Skip to content

Agentic UI: Dedupe the sidebar's site start/stop toggle into a shared hook - #4611

Draft
shaunandrews wants to merge 2 commits into
trunkfrom
stu-2162-dedupe-site-toggle
Draft

Agentic UI: Dedupe the sidebar's site start/stop toggle into a shared hook#4611
shaunandrews wants to merge 2 commits into
trunkfrom
stu-2162-dedupe-site-toggle

Conversation

@shaunandrews

Copy link
Copy Markdown
Contributor

Related issues

How AI was used in this PR

AI carved this from the larger site-header exploration as a standalone dedupe.

Proposed Changes

The sidebar's status button and its row context menu each re-implemented the same busy-guarded start/stop toggle. useToggleSiteRunning is now the single source; both consume it. The upcoming site header menu becomes a third consumer.

Testing Instructions

  1. In the sidebar, click a site's status dot — the site starts/stops as before, and the control no-ops while the site is busy.
  2. Right-click a site row — Start/Stop in the context menu behaves identically.

Verification completed

  • npm run typecheck · site-list suite 30/30

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?

… hook

The status button and the row context menu each re-implemented the same
busy-guarded start/stop toggle; useToggleSiteRunning is now the single source.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The hook had zero direct tests, and the sidebar's mock hardcoded busy: false,
so the busy no-op path was untestable. Add unit tests for
useToggleSiteRunning (start/stop/busy) and a sidebar test exercising the
disabled, no-op state. Also fix an overclaiming docstring and collapse the
row menu's two branches, now identical except their label, into one.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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