Skip to content

test(acceptance): exercise local-persistence TUI slash commands through real PTY #1291

Description

@dennisonbertram

Why this matters

TUI commands /export, /theme, /sessions, /history, /feedback, and /init remain unproven because the current isolated fixture does not create their local files, settings, or persisted session state. These are actual user paths, not N/A.

Acceptance contract

Provide deterministic isolated themes/config/archive/session/AGENTS fixtures; real 100x30 PTY keystrokes; rendered frames and filesystem/session durable postconditions; multi-message usability after each non-exit command.

Current architecture and search evidence

/export model.go:2053; /theme :2231; /sessions :2219; /history :2370; /init init_agents.go:40; /feedback feedback.go:70.

In scope

Provide deterministic isolated themes/config/archive/session/AGENTS fixtures; real 100x30 PTY keystrokes; rendered frames and filesystem/session durable postconditions; multi-message usability after each non-exit command.

Out of scope

All other TUI command groups, cron/callback scenarios, native GUI, and product fixes absent a separately filed live failure.

Work type

Engineering change / feature slice

Change class

Infrastructure, CI, or process change

Protected path

Registry-derived command case -> real harnesscli 100x30 PTY -> rendered TUI state -> isolated harness/API/store or filesystem postcondition -> continued usable conversation -> bounded cleanup.

Cross-surface impact map

Test-only PTY matrix/fixtures and existing read/write API endpoints. Isolated config/workspace/DB paths only. Explicit focus/keyboard/error/confirmation handling, durable probes, no secrets. Native GUI is excluded. No production behavior/schema/deployment change unless a live test demonstrates a separate bug. Required plan, impact map, logs, indexes, focused/race/full regression and hosted CI.

Product and UX contract

Drive exactly the keyboard interaction a user uses; capture success, invalid/error, selection/focus and destructive-confirmation states. A fixture shortage is not an N/A outcome.

Coordination and dependencies

Child work for #1088/#1010. It may build on the non-closing current 24-command matrix foundation, but must use a fresh current-main worktree and a single PR with Closes #N.

Test-first plan

Add red real-PTY fixture case(s) proving the command cannot be credited without rendered and durable evidence, then implement the narrowest deterministic fixture/driver support. Run focused tests, race, ./scripts/test-regression.sh, repeat bounded PTY smoke, and retain artifacts.

Verification plan

Record exact source SHA, terminal frame hashes/transcript, typed keys, API/SSE and relevant DB/filesystem evidence, IDs, cleanup, race/full regression and independent review. Do not claim GUI proof.

Rollout and rollback

Acceptance-only; revert the isolated PR, with no migration or deployment.

Documentation and handoff

Update active plan, impact map, engineering/observational/long-term logs, indexes and #1088 applicability matrix.

Definition of done

  • Each named command is driven through a real 100x30 PTY, not reducer-only
  • Rendered result and durable postcondition are retained
  • Required multi-message/confirmation/invalid behavior is covered
  • Focused/race/full regression, independent review and CI pass
  • No fixture shortage is recorded as a user-path pass

Process acknowledgement

  • I completed current-architecture search and impact analysis and will update scope if evidence changes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions