Skip to content

fix(desktop): improve workspace removal dialog copy - #923

Merged
saddlepaddle merged 1 commit into
mainfrom
copy-close-workspace
Jan 23, 2026
Merged

saddlepaddle merged 1 commit into
mainfrom
copy-close-workspace

Conversation

@saddlepaddle

@saddlepaddle saddlepaddle commented Jan 23, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Change "Close" button to "Hide" for clarity
  • Update description to warn about deletion first, then offer hiding as an alternative
  • Update toast messages to use "Hiding"/"hidden" terminology

Test plan

  • Open a workspace removal dialog
  • Verify the description reads: "Deleting will permanently remove the worktree. You can hide instead to keep files on disk."
  • Verify buttons are: Cancel, Hide, Delete
  • Click Hide and verify toast says "Workspace hidden"

Summary by CodeRabbit

  • Bug Fixes
    • Clarified dialog messaging: "Hiding..." loading state, success "Workspace hidden", and error "Failed to hide".
    • Non-branch dialog now explains that deleting permanently removes the worktree and that hiding preserves files.
    • Replaced secondary "Close" with "Hide" (same action) and aligned button labels/tooltips; branch workspaces still offer "Close".

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai

coderabbitai Bot commented Jan 23, 2026 •

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

Replace "close" semantics with "hide" in the workspace deletion dialog and adjust dialog controls; add a guard when marking branches as local in getBranches to avoid undefined map access.

Changes

Cohort / File(s) Summary
Workspace dialog text & UI
apps/desktop/src/renderer/screens/main/components/WorkspaceSidebar/WorkspaceListItem/components/DeleteWorkspaceDialog/DeleteWorkspaceDialog.tsx
Changed loading/success/error messages from "Closing/Closed/Failed to close" to "Hiding/Hidden/Failed to hide". Reworded descriptive text to clarify deletion vs. hiding. Removed the secondary tooltip-wrapped "Close" button in the non-branch path and added a standalone "Hide" button that invokes the existing close action; delete controls preserved.
Branch map guard in projects router
apps/desktop/src/lib/trpc/routers/projects/projects.ts
In getBranches, make setting isLocal = true conditional by first retrieving existing = branchMap.get(branch) and only updating when existing is defined to avoid undefined access.

Sequence Diagram(s)

(omitted)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐰 A hush in the sidebar, a gentle new clue,
"Hide" whispers softly where "Close" once flew.
Buttons rearranged, messages bright,
Files stay nearby if you hide them right.
Hop, tap, confirm — the rabbit says, "New view!"

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and concisely summarizes the main change: improving clarity in the workspace removal dialog copy by renaming buttons and updating messages.
Description check ✅ Passed The description provides a clear summary and test plan, but omits required template sections including Related Issues, Type of Change, and Additional Notes.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Change "Close" button to "Hide" and update description to warn about
deletion first, then offer hiding as an alternative.

Also fix lint warning for non-null assertion in projects.ts.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
apps/desktop/src/renderer/screens/main/components/WorkspaceSidebar/WorkspaceListItem/components/DeleteWorkspaceDialog/DeleteWorkspaceDialog.tsx (1)

65-82: Align branch dialog copy with new “Hide” messaging

handleClose now surfaces “Hiding…” / “Workspace hidden”, but the branch-only dialog still labels the action “Close”. This creates inconsistent UX for branch workspaces. Consider renaming the branch dialog title/button (or making toast copy conditional).

✅ Suggested alignment (outside this block)
-	// For branch workspaces, use simplified dialog (only close option)
+	// For branch workspaces, use simplified dialog (only hide option)
...
-							Close workspace "{workspaceName}"?
+							Hide workspace "{workspaceName}"?
...
-									This will close the workspace and kill any active terminals.
+									This will hide the workspace and kill any active terminals.
...
-							Close
+							Hide

@saddlepaddle
saddlepaddle merged commit 9cc332e into main Jan 23, 2026
5 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

🧹 Preview Cleanup Complete

The following preview resources have been cleaned up:

  • ⚠️ Neon database branch
  • ⚠️ Electric Fly.io app

Thank you for your contribution! 🎉

@Kitenite
Kitenite deleted the copy-close-workspace branch January 25, 2026 07:41
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.

1 participant