From 99c614cd541677e6addbdbb228fb50ac5e784500 Mon Sep 17 00:00:00 2001 From: iris Date: Fri, 28 Aug 2026 02:31:16 +0200 Subject: [PATCH] =?UTF-8?q?agent:=20address=20argus=20review=20notes=20?= =?UTF-8?q?=E2=80=94=20stale=20comment=20+=20CI=20typecheck=20wiring?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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. --- .../agent/src/components/StatusChips.tsx | 6 ++--- nix/checks.nix | 26 +++++++++++++++++++ 2 files changed, 29 insertions(+), 3 deletions(-) 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