refactor(desktop): retire dead Task Ledger CSS and align it with SessionTodoPanel - #4396
Open
liuxiaocs7 wants to merge 1 commit into
Open
Conversation
…ionTodoPanel (apache#4394) apache#4351 replaced the nested Task Ledger demand chain with the Host-owned, flat SessionTodo document (SessionTodoPanel), but its stylesheet still described the retired four-column, depth-indented tree row. Beyond selectors that could no longer match any element, the row `padding` fed a `calc()` the never-set `--task-depth` custom property, which made the whole padding declaration invalid at computed-value time — so on main the rows actually render with padding: 0. Reduce the sheet to what the flat `<li>` renders and rename it to match the component: - Row is now a two-column `[icon] [text]` grid whose content wraps within the panel width; drop the 4-column grid (which reserved a phantom >=100px empty column) and the `--task-depth` indent. Removing the invalid calc restores the intended `var(--space-1) var(--space-2)` padding the rows were meant to have — a small but real visual change (rows regain their inset/spacing). - Remove dead rules: `-group`, the `[data-status]` icon colors, `-key`/`-subject`/`-meta`/`-detail`, `-terminal`/`-terminal-trigger`, the row `:focus-visible` (the `<li>` is not focusable), and the viewport `@media` block. - Delete the viewport breakpoint rather than porting it: the flat row wraps at any width. Documented that future width-responsive styling should be an `@container` query on the panel (per workbar/inspector.css / chat-header.css), since the workbar shrinks to SESSION_WORKBAR_MIN_WIDTH (320px) inside a wide window where a viewport `@media` never fires. - Rename styles/task-ledger.css -> styles/session-todo-panel.css and the `maka-task-ledger-*` class prefix -> `maka-session-todo-*`; update the @import, the maka-tokens.css reference, and regenerate the Astryx surface inventory. Behavioral: restoring the row padding changes the rendered spacing of task rows. The existing real-host stories (Product/Session Workbar -> Tasks / TasksEmpty / TasksLoadFailed) render SessionTodoPanel through the workbar's `todo.read` service and cover the populated/empty/error states. Generated-by: Claude Code
liuxiaocs7
force-pushed
the
liuxiaocs7/task-ledger-css-still-describes-the-retired-nest
branch
4 times, most recently
from
August 31, 2026 18:58
9f43cf7 to
b32cfb3
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.
Summary
#4351 replaced the nested Task Ledger demand chain with the Host-owned, flat SessionTodo document (
SessionTodoPanel), butapps/desktop/src/renderer/styles/task-ledger.cssstill described the retired four-column, depth-indented tree row.Beyond selectors that could no longer match any element, the row
paddingfed acalc()referencing the never-defined--task-depth, which makes the wholepaddingdeclaration invalid at computed-value time — so onmainthese rows actually render withpadding: 0. This reduces the sheet to what the flat<li>renders and renames it to match the component:[icon] [text]grid whose content wraps within the panel width — dropping the 4-columngrid-template-columns(which reserved a phantom ≥100px empty column) and the--task-depthindent. Removing the invalidcalc()restores the intendedvar(--space-1) var(--space-2)padding the rows were meant to have.-group, the[data-status]icon-color rules (data-statusis never set;SessionTodoStatusis onlypending/in_progress/completed, distinguished by glyph),-key/-subject/-meta/-detail,-terminal/-terminal-trigger(no such elements exist), and the row:focus-visible(the<li>is not focusable).@media (max-width: 620px)block rather than porting it: the flat row wraps at any width. A comment records that future width-responsive styling should be an@containerquery on the panel (matchingworkbar/inspector.css/chat-header.css), because the workbar shrinks toSESSION_WORKBAR_MIN_WIDTH(320px) inside a wide window where a viewport@medianever fires — the@containerapproach from fix(desktop): contain deeply nested task rows in the task panel #4215.styles/task-ledger.css→styles/session-todo-panel.cssand themaka-task-ledger-*class prefix →maka-session-todo-*; updated the@import, the historicalmaka-tokens.cssreference, and regenerated the Astryx surface inventory.The
packages/storagetask-ledger-authority.test.tstmpdir string is a separate storage-layer concept and is intentionally untouched.Fixes #4394
Behavioral change
On
mainthe rowpaddingis invalid at computed-value time (undefined--task-depth), so task rows render flush withpadding: 0. Removing the dead--task-depthrestores the intendedvar(--space-1) var(--space-2)inset, and the row drops from a 4-column grid (with a phantom ≥100px column) toauto minmax(0, 1fr). Net effect: task-list rows regain their horizontal inset and vertical spacing, and long content now wraps within the panel instead of relying on the old auto-sized column.Rendered headlessly from the real stylesheets —
main'stask-ledger.cssvs this PR'ssession-todo-panel.css— over the actualmaka-tokens.cssand the panel's real markup, so it shows the true computed-layout delta rather than a mock (the status glyph is a stand-in). The same rows render in situ in theProduct/Session Workbar → Tasksstory.Verification
npm run astryx:surface-inventory— passes (231 files); regenerateddocs/astryx-surface-file-inventory.{md,paths}match generator output.node scripts/asf-license-headers.mjs check— passes.biome linton all changed source files — 0 violations.maka-task-ledger-*usage (outside the unrelated storage test) and no danglingtask-ledger.cssreference..ts/.tsx; no renderer.tsxchanged).Product/Session Workbar→Tasks/TasksEmpty/TasksLoadFailed(apps/desktop/stories/session-workbar.stories.tsx) renderSessionTodoPanelthrough the workbar's realtodo.readservice. The populatedTasksstory is where the restored row padding (0→var(--space-1) var(--space-2)) is visible, with no code change needed there. (An earlier standaloneProduct/Session Todostory was removed on review: it used a hand-rolled frame and duplicated these states, whichapps/desktop/stories/FIDELITY.mddisallows.)maka-tokens.cssand both stylesheet versions, so it shows the actual computed-layout delta rather than a mock. It is not a full-app capture; the real-hostProduct/Session Workbar → Tasksstory shows the same rows in situ.@maka/uiunit test. The@maka/uichange is a className string literal that cannot affect types, andsession-todo-panel.test.tsxasserts only text ordering, not classes.Review focus
The one visible change is the restored row padding (rows render at
padding: 0onmain). It shows in the existingProduct/Session Workbar→Tasksstory with no story change needed. Please compare that story — or the running app — onmainvs this branch; before/after screenshots still need attaching from a GUI host.AI use
Tool(s) and scope: Authored with Claude Code — analysis of the retired contract (including the invalid
--task-depthpadding), the CSS reduction and rename, inventory regeneration, and this description. The commit carries aGenerated-by: Claude Codetrailer.Checklist
Does this PR entail a change in behavior?