Skip to content

🤖 feat: clearer SSH+None trust feedback and one-click project default - #8123

Merged
ammario merged 5 commits into
mainfrom
ssh-dir-trust-feedback
Nov 11, 2026
Merged

ammario merged 5 commits into
mainfrom
ssh-dir-trust-feedback

Conversation

@ammar-agent

@ammar-agent ammar-agent commented Nov 10, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Follow-up to #8110. This PR improves the SSH+None trust experience on the new-workspace page:

  • Trusting a directory now gives visible feedback while it runs, and the result stays put.
  • The trust row is redesigned.
  • A Set as default action saves the shown isolation as the project's default in one click.

Screenshots

Dark theme, new-workspace page, Project isolation = SSH and Workspace isolation = None.

Untrusted: the trust row sits under the sentence; Set as default is at the end of it.

Untrusted directory row with Trust directory button and Set as default

Trusting a ~ path: the host resolves it over SSH; the status says so while the button shows a spinner.

Trusting state: Resolving ~/app on 10.255.255.1

Error (unreachable host), shown under the status text:

SSH timeout error under the trust row

Trusted, then Set as default clicked (it now reads ✓ Default):

Trusted directory row with Untrust

Default state after Set as default

375px, trusted and untrusted:

Phone width, trusted Phone width, untrusted

Background

A user reported that pressing Trust directory on the new-workspace page gave no feedback, even though the backend saved the trust. A sub-agent reproduced this against the real backend with throwaway sshd hosts. It found two problems:

  • The trust was only kept on screen by a copy-back. The row decides "trusted" by comparing the path as typed (~/app) with the stored entries. The backend stores the path as resolved on the host (/home/me/app). The two matched only because the UI copied the resolved path back into the field after the request. That copy is skipped if the user switches isolation or project, leaves the page, or edits the field before the reply arrives. After that, the field and the remembered directory stay ~/app, and the row says "untrusted" for good.
  • The wait was long and nearly invisible. For a ~ path, the request resolves it over SSH with a login shell, which takes seconds on a real host (about 9s on the slow test host). The only sign of progress was the button going grey, which invites the user to do exactly the things that skip the copy-back.

Implementation

Trust row (SshDirectoryTrustNotice.tsx, sshDirectoryTrustState.ts)

  • It now has its own bordered row under the "Run on … from " sentence instead of sitting inside it.
  • The icons match Settings → Security: ShieldCheck in the success color, ShieldAlert in the warning color. The title is "Trusted directory" or "Untrusted directory", followed by a one-line explanation.
  • While a request runs, the button shows a spinner and "Trusting…" or "Untrusting…". When the host has to resolve the path, the status text reads "Resolving on …". The host goes in the status text, not the button, so a long host name cannot widen the button.
  • The status text has role="status", so screen readers announce the change.
  • An error is shown only for the host and directory it was about; editing either one clears it.
  • When the copy-back cannot apply, saveSshDirectoryTrust replaces the typed spelling in the project's remembered SSH directory with the resolved one (withResolvedRememberedProjectDir). It does this only if the remembered host and directory still match the request, so a path resolved on one host is never stored next to another. The field the user comes back to fills from that remembered value, so it now matches the stored entry.

Set as default (SetDefaultIsolationButton.tsx, creationDraftProject.ts)

  • The button sits at the end of the sentence. It saves the shown isolation pair as the project's default (the user chose project scope). The host, directory and image it shows are the project's remembered values, which new workspaces already start from.
  • A project without runtime overrides inherits the global enabled isolations. Saving a project default turns its override on, so the button copies the global enabled set into the project (projectDefaultIsolationUpdate). Without the copy, turning the override on would re-enable isolations that Settings had turned off.
  • When the shown pair already is the default, the button is replaced by a muted "✓ Default" label. That label also confirms a save.
  • Shortcut: KEYBINDS.SET_DEFAULT_ISOLATION (Ctrl/Cmd+Alt+Shift+D). It works only while the button is enabled and no dialog is open, shows in the button's hover tooltip, and is listed in Settings → Keybinds.

Docs: AGENTS.md (PR Workflow) and the pull-requests skill now ask PRs that change UI for cropped, dark-theme screenshots in the body, hosted on an orphan pr-assets/<pr number> branch. This PR follows that rule (pr-assets/8123).

Test support: the Storybook/test oRPC mock gains a stateful projects.setSshDirectoryTrust that resolves ~ to /home/mock.

Validation

  • New UI tests in tests/ui/runtime/sshDirectoryTrust.test.ts cover:
    • Trusting an absolute path and a ~ path.
    • The resolving state while a request is held open.
    • Switching to Worktree while a ~ trust is in flight, then back. This test fails without the remembered-directory fix (checked by temporarily removing it).
    • Set as default, by click and by shortcut.
  • The sub-agent's real-backend repro (dev-server sandbox, Playwright, throwaway sshd including a slow, chatty login shell) showed the original behavior described above.

Risks

Low. The changes are limited to the creation page's SSH+None trust row and a new button. "Set as default" writes through the same config.updateRuntimeEnablement route that Settings → Runtimes uses.

Follow-ups (not in this PR)

  • Login-shell output ends up in resolved paths. SSHRuntime.resolvePathOnce returns everything bash -lc prints, so a profile that prints a MOTD gets that text stored in the trust entry and the field. The same code resolves paths at workspace creation and predates this change, so it gets its own PR: print a marker before the path and keep only what follows it.
  • Reloading mid-request still loses the copy-back. If the window reloads while a request runs, nothing on the frontend survives to upgrade the remembered directory. Clicking Trust again then shows the directory as trusted.
  • A remembered-settings write on every keystroke. Typing in the host or directory fields saves the remembered settings, and each save reloads the projects list. This predates the PR.
  • No shortcut for Trust or Untrust, on purpose: a chord that grants trust to a remote directory is too easy to hit by accident. Both buttons are reachable with Tab.

Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high • Cost: $167.99

@ammar-agent

Copy link
Copy Markdown
Collaborator Author

@codex review

Please review the trust row redesign, the remembered-directory fallback for interrupted trust requests, and Set as default.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-10T21:05:25.811979Z f1f0967 Manual request
🔒 Security Review ✅ Completed 2026-11-10T21:07:34.458159Z f1f0967 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9f9ea99a25

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: 9f9ea99a25

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

🟢 e2e stories (Haiku): 14 passed

22 agent steps · 7 replayed from cache · 15 model calls · 47.3k tokens (27% cached)
Spend: $0.09 of the $1.00 cap (proxy ledger)

All 14 tests in 9 files
Test Agent Time
🟢 chatRestart.e2e.ts · 1 passed 1 step · 1 call 6.9s
🟢 a chat survives a restart of the server 1 step · 1 call 6.9s
🟢 compaction.e2e.ts · 1 passed 1 step · 1 call 5.5s
🟢 /compact replaces the old chat with a summary 1 step · 1 call 5.5s
🟢 pluginTrustRestart.e2e.ts · 1 passed 4 steps · 2 calls 11.0s
🟢 a trusted plugin hook stays trusted after the server restarts 4 steps · 2 calls 11.0s
🟢 settingsRoundTrip.e2e.ts · 1 passed 2 steps · 1 call 10.4s
🟢 a chat survives trips through Settings 2 steps · 1 call 10.4s
🟢 sidebarPerWorkspace.e2e.ts · 1 passed 4 steps · 1 call 5.2s
🟢 a new workspace starts with its right sidebar collapsed while another keeps it open 4 steps · 1 call 5.2s
🟢 smoke.e2e.ts · 1 passed 2 steps · 1 call 3.2s
🟢 the agent opens the playground workspace 2 steps · 1 call 3.2s
🟢 streamErrors.e2e.ts · 1 passed 1 step · 1 call 7.5s
🟢 stream errors show in the chat, and the chat recovers 1 step · 1 call 7.5s
🟢 todoNudge.e2e.ts · 1 passed 1 step · 1 call 3.3s
🟢 the agent finishes open TODO items after the turn-end nudge 1 step · 1 call 3.3s
🟢 touchAlignment.e2e.ts · 6 passed 6 steps · 6 calls 24.4s
🟢 the Settings close button is level with the title on a touch screen 390px wide 1 step · 1 call 4.2s
🟢 the Settings close button is level with the title on a touch screen 768px wide 1 step · 1 call 4.1s
🟢 Backup settings checkboxes are small and level with their labels on a touch phone 1 step · 1 call 4.8s
🟢 the heartbeat checkbox is small and level with its label on a touch phone 1 step · 1 call 4.0s
🟢 a reply's model and time stay on one line on a touch phone 1 step · 1 call 3.8s
🟢 the workspace actions menu stays on the title row on a touch phone 1 step · 1 call 3.5s

e2e 0.20.0 · 1m 22s · web · run artifacts

🟢 e2e Electron stories (Haiku): 3 passed

3 agent steps · 3 model calls · 8.0k tokens (32% cached)
Spend: $0.01 of the $1.00 cap (proxy ledger)

All 3 tests in 3 files
Test Agent Time
🟢 electron/deepLink.e2e.ts · 1 passed 1 step · 1 call 7.3s
🟢 a deep link of a second launch starts a chat in the running app 1 step · 1 call 7.3s
🟢 electron/menuBar.e2e.ts · 1 passed 1 step · 1 call 6.7s
🟢 the workspace menu bar is the desktop title bar 1 step · 1 call 6.7s
🟢 electron/smoke.e2e.ts · 1 passed 1 step · 1 call 6.9s
🟢 Xum Electron opens the playground workspace 1 step · 1 call 6.9s

e2e 0.20.0 · 24.1s · electron · run artifacts

🟢 e2e agent repros (Haiku): no tests selected

Spend: $0.00 of the $1.00 cap (proxy ledger)

e2e 0.20.0 · 7.4s · 2 targets (web, phone) · run artifacts

@ammar-agent

Copy link
Copy Markdown
Collaborator Author

@codex review

The remembered-directory fallback now also checks the host, and Set as default has a keyboard shortcut.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

Reviewed commit: 00742a82c6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: 00742a82c6

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@ammar-agent

Copy link
Copy Markdown
Collaborator Author

@codex review

Since the last review: the trust button no longer changes width (the host moved into the status text), the error is aligned under the status, Set as default matches the branch select, and AGENTS.md plus the pull-requests skill now ask UI PRs for screenshots in the body.

@mintlify

mintlify Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
Mux 🟢 Ready View Preview Nov 10, 2026, 9:03 PM

💡 Tip: Enable Automations to automatically generate PRs for you.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: f1f09670b2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: f1f09670b2

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@ammario
ammario merged commit d8e781d into main Nov 11, 2026
35 of 36 checks passed
@ammario
ammario deleted the ssh-dir-trust-feedback branch November 11, 2026 16:05

This branch was successfully deployed

1 active deployment
staging - docs — f1f09670 Deployed Nov 10, 2026 by mintlify[bot]
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.

2 participants