agent: address argus review notes — stale comment + CI typecheck wiring

- StatusChips.tsx: drop the stale 'useAgentState lands in a later
  commit' comment now that Root.tsx already wires it.
- nix/checks.nix: add agent-typecheck, same shape as swarm-ui-typecheck,
  so a real TS error in the agent package fails CI instead of just
  esbuild-stripping silently.
This commit is contained in:
iris 2026-08-28 02:31:16 +02:00
commit 99c614cd54
2 changed files with 29 additions and 3 deletions

View file

@ -6,9 +6,9 @@
// badge here IS the control for what it displays, composed from
// `@hive/shared`'s `Badge`/`Dropdown` (../../shared/src/badge,
// ../../shared/src/dropdown). Presentational only: formatting +
// selection state live in the caller (a `useAgentState` hook lands in a
// later commit), so this component can be demoed and reviewed against
// plain sample data before it's wired to `/api/state` polling.
// selection state live in the caller (`Root.tsx`, via the
// `useAgentState` hook), so this component can still be demoed and
// reviewed against plain sample data independent of live `/api/state`.
import { useState } from 'preact/hooks';
import { Badge, type BadgeTone } from '@hive/shared/badge.js';
import { Dropdown, type DropdownOption } from '@hive/shared/dropdown.js';

View file

@ -175,6 +175,32 @@ in
'';
};
# Same rationale + shape as `swarm-ui-typecheck` above, for the `agent`
# package now that its Preact rewrite (hyperhive#3685) has grown enough
# real `.tsx`/`.ts` for a type error to matter — argus flagged the same
# gap on that PR's review.
agent-typecheck = pkgs.buildNpmPackage {
pname = "hyperhive-agent-typecheck";
version = "0.0.0";
src = ../frontend;
npmDepsHash = builtins.readFile ../frontend/npm-deps-hash;
buildPhase = ''
runHook preBuild
npm run typecheck --workspace=packages/agent
runHook postBuild
'';
dontNpmInstall = true;
installPhase = ''
runHook preInstall
mkdir -p $out
touch $out/ok
runHook postInstall
'';
};
# `hivectl` CLI reference freshness check. The committed
# markdown at `docs/tools/hivectl-cli.md` is the rendered
# output of the hidden `hivectl markdown-docs` subcommand