Show workspace card project and host identity
Summary
Fixes #7196 — make the workspace project name and host name first-class, toggleable identity on workspace cards.
- Add two card display properties, Project Name (
project-name) and Remote Hostname (host-name), selectable from the Card display menu alongside the existing properties. - Show the project (repo) label on cards in the ungrouped list, and suppress it while grouping by project (the group header already carries it). The Project Name toggle is hidden in that grouping mode, and its stored selection is preserved when the grouping rule changes back.
- Surface the host name only for non-local (SSH/remote) hosts, rendered next to the primary badge in the card title row (compact and detailed).
- Default both on for new profiles, and add a one-shot persistence migration so existing profiles pick them up once (
_identityWorktreeCardPropertiesDefaulted) while a later deliberate uncheck still sticks. - Localize the two labels (ko/ja/es/zh).
- Extend renderer + persistence tests to cover the toggles, the grouping/opt-out behavior, and the migration.
Screenshots
Testing
- [x]
pnpm lint(oxlint, switch-exhaustiveness, localization catalog + coverage) - [x]
pnpm typecheck(node, cli, web) - [x]
pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/components/sidebar/WorktreeCard.quick-actions.test.tsx src/renderer/src/components/sidebar/worktree-list-groups.test.ts src/renderer/src/components/sidebar/sidebar-workspace-option-items.test.ts src/shared/worktree-card-properties.test.ts src/main/persistence.test.ts— 379 passed - [x]
pnpm build:desktop - [x]
pnpm test— full suite still has unrelated mainline failures noted on this branch's ancestry - [x] Manual: exercised the toggles, grouping, and existing-profile migration in the dev app (badges appear/disappear with each toggle; migration flips identity on once after restart)
AI Review Report
- Cross-platform: renderer display logic plus a provider-neutral persistence migration; no platform-specific branches added.
- SSH/remote/local: host identity is only surfaced for non-local execution hosts; local worktrees are unaffected.
- Agent/integration/git-provider compatibility: provider-neutral card-property display only; no provider-specific branching.
- Performance: identity gating is
cardProps.includes(...)in existing render paths; the migration runs once at load and no-ops thereafter. - UI quality: identity stays visible where it disambiguates cards and is hidden where the group header already shows it.
- Security: no credential, shell, filesystem, or network behavior changed. The one main-process change is a bounded UI-state migration (see below).
Security Audit
Scope: renderer sidebar display logic, the shared card-property model, localization catalogs, and a one-shot UI-state migration in src/main/persistence.ts. Note: unlike the earlier revision, this is no longer renderer-only — it adds a persisted UI-state migration in the main process.
Security areas checked:
- Input handling: no new user input parsing or execution path. Labels come from existing repo/host metadata and render through React text nodes.
- Command execution: no shell, subprocess, git, or agent execution behavior changed.
- Path handling: no filesystem path construction, traversal, or read/write behavior changed.
- Auth/secrets: no credential, token, session, or secret-storage logic touched.
- Dependencies: no dependency or lockfile changes.
- IPC: no Electron IPC channels, preload APIs, or trust boundaries changed.
- Persistence: the migration only appends the two identity properties to the persisted
worktreeCardPropertiesarray once (guarded by_identityWorktreeCardPropertiesDefaulted); it reads/writes UI state that the app already owns and adds no new sinks.
Risk assessment: low. The residual risk is UI clarity — host/project labels must not imply a different execution location than the underlying worktree metadata; identity is intentionally scoped to non-local hosts and to the ungrouped list. Migration and toggle behavior are covered by tests.
Notes
X handle: @__minhoryang__
[!NOTE]
Reviews paused
It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the
reviews.auto_review.auto_pause_after_reviewed_commitssetting.Use the following commands to manage reviews:
@coderabbitai resumeto resume automatic reviews.@coderabbitai reviewto trigger a single review.Use the checkboxes below for quick actions:
- [ ] ▶️ Resume reviews
- [ ] 🔍 Trigger review
📝 Walkthrough
Walkthrough
This PR adds project-name and host-name worktree card properties, updates the default property order, and extends persisted UI migration state to default those properties once. It also adds sidebar menu options and locale strings for the new identity labels, filters one identity option in the display menu when grouping by repo, and updates row building so host-context labels are computed per repo/group with local hosts omitted where applicable. Worktree card rendering now supports a labeled repo identity chip and moves the host-context badge into the header area, with tests covering the new behavior.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
| Check name | Status | Explanation |
|---|---|---|
| Linked Issues check | ✅ Passed | The changes implement the issue's project-name and host-name visibility, grouping behavior, defaults, and migration. |
| Out of Scope Changes check | ✅ Passed | The diff stays focused on workspace-card identity, migrations, i18n, and tests with no unrelated feature work. |
| Docstring Coverage | ✅ Passed | No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. |
| Title check | ✅ Passed | The title clearly summarizes the main change: making workspace card project and host identity visible. |
| Description check | ✅ Passed | The description matches the template with all required sections filled in, including summary, screenshots, testing, review, security, and notes. |
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands.
@coderabbitai full review
Full review finished.✅ Action performed
@coderabbitai full review
Full review finished.✅ Action performed
@coderabbitai review
Review finished. Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.✅ Action performed
@coderabbitai review
Review finished. Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.✅ Action performed
makes sense. will get to it soon
Readiness verdict — CONDITIONAL READY
Reviewed and validated exact head 341f8f1ec997c2650ca1711244d253555f837e40 against current origin/main. The implementation is ready from code, compatibility, and manual-behavior review; do not merge until the currently queued fork workflows complete successfully.
Findings
- P0: none.
- P1: none.
- P2: none remaining. The earlier hidden-property count issue is fixed by excluding the hidden project option from
visiblePropertyCount.
Readiness checklist
- Functional correctness: project identity renders on ungrouped, pinned, board, and folder-workspace cards; project identity is suppressed under project grouping; local host identity is suppressed; non-local labels are derived even when callers omit a precomputed label.
- Persistence/data loss: the migration is one-shot and preserves later opt-outs. Legacy writes preserve identity membership; current clients retain pending identity choices while paired to legacy hosts and synchronize them after host upgrade.
- Mixed-version remote wire: capability-negotiated as
ui.worktree-card-identity-properties.v1; old clients receive arrays without new members, and new clients strip unsupported members before sending to old hosts. No unnegotiated opcode was added. - SSH/network boundary: display-only identity uses execution-host metadata and does not change process liveness, stop/list behavior, retry policy, or the
live/unverifiable/exitedverdict contract. - Crash/cast/retry/growth: no new retry loop, queue, listener, timer, unchecked cast, or unbounded collection. Migration and pending identity state are bounded two-member sets.
- Security/supply chain: no dependency or lockfile change; no new command, shell, path, credential, auth, or network sink. Labels render as React text.
- Performance/resources: render work is bounded property membership/label selection; no new polling or background work.
- Cross-platform/providers: no platform-specific keyboard/path/process logic and no GitHub-only review behavior. Windows was exercised directly; GitLab/provider-neutral paths are unchanged.
- Folder/mobile assessment: folder workspace rows receive project context and are covered by focused tests. Mobile protocol consumers remain compatible because legacy peers do not receive the new array members; no mobile-only UI or persistence schema was changed.
Tests by machine
macOS local, exact head
pnpm typecheck— passed.pnpm lint— passed on the final rebased SHA, including reliability, max-lines, Electron-ratchet, skill, and localization gates.pnpm build:desktop— passed on the final rebased SHA.- Focused compatibility/persistence/folder/grouping suite — 8 files, 60 tests passed:
src/shared/worktree/card-properties.test.ts,src/main/persistence-worktree-card-properties.test.ts,src/main/runtime/rpc/methods/client-ui-card-identity-compat.test.ts,src/renderer/src/web/web-preload-api-card-identity-compat.test.ts,src/renderer/src/components/sidebar/sidebar-workspace-option-items.test.ts,worktree-list-groups-host-collision.test.ts,worktree-list-groups-host-labels.test.ts, andworktree-list-groups-project-host-setups.test.ts. WorktreeCard.quick-actions.test.tsx— 34/34 passed.WorktreeCard.pinned-repo-icon.test.tsx— 4/4 passed.
Windows awin, exact head in C:/Users/neil/orca/workspaces/orca/pr-7216-win-proof
pnpm install --frozen-lockfile— passed.- Same 8-file focused suite — 60/60 passed.
pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/components/sidebar/WorktreeCard.quick-actions.test.tsx src/renderer/src/components/sidebar/WorktreeCard.pinned-repo-icon.test.tsx— 38/38 passed.pnpm typecheck— passed.pnpm build:desktop— passed.- Real headful Electron build attached through Playwright CDP on port
17216: changed Workspace options → Group by → None, observed project labels in rendered card DOM, and verified backing state throughwindow.api.ui.get()asgroupBy: "none", identity propertiesproject-name+host-name, and_identityWorktreeCardPropertiesDefaulted: true.
Visual proof
Fresh uncropped Windows Electron viewport from exact head:
The isolated proof profile had local-host cards only, so Remote Hostname was correctly not painted; its enabled backing-state toggle was verified through CDP, and non-local host painting is covered by the host-label and card-rendering suites above.
Residual risks and merge blockers
- Two broad remote-runtime tests previously hit machine-contention timing failures unrelated to these assertions: the keepalive timeout in
remote-runtime-client.test.tsand the 3 MB admission wait inremote-runtime-shared-control-connection.test.ts. Capability-auth expectations and all identity compatibility assertions passed; current fork CI remains the independent clean-run gate. - Exact merge blocker: GitHub reports the PR
MERGEABLEbutUNSTABLE;detect code-relevant changes,test vs non-test LoC, androot directory guardare currently queued. Merge only after all required checks finish successfully.
+1, this would fix a real problem for us. Thanks for putting it together, @minhoryang.
Our setup: Orca 1.4.221 on a Mac, plus an always-on Linux dev box paired as a Remote Orca Server. We work almost entirely in folder workspaces (one per ticket, at the parent folder that holds our repos), with the sidebar grouped by status.
Repo workspace cards show the host chip, but folder workspace cards only show the folder path, so the only ways to tell whether a session is running on the Mac or on the dev box are reading the path or opening Cmd+J. The "remote host context for folder workspace cards" case in this PR is exactly what we need.
It looks like the branch now conflicts with main. Could a maintainer take a look once it's rebased?