Repository navigation
Keep workspace deletion dialogs steady while changes load - #25321
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (6)
🚧 Files skipped from review as they are similar to previous changes (2)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 1 remain after this review. 📝 WalkthroughWalkthroughThe deletion dialog now distinguishes checking, complete, and unavailable Git status results. It passes check states to target previews and lineage notices, displays dirty-change information and loaded paths, and conditionally shows a warning about permanent deletion of uncommitted or untracked changes. The changes also add unit and end-to-end coverage for status outcomes and dialog layout. Priority: ➖ Normal Merge Risk: ⚪ Minimal · up to The deletion dialog distinguishes pending, completed, and unavailable change checks while keeping its destructive action steady. No actionable merge risk is established beyond normal checks. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The examined changes retain host-specific status handling and preserve known dirty-workspace warnings after failed checks. No introduced security issue was demonstrated, but incomplete baseline and missing-owner routing evidence limits confidence. Retained concerns Security review detailsTrust Boundaries and Controls
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 11 functions across 12 files. (2 skipped: 2 unsupported.)
✨ Finishing Touches 💡 1📝 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. Comment |
There was a problem hiding this comment.
Important
The localization catalogs were not regenerated. Both verify:localization-catalogs and verify:localization-extraction fail on this branch — see the inline comment for the exact keys and the two sync commands needed before merge.
Reviewed changes
- Fixed-height status line —
DeleteWorktreeDirtyChangeHintnow reserves anh-6row forchecking/clean/unavailableand for the dirty warning, so the row no longer resizes. - Popover for changed paths — the inline
Collapsiblelist is replaced by a portaledPopover, so opening details no longer grows the dialog. - Single dialog-level warning — the repeated per-workspace warning moved into
DeleteWorktreeDialogDescription, gated bycheckStates.size > 0. - Host-scoped check states — new
getDeleteWorktreeChangeCheckStatesplus anull-on-failure hydration result drive thechecking/complete/unavailablelabels. - Shared status lookup —
getStatusEntriesunifies hostless fallback to the hydrated identity map and is reused by counts and previews. - Tests — new e2e geometry spec plus unit coverage for check states and hydration/preview behavior.
ℹ️ Nitpicks
DeleteWorktreeTargetPreview.test.tsx:222— the title "expands each qualified batch target independently" now contradicts the assertions: opening the runtime popover closes the local one (line 256). Consider renaming to reflect the single-open-at-a-time behavior.
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to GitHub limitations.
🟡 Minor · Keep the status state visible with the dirty warning. · DeleteWorktreeDirtyChangeHint.tsx:43-61
src/renderer/src/components/sidebar/DeleteWorktreeDirtyChangeHint.tsx:43-61
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winKeep the status state visible with the dirty warning.
When a missing or null status snapshot leaves
checkStateas checking or unavailable, the dirty fallback supplieschangeCountas0, and the hint takes its numeric-count branch instead of showing that state. The generic dirty warning is accurate, not a fabricated count. But when no preview files are available, the hint offers no path-level preview and does not tell the user that status details are unavailable. Keep the checking or unavailable state visible alongside the warning.
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
84ee0d60-5a98-4f88-a41a-a410b92a052a
📒 Files selected for processing (3)
src/renderer/src/components/sidebar/DeleteWorktreeDialogDescription.tsxsrc/renderer/src/components/sidebar/DeleteWorktreeDirtyChangeHint.tsxtests/e2e/worktree-delete-dialog-layout.spec.ts
🚧 Files skipped from review as they are similar to previous changes (2)
- src/renderer/src/components/sidebar/DeleteWorktreeDialogDescription.tsx
- src/renderer/src/components/sidebar/DeleteWorktreeDirtyChangeHint.tsx
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 4 remain after this review.
There was a problem hiding this comment.
Important
The spacing refinement itself is clean — no new issues. The localization-catalog blocker raised in the previous review is still open: verify:localization-catalogs still exits 1 at 9c1a338, since no locale file was touched.
Reviewed changes (since fab7c6f0dc)
- Tighter row spacing —
DeleteWorktreeDialogDescriptionwarningmt-2→mt-1; the status/dirty rows and the popover trigger inDeleteWorktreeDirtyChangeHintmt-1 h-6→mt-0.5 h-4. Heights stay equal acrosschecking/clean/unavailable/ dirty, so the dialog and button remain stationary. - e2e artifacts — added
dialog.screenshotcaptures for the checking, loaded, and details states; assertions unchanged.
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏
|
Addressed the review findings in 67b7ee7:
Typechecking, changed-code quality/design-system checks, the Electron build, 36 focused unit tests, and all four rendered dialog checks pass locally. Updated screenshots are in the PR description. Waiting for the fresh CI run before merging. The advisory docstring suggestion is intentionally omitted: AGENTS.md requires concise comments only for non-obvious reasoning, and these functions already have descriptive names. |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Reviewed the delta since the prior pullfrog review (9c1a338), i.e. commit 67b7ee75aa.
- Added compact
· Checking…/· Details unavailabledetail-state labels beside a known-dirty warning when no path preview has loaded. - Regenerated the localization catalogs: the six
components.workspace.delete.changes.*keys are now inen.json, anden-runtime-required.jsonwas re-synced. - Added a
known-dirtye2e geometry scenario plus a unit test covering the pending-to-failed detail transition. - Renamed the batch-preview test title to match the single-open-at-a-time popover behavior.
Verified this run: all three localization gates exit 0 (verify:localization-catalogs, verify:localization-extraction, generate-runtime-required-english-catalog.mjs), pnpm tc:web exits 0, and the 36 focused sidebar unit tests pass.
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏

ELI5
The Delete button stays where you first saw it, even when workspace checks finish.
What Changed
Previously, late change counts inserted red text and repeated warning paragraphs, resizing the dialog. Opening changed paths grew it again.
Each Git workspace now has a fixed-height status line from the first render. The row matches the surrounding text height, with a small gap above it. The permanent-loss warning appears once in the dialog description. Changed paths open in a bounded popover; Escape returns to the confirmation. Pending, clean, and failed checks have distinct labels. An existing dirty warning survives a failed check and keeps the detail-loading or unavailable state visible beside it.
The existing status loader now retains failed results. Counts, previews, and check states read the same host-scoped snapshot, including hydrated results for older targets without an explicit host.
Why
Reserving the status space keeps both content and destructive actions stationary. Animating the old height changes would still move the button; waiting for every workspace would delay the dialog on remote hosts.
Linked Issue
Reported directly; no linked issue.
Visual Proof
Current compact layout: status rows are one text line high with a 2px gap above them. The 31-child case is 54px shorter than the earlier version. Frame checks confirm the dialog, rows, Delete button, and keyboard focus remain steady as results arrive.
Light mode:
Known-dirty recovery also stays on one line:
Before and after the spacing refinement, at the same viewport size
Testing
Passed:
pnpm tcpnpm run check:code-quality:changed, including the design-system gatepnpm run verify:localization-catalogsandpnpm run verify:localization-extractionTo repeat the rendered regression tests after an e2e build:
Review
Self-reviewed. Folder workspaces retain their existing behavior and do not receive Git deletion warnings. A failed remote check cannot borrow another host's status or claim the workspace is clean.
Agent skill upstream boundary
Notes
Host routing, deletion behavior, and remote messages are unchanged. Remote latency and failures were simulated; real SSH hosts, Linux, and Windows were not run locally. CI covers the broader lint, test, and release-build checks.
Checklist
pnpm lint,pnpm test, and release build: CI; focused local checks above passed