Skip to content

Local-first AI coding agent desktop: Electron + Rust host core + pi Agent Harness + user-installable plugins

style(sidebar): restore the 1px / 2px / 8px list rhythm

ZeroY2895d21de237
diff --git a/apps/desktop/src/styles/sessions.css b/apps/desktop/src/styles/sessions.css
index 0d41bb70e..3674ea9d6 100644
--- a/apps/desktop/src/styles/sessions.css
+++ b/apps/desktop/src/styles/sessions.css
@@ -473,7 +473,9 @@
align-items: center;
justify-content: space-between;
min-height: 24px;
- padding: 4px 4px 0;
+ /* The label opens a section, so its own top padding carries the 8px
+ section-to-section gap; the list below it supplies the 2px back. */
+ padding: 8px 4px 0;
border-radius: var(--radius-sm);
}
@@ -592,17 +594,6 @@
height: 6px;
}
-.sidebar-session-group-title.project-toggle {
- gap: 5px;
-}
-
-.sidebar-session-group-title.project-toggle:hover,
-.sidebar-session-group-title.project-toggle:focus-visible {
- background: var(--ds-bg-hover);
- color: var(--ds-text-primary);
-}
-
-
/* Compact hover card for session rows. Related-session references stay
real buttons so the card remains usable with a keyboard. */
.sidebar-session-hover-card {
@@ -882,11 +873,6 @@
background: var(--ds-accent);
}
-.project-group.active > .sidebar-session-group-header {
- border-radius: var(--radius-sm);
- background: color-mix(in oklab, var(--ds-accent) 4%, transparent);
-}
-
.project-menu {
top: calc(100% + 3px);
}
diff --git a/apps/desktop/src/styles/sidebar-threads.css b/apps/desktop/src/styles/sidebar-threads.css
index ee2d91dcf..790f143a9 100644
--- a/apps/desktop/src/styles/sidebar-threads.css
+++ b/apps/desktop/src/styles/sidebar-threads.css
@@ -4,6 +4,14 @@
lives in sessions.css.
*/
+.thread-item,
+.sidebar-session-group-header {
+ min-height: 28px;
+ border-radius: var(--radius-sm);
+ color: var(--ds-text-secondary);
+ transition: background var(--motion-duration-fast) var(--motion-ease-out), color var(--motion-duration-fast) var(--motion-ease-out);
+}
+
.thread-item {
position: relative;
display: flex;
@@ -11,11 +19,7 @@
align-items: center;
gap: 2px;
overflow: hidden;
- border-radius: var(--radius-sm);
padding: 0 2px 0 0;
- min-height: 28px; /* WorkBuddy-style compact scoped-session row pitch. */
- color: var(--ds-text-secondary);
- transition: background var(--motion-duration-fast) var(--motion-ease-out), color var(--motion-duration-fast) var(--motion-ease-out);
}
.thread-item-main {
@@ -38,14 +42,15 @@
}
.thread-item:hover,
-.thread-item.active {
+.thread-item.active,
+.project-group > .sidebar-session-group-header:hover {
background: var(--ds-bg-hover);
color: var(--ds-text-primary);
}
-/* A blurred window keeps :hover latched on the last row under the cursor;
- * restore the resting paint. Active rows keep their own paint. */
-.sidebar[data-window-blur="true"] .thread-item:hover:not(.active) {
+/* Window blur releases hover, not selection or drag feedback. */
+.sidebar[data-window-blur="true"] .thread-item:hover:not(.active),
+.sidebar[data-window-blur="true"] .project-group:not(.is-drop-target) > .sidebar-session-group-header:hover {
background: transparent;
color: var(--ds-text-secondary);
}
@@ -62,7 +67,11 @@
nudges the whole list up a few pixels before it settles back. */
flex: 1 1 0;
flex-direction: column;
- gap: 2px;
+ /* Baseline of the group ladder: adjacent rows and group headers sit 1px
+ apart. The extra air around an expanded group belongs to the group itself
+ (see `.sidebar-session-group-body.project`), so this gap stays uniform and
+ a collapsed group cannot fork the spacing on its neighbour's state. */
+ gap: 1px;
overflow-x: hidden;
overflow-y: auto;
overscroll-behavior-y: contain;
@@ -131,7 +140,8 @@
gap: 5px;
border-radius: var(--radius-sm);
padding: 5px 6px;
- color: var(--ds-text-secondary);
+ background: transparent;
+ color: inherit;
font-size: var(--text-md); /* project/group labels one step quieter than sessions */
font-weight: var(--font-weight-medium);
line-height: var(--leading-compact);
@@ -140,17 +150,10 @@
touch-action: pan-y;
}
-.sidebar-session-group-title:not(.static):hover {
+.sidebar-session-group-title:focus-visible {
color: var(--ds-text-primary);
}
-/* Same release for the project title's hover tile: a blurred window must not
- * leave it lit while the pointer that caused it is gone. */
-.sidebar[data-window-blur="true"] .sidebar-session-group-title:not(.static):hover {
- background: transparent;
- color: var(--ds-text-secondary);
-}
-
.sidebar-session-group-title svg {
flex: 0 0 auto;
color: var(--ds-text-muted);
@@ -187,25 +190,46 @@
.sidebar-session-group-body {
display: flex;
flex-direction: column;
- gap: 0;
+ /* One hairline between list rows: adjacent rounded row fills read as
+ separate rows instead of one block. A time-group header and the load-more
+ affordance are ordinary rows in that same rhythm. */
+ gap: 1px;
overflow: hidden;
- max-height: 2000px;
- opacity: 1;
- transition: max-height var(--motion-duration-slow) var(--motion-ease-out),
- opacity var(--motion-duration-normal) var(--motion-ease-out);
-}
-
-.sidebar-session-group-body.collapsed {
- max-height: 0;
- opacity: 0;
- pointer-events: none;
}
/* Nested session rows read as children through the indent alone; the tree
rail is gone (D297). */
.sidebar-session-group-body.project {
+ /* A one-row grid: the fold is a real fraction of the measured content, and
+ `opacity` stays 1 — the rows are clipped, never faded. */
+ display: grid;
+ grid-template-rows: 1fr;
margin-left: 13px;
padding-left: 9px;
+ transition: grid-template-rows var(--motion-duration-normal) var(--motion-ease-out);
+}
+
+.sidebar-session-group-body.project.collapsed {
+ grid-template-rows: 0fr;
+ pointer-events: none;
+}
+
+/* The `0fr` row closes only if the clip can shrink below its content. */
+.sidebar-session-group-clip {
+ min-width: 0;
+ min-height: 0;
+ overflow: hidden;
+}
+
+/* The group's inset: 2px between the header and the first row, 7px after the
+ last one, so the container's 1px gap completes the 8px before the next group.
+ Vertical padding on the animating box instead would hold a `0fr` row open. */
+.sidebar-session-group-list {
+ display: flex;
+ flex-direction: column;
+ gap: 1px;
+ padding-top: 2px;
+ padding-bottom: 7px;
}
.sidebar-session-group-body.temporary {
@@ -214,7 +238,7 @@
}
.sidebar-time-group-header {
- padding: 6px 6px 2px 20px;
+ padding: 4px 6px 4px 20px;
color: var(--ds-text-muted);
font-size: var(--text-2xs);
font-weight: var(--font-weight-medium);
@@ -243,12 +267,15 @@
}
.sidebar-session-group-body.standalone {
- max-height: 140px; /* Five compact session rows before internal scrolling. */
+ /* Five compact 28px rows plus the four 1px gaps between them, and the 2px
+ label inset, before the list starts scrolling internally. */
+ max-height: 146px;
min-height: 0;
overflow-x: hidden;
overflow-y: auto;
overscroll-behavior-y: contain;
- padding: 0 2px;
+ /* 2px below the section label, matching every label-to-content pair. */
+ padding: 2px 2px 0;
}
.sidebar-standalone-sessions {
@@ -269,11 +296,14 @@
}
.sidebar-session-group-body.pinned {
- max-height: min(224px, 30vh);
+ /* Eight compact 28px rows plus their seven 1px gaps, and the 2px label
+ inset. */
+ max-height: min(233px, 30vh);
overflow-x: hidden;
overflow-y: auto;
overscroll-behavior-y: contain;
- padding: 0 2px;
+ /* 2px below the section label, matching every label-to-content pair. */
+ padding: 2px 2px 0;
}
.sidebar-pinned-sessions .thread-item-title {
diff --git a/apps/desktop/test/sidebar-navigation.test.mjs b/apps/desktop/test/sidebar-navigation.test.mjs
index aeb8a554c..0f3699d9a 100644
--- a/apps/desktop/test/sidebar-navigation.test.mjs
+++ b/apps/desktop/test/sidebar-navigation.test.mjs
@@ -129,7 +129,9 @@ test("sidebar shows a bounded standalone session list before retained projects",
);
assert.match(
globalStyles,
- /\.sidebar-session-group-body\.standalone\s*\{[\s\S]*?max-height:\s*140px;[\s\S]*?overflow-x:\s*hidden;[\s\S]*?overflow-y:\s*auto;/,
+ // `[^}]*`, not `[\s\S]*?`: the assertion must read this block, not a
+ // `max-height` in some later partial of the concatenated stylesheet.
+ /\.sidebar-session-group-body\.standalone\s*\{[^}]*max-height:\s*146px;[^}]*overflow-x:\s*hidden;[^}]*overflow-y:\s*auto;/,
);
assert.doesNotMatch(sidebarSource, /data-sidebar-project-group="temporary"/);
});
@@ -330,14 +332,29 @@ test("a blurred window releases latched row hover and actions", () => {
assert.match(sidebarSource, /data-window-blur=\{windowFocused \? undefined : "true"\}/);
assert.match(
globalStyles,
- /\.sidebar\[data-window-blur="true"\] \.thread-item:hover:not\(\.active\)\s*\{[^}]*background:\s*transparent;/s,
+ /\.sidebar\[data-window-blur="true"\] \.thread-item:hover:not\(\.active\),\s*\.sidebar\[data-window-blur="true"\] \.project-group:not\(\.is-drop-target\) > \.sidebar-session-group-header:hover\s*\{[^}]*background:\s*transparent;/s,
);
assert.match(
globalStyles,
/\.sidebar\[data-window-blur="true"\] \.thread-item:hover \.thread-item-more:not\(\[aria-expanded="true"\]\),[\s\S]*?opacity:\s*0;\s*\n\s*pointer-events:\s*none;/,
);
+});
+
+test("sidebar rows share one hover surface and workspace context never paints selection", () => {
+ assert.match(
+ globalStyles,
+ /\.thread-item,\s*\.sidebar-session-group-header\s*\{[^}]*border-radius:\s*var\(--radius-sm\);[^}]*transition:/,
+ );
assert.match(
globalStyles,
- /\.sidebar\[data-window-blur="true"\] \.sidebar-session-group-title:not\(\.static\):hover\s*\{[^}]*background:\s*transparent;/s,
+ /\.thread-item:hover,\s*\.thread-item.active,\s*\.project-group > \.sidebar-session-group-header:hover\s*\{[^}]*background:\s*var\(--ds-bg-hover\);/,
);
+ assert.match(globalStyles, /\.thread-item.active\s*\{[^}]*background:\s*var\(--ds-bg-active\);/);
+ assert.match(globalStyles, /\.sidebar-session-group-title\s*\{[^}]*background:\s*transparent;[^}]*color:\s*inherit;/);
+ assert.doesNotMatch(globalStyles, /\.project-group\.active/);
+ assert.doesNotMatch(globalStyles, /\.sidebar-session-group-title\.project-toggle:hover/);
+ assert.match(sidebarSource, /data-current-workspace=\{entry\.active \? "true" : undefined\}/);
+ assert.match(globalStyles, /:focus-visible\s*\{[^}]*outline:\s*1\.5px solid/);
+ assert.match(globalStyles, /\.project-group\.is-drop-target > \.sidebar-session-group-header\s*\{[^}]*outline:[^}]*background:/);
+ assert.match(globalStyles, /@media \(prefers-reduced-motion: reduce\)\s*\{[\s\S]*?\.thread-item,\s*\.sidebar-session-group-header\s*\{\s*transition-duration:\s*0\.01ms !important;/);
});
diff --git a/docs/spec/04-ux/01-ui-ia.md b/docs/spec/04-ux/01-ui-ia.md
index 178feb740..31a4a048a 100644
--- a/docs/spec/04-ux/01-ui-ia.md
+++ b/docs/spec/04-ux/01-ui-ia.md
@@ -184,7 +184,7 @@ destination, chat as the home surface, tools and permissions inline.
toolbar places sorting before new-session creation. Both headings keep quiet
glyph actions and also accept a right-click create menu on the heading or empty
list chrome so section creation stays discoverable
- without extra chrome. Its list shows at most five compact rows (140px) before
+ without extra chrome. Its list shows at most five compact rows (146px) before
scrolling internally, so standalone work stays visible without displacing
project navigation. The following `Projects` heading exposes the
folder-picker action; retained project groups use the remaining height and
@@ -192,8 +192,12 @@ destination, chat as the home surface, tools and permissions inline.
- **Identity**: each project group is keyed by a host-owned logical group id;
each root path remains canonical and is never inferred from an ambiguous
folder basename. Legacy single-folder projects are compatibility groups.
-- **Header**: project name, active state, disclosure, new-task action, and an
- overflow menu. The directory title is one full-row disclosure target;
+- **Header**: project name, current-workspace dot, disclosure, new-task action,
+ and an overflow menu. Workspace context is not navigation selection: project
+ headers have no persistent selected background, including when no conversation
+ is selected. Only the current conversation on the chat page receives selected
+ row paint. Project and conversation rows share full-row hover feedback; the
+ project title itself stays transparent. The directory title is one full-row disclosure target;
collapse/expand affects only child visibility, and adjacent groups form one
dense tree rather than detached cards. Hovering or focusing the project title
reveals the full project path. Pressing the title and moving 8px reorders
diff --git a/docs/spec/04-ux/07-ui-design-system.md b/docs/spec/04-ux/07-ui-design-system.md
index 5ba914777..e1914d742 100644
--- a/docs/spec/04-ux/07-ui-design-system.md
+++ b/docs/spec/04-ux/07-ui-design-system.md
@@ -416,6 +416,7 @@ Weights use `--font-weight-*` tokens only (Codex uses variable-font intermediate
| Token | Value | Usage |
|---|---|---|
+| `space-0.25` | 1px | Hairline row gaps in dense list rhythms (sidebar session rows, settings rail items) |
| `space-0.5` | 2px | Tight inline gaps |
| `space-1` | 4px | Icon-text gaps, badge padding |
| `space-1.5` | 6px | Compact inner padding |
@@ -571,7 +572,7 @@ floating layers where an edge is an elevation cue rather than a partition.
| Tile | `--ds-tile` (3.5% text mix); hover `--ds-tile-hover` (6%); deep `--ds-tile-deep` (8%) | Panels, list rows, cards, form fields, chips, code blocks, empty states |
| Raised | `--ds-raised` + `--ds-raised-shadow` | The active pill of a segmented control, a disclosed detail block, a recorder keycap |
| Dock | `--ds-bg-dock` (the column), `--ds-bg-dock-raised` (its header and viewer strips) | The work-panel column and the bars inside it. Both are tokens, not literals, so a contributed theme can move them (D419) |
-| Settings rail | `--ds-settings-rail-bg` (light `#f4f4f4`, dark `#000000`) | Full-window settings navigation column |
+| Sidebar / settings rail | `--ds-bg-sidebar` (opaque fallback: light `#f3f3f3`, dark `#000000`), `--ds-bg-sidebar-image`, shared macOS glass tint/sheen | One `sidebar-surface` material for both navigation columns; content stays opaque |
| Settings search | `--ds-settings-field-bg` (light `#ffffff`, dark `#212121`) | Search pill on the settings rail |
| Active settings item | `--ds-settings-nav-active` (light 12% `#1a1c1f` mixed over white; dark 10% `--gray-0` over transparent) | Selected navigation pill |
| Inset search | `--ds-field-inset-bg`, `--ds-field-inset-focus-bg` (light `#f3f3f3` / white; dark 5% / 7% primary-text mix over transparent) | Plugin search and Agent capability search, including focus |
@@ -583,6 +584,15 @@ floating layers where an edge is an elevation cue rather than a partition.
| Disabled send chip | `--ds-send-disabled-bg`, `--ds-send-disabled-fg` (light `#8e8e90` / `#ffffff`; dark 18% text mix / 70% `--gray-900`) | The composer's disabled send button |
| Composer placeholder | `--ds-placeholder-ink` (light `#4a4c4f`, dark 42% white) | Input and placeholder ink in both composer states |
+Main and settings navigation share the same material, not just matching colors.
+The legacy `--ds-settings-rail-bg` remains readable with the shared built-in
+palette and supplies the sidebar color fallback, including theme overrides.
+An explicit `--ds-bg-sidebar` override takes precedence. This preserves legacy
+color reads and inputs without retaining
+an independent settings-only plate or creating a circular alias. On macOS the
+shared tint derives from that color; on other platforms the shared plate is
+opaque. Background imagery uses `--ds-bg-sidebar-image` for both rails.
+
The dark composer shell consumes `--ds-bg-elevated-primary` directly; light
continues to use `--ds-bg-composer`. Switch on-state knobs consume
`--ds-switch-knob-on` in both palettes. These fills keep their built-in paint,
@@ -1217,9 +1227,10 @@ Full component contract and usage rules: [08-component-spec.md §17](08-componen
|---|---|
| **Base padding 8px (space-2)** | Default inner padding for list items, form groups |
| **Message gap 10px** | Between chat message rows — denser WorkBuddy-like transcript |
-| **Section gap 16px (space-4)** | Between distinct UI sections (sidebar sections, settings groups) |
+| **Section gap 16px (space-4)** | Between distinct UI sections (destination pages, settings groups, page-level blocks) |
| **Panel gap 0px** | Panels touch edge-to-edge with border-subtle separator — no gutters |
| **Compact list rows 28px height** | Sidebar session items, settings list rows |
+| **Sidebar rhythm 1px / 2px / 8px** | Sidebar lists: 1px between rows, 2px from a group header or section label to its first row, 8px after an expanded project group and between sidebar sections (1px when the preceding group is collapsed) |
| **Button rows 32px height** | Standard buttons |
| **Never exceed 24px vertical gap** | Even for "breathing room" — this is a workstation |
| **Max content width 720px** | Chat messages, tool disclosure rows — prevent over-wide eye-span |
@@ -1292,7 +1303,7 @@ Full component contract and usage rules: [08-component-spec.md §17](08-componen
the only counts on the page. It has no hero block, no decorative gradient,
and no page-level counter run
- **Settings**: full-page Codex shell per D063/D090/D133/D166 (275px compact
- eight-destination rail, `#f4f4f4` light, elevated content cards, Back to app);
+ navigation rail sharing the main sidebar material, elevated content cards, Back to app);
per D092, the content cards fill the pane width available from the current
window instead of retaining D070's fixed 720px cap — the earlier in-shell
200px rail and broad grouped directory are superseded
diff --git a/docs/spec/04-ux/08-component-spec.md b/docs/spec/04-ux/08-component-spec.md
index ff9ba3ffc..7640670de 100644
--- a/docs/spec/04-ux/08-component-spec.md
+++ b/docs/spec/04-ux/08-component-spec.md
@@ -54,7 +54,12 @@ Outer frame that positions Topbar, Sidebar, MainChat, and WorkPanel. Owns resize
collapse and expand use a mounted-then-animated dock transition (entrance
`sidebar-in`, exit `sidebar-out` keyframes) that mirrors the work-panel dock:
the aside stays in the tree through the exit keyframe, then unmounts
- (`is-exiting` flag + `animationend` guard, with a timeout fallback)
+ (`is-exiting` flag + `animationend` guard, with a timeout fallback).
+ Entrance requires an explicit `is-entering` phase from a collapsed-to-expanded
+ change on the presented main shell. Initial mounting and return from Settings
+ restore the full retained layout directly. Entering Settings cancels either
+ pending phase, including during rapid navigation; no hidden shell is kept
+ mounted solely to suppress animation.
- Sidebar width: the expanded column is fixed at 275px. Collapse/open changes
only whether the column is present; the historical resize handle is hidden
and legacy persisted width preferences are ignored.
@@ -144,8 +149,10 @@ Outer frame that positions Topbar, Sidebar, MainChat, and WorkPanel. Owns resize
(D348). `nativeTheme.themeSource` follows the app theme preference (`system` /
`light` / `dark` / plugin base) so the material's light or dark plate matches
the renderer. Vibrancy is re-applied only when that source changes; a missing
- plugin theme falls back to `system`. Only the `.sidebar` and any rendered `.sidebar-rail` surface
- are translucent; the renderer adds a thin theme tint
+ plugin theme falls back to `system`. Main and settings navigation share the
+ `.sidebar-surface` material, alongside any rendered `.sidebar-rail`; the
+ settings shell ancestry is transparent but its content pane and titlebar stay
+ opaque. The renderer adds a thin theme tint
(`--ds-sidebar-glass-tint`, 40% dark / 55% light) plus a top/bottom sheen.
The dock carries no seam or hairline: the glass meets the opaque main pane
flush, so the only edge cue is the tint's natural change against the pane.
@@ -401,8 +408,10 @@ visually distinct from list content.
| Session in progress | Orange breathing dot; static under reduced motion |
| Session completed | Green check mark from the latest unread task notification when the row is not selected |
| Session failed | Red circled alert mark from the latest unread task notification when the row is not selected |
-| Hover session | bg-tertiary background |
-| Active project | Header carries active state; topbar follows that workspace; composer exposes no workspace identity |
+| Hover row | Project headers and all conversation rows share one full-row `--ds-bg-hover` surface, radius and transition; selected conversation fill takes precedence |
+| Current workspace | Project header shows the workspace dot, never a persistent selection fill; topbar follows that workspace; composer exposes no workspace identity |
+| Navigation selection | Only the selected conversation on the chat page uses `--ds-bg-active`, including pinned and standalone rows; folding its group never transfers selection to the header. No conversation or a non-chat page means no selected conversation row |
+| Keyboard focus | The focused control keeps its visible outline; the project title stays transparent and independent action buttons retain their own hover feedback |
| Collapsed project | Header remains visible; unpinned child conversations are hidden; global pins remain visible |
| Archived row | Hidden by default; visible in the explicit archived view |
| No retained project | Compact Open project entry; standalone Sessions rows remain available |
@@ -531,7 +540,7 @@ visually distinct from list content.
Projects, independent of date buckets, project collapse, retained tabs, and
each project's ten-row history limit. Each pin shows its project display
name (full path on hover), or Temporary space for a path-less conversation.
- The section is omitted when empty and scrolls within `min(224px, 30vh)` when
+ The section is omitted when empty and scrolls within `min(233px, 30vh)` when
needed. Its rows reuse normal selection, status, hover, and overflow actions.
- Pinning moves the existing row into that section; unpinning returns it to
normal project or temporary history, subject to existing folding and closed
@@ -1166,6 +1175,49 @@ SESSIONS [msg+][↕]
Session title
```
+Rows inside a project group are dated. The today bucket draws no header;
+yesterday, the previous 7 days, the previous 14 days, and everything older each
+draw a muted uppercase label above their rows, and only a bucket that holds rows
+draws one:
+
+```text
+[folder] current-project [+]
+ YESTERDAY
+ Session title
+ Session title
+```
+
+That label is an ordinary row of the list rhythm — no disclosure, no state, no
+`aria-expanded` — unlike a project header, which is a real collapsible group.
+
+Spacing ladder in the sidebar lists (`space-0.25` / `space-0.5` / `space-2` per
+`04-ux/07-ui-design-system.md` §6.1):
+
+| Relation | Gap |
+|---|---|
+| Row to row, including a date label and the load-more row | 1px |
+| Project group header to its first row | 2px |
+| Last row of an expanded group to the next group | 8px |
+| Collapsed group to the next group | 1px |
+| Section label to its first row | 2px |
+| Sidebar section to sidebar section | 8px |
+
+The 8px tail belongs to the expanded group itself, so the spacing is decided by
+the preceding group alone: an expanded group is followed by 8px whether the next
+group is expanded or collapsed, and a collapsed group is followed by 1px either
+way.
+
+The fold is one motion, not two. A collapsed group is a single grid row that
+animates `1fr` → `0fr` over the 200ms normal duration, so every frame is a real
+fraction of the group's measured height instead of a `max-height` clamp that
+spends most of its curve above the content and then snaps. The rows are clipped
+by an inner box with `min-height: 0`, never faded — opacity stays 1 for the whole
+fold — and the 2px / 7px inset lives on the list inside that clip, so it travels
+with the rows instead of holding the closed row open. Under
+`prefers-reduced-motion: reduce` the fold keeps both endpoints and runs in a
+near-zero duration. A folded group keeps its rows mounted, `aria-hidden`, and
+`inert`, so they leave the tab order as well as the accessibility tree.
+
### 6.3 States
| State | Appearance |
@@ -1235,7 +1287,8 @@ SESSIONS [msg+][↕]
local view controls rather than host queries.
- Temporary means **not bound to a project**, not ephemeral storage; these
sessions survive restart.
-- The standalone Sessions body shows at most five compact 28px rows and
+- The standalone Sessions body is a 146px window over five compact 28px rows,
+ their 1px row gaps, and the 2px label inset; it
scrolls internally when more rows exist. The Projects list uses the remaining
sidebar height and scrolls independently; neither region scrolls the footer
or primary navigation. Both list scrollbars use the same global 6px,
diff --git a/docs/spec/08-meta/decisions-log.md b/docs/spec/08-meta/decisions-log.md
index 7d83ae5ac..07b29fd39 100644
--- a/docs/spec/08-meta/decisions-log.md
+++ b/docs/spec/08-meta/decisions-log.md
@@ -5758,3 +5758,105 @@ that was sitting at the bottom — including after the turn had finished.
- Renderer plus one narrow main-process capability: no protocol, schema, host
RPC, permission, storage, or preference change. See ADR 0273,
`03-runtime/01-ipc-protocol.md` §9, `04-ux/08-component-spec.md`, and E2E-258.
+## 2026-09-16 — The sidebar list rhythm is 1px / 2px / 8px
+
+- The sidebar's session lists had no rhythm to read. Rows and group headers sat
+ flush inside a group (a 0 gap), two project groups sat 2px apart, and the only
+ air was the 4px above a section label. Adjacent 28px rows painted rounded
+ hover fills that touched, so two rows read as one block, a collapsed group sat
+ as far from its neighbour as an expanded group with ten rows under it, and a
+ section label was closer to the rows above it than to the rows it introduces.
+- The lists now state one ladder: rows sit 1px apart, a project group header and
+ a section label sit 2px above their first row, a sidebar section sits 8px
+ below the one above it, and an expanded project group carries an 8px tail.
+- That tail belongs to the expanded group itself, so the spacing is decided by
+ the preceding group alone: an expanded group is followed by 8px whether the
+ next group is expanded or collapsed, and a collapsed group by 1px either way.
+ The scroller's own gap stays a uniform 1px and the difference lives in the
+ group body's inset, which leaves with the rows. Collapsing a group therefore
+ cannot fork the spacing on a neighbour's state, and cannot snap its own tail.
+- The dated labels inside a project group are ordinary rows of that rhythm
+ rather than a second level of groups: they keep no state, no disclosure, and
+ no `aria-expanded`, and their own inset becomes a symmetric 4px instead of 6px
+ above and 2px below, so a label no longer outweighs the 1px row gap it sits in.
+- `space-0.25` (1px) joins the spacing scale as the hairline step for dense list
+ rhythms; the settings rail already used 1px between its navigation items. The
+ section-gap rule no longer claims the sidebar, which has its own rhythm.
+- Two row budgets follow the pitch: the pinned body still shows eight rows
+ (233px, was 224px) and the standalone Sessions body still shows five (146px,
+ was 140px), because the 28px row grid no longer fits its own gaps inside the
+ old numbers.
+- Renderer only: no protocol, storage, host, permission, or migration change.
+ See `04-ux/07-ui-design-system.md` §6.1 and §13, and
+ `04-ux/08-component-spec.md` §6.2 and §6.6.
+
+## 2026-09-16 — The sidebar project group folds as one grid row
+
+- The rhythm above shipped with the group fold animating `max-height: 2000px →
+ 0` over the 300ms slow duration, plus a separate 200ms opacity fade and a
+ padding transition. A `max-height` curve spends most of its length above the
+ content, so the visible move was a short snap at the end, and the shorter
+ opacity curve emptied the group roughly two thirds of the way through: the
+ rows disappeared first and the empty box closed afterwards. Collapsing a
+ project read as two separate animations.
+- The group body is now a one-row grid whose row animates `1fr` → `0fr` over the
+ 200ms normal duration. Every frame is a real fraction of the group's measured
+ height, so the fold is a single continuous motion, and `opacity` stays 1 for
+ the whole fold — the rows leave by being clipped, not by fading.
+- The body is three layers: the grid, a clip with `min-height: 0` and
+ `overflow: hidden`, and the list that owns the 1px row gap and the fixed
+ 2px / 7px inset. The inset has to sit inside the clip, because vertical
+ padding on the animating box holds a `0fr` row open and leaves the group's
+ tail behind after its rows are gone.
+- A folded group keeps its rows mounted inside the `0fr` row, so it is `inert`
+ as well as `aria-hidden` and leaves the tab order. Under
+ `prefers-reduced-motion: reduce` the fold keeps both endpoints and runs in a
+ near-zero duration.
+- The scroll budgets, the indent, the pinned and standalone lists, and the
+ shared `.sidebar-session-group-body` flex column are unchanged; only the
+ project body folds as a grid.
+- Renderer only: no protocol, storage, host, permission, or migration change.
+ See `04-ux/08-component-spec.md` §6.2 and
+ `06-delivery/04-e2e-test-plan.md` E2E-LAYOUT-sidebar-project-group-fold.
+
+## 2026-09-17 — Sidebar selection is distinct from workspace context
+
+- Project headers and project, pinned and standalone conversation rows share
+ one row-level hover surface, radius and transition. Project title buttons
+ stay transparent; selected conversation paint takes precedence over hover.
+- A project is a workspace/disclosure control, not a separate selected page.
+ The current workspace keeps its dot and all existing workspace behavior but
+ no persistent row fill, including when no conversation is selected. The
+ renderer marks that context with `data-current-workspace`, not an `active`
+ project class. Session selection remains chat-page-aware and follows the
+ destination immediately while a switch is pending.
+- Folding a selected conversation does not transfer selection to its project.
+ Keyboard focus retains its outline, action buttons retain local feedback,
+ window blur releases hover without clearing selection, and drop-target paint
+ takes precedence over hover.
+- Renderer presentation only: no persistence, workspace activation, permissions
+ or protocol changes. See `04-ux/01-ui-ia.md`, `04-ux/08-component-spec.md`,
+ `04-ux/09-interaction-patterns.md` §9.1c and
+ E2E-LAYOUT-sidebar-row-states in `06-delivery/04-e2e-test-plan.md`.
+
+## 2026-09-17 — Settings shares sidebar material and restores layout without entrance
+
+- Main and settings navigation now share `sidebar-surface`: the same opaque
+ color/image fallback on Windows/Linux and the existing native vibrancy plus
+ tint/sheen on macOS. Settings wrapper ancestry allows that native material
+ through, while its content pane and content-column titlebar remain opaque.
+ Only the inner settings content animates, not the navigation backing.
+- Built-in settings rail colors no longer diverge from the sidebar. Legacy
+ `--ds-settings-rail-bg` remains an optional shared fallback; a canonical
+ `--ds-bg-sidebar` override wins. No theme or native-window API changes.
+- Sidebar mounting no longer implies expansion. A dedicated transition hook
+ distinguishes visible collapsed-state changes from route restoration. Only
+ real collapse/expand changes animate; settings navigation cancels unfinished
+ phases, and returning restores the retained width/state without replaying
+ `sidebar-in`. Animation-end guards, scoped timeout cleanup, auto-restore and
+ reduced motion remain supported. Boot presentation uses the existing splash
+ reveal instead of a second sidebar width animation.
+- No changes to item indentation, widths, workspace state, data or permissions.
+ See `04-ux/06-settings-ia.md`, `04-ux/07-ui-design-system.md`,
+ `04-ux/08-component-spec.md` and E2E-LAYOUT-sidebar-settings in
+ `06-delivery/04-e2e-test-plan.md`.
diff --git a/docs/zh-CN/spec/04-ux/01-ui-ia.md b/docs/zh-CN/spec/04-ux/01-ui-ia.md
index ce1130a41..9d4a817af 100644
--- a/docs/zh-CN/spec/04-ux/01-ui-ia.md
+++ b/docs/zh-CN/spec/04-ux/01-ui-ia.md
@@ -157,15 +157,18 @@
工具栏在创建新会话之前进行排序。两个标题都保持沉默
字形操作,还接受标题或空白上的右键单击创建菜单
列出 chrome,以便部分创建保持可发现性
- 无需额外镀铬。它的列表之前最多显示五个紧凑行(140px)
+ 无需额外镀铬。它的列表之前最多显示五个紧凑行(146px)
内部滚动,因此独立作品保持可见而不会移位
项目导航。以下 `Projects` 标题公开了
文件夹选择器操作;保留的项目组使用剩余的高度和
独立滚动。
- **身份**:每个组都由规范化的完整项目路径作为密钥,从不
通过可能不明确的文件夹基名。
-- **标题**:项目名称、活动状态、披露、新任务操作和
- 溢出菜单。目录标题是一个整行的披露目标;
+- **标题**:项目名称、当前工作区圆点、披露、新任务操作和
+ 溢出菜单。工作区上下文不等于导航选中:项目标题不绘制持久选中背景,
+ 没有选中会话时也不例外。只有聊天页当前会话显示选中背景。
+ 项目与会话共享整行悬停反馈,项目标题按钮自身保持透明。
+ 目录标题是一个整行的披露目标;
collapse/expand 仅影响子级可见性,相邻组形成一个
密集的树而不是分离的卡片。悬停或聚焦项目标题
揭示完整的项目路径。
diff --git a/docs/zh-CN/spec/04-ux/07-ui-design-system.md b/docs/zh-CN/spec/04-ux/07-ui-design-system.md
index 9afbed83d..1ee5ba2ba 100644
--- a/docs/zh-CN/spec/04-ux/07-ui-design-system.md
+++ b/docs/zh-CN/spec/04-ux/07-ui-design-system.md
@@ -383,6 +383,7 @@ UI 字体栈可从设置 → 基础 → 外观中由用户覆盖(ADR 0083)
| 代币 | 价值 | 用途 |
|---|---|---|
+| `space-0.25` | 1像素 | 密集列表节奏中的发丝行间隙(侧边栏会话行、设置导航项) |
| `space-0.5` | 2像素 | 紧密的内嵌间隙 |
| `space-1` | 4像素 | 图标文本间隙、徽章填充 |
| `space-1.5` | 6像素 | 紧凑的内垫 |
@@ -515,7 +516,7 @@ shadow-lg: 0 8px 24px rgba(0,0,0,0.12)
| 色块 | `--ds-tile`(文字色 3.5% 混合);悬停 `--ds-tile-hover`(6%);加深 `--ds-tile-deep`(8%) | 面板、列表行、卡片、表单字段、芯片、代码块、空状态 |
| 抬起 | `--ds-raised` + `--ds-raised-shadow` | 分段控件的当前项、展开的详情块、录制键帽 |
| 停靠列 | `--ds-bg-dock`(列本身)、`--ds-bg-dock-raised`(其标题栏与查看器条目栏) | 工作面板列及其内部条目栏。两者都是标记而非字面量,插件主题可以覆盖(D419) |
-| 设置导航轨 | `--ds-settings-rail-bg`(浅色 `#f4f4f4`、深色 `#000000`) | 全窗口设置导航列 |
+| 主侧栏 / 设置导航 | `--ds-bg-sidebar`(不透明回退:浅色 `#f3f3f3`、深色 `#000000`)、`--ds-bg-sidebar-image` 和共享 macOS tint/sheen | 两处导航使用同一 `sidebar-surface` 材质,内容区保持不透明 |
| 设置搜索 | `--ds-settings-field-bg`(浅色 `#ffffff`、深色 `#212121`) | 导航轨搜索框 |
| 设置选中项 | `--ds-settings-nav-active`(浅色为 12% `#1a1c1f` 混合白底;深色为 10% `--gray-0` 混合透明底) | 选中导航胶囊 |
| 内嵌搜索 | `--ds-field-inset-bg`、`--ds-field-inset-focus-bg`(浅色 `#f3f3f3` / 白色;深色为 5% / 7% 主文本色混合透明底) | 插件搜索和 Agent 能力搜索,包含焦点状态 |
@@ -527,6 +528,11 @@ shadow-lg: 0 8px 24px rgba(0,0,0,0.12)
| 禁用发送芯片 | `--ds-send-disabled-bg`、`--ds-send-disabled-fg`(浅色 `#8e8e90` / `#ffffff`;深色 18% 文字色混合 / 70% `--gray-900`) | 输入框的禁用发送按钮 |
| 输入占位符 | `--ds-placeholder-ink`(浅色 `#4a4c4f`、深色 42% 白) | 两种输入框状态的输入与占位墨色 |
+主侧栏与设置导航共享整套材质,不仅是颜色相近。旧 `--ds-settings-rail-bg` 保留共享调色板的
+可读默认值,并作为两处侧栏颜色的回退,继续支持主题覆盖;显式 `--ds-bg-sidebar` 优先。
+这样保留旧主题颜色读取和输入,不再维持独立设置底板,也不形成循环别名。
+macOS 的共享 tint 从该颜色派生,其他平台使用不透明背景;两处均支持 `--ds-bg-sidebar-image`。
+
深色输入框壳直接使用 `--ds-bg-elevated-primary`,浅色继续使用
`--ds-bg-composer`。开启状态的开关旋钮在两套调色板中均使用
`--ds-switch-knob-on`。这些表面保留内置配色、焦点环和阴影,插件样式可通过变量
@@ -1100,9 +1106,10 @@ Linux 保留淡入淡出和滑动退出。
|---|---|
| **基础内边距 8px(空格-2)** | 列表项、表单组的默认内部填充 |
| **消息间隙10px** | 聊天消息行之间——更密集的类似 WorkBuddy 的文字记录 |
-| **节间隙 16px(空间 4)** | 在不同的 UI 部分(侧边栏部分、设置组)之间 |
+| **节间隙 16px(空间 4)** | 在不同的 UI 部分(目标页面、设置组、页面级区块)之间 |
| **面板间隙0px** | 面板边对边接触,并带有微妙的边框分隔符 - 无排水沟 |
| **紧凑列表行 28 像素高度** | 侧边栏会话项目、设置列表行 |
+| **侧边栏节奏 1px / 2px / 8px** | 侧边栏列表:行与行之间 1px;分组标题或分区标签到首行 2px;展开的项目分组之后以及侧边栏分区之间 8px(前一个分组折叠时为 1px) |
| **按钮行 32px 高度** | 标准按钮 |
| **垂直间隙切勿超过 24 像素** | 即使是“呼吸空间”——这也是一个工作站 |
| **最大内容宽度 720 像素** | 聊天消息、工具披露行——防止眼距过宽 |
@@ -1174,7 +1181,7 @@ Linux 保留淡入淡出和滑动退出。
其固定/所有项目/已存档分组是面板内标题条,并承载页面上唯一的计数。
它没有英雄区块、装饰渐变,也没有页面级计数器串
- **设置**:按照 D063/D090/D133/D166 的全页 Codex shell(275 像素紧凑型
- 八个目的地铁路、`#f4f4f4` 灯、高架内容卡、返回应用程序);
+ 与主侧栏共享材质的导航、高架内容卡、返回应用程序);
根据 D092,内容卡填充当前可用的窗格宽度
窗口而不是保留 D070 的固定 720px 上限 - 早期的 in-shell
200px 轨道和广泛的分组目录被取代
diff --git a/docs/zh-CN/spec/04-ux/08-component-spec.md b/docs/zh-CN/spec/04-ux/08-component-spec.md
index 8d464f96e..b45addb46 100644
--- a/docs/zh-CN/spec/04-ux/08-component-spec.md
+++ b/docs/zh-CN/spec/04-ux/08-component-spec.md
@@ -57,7 +57,9 @@
折叠和展开使用安装后动画的停靠过渡(入口
`sidebar-in`,退出 `sidebar-out` 关键帧),镜像工作面板停靠:
侧面通过退出关键帧保留在树中,然后卸载
- (`is-exiting` 标志 + `animationend` 防护,具有超时回退)
+ (`is-exiting` 标志 + `animationend` 防护,具有超时回退)。只有可见主界面发生
+ 折叠到展开的变化才进入显式 `is-entering` 阶段;首次挂载及从设置返回直接恢复布局。
+ 进入设置会取消未完成的入场或退出阶段,快速往返也不重播;不为抑制动画保留隐藏主界面。
- 侧边栏宽度:展开列固定为 275px。折叠/展开只改变列是否存在;历史上的
调整大小手柄会隐藏,旧的持久化宽度偏好会被忽略。
- 工作面板折叠:唯一的控件位于会话窗格标题栏右上角
@@ -144,7 +146,9 @@
- macOS 启用 Electron 原生 `vibrancy: "sidebar"` source-list 材质,配合
`visualEffectState: "followWindow"` 和透明窗口底(D348)。`nativeTheme.themeSource`
跟随应用主题偏好(`system` / `light` / `dark` / 插件 base),让毛玻璃底板与
- 渲染器一致。仅在该来源变化时重设 vibrancy;缺失的插件主题回落 `system`。只有 `.sidebar` 和已渲染的 `.sidebar-rail` 半透明;渲染器叠加
+ 渲染器一致。仅在该来源变化时重设 vibrancy;缺失的插件主题回落 `system`。
+ 主侧栏与设置导航共享 `.sidebar-surface` 材质,已渲染的 `.sidebar-rail` 同样半透明。
+ 设置外壳透明,但其右侧内容和顶部条保持不透明;渲染器叠加
一层薄主题 tint(`--ds-sidebar-glass-tint`,深色 40% / 浅色 55%)和上下
sheen。侧栏与不透明主面板齐平,没有接缝。`.main-pane`、`.main-titlebar` 和
`.conversation-topbar` 保持不透明 `bg-primary`。Windows/Linux 仍用不透明底。
@@ -339,8 +343,10 @@ Collapsed (48px):
| 会话进行中 | 橙色呼吸点;减少运动时的静态 |
| 会话已完成 | 未选择该行时呈绿色复选标记 |
| 会话失败 | 未选择该行时,红色圆圈警告标记 |
-| 悬停会话 | bg-第三级背景 |
-| 活跃项目 | 标头携带活动状态;顶栏跟随该工作区;输入框不公开任何工作区身份 |
+| 行悬停 | 项目标题与所有会话行共享整行 `--ds-bg-hover` 背景、圆角和过渡;会话选中背景优先 |
+| 当前工作区 | 项目标题通过圆点标记当前工作区,不绘制持久选中背景;顶栏跟随该工作区,输入框不公开工作区身份 |
+| 导航选中 | 仅聊天页当前会话使用 `--ds-bg-active`,包括置顶和独立会话;折叠分组不会把选中态转交给标题。没有选中会话或离开聊天页时,没有选中的会话行 |
+| 键盘焦点 | 焦点控件保留可见轮廓;项目标题按钮保持透明,独立操作按钮保留自己的悬停反馈 |
| 崩溃的项目 | 标题保持可见;儿童对话被隐藏 |
| 存档行 | 默认隐藏;在显式存档视图中可见 |
| 无保留项目 | 紧凑的开放式项目入口;独立会话行仍然可用 |
@@ -876,6 +882,45 @@ SESSIONS [msg+][↕]
Session title
```
+项目分组内的行按日期分桶。今天这一桶不绘制标题;
+昨天、过去 7 天、过去 14 天以及更早的每一桶都会在其行上方绘制一个弱化的全大写标签,
+且只有包含行的桶才会绘制:
+
+```text
+[folder] current-project [+]
+ YESTERDAY
+ Session title
+ Session title
+```
+
+该标签是列表节奏中的普通一行 —— 没有展开披露、没有状态、没有
+`aria-expanded` —— 不同于项目标题,后者才是真正的可折叠分组。
+
+侧边栏列表中的间距阶梯(按 `04-ux/07-ui-design-system.md` §6.1 使用
+`space-0.25` / `space-0.5` / `space-2`):
+
+| 关系 | 间距 |
+|---|---|
+| 行与行之间,包括日期标签与“加载更多”行 | 1px |
+| 项目分组标题到其首行 | 2px |
+| 展开分组最后一行到下一个分组 | 8px |
+| 折叠分组到下一个分组 | 1px |
+| 分区标签到其首行 | 2px |
+| 侧边栏分区到侧边栏分区 | 8px |
+
+8px 的尾部间隙属于展开的分组本身,因此间距仅由前一个分组决定:
+展开的分组之后是 8px,无论下一个分组是展开还是折叠;折叠的分组之后
+则是 1px,两种情况都一样。
+
+折叠是一次运动,而不是两段。折叠的分组是一个单行网格,其行在 200ms 的正常时长内
+从 `1fr` 动画到 `0fr`,因此每一帧都是该分组实测高度的真实比例,而不再是
+`max-height` 夹取——后者的大部分曲线都落在内容高度之上,末端只能瞬间跳变。
+行由带 `min-height: 0` 的内层盒裁剪,绝不淡出:整个折叠过程中 opacity 始终为 1;
+2px / 7px 的内缩量位于该裁剪层内部的列表上,因此它随行一起消失,
+而不会把已关闭的行撑开。在 `prefers-reduced-motion: reduce` 下,折叠保留两端状态,
+并以接近零的时长完成。折叠的分组仍然挂载其行,并保持 `aria-hidden` 与
+`inert`,因此它们既离开可访问性树,也离开 Tab 顺序。
+
### 6.3 状态
| 状态 | 外观 |
@@ -933,8 +978,8 @@ SESSIONS [msg+][↕]
本地视图控件而不是主机查询。
- 临时意味着**不受项目约束**,不是临时存储;这些
会话在重新启动后仍然有效。
-- 独立的会话主体最多显示五个紧凑的 28 像素行,并且
- 当存在更多行时在内部滚动。项目列表使用剩余的
+- 独立的会话主体是一个 146 像素的窗口,容纳五个紧凑的 28 像素行、它们之间的 1px 行间隙
+ 以及 2px 的标签内缩;当存在更多行时在内部滚动。项目列表使用剩余的
侧边栏高度和滚动独立;两个区域都不滚动页脚
或主要导航。两个列表的滚动条与对话区和工作面板使用相同的全局规则:6px、
无轨道、静止时透明;文字色滑块在其列表被悬停、聚焦或滚动时出现,拖动期间
diff --git a/docs/zh-CN/spec/08-meta/decisions-log.md b/docs/zh-CN/spec/08-meta/decisions-log.md
index b3109d52d..53edc9ca5 100644
--- a/docs/zh-CN/spec/08-meta/decisions-log.md
+++ b/docs/zh-CN/spec/08-meta/decisions-log.md
@@ -4330,3 +4330,35 @@ that amendment are retired by ADR 0268; the upstream work-panel lifecycle stays.
- 主进程新增可加的 `project/cloneCheckout({ url, parentPath })`:它克隆到显式指定的父目录并返回 `{ path, name }`,不更改当前工作空间、也不弹出选择器。`project/clone` 为首页切换器保留原有的原生选择器行为。
- 项目创建语义不变:两种来源调用同一个项目 slice 助手,`project-group/create` 仍写入唯一的持久记录,检出目录成为同一逻辑项目组的主要根(ADR 0233)。
- 渲染器加一条窄的主进程能力:协议、schema、host RPC、权限、存储与偏好均无变化。见 ADR 0273、`03-runtime/01-ipc-protocol.md` §9、`04-ux/08-component-spec.md` 与 E2E-258。
+## 2026-09-16 —— 侧边栏列表节奏为 1px / 2px / 8px
+
+- 侧边栏的会话列表原本没有可供阅读的节奏。行与分组标题在一个分组内紧贴(0 间隙),两个项目分组相距 2px,唯一的留白是分区标签上方的那 4px。相邻的 28px 行绘制的圆角悬停填充彼此相接,于是两行读起来像一整块,折叠的分组与相邻分组的距离,和一个展开后带十行的分组一样远,而分区标签距离它上方的行,比距离它所引出的行更近。
+- 这些列表现在陈述同一条阶梯:行与行之间相隔 1px,项目分组标题与分区标签位于其首行上方 2px,侧边栏分区位于其上方分区之下 8px,展开的项目分组带有一段 8px 的尾部。
+- 该尾部属于展开的分组本身,因此间距仅由前一个分组决定:展开的分组之后是 8px,无论下一个分组是展开还是折叠,折叠的分组之后则是 1px,两种情况都一样。滚动容器自身的间隙保持统一的 1px,差异存在于分组主体的内缩量中,它会随行一起消失。因此折叠一个分组既不会让间距取决于相邻分组的状态,也不会让它自己的尾部突然跳变。
+- 项目分组内的日期标签是该节奏中的普通行,而不是第二层分组:它们不保留状态、不保留展开披露,也没有 `aria-expanded`,并且它们自身的内缩量改为对称的 4px,而不再是上方 6px、下方 2px,于是它们不再盖过 1px 的行间隙。
+- `space-0.25`(1px)作为密集列表节奏的发丝级步进加入间距比例;设置栏在其导航项之间本来就已经使用 1px。节间隙规则不再声称适用于侧边栏,侧边栏有自己的节奏。
+- 两个行预算随该节距变化:固定主体仍显示八行(233px,原为 224px),独立的会话主体仍显示五行(146px,原为 140px),因为 28px 的行网格已无法把自身的间隙容纳进旧的数字里。
+- 仅渲染层:无协议、存储、宿主、权限或迁移改动。见 `04-ux/07-ui-design-system.md` §6.1 与 §13,以及 `04-ux/08-component-spec.md` §6.2 与 §6.6。
+
+## 2026-09-16 —— 侧边栏项目分组以单行网格折叠
+
+- 上述节奏上线时,分组折叠使用的是 300ms 慢速时长上的 `max-height: 2000px → 0`,外加一段独立的 200ms opacity 淡出与 padding 过渡。`max-height` 的曲线大部分长度都落在内容高度之上,于是可见的位移只是末尾的一小段跳变;而更短的 opacity 曲线在约三分之二处就把分组清空了:行先消失,空盒子随后才合上。折叠一个项目读起来像是两段彼此分离的动画。
+- 分组主体现在是一个单行网格,其行在 200ms 的正常时长内从 `1fr` 动画到 `0fr`。每一帧都是该分组实测高度的真实比例,因此折叠是一次连续运动,并且整个折叠过程中 `opacity` 始终为 1 —— 行是被裁剪掉的,不是淡出的。
+- 主体由三层组成:网格层、带 `min-height: 0` 与 `overflow: hidden` 的裁剪层,以及持有 1px 行间隙与固定 2px / 7px 内缩量的列表层。内缩量必须位于裁剪层内部,因为动画盒上的垂直内边距会把 `0fr` 行撑开,并在行消失后留下分组的尾部。
+- 折叠的分组仍把行挂载在该 `0fr` 行内,因此它同时是 `inert` 与 `aria-hidden`,并离开 Tab 顺序。在 `prefers-reduced-motion: reduce` 下,折叠保留两端状态并以接近零的时长完成。
+- 滚动预算、缩进、固定与独立列表,以及共享的 `.sidebar-session-group-body` 弹性列都保持不变;只有项目主体以网格折叠。
+- 仅渲染层:无协议、存储、宿主、权限或迁移改动。见 `04-ux/08-component-spec.md` §6.2 与 `06-delivery/04-e2e-test-plan.md` 的 E2E-LAYOUT-sidebar-project-group-fold。
+
+## 2026-09-17 —— 侧边栏选中态与工作区上下文分离
+
+- 项目标题与项目、置顶、独立会话行共享整行悬停背景、圆角和过渡;标题按钮透明,会话选中背景优先于悬停,不再叠加第二层背景。
+- 项目是工作区和折叠控件,不是独立选中的页面。当前工作区保留圆点及业务行为,但不再绘制持久选中背景,没有选中会话时也不例外。上下文由 `data-current-workspace` 标记,不再使用项目的 `active` 类。
+- 会话选中仍以聊天页及正在切换的目标为准;折叠分组不转移选中态。焦点轮廓、操作按钮反馈、窗口失焦释放和拖拽目标优先级保持独立。
+- 仅改变渲染表现,不改变持久化、工作区激活、权限或协议。见 `04-ux/01-ui-ia.md`、`04-ux/08-component-spec.md`、`04-ux/09-interaction-patterns.md` §9.1c 及 `06-delivery/04-e2e-test-plan.md` 的 E2E-LAYOUT-sidebar-row-states。
+
+## 2026-09-17 —— 设置共享侧栏材质,返回直接恢复布局
+
+- 主侧栏与设置导航共享 `sidebar-surface`:Windows/Linux 共享不透明颜色和背景图,macOS 共享现有原生 vibrancy、tint 与 sheen。设置外壳允许材质透出,右侧内容与顶部条保持不透明;仅内容内部播放入场动画。
+- 旧 `--ds-settings-rail-bg` 作为共享颜色的可选回退保留,显式 `--ds-bg-sidebar` 优先;不修改主题或原生窗口 API。
+- 侧栏挂载不再等同于展开。专用过渡 hook 只响应可见主界面的折叠状态变化,设置导航取消未完成阶段,返回恢复既有宽度和状态,不重播 `sidebar-in`。动画事件防护、超时清理、自动恢复及减少动态效果仍保留;首次显示由原有启动揭示处理,不再叠加侧栏宽度动画。
+- 不改变 item 缩进、宽度、工作区状态、数据或权限。见 `04-ux/06-settings-ia.md`、`04-ux/07-ui-design-system.md`、`04-ux/08-component-spec.md` 及 `06-delivery/04-e2e-test-plan.md` 的 E2E-LAYOUT-sidebar-settings。