Repository source: docs/concepts/navigation_slots.md
Navigation slots
Purpose: Keep the phone tab bar short while giving each reader one-tap access to the destinations they use most, without the server knowing anything about them. Every destination tab is earned by use, Board and Calendar included, despite the adaptive-menu caution from Office; the hold rules below are the hedge against tabs moving under a reader's thumb.
Scenario: On a phone a fresh browser shows Board, Calendar (while event support is on), New post and More, with room for one or two more tabs; Board and Calendar are only starting tabs, and every destination, them included, is listed in More. A reader opens Recent from More three times; on the next page Recent is a tab, before first paint, and stays there through twenty visits to other destinations. Users takes a tab only after leading the least-used tab by three uses across two different days; that can be Board. Tabs show in bar order whatever order they were earned in. A browser that saved state while Board and Calendar were fixed keeps them in front, counted as used as its busiest destination, so the change itself moves nothing. New post and More are always in the bar. On a page listed in More, the More tab takes that page's name and the selected look, unless the page holds a slot. Clearing browser storage restores the default bar; every destination stays reachable from More. On desktop every main destination is in the top bar and You holds Profile, Account, Invite and the theme controls, so slots do not apply. While FORUM_INBOX_ENABLED is on, Unread sits on the bar just before Messages; on phones both open from More and can hold a slot. Messages stays on the bar because its link is where the Messages unread count and history sync start.
Sources: slot count and sections (source unavailable) (navSlotCount(), navSlotDefaults(), navigationItems()), head script (source unavailable) (reads forum_nav_slots, sets data-nav-slots before paint), rules and storage (source unavailable) (FILL, LEAD, decide()), bar and More markup (source unavailable), per-section slot rules (source unavailable) (critical section, html[data-nav-slots~=…]), browser check (source unavailable), pre-paint check (source unavailable).
Boundary: Server HTML is the same for every viewer and every width; CSS and the browser decide. The server puts the starting tabs on <html data-nav-slots>, so a page without script or storage still has them. State lives in one local-storage key as JSON (internal state, so not the Key: value format), per browser, never synced; "v": 2 marks state saved since every tab was earned. Messages and Unread can hold a slot only in a browser remembered as approved; the member-only rule hides it regardless of stored state. Adding a slottable destination means a new html[data-nav-slots~="…"] rule in site.css; the head script only accepts sections the server lists. A single private-message conversation shows no phone bar at all (data-tabbar-page="none" on the shell); its back arrow leads to Messages, which has the bar.