Skip to content

feat(nav): Collapse TopBar action triggers to icons on mobile - #121044

Draft
priscilawebdev wants to merge 9 commits into
masterfrom
worktree-synchronous-hatching-canyon
Draft

feat(nav): Collapse TopBar action triggers to icons on mobile#121044
priscilawebdev wants to merge 9 commits into
masterfrom
worktree-synchronous-hatching-canyon

Conversation

@priscilawebdev

@priscilawebdev priscilawebdev commented Aug 3, 2026

Copy link
Copy Markdown
Member

Top-bar actions now share a clearer responsive hierarchy: Ask Seer leads, Feedback recedes when actions collapse, and icon-only actions include their labels and shortcuts in tooltips. Empty action slots no longer leave extra spacing.

On mobile, Search moves into the navigation row and What’s New remains available from the overflow menu. Search relocation is deliberately tied to the viewport-based mobile navigation, not the page-frame container width; opening the Seer sidebar can narrow the page, but should not make Search jump into the top navigation.

The Ask Seer, Command Palette, and Feedback triggers in the TopBar were
all styled with equal visual weight, competing for attention. This
reorders and restyles them into a clearer hierarchy:

- Ask Seer now renders first (leading) in the action group, immediately
  after the page-specific actions slot.
- The Command Palette (Search) trigger only reveals its label and mod+k
  hotkey when there's room — it stays icon-only below that.
- Ask Seer likewise drops its mod+/ hotkey once collapsed, keeping the
  two triggers consistent.
- The default Feedback button drops to the `transparent` variant at the
  same point, so once the triggers collapse to icons it recedes instead
  of competing with Ask Seer and Search.

All three share one width check, `useHasExpandedTopBarActions`, which
resolves against the nearest query container (the app content stack)
rather than the viewport — so opening the Seer Explorer sidebar collapses
them the same way narrowing the window does.
The TopBar action triggers had two states, and the three consumers
disagreed about what the collapsed one meant: search went icon-only,
ask seer kept its label and only dropped the hotkey, and feedback was
always icon-only and merely flipped variant.

Replace the boolean with a three-state size resolved on the container
axis at `xl` (768px) and `4xl` (1152px):

- collapsed: icon only, search moves into the mobile navigation row
- medium: icon + label
- full: icon + label + hotkey (matches today)

Search relocates rather than shrinking twice, so at the narrowest size
it takes What's New's slot instead of growing the row. Broadcasts stay
reachable through a What's New entry in the overflow menu, which also
carries the unread indicator while that entry is present.

The mobile navigation row is a sibling of `#main`, not a descendant, so
`useResponsivePropValue` there had no query container and always
resolved to `zero` — it would have rendered a search trigger the TopBar
was also still showing between 800px and 991px. Lift
`ContainerQueryProvider` above both trees so they read one breakpoint,
and derive both render sites from a single predicate.
@priscilawebdev priscilawebdev changed the title fix(nav): Fix TopBar trigger visual hierarchy feat(nav): Add three responsive sizes for TopBar action triggers Aug 3, 2026
Once the Search and Ask Seer triggers collapse, their label and keyboard
shortcut are no longer visible anywhere — the buttons become unlabeled
icons and the shortcut is undiscoverable.

Give each a tooltip carrying exactly what the current size hides: the
label and hotkey when icon-only, and just the hotkey for Ask Seer at the
medium size where the label is still inline. At the full size both are
already visible, so no tooltip is attached.

The tooltip embeds a real `Hotkey`, so the glyphs stay platform-correct
(⌘K on macOS, CtrlK elsewhere) rather than hardcoding either form.
At the collapsed size the TopBar showed three separate icon buttons in a
row. Pair search with an overflow menu in a button bar instead, and fold
Give Feedback into that menu.

Search and Ask Seer keep their own buttons: search is the primary action,
and Ask Seer's icon carries live state — the thinking loader and the
unread indicator — that a menu item can't convey.

The menu reads the feedback slot's `hasConsumers`, so a page that
registers its own feedback trigger keeps it inline and does not also get
a Give Feedback entry. With nothing left to offer the menu renders
nothing, rather than showing a trigger that opens empty.
The tooltip also appeared at the medium size, where the label is already
inline and only the hotkey is hidden — showing a lone shortcut glyph next
to a button that names itself.

Attach it only when the trigger collapses to a bare icon, and always
carry the full label plus the hotkey rather than just the missing part.
The search and actions outlets always rendered a flex item, empty or not.
An empty item still takes a `gap` on each side, so the action row carried
three gaps where one was visible — most obvious on mobile, where search
relocates to the navigation row and Ask Seer ends up sitting next to
feedback with all that dead space between them.

Hide them when they have no consumers, matching what the breadcrumbs
outlet above already does.

This also reverts the overflow menu from d9c0c77: with Ask Seer kept
inline, feedback was its only entry, and in the mobile row search moves
out of the button bar — leaving it holding nothing but the 3-dots
trigger, so the feedback button read as having become one.
The three-state size resolved against `#main`'s container width, which
needed `ContainerQueryProvider` lifted above both the navigation and the
content just so the mobile row and the TopBar could agree on whether
search had moved. That was a lot of machinery for two visual states.

The mobile layout is already exactly the case where the row is too tight
for labels, and it is also where the mobile navigation row exists to host
the relocated search trigger. So key off `layout` from
`usePrimaryNavigation`, which sits above both trees:

- mobile: bare icons, search renders in the mobile navigation row
- sidebar: labels and hotkeys, as before

Search can no longer appear twice because the row that hosts it only
mounts in the layout where the TopBar drops it — no shared predicate
needed. Reverts the provider lift, drops the intermediate label-without-
hotkey state, and restores the viewport axis this used before.
@priscilawebdev priscilawebdev changed the title feat(nav): Add three responsive sizes for TopBar action triggers feat(nav): Collapse TopBar action triggers to icons on mobile Aug 3, 2026
@priscilawebdev

Copy link
Copy Markdown
Member Author

bugbot run

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 39aee1e. Configure here.

</Body>
</Fragment>
));
},

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.

Stale What's New modal content

Medium Severity

The help-menu What's New action passes isPending, unseenPostIds, and uniqueBroadcasts into openModal from the click-time closure. ModalStore keeps that renderer, so if the modal opens while broadcasts are still loading, WhatsNewContent never receives the completed query result and can remain on the loading state.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 39aee1e. Configure here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant