Skip to content

refactor(desktop): retire dead Task Ledger CSS and align it with SessionTodoPanel - #4396

Open
liuxiaocs7 wants to merge 1 commit into
apache:mainfrom
liuxiaocs7:liuxiaocs7/task-ledger-css-still-describes-the-retired-nest
Open

refactor(desktop): retire dead Task Ledger CSS and align it with SessionTodoPanel#4396
liuxiaocs7 wants to merge 1 commit into
apache:mainfrom
liuxiaocs7:liuxiaocs7/task-ledger-css-still-describes-the-retired-nest

Conversation

@liuxiaocs7

@liuxiaocs7 liuxiaocs7 commented Aug 31, 2026

Copy link
Copy Markdown
Member

Summary

#4351 replaced the nested Task Ledger demand chain with the Host-owned, flat SessionTodo document (SessionTodoPanel), but apps/desktop/src/renderer/styles/task-ledger.css 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() referencing the never-defined --task-depth, which makes the whole padding declaration invalid at computed-value time — so on main these rows actually render with padding: 0. This reduces the sheet to what the flat <li> renders and renames it to match the component:

  • The row is now a two-column [icon] [text] grid whose content wraps within the panel width — dropping the 4-column grid-template-columns (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.
  • Removed dead rules: -group, the [data-status] icon-color rules (data-status is never set; SessionTodoStatus is only pending/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).
  • Deleted the @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 @container query on the panel (matching workbar/inspector.css / chat-header.css), because the workbar shrinks to SESSION_WORKBAR_MIN_WIDTH (320px) inside a wide window where a viewport @media never fires — the @container approach from fix(desktop): contain deeply nested task rows in the task panel #4215.
  • Renamed styles/task-ledger.cssstyles/session-todo-panel.css and the maka-task-ledger-* class prefix → maka-session-todo-*; updated the @import, the historical maka-tokens.css reference, and regenerated the Astryx surface inventory.

The packages/storage task-ledger-authority.test.ts tmpdir string is a separate storage-layer concept and is intentionally untouched.

Fixes #4394

Behavioral change

On main the row padding is invalid at computed-value time (undefined --task-depth), so task rows render flush with padding: 0. Removing the dead --task-depth restores the intended var(--space-1) var(--space-2) inset, and the row drops from a 4-column grid (with a phantom ≥100px column) to auto 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.

SessionTodo rows — before (main): padding:0 with a 4-column grid squeezing text into a narrow column; after (this PR): restored padding and a two-column grid using the full width

Rendered headlessly from the real stylesheets — main's task-ledger.css vs this PR's session-todo-panel.css — over the actual maka-tokens.css and 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 the Product/Session Workbar → Tasks story.

Verification

  • npm run astryx:surface-inventorypasses (231 files); regenerated docs/astryx-surface-file-inventory.{md,paths} match generator output.
  • node scripts/asf-license-headers.mjs checkpasses.
  • biome lint on all changed source files — 0 violations.
  • Repo-wide grep: no remaining maka-task-ledger-* usage (outside the unrelated storage test) and no dangling task-ledger.css reference.
  • Renderer-architecture snapshot is not affected (its generator scans only .ts/.tsx; no renderer .tsx changed).
  • The visual states already have a real-host surfaceProduct/Session WorkbarTasks / TasksEmpty / TasksLoadFailed (apps/desktop/stories/session-workbar.stories.tsx) render SessionTodoPanel through the workbar's real todo.read service. The populated Tasks story is where the restored row padding (0var(--space-1) var(--space-2)) is visible, with no code change needed there. (An earlier standalone Product/Session Todo story was removed on review: it used a hand-rolled frame and duplicated these states, which apps/desktop/stories/FIDELITY.md disallows.)
  • Before/after screenshot: included in Behavioral change above — rendered headlessly (Playwright + the desktop's Chromium) from the real maka-tokens.css and both stylesheet versions, so it shows the actual computed-layout delta rather than a mock. It is not a full-app capture; the real-host Product/Session Workbar → Tasks story shows the same rows in situ.
  • Not run here (no installed workspace deps): full desktop build/typecheck and the @maka/ui unit test. The @maka/ui change is a className string literal that cannot affect types, and session-todo-panel.test.tsx asserts only text ordering, not classes.

Review focus

The one visible change is the restored row padding (rows render at padding: 0 on main). It shows in the existing Product/Session WorkbarTasks story with no story change needed. Please compare that story — or the running app — on main vs this branch; before/after screenshots still need attaching from a GUI host.

AI use

  • Generative tooling made a substantive contribution

Tool(s) and scope: Authored with Claude Code — analysis of the retired contract (including the invalid --task-depth padding), the CSS reduction and rename, inventory regeneration, and this description. The commit carries a Generated-by: Claude Code trailer.

Checklist

  • Tests cover the change and fail without it
  • Lint, format, typecheck and the affected suites pass locally

Does this PR entail a change in behavior?

  • Yes — described under Behavioral change above
  • No

…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
@github-actions github-actions Bot added the effort/M Under 500 readable lines label Aug 31, 2026
@liuxiaocs7
liuxiaocs7 force-pushed the liuxiaocs7/task-ledger-css-still-describes-the-retired-nest branch 4 times, most recently from 9f43cf7 to b32cfb3 Compare August 31, 2026 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/M Under 500 readable lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Task Ledger CSS still describes the retired nested task row

1 participant