Skip to content

mecatui: bound /schedule inventory and fire-history browsing #2173

Open

Description

@jbeda

Scope

Bound the /schedule inventory and the selected schedule's cursor-navigable fire history in cmd/mecatui/ui/schedule.go. Both render every row while ignoring offered height (renderSchedulePanel, renderScheduleInspect), which can overflow the conversation region. Treat the inventory and fire history as separate browsing regions; do not convert create/delete confirmation forms into bounded browsing controls. Their interaction ownership moves with the coordinated surface migration below, without changing form semantics.

Required outcome

  • Derive each list's row budget from its actual card/title/spec/status/filter/action-footer chrome. Use bounded.List with stable schedule and fire identities, selection reveal, overflow indicators, and the UI-level presentListRow for standard cursor rows. Fit both width and height with compact fallbacks.
  • Preserve filtering and refresh identity, enabled/paused/deletion-pending/in-flight/claimed distinctions, create/pause/resume/fire/delete actions, and the selected fire's transcript handoff. Keep current live vs bare key hints accurate.
  • Do not change scheduler/server pagination, fire retention, or form behavior as part of this UI slice.

Verification

Scenario-first tests for many schedules and historical fires, short heights, long/wrapped metadata, filter/refresh/reorder, resize, selected-row visibility and correct action/selected-fire identity; include loading/error/empty/claimed/in-flight states. Run focused UI and bounded tests.

Coordinated surface migration

Also migrate the legacy root-owned /schedule overlay onto the shared surface contract as part of this slice (tracked by #2237 and #555). The surface owns inventory/inspect/form interaction, geometry-derived caches, request correlation, and teardown. The root retains modal placement, frame-scoped input mapping, and transcript navigation through a narrow intent. Preserve create/delete form behavior; moving their ownership does not authorize redesigning the forms.

Use /sessions-style fill placement within the conversation region, retaining the application header, prompt, and footer (operator-confirmed). The browsing hierarchy is schedule inventory → runs → schedule details: two bounded selectable lists plus a separate bounded detail viewport for configuration/state/warnings. Normal Back unwinds one level and preserves parent selection/window; compact geometry disables hidden activation. Opening a fire transcript retains the existing read-only Sessions transition, not a new surface stack or return-to-Schedule path.

Add reusable placement, hierarchy, geometry, and async-ownership guidance discovered by the implementation to docs/tui.md; keep migration status on issues/PRs.

Include tests for stale async results after refresh, switching inspected schedules, closing/reopening, wheel capture, prompt isolation, and the existing fire-transcript handoff without changing the active chat session.

Relates to #1742, #1589, #2237, and #555. Click-to-select is separately tracked in #769.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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