Keep live nav state synchronized - #166
Conversation
Reconnect the scroll-aware title after Turbo replaces the plan header and sync renamed titles into the sticky nav. Avoid exposing hidden navigation controls or stale unread counts, and keep header anchor jumps clear of the sticky bar. Amp-Thread-ID: https://ampcode.com/threads/T-019fa9f4-9144-76b8-a764-98d7ba1cc0e9 Co-authored-by: Amp <amp@ampcode.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8823799548
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| <%# No count here: only #inbox-badge gets live updates, so a | ||
| number rendered once would go stale. Unread is signalled | ||
| live by the dot on the ☰ button instead. %> |
There was a problem hiding this comment.
Expose unread status to assistive technology
At phone widths, the bell is hidden and this change removes the only textual unread count from the Notifications menu item. The replacement is solely .site-nav__menu-btn::after, a visual CSS dot on a button whose accessible label remains "Menu", so screen-reader users receive no indication that unread notifications exist or that the count changed. Keep a live, visually hidden status tied to #inbox-badge, or update the menu button or link's accessible label.
Useful? React with 👍 / 👎.
Why
The scroll-aware plan title can become detached or stale when Turbo replaces the live plan header, and the mobile notification menu can show a stale server-rendered count.
What
Risk Assessment
Low — localized follow-ups to the newly merged navigation behavior, with no persistence or API changes.
References
bundle exec rspec spec/system/nav_stimulus_spec.rb spec/requests/notifications_spec.rb spec/services/notifications/create_spec.rb(25 examples, 0 failures)Generated with Amp