Skip to content

fix(desktop): drop Restart-Agent label distinction, standardize on 2-way UX - #46

Merged
yjc801 merged 1 commit into
mainfrom
claude/agent-primary-action-two-way
Aug 13, 2026
Merged

fix(desktop): drop Restart-Agent label distinction, standardize on 2-way UX#46
yjc801 merged 1 commit into
mainfrom
claude/agent-primary-action-two-way

Conversation

@yjc801

@yjc801 yjc801 commented Aug 13, 2026

Copy link
Copy Markdown
Owner

Summary

  • main has been red since PR fix(desktop): restore status-aware primary action label #42 merged: Desktop E2E Integration fails on profile.spec.ts:935, expecting the primary action's aria-label to become "Start agent" (and the dedicated Restart quick-action to disappear) after stopping a local agent.
  • Root cause: upstream PR Refine channel settings and profile panels block/buzz#5574 added that E2E expectation but never updated getManagedAgentPrimaryActionLabel's status-aware ternary ("Restart Agent" for a previously-stopped agent, "Start Agent" for one never started) to match. Its accidental full collapse (always "Start agent") happened to satisfy the new E2E test while breaking the old unit test (managedAgentControlActions.test.mjs). fix(desktop): restore status-aware primary action label #42 fixed forward by restoring that ternary, which flipped the failure back onto the E2E test.
  • Per JC's call in #buzz-dev, standardize on the simpler 2-way UX the E2E test expects: Stop / Start agent on the primary button, no "was previously stopped" distinction. The dedicated Restart quick-action (user-profile-agent-restart) already only shows while the agent is live, so it still covers the "restart a running agent" case unchanged.
  • Updated the stale unit test to match the new 2-way contract.

Test plan

  • managedAgentControlActions.test.mjs — all 24 unit tests pass (node --import ./test-loader.mjs --experimental-strip-types --test)
  • just gate — clean
  • pnpm build:e2e then playwright test --project=integration -g "renders agent profile ingress subviews" — previously-failing test now passes

…ry action

PR block#5574 added an E2E test expecting the primary action to always read
"Start agent" after stopping a local agent, but never updated
getManagedAgentPrimaryActionLabel's status-aware ternary to match — its
accidental full collapse happened to satisfy the new E2E test while
breaking the old unit test. #42 restored the old ternary, which flipped
the failure back onto the E2E test. Per JC, standardize on the simpler
2-way UX the E2E test expects: Stop / Start agent, no separate
"Restart Agent" wording on the primary button (the dedicated Restart
quick-action, shown only while live, already covers that case).

Signed-off-by: Junchao Yan <yjc801@gmail.com>
@yjc801
yjc801 merged commit c5ec800 into main Aug 13, 2026
24 checks passed
@yjc801
yjc801 deleted the claude/agent-primary-action-two-way branch August 13, 2026 00:53
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