Skip to content

helium/core: complete nested (tree-style) tab support#1832

Open
ImTheSquid wants to merge 9 commits into
imputnet:mainfrom
ImTheSquid:nested-tabs
Open

helium/core: complete nested (tree-style) tab support#1832
ImTheSquid wants to merge 9 commits into
imputnet:mainfrom
ImTheSquid:nested-tabs

Conversation

@ImTheSquid

@ImTheSquid ImTheSquid commented May 31, 2026

Copy link
Copy Markdown

For your pull request to not get closed without review, please confirm that:

  • An issue exists where the maintainers agreed that this should be implemented
    (an approved feature request, or confirmed bug).
  • I tested that my contribution works locally, and does not break anything,
    otherwise I have marked my PR as draft.
  • If my contribution is non-trivial, I did not use AI to write most of it.
  • I understand that I will be permanently banned from interacting with this
    organization if I lied by checking any of these checkboxes.

Tested on (check one or more):

  • Windows
  • macOS
  • Linux

This PR adds fully-featured tree-style tabs to the vertical tabs strip. Tabs are automatically nested under their parents when Cmd+Clicking a link. You can also drag tabs around to manually child them, as well as collapse tabs to temporarily hide trees. I was a big Sidebery user (and even contributed to it!) so I wanted to add a similarly polished system to Helium. This is a core addition instead of a UI addition because of how many core tab management systems I had to touch to make this work.

The feature is gated behind a preference in helium://settings.

This PR is different from #1468 in that:

  • Session restoration is fully supported. I persued the patch and saw only partial support for reopening tabs correctly on relaunch. My patch has everything built in, including lots of error handling.
  • Full support for splits and groups. Splits may inhabit a space in the hierarchy, but may not have children of their own. My rationale is that it is unknown who actually owns the child (the opening tab or the first in the split?), and I didn't want to deal with those semantics. Groups may host trees but may not be part of one, they are always top level.
  • Reopening closed tabs (Cmd+Shift+T) works correctly and restores an entire tree or a single child to its parent. This also applies to reopening groups and entire windows.
  • Drag and drop functions like groups (bringing all the tabs along) instead of a "parent only" style drag. It is still a bit glitchy sometimes, but I think it is way more obvious what is going on.

Note: I am taking the liberty that #1468 existing means that the Helium maintainers have accepted this as a valid FR.

The architecture of this PR revolves around a new NestedTabCollection that lives in the hierarchy of tab controllers. Its owner is the first child. I took susbtantial inspiration from SplitTabCollection and TabGroupTabCollection.

I tried to minimize the number of impacted files, but with a change this big and trying to do it right and account for edge cases, there was only so much I could do.

Demo

demo.mp4

Known Issues

  • Upstream Chromium bug where split tabs are not properly restored through Cmd+Shift+T: I do not attempt to fix this problem in my PR, but worth a look at some point.
  • Upstream Chromium sync-init bug: rare entire-group disappearance on startup. Couldn't figure out a way around this, but it's rare enough that I don't care.
  • kChildInto onto parent-with-nest: Nest-in-nest works but is degraded for non-NESTED drags (existing limitation).
  • Drag-cancel of a nested mid-flight: No dedicated revert path, tabs revert individually. Fine for how rare it is.
  • GetMovePosition falls back to "append to end" for unresolvable destinations: May surprise users on weird drop positions.
  • Crash points: The surface of this PR is REALLY big, so there are potentially hidden crash points I haven't caught.

@greptile-apps

greptile-apps Bot commented May 31, 2026

Copy link
Copy Markdown

Reviews (1): Last reviewed commit: "Nested tabs initial implementation" | Re-trigger Greptile

Comment thread patches/helium/core/nested-tabs.patch Outdated
Comment thread patches/helium/core/nested-tabs.patch Outdated
Comment thread patches/helium/core/nested-tabs.patch
Comment thread patches/helium/core/nested-tabs.patch
Comment thread patches/helium/core/nested-tabs.patch Outdated
@samebutdiff

Copy link
Copy Markdown

👀 this is sick, hopefully merged soon:tm:

@marlonjames71

Copy link
Copy Markdown

From the video it looks like the chevron icon for collapsing and expanding nested tabs isn't centered with the favicon. Also, putting the chevron directly over the favicon can make it hard to see. Suggestions:

  • center the chevron icon over the favicon
  • dim the favicon really good when the chevron appears (on hover) – use fast animation for smoothness and polish

@brunoalano

Copy link
Copy Markdown

i've compiled locally and it's running great on my end (m4 max)

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.

4 participants