Skip to content

Remember the sidebar per tab in Top Tabs, and give it a real icon - #22

Merged
matthewdias merged 2 commits into
mainfrom
top-tabs-sidebar-per-tab
Oct 5, 2026
Merged

matthewdias merged 2 commits into
mainfrom
top-tabs-sidebar-per-tab

Conversation

@matthewdias

@matthewdias matthewdias commented Oct 5, 2026 •

Copy link
Copy Markdown
Owner

What changes

Only Threads used to remember the sidebar. Leaving Threads collapsed it, a sidebar opened by hand on another tab stayed open only until you went back to Threads, and Settings forced it open and undid that on the way out.

Now every tab keeps the sidebar as you left it there:

  • Leaving a tab records whether the sidebar was open. Arriving on a tab, or loading the app on one, opens or collapses it to match.
  • Opening or collapsing it yourself is remembered for the tab you're on.
  • A tab you haven't set starts collapsed, so the destination gets the whole window. Settings starts open for its sections, but collapsing it there now sticks. Threads still learns its state from the first look instead of imposing one.
  • Splits still pause all of this.

The Collapse the sidebar on other tabs setting keeps its key and default and becomes Remember the sidebar on each tab.

Top Tabs gets a real icon. bb.branding.icon was Columns, which isn't one of bb's built-in icon names, so bb drew its generic fallback. It's now AppWindow, a window with a band across the top. That's a separate commit.

How

  • lib/tabs-model.ts: TabsState.threadsSidebarOpen becomes sidebar, a map of tab to open. parseState carries a stored Threads value over. sidebarStep is now one rule for every tab, plus a small rememberSidebar helper.
  • components/TopTabs.tsx: the toggle observer runs on every tab, not just Threads. It records under the tab the strip last brought the sidebar in line with (previous), not the route, because a tab click toggles the sidebar before it navigates. The strip's own toggles set the state the tab already wants, so recording them changes nothing.
  • The animations from Animate the sidebar and thread when switching to and from Threads in Top Tabs #21 are unchanged. They play for the moves they were written for (returning to Threads, opening Settings, leaving Threads). The moves only per-tab memory makes, such as arriving on a tab where you keep the sidebar open, are instant, like every strip move before Animate the sidebar and thread when switching to and from Threads in Top Tabs #21.
  • README, PLUGIN_OVERVIEW and the setting's description are updated. No version bump: 0.2.0 hasn't been tagged yet.

Testing

  • npm test (77 pass), npm run typecheck and npm run build in plugins/top-tabs.
  • Mutation-checked: leaving records nothing, memory ignored on arrival, Settings defaulting collapsed, unseen tabs defaulting open, Threads not learned, recording under a null tab, the old field overriding the new one, non-boolean values kept, and a fresh object on every write. Each mutant failed a test.
  • Linked into bb from this branch and tried by hand, sidebar and icon both.

🤖 Generated with Claude Code

matthewdias and others added 2 commits October 4, 2026 21:49
Only Threads remembered the sidebar. Leaving it collapsed the sidebar, a
sidebar opened by hand on another tab stayed open until Threads, and
Settings forced it open and undid that on the way out. Now every tab keeps
the sidebar as the user left it there: leaving a tab records whether it
was open, arriving restores it, and the user's own toggling is filed under
the tab they are on. A tab never seen starts collapsed, Settings starts
open for its sections, and Threads still learns its state from the first
look instead of imposing one.

TabsState.threadsSidebarOpen becomes `sidebar`, a map of tab to open;
stored state carries the old Threads value over. sidebarStep is one rule
for every tab now, with tests. The toggle observer files a change under
the tab the strip last brought the sidebar in line with, not the route,
because a tab click toggles the sidebar before it navigates.

The Collapse the sidebar setting keeps its key and becomes "Remember the
sidebar on each tab".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bb.branding.icon was "Columns", which is not one of bb's built-in icon
names, so bb drew its generic fallback for the plugin. "AppWindow", a
window with a band across the top, is a built-in and stands for what Top
Tabs adds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@matthewdias matthewdias changed the title Remember the sidebar per tab in Top Tabs Remember the sidebar per tab in Top Tabs, and give it a real icon Oct 5, 2026
@matthewdias
matthewdias merged commit c3c22ab into main Oct 5, 2026
1 check passed
@matthewdias
matthewdias deleted the top-tabs-sidebar-per-tab branch October 5, 2026 03:02
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