Skip to content

feat(workspace): dedicated StashesPanel with Apply/Pop/Drop actions#12

Draft
noahbclarkson wants to merge 4 commits intomainfrom
feat/stashes-panel
Draft

feat(workspace): dedicated StashesPanel with Apply/Pop/Drop actions#12
noahbclarkson wants to merge 4 commits intomainfrom
feat/stashes-panel

Conversation

@noahbclarkson
Copy link
Copy Markdown
Owner

Summary

Adds a first-class Stashes Panel accessible via Alt+8, giving stashes the same UI treatment as branches and PRs.

What changed

New StashesPanel (crates/rgitui_workspace/src/stashes_panel.rs):

  • Toolbar with stash count badge and refresh button
  • List of all stash entries showing message + short OID
  • Per-row Apply (keeps stash), Pop (removes stash), and Drop buttons
  • Empty state with helpful prompt
  • 4 unit tests for StashEntry

Wiring:

  • Stashes added to RightPanelMode enum
  • Panel rendered in workspace layout via .when(right_panel_mode == Stashes)
  • Alt+8 keyboard shortcut via ToggleStashes command
  • Command palette entry: "View: Stashes Panel" with Alt+8 hint
  • stashes_panel added to ProjectTab; spawned in open_repo
  • Refresh on ToolbarEvent::Refresh

Sidebar stash context menu (pre-existing working directory changes):

  • Right-click stash entries for Apply/Pop/Drop/Branch
  • Dismiss on left-click outside menu bounds

Why

Stash operations were buried in sidebar context menus with no dedicated panel. This makes stash management a first-class workflow, matching the UX of BranchHealthPanel and PrsPanel.

CI

All tests pass, clippy clean, fmt clean.

@noahbclarkson
Copy link
Copy Markdown
Owner Author

Details panel shows "Stash" with nothing else when clicking on a stash which could be confusing for users. Also suffers from Issue: #13

Forge added 3 commits April 13, 2026 09:29
- Create StashesPanel (Alt+8) showing all stash entries with message + OID
- Add toolbar with stash count badge and refresh button
- Inline Apply (keep stash) / Pop (remove) / Drop action buttons per entry
- Add Stashes to RightPanelMode enum; wire into workspace layout
- Add ToggleStashes command + Alt+8 keyboard shortcut
- Register ToggleStashes in command palette with Alt+8 hint
- Add StashesPanel to ProjectTab; spawn in open_repo tab creation
- Wire Refresh handler to call panel.refresh() on toolbar refresh
- Add StashesPanelEvent enum for future event-driven coordination
- Add stash context menu state + dismiss logic to sidebar (pre-existing)
- Add stashes_panel unit tests for StashEntry
Fixes button overflow on the right side of the dialog on Windows (issue #13).

The button container div was missing .pr(px(4.)) padding, causing buttons
to touch or extend past the right edge of the dialog. Added the padding
to match the pattern already used in confirm_dialog.rs.
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