Uh oh!
There was an error while loading. Please reload this page.
fix(web): Remove saved environments atomically - #2917
Conversation
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
ApprovabilityVerdict: Needs human review 1 blocking correctness issue found. This PR adds new functionality and has an unresolved review comment identifying an error type mismatch where You can customize Macroscope's approvability policy. Learn more. |
Dismissing prior approval to re-evaluate 933a157
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
57451d3 to
61426fdCompareDismissing prior approval to re-evaluate 61426fd
Uh oh!
There was an error while loading. Please reload this page.
61426fd to
177b89bCompareUh oh!
There was an error while loading. Please reload this page.
1e011dc to
cfc3112CompareUh oh!
There was an error while loading. Please reload this page.
cfc3112 to
c3497b0Comparec3497b0 to
cc9d672Compare33193f4 to
9e5bd2aCompare95c5ea1 to
c9bcc76Compare30c2ad5 to
a980c75CompareThere was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit a980c750b2c825b09cebfe83fb3839b602d34574. Configure here.
Uh oh!
There was an error while loading. Please reload this page.
9c4afac to
da654c7Compareda654c7 to
01dee9cCompareUh oh!
There was an error while loading. Please reload this page.
mwolson
commented
Jun 19, 2026
@macroscope-app review |
Sorry, I'm unable to act on this request because you do not have permissions within this repository. |
Uh oh!
There was an error while loading. Please reload this page.
(cherry picked from commit 1fcc57a)
(cherry picked from commit 1fcc57a)
…-connection-runtime fix(web): Remove saved environments atomically (pingdotgg#2917)

Summary
Closes#2914.
This makes saved-environment removal use a single persistence operation that removes metadata and embedded credentials together, and tightens rollback behavior when replacing stale desktop SSH records.
Problem and Fix
removeSavedEnvironmentto the local persistence API and desktop IPC bridge so metadata and embedded secrets are removed atomically.Defensive Fixes
Validation
bun fmtbun lintbun typecheckbun run --filter @t3tools/desktop test -- DesktopSavedEnvironmentsbun run --filter @t3tools/web test -- localApi catalog service.addSavedEnvironment service.savedEnvironmentsChecklist
Note
Medium Risk
Changes on-disk saved-environment and credential persistence, but the scope is narrow and covered by a new atomic-removal test.
Overview
Adds
removeEnvironment(environmentId)to desktop saved-environment persistence so registry metadata and the embeddedencryptedBearerTokenare dropped in one registry write, instead of relying on separate metadata vs secret updates.The file-backed implementation filters the matching record out of the persisted document (no-op if missing). The in-memory test layer clears both the records ref and secrets ref together. A new test asserts the registry is empty and
getSecretis none after removal.Reviewed by Cursor Bugbot for commit 01dee9c. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Add
removeEnvironmenttoDesktopSavedEnvironmentsto delete registry records and secrets atomicallyremoveEnvironment(environmentId)toDesktopSavedEnvironmentsShape, which removes the matching record from the registry document and its embeddedencryptedBearerTokenin a single write.recordsRefand the secret fromsecretsReftogether, with a new test asserting both are cleared after callingremoveEnvironment.📊 Macroscope summarized da654c7. 1 file reviewed, 0 issues evaluated, 0 issues filtered, 0 comments posted
🗂️ Filtered Issues
No issues evaluated.