Skip to content

feat(ui): name the workspace on every session row and header (OH-77) - #23

Merged
andorcassian merged 4 commits into
devfrom
feature/OH-77-session-project-label
Nov 4, 2026
Merged

andorcassian merged 4 commits into
devfrom
feature/OH-77-session-project-label

Conversation

@andorcassian

@andorcassian andorcassian commented Nov 4, 2026 •

Copy link
Copy Markdown
Collaborator

What changes

Every session row and the session detail header now name the session's workspace, in every grouping and density.

  • One owner: resolveSessionWorkspacePresentation gains identityLabel. Rows, through the reachability display, and the header, through useSessionWorkspacePresentation, both read it.
  • Worktrees: a worktree shows its repository when a stored association covers it, not the generated directory name.
  • Names only: a repository with a remote identity shows the identity's final segment. POSIX and Windows paths both reduce. A repository group the user named is shown as typed, slashes included.
  • No borrowed names: an association with no remote identity only records the checkout that was discovered first, so every checkout in it keeps its own directory name, unless the user chose a repository for it.
  • Rows: the label joins the title row's identity group, before the agent and machine, so a narrow row wraps as one unit. If the row's path line is showing, the path line already carries the name and the title row leaves it out. A draft preview that replaces the path line brings the label back.
  • Hover and focus: SessionIdentityHoverAnchor is extracted from SessionMachineIdentity and shared by the row label, the path line and the header subtitle. Focus opens the tooltip only for keyboard focus, so clicking a row does not pin it. This also applies to the machine identity.
  • Accessibility: the row's accessible name includes the workspace name, because the row groups its children on native.
  • Docs: the sidebar section of the app docs describes the label.

Decisions taken:

  • Precedence: explicit custom workspace label, then repository association display name, then directory final segment. This matches the custom-first rule in ProjectGroupHeader.
  • Path display mode: the normal label never shows a full path, whichever mode is set. The Workspace names setting still controls project group headers, but no longer the session header.
  • Discovery is not widened: only stored associations are read. A worktree whose repository has never been discovered shows its directory name until the Repository view or a launch from the app records it.
  • Foreign Homes: associations are keyed by account. useServerAccountScopes, extracted from the Repository view, reads each foreign Home's account from local credentials in every grouping, and rows and the header both use it. Until that read lands, a foreign session shows its custom label or directory name. The active Home is answered synchronously and starts no read. This never starts SCM or RPC work. A side effect: group-order writes for a foreign Home now carry its account id in every grouping, not only in Repository and flat views.
  • Ellipsis: the row label truncates at the end. The header keeps its existing start ellipsis for non-custom names, the same as the path line. The header's hover anchor is capped at its column width so the ellipsis holds on web.

Validation

Run on the branch's last commit before dev was merged in, unless noted. Hosted CI passed every lane on that commit, including the four UI E2E shards.

  • RED, before the first commit: 23 failed, 32 passed across the owner test files, on missing identityLabel values and absent label nodes.
  • RED, before the review fixes: an identity-less checkout took its sibling's name (generated-16 instead of generated-17); Client/Web showed as Web; foreign Home rows, header and the scope hook had no account outside Repository mode; the header anchor overflowed its column on web (992px right edge in a 717px column); and the header re-rendered once more for the active Home after the account read settled.
  • Owner unit slice: 107 files, 1282 tests passed. It covers the presentation owner, sessionMachineTarget, the session model hooks, reachability, view state, SessionView, SessionItem, SessionsList, the row model, ChatHeaderView, the hover anchor and SessionMachineIdentity.
  • Browser: sessionList.repositoryView.spec.ts, full file in Chrome, 3 passed. The new test checks a long name truncated inside its column on the row at 820px and on the header at 820px and 390px, with the full name in the tooltip. The 390px screenshot was inspected.
  • apps/ui typecheck and tests package typecheck: both exit 0.
  • After merging dev twice: the first merge brought in OH-54, and its one conflict was the row accessible label, which now keeps both the workspace name and the machine name that OH-54 always includes. The second brought in OH-47, and its one conflict was SessionMachineIdentity, which now keeps this change's shared hover anchor together with OH-47's subtitle variant and per-variant styles. After the second merge, 20 test files passed (261 tests): SessionMachineIdentity, the hover anchor, every SessionItem file, ProjectGroupHeader, SessionsList native virtualization and ChatHeaderView. The apps/ui typecheck exits 0. Hosted CI on the final head passed every lane after one rerun of UI Unit Tests part 2, whose only failure was ModelPickerOverlay.test.tsx, a file outside this change that passes locally on the same head. Hosted CI on the first merge head passed every lane after one rerun of Production Build Smoke, whose runner ran out of disk while setting up Node.
  • Copilot did not post a review within 15 minutes of the PR being marked ready.
  • Full suites were not run locally. Hosted CI on the first head failed one shard, on newSession.resumeId.browseFill.spec.ts timing out after picking a machine in /new. That flow is outside this change, and the same test also fails on another open PR.

The spec's worktree test was already broken: it clicked session-list-ordering-menu-trigger, which no longer exists in the UI. It now uses session-list-group-menu-trigger, the same as the rest of the file.

Scope and deferrals

  • 0.3 port disposition is blocked because the destination checkout is absent.
  • Native QA is deferred: narrow phone rows, multiple hosts, Windows paths on a real machine, and screen reader checks of the row name.
  • Each visible label is a keyboard tab stop on web, which is what makes the focus tooltip reachable. Rows gain one tab stop each.
  • The row path line under a long name has no browser assertion: a new session does not render that line in this spec's flat setup.
  • Associations are still only learned in Repository mode or from a launch in the app. The ticket asks for the repository "when known", so discovery was not widened to every grouping.
  • The inbox context still resolves its own workspace name without associations, so it can differ from the row. It was out of scope here.

Tracks OH-77.

Resolve one identity label at the session workspace presentation owner:
explicit workspace label, then the stored repository association name,
then the directory's final segment. Rows and the detail header read that
value, so a worktree shows its repository and the label stays a name in
every path display mode.

Rows paint it in the title row identity group in every density and
grouping, unless the path line already carries it. Extract the machine
identity hover into a shared anchor for the full name on hover and
keyboard focus.
…ctly (OH-77)

Review fixes for the session workspace label:

- An association without a remote identity names only the checkout that
  was discovered first, so a sibling checkout keeps its own directory
  name unless the user chose a repository for it.
- A repository group the user named is shown as typed, slashes included.
- Extract the per-Home account read into useServerAccountScopes and use it
  in every grouping, so rows and the header resolve a foreign Home's
  stored association under that Home's account. The active Home is
  answered synchronously and starts no read.
- Cap the header identity anchor at its column width so web truncation
  holds, and cover long names at narrow widths in the browser spec.
@andorcassian
andorcassian marked this pull request as ready for review November 4, 2026 18:14
…project-label

# Conflicts:
#	apps/ui/sources/components/sessions/shell/SessionItem.tsx
…project-label

# Conflicts:
#	apps/ui/sources/components/sessions/SessionMachineIdentity.tsx
@andorcassian
andorcassian merged commit 3f2f2d3 into dev Nov 4, 2026
84 of 88 checks passed
@andorcassian
andorcassian deleted the feature/OH-77-session-project-label branch November 4, 2026 20:21
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