chore: remove low-value test files (batch 1)#1489
Conversation
Signed-off-by: liying <422107224@qq.com>
- Remove function existence tests (publicExports.test.ts) - Remove hardcoded constant tests (analyticsDebugMode.test.ts) - Remove simple string mapping tests (IssueManagerStatusBadge.test.ts) - Remove CSS class name tests (workspaceFileManagerIconGridLayout.test.ts) - Remove duplicate CSS z-index tests (theme.spec.ts in dist) These tests provide minimal value and add maintenance overhead.
| | "onSubmitGuidance" | ||
| | "onCapabilitySettingsRequest" | ||
| | "onSlashStatusOpen" | ||
| | "onSlashStatusClose" |
There was a problem hiding this comment.
🟡 Closing the status panel never cancels its in-flight status lookup
The status panel's close signal is silently dropped before reaching the composer's command logic (onSlashStatusClose is never forwarded into useComposerSlashActions at packages/agent/gui/agent-gui/agentGuiNode/AgentComposer.tsx:354-371), so closing the panel no longer cancels its still-running status lookup.
Impact: A slow status lookup keeps running after the user closes the status panel instead of stopping, and the intended cancel-on-close behavior does nothing.
Incomplete wiring of the new onSlashStatusClose callback
This PR introduced a new onSlashStatusClose callback and wired it in most places: it was added to AgentComposerProps (packages/agent/gui/agent-gui/agentGuiNode/composer/AgentComposer.types.ts:296), consumed inside useComposerSlashActions (destructured at packages/agent/gui/agent-gui/agentGuiNode/composer/useComposerSlashActions.ts:130 and invoked from closeSlashStatusPanel (:166), closeSlashFloatingMenu (:187), and the showStatus/showReviewPicker/activateGoalMode effects (:253,:261,:269)), and threaded through AgentGUIDetailPane's bottomDockComposerProps (packages/agent/gui/agent-gui/agentGuiNode/view/AgentGUIDetailPane.tsx:425).
However AgentComposer.tsx — which is the component that actually calls useComposerSlashActions — only destructures onSlashStatusOpen (AgentComposer.tsx:134) and only passes onSlashStatusOpen into the hook (AgentComposer.tsx:371); onSlashStatusClose is never destructured from props nor passed to the hook. Because the field is optional, TypeScript does not flag the omission, so inside useComposerSlashActions onSlashStatusClose is always undefined and every onSlashStatusClose?.() call is a no-op.
As a result, when the user closes the /status panel via the Close button, dismisses the floating menu, toggles /status off, or switches to the review picker / goal mode, the host's handleSlashStatusClose (which calls AgentStatusController.close()) is never invoked. The controller keeps the slash-status request active (its subscription and 30-second timeout still pending) until the underlying read completes on its own or times out, contradicting the documented contract in docs/architecture/agent-gui-node.md:166-170 that closing /status cancels the request owned by that surface. The Agent Info popover and Agent Config menu close paths are unaffected because they invoke their close callbacks directly rather than through the composer.
Prompt for agents
The new onSlashStatusClose callback is consumed by useComposerSlashActions (it is in the Props Pick and is destructured/used in closeSlashStatusPanel, closeSlashFloatingMenu, and executeSlashCommandEffect), but the component that calls useComposerSlashActions, packages/agent/gui/agent-gui/agentGuiNode/AgentComposer.tsx, never forwards it. AgentComposer.tsx destructures onSlashStatusOpen from props (around line 134) and passes only onSlashStatusOpen into the useComposerSlashActions({...}) call (around line 371), so onSlashStatusClose is always undefined inside the hook and every onSlashStatusClose?.() is a no-op. Fix by destructuring onSlashStatusClose from props in AgentComposer.tsx and adding onSlashStatusClose to the object passed to useComposerSlashActions, mirroring how onSlashStatusOpen is handled. This restores the intended cancel-on-close of the slash-status request through AgentStatusController.close().
Was this helpful? React with 👍 or 👎 to provide feedback.
Summary
Remove 4 low-value test files (43 lines):
These tests provide minimal value and add maintenance overhead.
🤖 Generated with Claude Code