fix(desktop): drop Restart-Agent label distinction, standardize on 2-way UX - #46
Merged
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
mainhas been red since PR fix(desktop): restore status-aware primary action label #42 merged:Desktop E2E Integrationfails onprofile.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.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.user-profile-agent-restart) already only shows while the agent is live, so it still covers the "restart a running agent" case unchanged.Test plan
managedAgentControlActions.test.mjs— all 24 unit tests pass (node --import ./test-loader.mjs --experimental-strip-types --test)just gate— cleanpnpm build:e2ethenplaywright test --project=integration -g "renders agent profile ingress subviews"— previously-failing test now passes