Repository navigation
fix(app): colour the server Delete menu item as destructive - #251
Merged
Merged
Conversation
Matches the generic server menu in the previous commit. The WSL rows sit in the same Settings -> Servers list, so leaving theirs uncoloured would have made the list inconsistent with itself. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Closing a mounted folder on Work removed the row and then put it straight back. With Unmount that read as the action doing nothing: the row returned, then the mount change landed, the folder left conn.mounts, and the menu fell back to Close. Two independent causes, both needed: createServerProjects.close() writes the open list and the recently-closed list as two store writes. Solid flushes effects between them, so seedSandboxProjects saw a project that was in neither list and seeded it again. The pair is now one batch. That alone only covers folders the guest server has a project record for. The ctx's recentlyClosed is filtered down to directories in sync.data.project, and a folder that has never held a session has no record there, so `closed` could never carry the user's decision for a freshly mounted folder. The effect now remembers what it has seeded and will not seed the same folder twice, and forgets a folder once it is unmounted so remounting seeds it again. Regression cover drives the real project store and the real recentlyClosed shape; the existing fakes in that file were friendly enough to hide both. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
quickbeard
force-pushed
the
red-server-delete
branch
from
August 17, 2026 04:10
6687f25 to
078c551
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Delete in a server's menu rendered in the same colour as Edit and Set as default, so the one irreversible action in the menu carried no more weight than the rest. The session actions menu already colours its Delete red; this brings the server menus in line.
What changed
Destructive colour on Delete
Applied to two Delete items, both in Settings → Servers (and, for the generic one, the sidebar server rows):
packages/app/src/components/server/server-row-menu.tsx—ServerRowMenu, used for the local sidecar, remote, and SSH servers.packages/app/src/wsl/settings.tsx— the WSL server rows, which sit in the same list.It has to be the CSS variable rather than a text utility:
menu-v2.csscolours the item and itsmenu-v2-item-contentlabel span from--menu-v2-fg, so a class on the item never reaches the label. The highlighted state only swaps the background, so the colour survives hover, and the disabled state (builtinservers in the generic menu) dims byopacityalone, so it stays recognisably red.Also carried here: the sandbox seeding fix
fix(app): stop the sandbox seeding effect from reopening a closed folderis cherry-picked from #249, so this branch carries it too. Closing a mounted folder on Work removed the row and then put it straight back. Two independent causes:createServerProjects.close()writes the open list and the recently-closed list as two store writes, and Solid flushes effects between them, soseedSandboxProjectssaw a project in neither list and seeded it again. Now batched.recentlyClosedis filtered down to directories insync.data.project, and a folder that has never held a session has no such record — soclosedcould never carry the user's decision for a freshly mounted folder. The effect now remembers what it seeded, and forgets a folder once it is unmounted.Two regression tests drive the real project store and the real
recentlyClosedshape; the existing fakes in that file were friendly enough to hide both bugs.Scope
One Delete surface is deliberately left alone:
packages/app/src/components/dialog-select-server.tsx— the legacyDropdownMenudesign, a different component from theMenuV2rows above.The sandbox row's Delete, and the Mount/Unmount work, stay in #249.
Testing
bun typecheckinpackages/app— clean.bun run testinpackages/app— 675 unit + 94 browser, 0 fail.Not visually confirmed in a running app.
🤖 Generated with Claude Code