Fix inverted play/pause glyphs on the site status toggle and add a status tooltip - #4374
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Collaborator
📊 Performance Test ResultsComparing a681916 vs trunk app-size
site-editor
site-startup
Results are median values from multiple test runs. Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff) |
wojtekn
approved these changes
Jul 28, 2026
wojtekn
left a comment
Contributor
There was a problem hiding this comment.
Looks good, works as expected. Left one comment regarding code readability.
| // the pointer events the tooltip listens for, hiding the status exactly | ||
| // while the site is transitioning. | ||
| const inert = disabled || pending; | ||
| const statusName = pending |
Contributor
There was a problem hiding this comment.
Chained ternary is not really readable, I would split it if possible.
Contributor
Author
There was a problem hiding this comment.
Good call — split into a getLocalServerStatusName() helper with early returns in a681916.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 task
shaunandrews
added a commit
that referenced
this pull request
Jul 29, 2026
…ure (#4379) ## Related issues - Related to #4374 and #4307. ## How AI was used in this PR AI traced the failure to its origin, wrote the fix, and verified it. `npm run typecheck` and the affected suite were run locally and reviewed. ## Proposed Changes `trunk` is currently red on both **Unit Tests** and **Lint**. This fixes it. Two PRs landed the same day and conflicted semantically rather than textually, so nothing blocked either one: - #4307 changed the `renderMainView` test helper to take an options object (`{ siteOverrides, activity }`) instead of a bare site-overrides argument, updating the call sites that existed at the time. - #4374 was branched before that and added two calls using the previous signature, then merged about seven hours later. Git merged both cleanly — the two PRs touched different lines of the same file — but the calls no longer match the helper. `{ running: false }` is now swallowed as the options object, `siteOverrides` falls back to `{}`, and the site under test stays *running*. One test then looks for a stopped-site toggle that was never rendered. The second call site is worth noting: it fails typecheck but still passes, because that test sets `starting` and the pending label wins regardless of `running`. It was quietly asserting against a running site while reading as though it covered a stopped one. Both call sites now pass the override through properly, so that coverage is real again. No production code changes — this is test-only, and the behavior #4374 shipped is unaffected. ## Testing Instructions 1. `npm test -- apps/ui/src/components/site-dropdown/main-view.test.tsx` — 9 passing. 2. `npm run typecheck` — clean; on `trunk` it reports two `TS2353` errors in this file. 3. Confirm CI is green on both Unit Tests and Lint (the Lint job runs `npm run lint` followed by `npm run typecheck`, which is why one root cause turned two checks red). ## Pre-merge Checklist - [x] Have you checked for TypeScript, React or other console errors? Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.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.
Related issues
How AI was used in this PR
Claude located the inverted ternary, confirmed the glyph semantics against the CSS module (
.pauseIconrenders two bars,.playIconrenders a triangle), and applied the one-line swap. It then mirrored the sidebar'sSiteStatusButtontooltip pattern onto the dropdown toggle and added the test coverage. Reviewed by me.Proposed Changes
The icons for the play/pause toggle in the Site Menu were reversed; you clicked play to stop, and pause to start. The PR changes that so you click pause to stop, and play to start. I also added a tooltip, and generally matched the behavior of the toggle buttons in the sidebar.
Testing Instructions
:disabledto[aria-disabled='true'].