diff --git a/frontend/packages/agent/src/components/StatusChips.tsx b/frontend/packages/agent/src/components/StatusChips.tsx index b4e674b6..72ebe367 100644 --- a/frontend/packages/agent/src/components/StatusChips.tsx +++ b/frontend/packages/agent/src/components/StatusChips.tsx @@ -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'; diff --git a/nix/checks.nix b/nix/checks.nix index 0944d240..776de524 100644 --- a/nix/checks.nix +++ b/nix/checks.nix @@ -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