Skip to content

log-frame: migrate plan-resumed role from ink to frame #5

@esengine

Description

@esengine

Context

src/cli/ui/log-frame.tsx walks each DisplayEvent and either produces a frame atom (row-precise scroll, deterministic layout) or falls back to a legacy ink atom (snap-to-boundary scroll, height estimate). The remaining ink fallbacks are listed in the comment around eventToAtom:

// Fall back to legacy Ink rendering for roles we haven't migrated
// (currently: streaming assistant, plan-replay, plan-resumed; …)

We want to migrate them one by one. This issue is about plan-resumed.

What plan-resumed renders

When a session is resumed and a previously-saved plan is reattached. Existing renderer lives in src/cli/ui/EventLog.tsx around line 444. The event payload is on event.resumedPlan ({ steps, ... }).

Task

  1. Add a planResumedFrame(event, width): Frame builder in log-frame.tsx, near the existing planFrame / ctxBreakdownFrame helpers.
  2. Wire it into the dispatch in eventToAtom so event.role === 'plan-resumed' returns { kind: 'frame', ... } instead of falling through to ink.
  3. Visually match the legacy <EventRow event={event} /> output — header pill + indented step list + any meta lines. Use the existing primitives (borderLeft, vstack, pad, text, rowFrame).
  4. No tests required, but a manual check via npm run dev + a session that has a resumed plan should look identical row for row.

Why it's a good first PR

  • Self-contained: one new function + one branch in the dispatch.
  • The planFrame next door is the closest pattern to copy.
  • No behavior change for any other role.

Tag me on the PR if you get stuck on width budgets or cell layout.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions