Repository navigation
feat(ui): show the chosen machine glyph on project machine subtitles (OH-47) - #19
Merged
Merged
Conversation
…(OH-47) Project headers named the machine in text only, so a machine's chosen icon and color never reached the grouped session list. Render the shared MachineDisplayGlyph for the machine the subtitle names, scoped to its Home. The synthetic unknown machine stays text-only.
…(OH-47) Project headers dropped the glyph along with the machine name, and neither reached assistive technology. Render the shared SessionMachineIdentity so the glyph stays when names are hidden, and add the name to the header's label. Turning off machine identity on rows as well removes the glyph. Repository checkout menus now show each machine's glyph, so checkouts with the same label and path stay distinct.
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.
What changes
Project headers named their machine as plain text, so a machine's chosen icon and color never appeared on that surface. Repository checkout menus had the same gap.
ProjectGroupHeadernow renders the sharedSessionMachineIdentity, in a newsubtitlevariant that keeps the header's text size, color and width. The icon and color follow the same preference owner as rows and machine-group headers, and the glyph updates live when the preference changes.item.machine.id, the machine the subtitle names, so the label and icon cannot disagree. This also covers a header with noworkspaceScopeHint.unknownmachine stays text-only, filtered through the existingnormalizeKnownProjectMachineId, so it shows nothing when names are hidden. Single-machine lists show no glyph.session-list-project-machine:<groupKey>testID on the subtitle row.docs/fork-development.md.Decision recorded: Settings > Session > Machine names hides only the name on project headers. The glyph stays, with the name in its tooltip and accessibility text, because the ticket wants the icon and color to identify a machine when its label is hidden. Turning off "Machine on session rows" as well removes the glyph, so there is still a way to hide it. With names on, the name shows regardless of that row setting, as before.
Decision recorded: triage suggested
workspaceScopeHint.machineId. I useditem.machine.idbecause the hint is null without a server or path, and it is routing data rather than the subtitle's identity. Both producers set them to the same machine whenever both exist.Validation
RED: new owner test in
SessionsList.nativeVirtualization.test.tsxfailed withexpected [] to deeply equal [ ObjectContaining{ name: 'laptop' } ], because the header rendered no glyph.GREEN: the same test passes. It covers per-Home icon and color, a missing scope hint, the unknown machine, the single-machine list, glyph-only headers, both machine settings off, and the accessibility label.
Review follow-up RED: the accessibility label failed with
expected '/repo' to be '/repo, Studio', and the new repository menu test failed withexpected [] to deeply equal [ 'laptop', 'cloud' ]. The glyph-only case was shown real by removing the fix:expected [] to deeply equal [ ObjectContaining{…} ]. All three pass now.List wiring: a new test mounts the full
SessionsListand checks that turning off "Machine on session rows" reaches the mounted project header. Replacing the wired setting with a constant fails it withexpected true to be false.Touched owner tests on this head:
SessionsList*,SessionMachineIdentity.test.tsxandChatHeaderView, 15 files, 236/236 pass. On this heavily loaded machine, the folder suite's first test hit the 60 s per-test limit in two earlier runs, and every later test in that file then failed on the unmounted renderer. The same file passed 41/41 with a longer limit, and then the whole set passed at the default limit. No timeout was changed in the repository.apps/uitypecheck and@happier-dev/teststypecheck pass.Browser (Chrome, web export): the full
sessionList.orderingMode.spec.tspasses 7/7 on this head. Its project glyph case picks Laptop for one of two machines, checks that only that machine's project subtitle glyph changes, then hides machine names and checks the glyphs stay without the text.The repository checkout menus are covered by the owner test only, not in a browser.
The browser case was only run against the fix. It depends on the new testID, so it has no separate RED; the RED evidence is the owner test above.
Hosted CI (
CI — Tests) passed on this head on attempt 2. Attempt 1 had two unrelated failures, so failed jobs were rerun once:sync.sessionOrganizationWarmCache.test.tshit the default 1 svi.waitForlimit at 1007 ms. That file is not touched here, and it passes locally on this head.Copilot review did not arrive within 15 minutes of marking the PR ready. No review threads were opened.
Full UI suites were not run; hosted CI owns them.
Scope and deferrals
serverId.Tracks OH-47.