feat(v0.6): add Home (⌂) button to reach Sessions/Projects from a session

Once a project/session tab was open, the home chooser (Sessions/Projects
segmented control) was hidden and only reachable by closing every tab — no
way back to the Projects view to open another project.

Add a ⌂ Home button to the tab bar that overlays the chooser on top of the
open tabs (homeForced flag; updateHomeView shows home when no tab OR forced,
hiding the terminal panes). Clicking ⌂ again, clicking a tab (activate resets
homeForced), or opening another session/project dismisses the overlay.
Closing the last tab resets the flag. The button highlights while active.

Tests: +3 (tabs.test.ts). Full suite 415 green; both typechecks clean;
verified in-browser (open tab → ⌂ → Projects panel reachable → ⌂ → terminal).
This commit is contained in:
Yaojia Wang
2026-06-30 11:39:38 +02:00
parent 7b4adf5072
commit 985ff8a178
4 changed files with 117 additions and 2 deletions

View File

@@ -207,6 +207,26 @@ body {
background: var(--surface-2);
}
/* v0.6: Home (⌂) button — opens the Sessions/Projects chooser over open tabs. */
.tab-home {
background: none;
border: none;
color: var(--text-dim);
cursor: pointer;
font-size: 17px;
padding: 0 10px;
flex: none;
border-radius: 7px;
}
.tab-home:hover {
color: #fff;
background: var(--surface-2);
}
.tab-home.active {
color: var(--on-accent, #1a1408);
background: var(--accent);
}
/* toolbar */
#toolbar {
flex: 0 0 auto;