Skip to content

chore: remove low-value test files (batch 1)#1489

Open
SingleMai wants to merge 2 commits into
mainfrom
chore/remove-low-value-tests-1
Open

chore: remove low-value test files (batch 1)#1489
SingleMai wants to merge 2 commits into
mainfrom
chore/remove-low-value-tests-1

Conversation

@SingleMai

@SingleMai SingleMai commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Summary

Remove 4 low-value test files (43 lines):

    • hardcoded boolean test
    • function existence check (zero value)
    • simple string mapping test
    • CSS class name test

These tests provide minimal value and add maintenance overhead.


🤖 Generated with Claude Code


Open in Devin Review

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.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

View 4 additional findings in Devin Review.

Open in Devin Review

| "onSubmitGuidance"
| "onCapabilitySettingsRequest"
| "onSlashStatusOpen"
| "onSlashStatusClose"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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().
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant