Skip to content

feat(workbench): add home button to workspace sidebar - #907

Merged
leynier merged 2 commits into
mainfrom
feat/add-workspace-home-button
Oct 6, 2026
Merged

leynier merged 2 commits into
mainfrom
feat/add-workspace-home-button

Conversation

@leynier

@leynier leynier commented Oct 6, 2026

Copy link
Copy Markdown
Owner

What changed

  • Added a Home button to the expanded workspace sidebar header.
  • Added a home icon to the design system icon set.
  • Added showHome() to clear the active workspace while preserving its tabs and session state.
  • Updated sidebar layout so home and collapse actions remain aligned to the right edge.
  • Added unit and widget tests covering navigation, layout, visibility, and workspace restoration.

Why

Users can now return to the welcome dashboard without closing their active workspace. Reopening the workspace preserves its existing tabs and state for a seamless return.

- Return to the welcome dashboard without closing workspace tabs
- Keep home and collapse actions pinned to the expanded sidebar edge
- Add controller, widget, and layout coverage for home navigation

@pullfrog pullfrog 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.

ℹ️ No critical issues. Two rough edges worth a look.

Reviewed changes

One commit adds a sidebar Home control that returns to the welcome dashboard without closing the active workspace.

  • Home button. The expanded sidebar header shows a Home icon button wired to WorkbenchController.showHome.
  • Selection. showHome nulls activeWorkspaceId, keeps the project and tabs, and no-ops when already home, so the shell's existing null-workspace path shows WelcomeDashboard.
  • Header layout. The brand group is an Expanded row so Home and collapse stay on the right edge instead of sharing slack with a Spacer.
  • Tests. Controller preservation and the no-op, header alignment, collapsed hiding, and worktree-role finders scoped off the shared house glyph.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using grok-4.7 | 𝕏

- Use the dashboard glyph for Home; the house already marks the main worktree row
- Leaving a workspace for Home or a project puts it on the back stack, so Go Back returns to it
- Re-selecting the workspace just left does not stack it twice
- Selections and back/forward overtaken by Home no longer record history

@pullfrog pullfrog 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.

✅ No new issues found.

Reviewed changes

The follow-up commit fixes the two notes from the previous review: Home no longer shares the main-worktree glyph, and leaving a workspace updates worktree history so Go Back returns to it.

  • Left worktree history. leaveCurrent pushes the current target onto the back stack, clears forward, and nulls the cursor. showHome and activateProject both call it.
  • Avoided a duplicate entry. Selecting the workspace just left pops that back entry instead of stacking it again.
  • Ignored a superseded selection. A selection records history only while that workspace is still active, and goBack / goForward skip their commit if Home replaced the target during the await.
  • Split the glyphs. Home uses LucideIcons.layoutDashboard, so it no longer compares equal to the main-worktree house icon.

Pullfrog  | View workflow run | Using grok-4.7 | 𝕏

@leynier
leynier merged commit 03ab251 into main Oct 6, 2026
21 checks passed
@leynier
leynier deleted the feat/add-workspace-home-button branch October 6, 2026 16:09
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