Repository navigation
feat(webui): align the sidebar with the reference (webui-parity 47) - #92
Merged
Merged
Conversation
added 2 commits
September 29, 2026 10:38
Layer 1 (ticket must-dos): - S1: selected session/subagent rows paint with the selected token while hover keeps the hover token, restoring the lost "which session am I in" signal (distinguishable in dark; the light tokens are equal upstream) - N2: nav rows get a real active signal — pure rule in lib/sidebar-nav.ts, driven by the tree-column surface (page passes activeNavSurface) and the engine's active session id; the collapsed icon rail lights up too - S2: the projects section header is a plain 28px div — the focusable button with no onClick is gone - S5: project/directory/subagent disclosures animate through the reference's grid-template-rows 0fr->1fr motion (.webui-expandable-motion, 180ms + 140ms opacity); children stay mounted, inert + aria-hidden while closed; reduced-motion drops the transition but keeps the state - S3/S4: empty state gets the reference card face; the error state is a role="alert" that names the live failure reason (sidebar.loadError) - C3: the rail toggle's aria-label flips 展开导航栏/收起导航栏 per state - C1/C5: rail width 52 -> 64px with the reference's 180ms cubic-bezier; collapsed background goes transparent - C6: the toolbar column gains pl-[142px] while collapsed so the session title keeps its horizontal position Layer 2 (structural alignment): - S8: session and subagent rows are <a> deep links over the app's own ?session= grammar (lib/url-restore.ts#sessionHref) — plain clicks route through switchSession as before; modified clicks open a restorable URL. The reference's #session= fragment grammar is deliberately NOT copied: the restore pipeline parses the query string and preserves fragments - C2: the collapse toggle moves outside the sidebar onto a pointer-events-none overlay (32px button, floats right of the rail when collapsed) - C4 (kept): the collapsed form stays the icon rail — the reference's emptied strip hides every affordance and its own rail-mode user-menu branch never executes there - S6 (verified, not added): "click selects a project" has no backend contract to drive it Reverse-parity kept: drag-resize 240-400, <980px auto-collapse, collapsed persistence (same webui:ui-state key, no new storage). GET /api/session-tree stays read-only. Docs: bilingual sidebar sections and anchor-table rows in webui.md and webui.zh-CN.md. Tests: webapp/test/sidebar-nav-active.test.ts (27 cases: pure-function decisions + static-source wiring tripwires).
…ection (parity 47 follow-up) Acceptance P4 follow-up: the sidebar section in both documents claimed the selected and hover tokens "differ". They do by name, but upstream's light theme resolves both --bg_interaction_tertiary_selected and --bg_interaction_tertiary_hover to --opacity_black_1_4, so the visual distinction holds only in the dark theme (opacity_white_0_4 vs _0_8). Both locales now state that boundary and that it is the upstream token set's current state, not a regression from ticket 47.
fengzhi09
force-pushed
the
feat/sidebar-alignment
branch
from
September 29, 2026 02:42
132cb7a to
b48b0bd
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ticket:
.tickets/webui-parity/47-sidebar-alignment.md左侧边栏对齐:折叠宽 64px + 过渡、开关浮层、小节头去按钮、Expandable 展开动画、空态/错误态、导航激活态接线、
?session=深链(改用 query 语法的理由:恢复管线只解析 searchParams 且保留 hash,fragment 会双语法互扰——验收 agent 独立复核成立)。验收结论:PASS(独立验收 agent)
已知限制(已文档化)