Repository navigation
Conversation
…locked The Delete tooltip for an SSH or remote-runtime session said only "Only sessions on this device can be deleted.", without naming where the session lives or how to remove it there. Name the owning host and point at Copy Log Path so the user can delete the log on that host. The delete itself stays local-only: no runtime can validate a delete target on the owning host yet. Fixes stablyai#23556
…ce only where safe Fold of the review findings on the remote Delete tooltip: - Name the host by its display label (the user's rename, the SSH target's label or the runtime environment's name), resolved in VaultSessionRow with selectExecutionHostDisplayLabel, instead of the generated target id or environment UUID. - Give the "copy its log path and delete the session's files" advice only for a row Orca could delete locally. A remote synthetic row (a session inside a shared SQLite database) or an unsupported agent gets a host-naming refusal without it. - Say "the session's files", since a local delete also removes companion files. - Replace the host-priority test that used a deletable agent with one that uses an unsupported agent. Fixes stablyai#23556 Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. 🧰 Additional context used📚 Code guidelines (1)No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (10)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe deletion-block check now uses a host label for remote sessions. It distinguishes general remote sessions from sessions with synthetic paths or unsupported agents. English, Spanish, French, Japanese, Korean, and Chinese messages and tests cover the updated reasons. AiVaultSessionRow resolves the host label from the app store and passes it to the check. Priority: ➖ Normal Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to The remote-session Delete tooltip changes appear mergeable after normal checks. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 4 files. (6 skipped: 6 unsupported.)
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 |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Remote host label in the Delete tooltip —
aiVaultSessionDeleteBlockedReasonnow takes a resolvedhostLabeland names the host for SSH/runtime sessions instead of the generic "only this device" sentence. - Reason-specific remote copy — synthetic rows and unsupported-agent rows get their own remote sentences; only a remote row Orca could delete locally gets the "copy its log path and delete the files on the host" instruction.
- Label resolution —
VaultSessionRowresolves the label with the existingselectExecutionHostDisplayLabelselector and passes it in; the raw generated id no longer reaches the message. - i18n —
deleteReasonNonLocalHostis replaced bydeleteReasonRemoteHost, withdeleteReasonRemoteHostSyntheticPathanddeleteReasonRemoteHostUnsupportedAgentadded in all six catalogs; English fallbacks matchen.jsonand placeholders line up. - Tests — unit tests pin each remote branch and assert the raw host id never appears; row tests verify SSH and runtime labels come from the store.
I verified the hand-delete advice is only reachable where Copy Log Path is present (onCopyPath and onRequestDelete share the searchPathAllowed gate in AiVaultVirtualRow, and both are unconditional in AiVaultSessionVirtualList), and that the repeated {{value0}} in the remote-host string is handled by i18next (the repo already uses that pattern in localBaseRefRefreshFailedDetailDirty). The changed test files pass locally (19 tests).
One non-blocking note, already called out in the PR body: an SSH target reached through a runtime environment is labelled from the local target list, so an unknown target still shows the generated id. AiVaultSession carries no environment id, so this can't be resolved from the row alone — not a regression, just a remaining edge of "name the host by its label".
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏
|
Thanks @brynnclaw for #25169. You were right that a remote row should name its host by the label the user gave it, not its generated id. We went one step further in #33906: Delete on a paired-server or SSH-managed session now asks that machine to delete it, and only an older server shows "Update to delete its sessions from here." That message and the confirmation use the host label your PR introduced, and you're credited as co-author. Closing this in favor of that one. |

ELI5
When you try to delete an agent session that lives on an SSH host or a remote Orca server, Orca refuses, and until now it didn't say where the session was. Now the message names the machine by the name you gave it, and it only tells you to remove the session there by hand when that is safe to do.
What Changed
<host>. Orca can only delete sessions on this device, so copy its log path and delete the session's files on<host>."<host>, and it can't be deleted from Orca." No hand-delete instruction, because the copied path is the database that holds every session on that host.<host>, and<Agent>sessions can't be deleted from Orca."VaultSessionRowresolves the host label from the store with the existingselectExecutionHostDisplayLabeland passes it toaiVaultSessionDeleteBlockedReason(src/renderer/src/components/right-sidebar/ai-vault-session-deletability.ts). The function still reaches the same deletable-or-not result for every row. For a remote row it now runs the synthetic-path and agent checks too, so it can pick the right sentence. The old catalog keydeleteReasonNonLocalHostis replaced bydeleteReasonRemoteHost, and two keys are added,deleteReasonRemoteHostSyntheticPathanddeleteReasonRemoteHostUnsupportedAgent, in all six locale catalogs (en, es, fr, ja, ko, zh). The main-process validator (validateAiVaultSessionDeleteTarget) is untouched and still refuses non-local hosts.Why
The issue offers two acceptable outcomes: proxy the delete to the execution host, or have the UI say where the session lives and how to delete it there. This PR takes the second path, on purpose:
fs.deletePathwould skip those checks, so a delete from the panel would be less safe than a local one. Adding that operation is a new relay/runtime contract, which is the work tracked in [Feature]: Allow deleting AI Vault sessions that live on a Remote Orca Server #13471 and too big for a bug fix.ssh-<timestamp>-<random>) and runtime environment ids are UUIDs, so the message uses the display label the host picker and other host-facing messages already use.session-env/<id>/, and the whole session directory for some agents).Linked Issue
Fixes #23556
Visual Proof
Tooltip text change only, with no layout or styling change. Before/after screenshots are still to be attached (they could not be captured in the headless environment this was built in). Text of each case, for a host labelled "Build box":
Testing
src/renderer/src/components/right-sidebar/ai-vault-session-deletability.test.ts:blocks ssh- and runtime-hosted sessions, naming the host by its label(a generatedssh-<ms>-<rand>id and a runtime UUID; the id never appears in the message)never tells the user to delete a remote synthetic row by handnames the host alongside the unsupported-agent reason, with no delete instruction(replacesprioritizes the host gate over the unsupported-agent reason, which usedclaude, a deletable agent, so it could not test that)src/renderer/src/components/right-sidebar/AiVaultSessionRow.test.tsx, newVaultSessionRow remote Delete reasonblock: the Delete menu item of a rendered row names an SSH host by its store label and a runtime host by its environment name, not by the id.All five new tests fail against the earlier revision of this change (which printed the raw id and gave the hand-delete instruction for every remote row). All pass now. Each guard was also checked by mutation: passing the raw id label from the row, and skipping the synthetic or agent check for remote rows, each turns a named test red.
Ran the deletability test plus the row tests that render the tooltip (
AiVaultSessionRow.test.tsx,AiVaultVirtualRow.test.tsx,SessionRowTrailingActions.test.tsx): 24/24 pass.Also ran the whole
right-sidebartest directory (262 files, 2229 tests) and thei18ntest directory (21 files, 203 tests): all pass.pnpm lintpasses, including the localization catalog, extraction and coverage checks.tsc --noEmit -p config/tsconfig.node.jsonpasses.config/tsconfig.tc.web.json, the renderer config, ran out of the 8 GB memory limit of the build environment, so it is left to CI.pnpm run build:electron-vitepasses. The fullpnpm testand the other build steps are also left to CI. Linux only.I manually tested these changes locally
Automated tests added/updated, or explained why not below
AI Disclosure
Claude Opus 5.5 (claude-opus-5-5), Anthropic.
Review
Reviewed before submission by an automated reviewer against the change and its tests.
Agent skill upstream boundary
docs/reference/agent-skill-sharing-upstream-boundary.mdand copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.Notes
AiVaultVirtualRowpasses neither action for such a row).Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)