Skip to content

feat(ui): failure panel#39

Merged
sepehr-safari merged 1 commit into
mainfrom
feat/failure-panel
Jul 11, 2026
Merged

feat(ui): failure panel#39
sepehr-safari merged 1 commit into
mainfrom
feat/failure-panel

Conversation

@sepehr-safari

Copy link
Copy Markdown
Member

Summary

Surfaces the engine's detected failures in a failure panel — a fixed-height
drawer beneath the timeline that lists what detectFailures found for the active
trace, with one-click navigation to the evidence.

  • Ranked list — one row per Failure, ordered critical → warning → info,
    then by first affected event. Each row shows a severity dot, the failure code,
    and its description.
  • Expand for remediation — selecting a row expands its suggested_steps and
    affected event ids (accordion: at most one open at a time).
  • Jump to event — selecting a failure also selects its primary event, so the
    timeline highlights it and the detail pane (feat(ui): message inspector + session panel #30) shows it.
  • Clean + skipped states — a clean trace shows a positive "no failures
    detected"; a detection-skipped large trace (ADR-0007) says so. The status bar
    now carries the severity breakdown (e.g. 2 failures: 1 critical, 1 warning).

Design notes

  • Layout. ui.split is horizontal-only (it lays panes along x), so the
    drawer isn't a vertical split — activeBody is a column: the timeline|detail
    split grows to fill, the 240px failure drawer sits below it. The drawer's list
    scrolls and is capped for pathological inputs.
  • Ordering is display-only. sortedFailureIndices returns indices into the
    engine's failures slice; the slice itself is never reordered. Failure
    identity (the accordion's expanded_failure, each row's jump target) is the
    raw index, so sorting can't desync the state.
  • Same jump semantics as feat(ui): message inspector + session panel #30. Selecting a failure selects + highlights its
    primary event. The literal timeline viewport scroll needs the runner eject
    tracked in feat(ui): interactive open — native dialog + drag-drop (ejected runner) #33 (the runtime owns the virtual list's offset); realistic failure
    evidence is usually already on screen.

Testing

native test -Dplatform=null — 82 headless tests green (macOS local; CI runs
both OSes). New coverage:

  • Pure helpers: severity ordering (critical → warning → info, then first event)
    and the severity-breakdown summary string.
  • Over the failed-auth conformance fixture: the FAILED_AUTHORIZATION row
    renders, remediation is hidden until expanded then shows its steps + affected
    events, and clicking the row expands it and selects the primary event.
  • Workspace: select_failure toggles the accordion and jumps; out-of-range is
    ignored.
  • The accessibility sweep now also covers the failure drawer with an expanded
    entry.

native check --strict clean; native build (ReleaseFast) builds. Living docs
(CURRENT_STATE.md) updated in-branch.

Closes #31

A fixed-height drawer under the timeline surfaces the engine's detected
failures for the active trace:

- Ranked critical -> warning -> info, then by first affected event, over a
  display-order index array (the engine's failure slice is never mutated).
- Each row shows severity, code, and description; selecting one expands its
  remediation steps and affected events (accordion, at most one open) and
  jumps to its primary event, so a failure and its evidence line up.
- A clean trace shows a positive "no failures detected" state; a
  detection-skipped large trace says so instead.
- The status bar now carries the severity breakdown.

split is horizontal-only, so the drawer is a fixed-height child of a vertical
column beneath the timeline|detail split. Jump selects and highlights the
event; the literal viewport scroll rides the runner eject (#33), like the
session jump in #30.

Tests: the ordering and severity-summary helpers (pure), and over the
failed-auth conformance fixture the failure renders, expanding reveals its
steps, and clicking jumps to the event; the a11y sweep now covers the drawer.

Closes #31
@sepehr-safari sepehr-safari added type:feature New capability area:ui Native markup views labels Jul 11, 2026
@sepehr-safari sepehr-safari added this to the S3 — Inspector UI milestone Jul 11, 2026
@sepehr-safari sepehr-safari merged commit d151fdb into main Jul 11, 2026
3 checks passed
@sepehr-safari sepehr-safari deleted the feat/failure-panel branch July 11, 2026 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ui Native markup views type:feature New capability

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(ui): failure panel

1 participant