From 1c43ff3061004da9d388906b50036ee534813711 Mon Sep 17 00:00:00 2001 From: imccyu <276526105+imccyu@users.noreply.github.com> Date: Tue, 28 Jul 2026 23:41:19 +0800 Subject: [PATCH] test(goal): close the per-file coverage gaps for the goal surface MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - projection.spec covers applyGoalProjection's non-message early return and the foreign-change-kind arm directly (the pure-function posture the unit requires — a throwing apply would tear down the registry drive). - New ui-goal browser-plugin spec exercises the plugin body over a real cordis Context with fake faces: dock registration (id/order), verbs reading the CAS ref from the current projected value, the no-current-goal short circuit, RPC-error mapping, HMR disposal, the GoalDock adapter's three projection states, and the inert node half. --- .../client/ui-goal/src/client/GoalBar.tsx | 6 +- packages/client/ui-goal/src/client/slots.ts | 8 +- .../ui-goal/tests/browser-plugin.spec.tsx | 167 ++++++++++++++++++ .../client/ui-goal/tests/goalbar.spec.tsx | 8 +- packages/goal/goal/src/index.ts | 4 + packages/goal/goal/tests/projection.spec.ts | 16 +- 6 files changed, 196 insertions(+), 13 deletions(-) create mode 100644 packages/client/ui-goal/tests/browser-plugin.spec.tsx diff --git a/packages/client/ui-goal/src/client/GoalBar.tsx b/packages/client/ui-goal/src/client/GoalBar.tsx index ea38c0dc8c..197c000926 100644 --- a/packages/client/ui-goal/src/client/GoalBar.tsx +++ b/packages/client/ui-goal/src/client/GoalBar.tsx @@ -77,8 +77,8 @@ export function GoalBar({ goal, onEdit, onResume, onClear }: GoalBarProps) { type="text" aria-label="Goal objective" value={draft} - onChange={e => setDraft(e.target.value)} - onKeyDown={e => { + onChange={(e) => { setDraft(e.target.value) }} + onKeyDown={(e) => { if (e.key === 'Enter') void handleEdit() if (e.key === 'Escape') setEditing(false) }} @@ -99,7 +99,7 @@ export function GoalBar({ goal, onEdit, onResume, onClear }: GoalBarProps) {