Skip to content

Tracking B3b: change cards webview UI and rollback buttons #1402

Description

@easonLiangWorldedtech

Tracking issue for the B3b PR (branch feat/change-cards-webview-b3b; PR to be opened after review).

Part of the file-write safety series — plan: easonLiangWorldedtech/Zoo-Code#33, epic: #1375. Item: B3b — Change cards webview UI + rollback buttons. Stacks on the B3a PR (#1401); the card payloads and rollback actions already exist on the extension host.

Scope

  • Render the per-step change card in the checkpoint chat message: the summary line ("N files changed this step") + per-file rows; when changeCardDetail === "full" the per-file unified diff is expandable.
  • Rollback buttons: per-file ("restore this file") and per-step ("restore this step"), posting the B3a checkpointRestoreFile / checkpointRestoreStep messages, with a confirm step and the existing error surfacing on failure.
  • The changeCardDetail select control in the Checkpoints settings section (the round trip already exists from B3a) with i18n labels in every locale.

Acceptance

  • Card renders for summary-only payloads (no diff rows) and for full payloads (expandable diffs); suppressed checkpoints still render in history
  • Rollback buttons post the exact B3a payloads; a failed rollback surfaces the B3a i18n error string
  • Settings select binds to cachedState (not live state) and saves via handleSubmit
  • Behavioral webview tests (Vitest JSDOM) for render + button dispatch; CI green (ubuntu unit-test gate), 100% codecov patch coverage on the webview-ui flag

Status

  • PR: to be opened (after B3a review/ship)

PR: #1412

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions