Skip to content

feat(session-summary): lead with the written summary, not the ledger - #200

Merged
nplez1 merged 1 commit into
nplez1/mainfrom
nplez1/feature-session-summary-written-summary-under-th
Oct 28, 2026
Merged

nplez1 merged 1 commit into
nplez1/mainfrom
nplez1/feature-session-summary-written-summary-under-th

Conversation

@nplez1

@nplez1 nplez1 commented Oct 28, 2026

Copy link
Copy Markdown
Owner

Fixes #195. The Session summary pane sandwiched the written summary between the two disclosures, so
opening it showed a Ledger (3 items) row before a word of the summary.

What changed

LedgerContent (src/renderer/src/components/activity/session-summary-ledger-view.tsx) now renders
the title, then the written summary, then the Ledger and Timeline disclosures, then the
Show the full session switch.

Empty states keep their own slot rather than collapsing the summary's away:

  • report === null → the "Nothing has happened since your last message" fallback sits where the
    report was (already mutually exclusive with it: nothingSince requires !report);
  • no ledger facts → the Ledger disclosure is absent and Timeline stays last;
  • timeline.length === 0 → Timeline absent and Show the full session stays last.

The Activity strip (session-summary-panel.tsx) renders the same body, so it follows for free; it is
unreachable today (docs/reference/session-summary.md § Where it is surfaced). The docstring above
LedgerContent and the reference doc's "pane opens as a brief" bullet are updated with the order.

Verification

  • pnpm test src/renderer/src/components/activity/session-summary-ledger-view.test.tsx — 10 passed,
    including two new order assertions: summary above both disclosures with the switch last, and empty
    sections dropping out while the fallback keeps the summary's slot. The issue noted nothing pinned
    the order; nothing did, and the new test fails against the old order.
  • pnpm tc:web — clean.
  • pnpm run check:code-quality:changed — 0 new findings across the changed files.
  • Lint/format via the commit hook (oxlint, oxfmt, ast-grep, React Doctor).
  • Not validated visually in Electron: a JSX reorder inside one component, pinned by the render-order
    test.

Gate 1 not required: the diff touches only src/renderer/** and docs/**, no global inputs.

Review

Reviewed by Opus 5.5, high: R1 (0 blocking, 2 MINOR, both addressed), delta clean on R2.

Reviewer claude/opus at high reasoning, read-only packet review over the branch's own diff.

  1. The issue's claim that the only scroll container is in SessionSummaryPane.tsx is wrong —
    session-summary-panel.tsx wraps the same view in a ScrollArea capped at max-h-[40vh], where
    a long report now pushes both disclosures below the fold. That strip is unreachable today, so
    nothing anyone can see changes; recorded in case the Activity view returns.
  2. The order test covered only the full case. Fixed on this branch (empty-state order, and the switch
    asserted last after Timeline); the follow-up is test- and doc-only, so the review still covers the
    source it read.

…195)

The pane sandwiched the prose between two disclosures, so opening it showed a
Ledger row before a word of the summary. Reorder to title, summary, then the
Ledger and Timeline disclosures and the full-session switch. Empty states keep
their own slot: the 'nothing since your last message' fallback stays where the
report was, and an absent section simply drops out.

Adds the render-order assertion the issue noted was missing.
@nplez1
nplez1 merged commit 6587eef into nplez1/main Oct 28, 2026
@nplez1
nplez1 deleted the nplez1/feature-session-summary-written-summary-under-th branch October 28, 2026 03:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Session summary — written summary under the title, with Ledger and Timeline below it

1 participant