Skip to content

helium/ui: Add visual tab switcher - #2539

Open
beeltec wants to merge 4 commits into
imputnet:mainfrom
beeltec:feature/visual-tab-switcher
Open

beeltec wants to merge 4 commits into
imputnet:mainfrom
beeltec:feature/visual-tab-switcher

Conversation

@beeltec

@beeltec beeltec commented Sep 19, 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 adds a Ctrl+Tab overlay with thumbnail and list layouts.

Closes #238.

Unfortunately #1376 seems to be abandoned by the original author. That's why I rethought the implementation approach to not only support the usual thumbnail view but also a list view (which during my tests I found much more useful when having a lot of tabs).

Full disclosure: I did use an LLM for autocomplete and code review.

Screenshots

thumbnail strip:

image

list layout:

image

appearance settings:

image

@greptile-apps

greptile-apps Bot commented Sep 19, 2026 •

Copy link
Copy Markdown

RetriggerView in Greptile

[Medium impact] The PR appears safe to merge, with no new actionable correctness or security issue established.

Reviews (4) · Last reviewed commit: "fix(helium/core/session-restore): handle..." · Reviewed by Greptile

Comment thread patches/helium/ui/visual-tab-switcher.patch Outdated
@dumbmoron dumbmoron added the bot:review Request a Helium bot review label Sep 19, 2026
@helium-gardener helium-gardener Bot removed the bot:review Request a Helium bot review label Sep 19, 2026
@beeltec
beeltec force-pushed the feature/visual-tab-switcher branch from e0a8610 to e615a8b Compare September 19, 2026 12:08
@immadolf

Copy link
Copy Markdown

A useful open-source reference for the interaction model here is Phi Browser, which has already implemented an Arc-style Ctrl+Tab switcher on macOS:

https://github.com/phibrowser/phibrowser-mac/blob/main/Sources/States/TabSwitchManager.swift

The interesting part is not just the thumbnail UI, but the switching session behavior:

  • Tabs are ordered by MRU (most recently used).
  • The first Ctrl+Tab selects the previous MRU tab but does not immediately show the overlay.
  • A ~250 ms reveal timer is started.
  • If Ctrl is released before the timer fires, it simply switches to the selected tab without ever showing the UI.
  • If Ctrl is still held after the threshold, the visual switcher appears.
  • If Tab is pressed again before the timer expires, the overlay appears immediately, since that indicates the user is browsing through multiple tabs.
  • Further Tab / Shift+Tab presses only move the highlighted selection.
  • Releasing Ctrl commits the currently highlighted tab.

This creates the Arc-style feel where a quick Ctrl+Tab works as an instant previous-tab toggle with no UI flash, while holding Ctrl or pressing Tab repeatedly turns it into a visual MRU browser.

From the current implementation in this PR, the release-Ctrl-to-confirm behavior already appears to be present. The main interaction improvement worth borrowing from Phi seems to be the delayed overlay/session behavior.

Phi also limits the switcher to a small recent working set (maxRecentTabs = 5). That may be worth considering as well: Ctrl+Tab works especially well as a quick switcher between recent tabs, while Tab Search can handle browsing a large number of open tabs.

The thumbnail implementation in this PR already looks more appropriate for Chromium than Phi's Swift/Chromium bridge approach, so the most useful part to borrow is probably the interaction/session model rather than the rendering implementation.

@beeltec

beeltec commented Sep 22, 2026

Copy link
Copy Markdown
Author

A useful open-source reference for the interaction model here is Phi Browser, which has already implemented an Arc-style Ctrl+Tab switcher on macOS:

https://github.com/phibrowser/phibrowser-mac/blob/main/Sources/States/TabSwitchManager.swift

The interesting part is not just the thumbnail UI, but the switching session behavior:

  • Tabs are ordered by MRU (most recently used).
  • The first Ctrl+Tab selects the previous MRU tab but does not immediately show the overlay.
  • A ~250 ms reveal timer is started.
  • If Ctrl is released before the timer fires, it simply switches to the selected tab without ever showing the UI.
  • If Ctrl is still held after the threshold, the visual switcher appears.
  • If Tab is pressed again before the timer expires, the overlay appears immediately, since that indicates the user is browsing through multiple tabs.
  • Further Tab / Shift+Tab presses only move the highlighted selection.
  • Releasing Ctrl commits the currently highlighted tab.

This creates the Arc-style feel where a quick Ctrl+Tab works as an instant previous-tab toggle with no UI flash, while holding Ctrl or pressing Tab repeatedly turns it into a visual MRU browser.

From the current implementation in this PR, the release-Ctrl-to-confirm behavior already appears to be present. The main interaction improvement worth borrowing from Phi seems to be the delayed overlay/session behavior.

Phi also limits the switcher to a small recent working set (maxRecentTabs = 5). That may be worth considering as well: Ctrl+Tab works especially well as a quick switcher between recent tabs, while Tab Search can handle browsing a large number of open tabs.

The thumbnail implementation in this PR already looks more appropriate for Chromium than Phi's Swift/Chromium bridge approach, so the most useful part to borrow is probably the interaction/session model rather than the rendering implementation.

Thanks for the input! I already added an option to switch trough the tabs in MRU order. The idea with the small delay until the overview is displayed is really good. I will implement that.

Regarding the max recent tabs I see where you are coming from. I do use it with more tabs. I think I will implement it but with an experimental option to enable unlimited tabs in the normal switcher view (list view will retain it's behaviour).

@beeltec
beeltec force-pushed the feature/visual-tab-switcher branch from ca55d92 to 3b0565e Compare September 22, 2026 10:33
wingedseraph pushed a commit to wingedseraph/helium that referenced this pull request Sep 23, 2026
… to 153

Vendored from imputnet#2539 (beeltec/feature/visual-tab-switcher).
Three quilt patches (core/settings/ui) + i18n source entries, appended after
address-bar so they layer on top. core & settings apply verbatim; ui rebased
onto the address-bar tree (BUILD.gn source list, browser_view.cc include and
dtor visual_tab_switcher_.reset() re-anchored around the sidebar changes).
Verified: core/settings/ui apply sequentially at zero offset on ci-sidebar.
@beeltec

beeltec commented Sep 25, 2026

Copy link
Copy Markdown
Author

@immadolf Your proposed solution regarding the small 250ms delay and capping the maximum number of tabs shown in the thumbnail strip view is now implemented. Thanks again for the suggestions!

@beeltec

beeltec commented Sep 26, 2026

Copy link
Copy Markdown
Author

@greptileai please review

@beeltec
beeltec force-pushed the feature/visual-tab-switcher branch 2 times, most recently from 40da777 to e931fc1 Compare September 27, 2026 12:48
@beeltec

beeltec commented Sep 27, 2026

Copy link
Copy Markdown
Author

Empty session restores can now complete correctly. @greptileai please review

Keep quick Ctrl+Tab switches hidden and reveal the overlay after
250 ms or a second Tab press. Commit the selection on Ctrl release.

Limit the thumbnail switcher to five recent tabs by default. Add an
experimental maximum with -1 for unlimited tabs. Keep list mode
unlimited.
Empty restores can run without a background tab loading policy. Return after the restore trace when no policy is installed, while keeping the existing completion path when one is present.
@beeltec
beeltec force-pushed the feature/visual-tab-switcher branch from 7830541 to 83e306b Compare October 15, 2026 15:45
@beeltec

beeltec commented Oct 15, 2026

Copy link
Copy Markdown
Author

Merged with latest main and fixed conflicts. @greptileai please review

@marlonjames71

marlonjames71 commented Oct 17, 2026 •

Copy link
Copy Markdown

@beeltec This looks awesome. The only other thing I'd want if it isn't already implemented is the ability to move the selection backwards with CTRL + ` (backtick or tilde key). This is how Arc and Dia's tab switcher works as well as all the other ones I've seen that are well implemented. I guess CTRL + Shift + Tab works as well, but that's more keys to press. CTRL + ` is simpler and aligns with the macOS app switcher as well.

My only other suggestion just looking at the provided images is to round the corners a bit more to make it look more modern. The corner radius currently looks very very small and it could look a bit dated. For example, here's what Dia's looks like which is super clean:
CleanShot 2026-10-17 at 10 04 10 AM@2x
Maybe, instead of the blue selection color you can reuse the focused tab color. Might look a bit cleaner.

Nice job with this. Having the layout option is very cool too and I'm looking forward to trying it.

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.

[FR]: Show tab preview on tab switch

4 participants