9 Commits

Author SHA1 Message Date
teernisse
3e96f19a11 feat(tui): add CLI/TUI parity tests (bd-wrw1)
10 parity tests verifying TUI and CLI query paths return consistent
results from the same SQLite database:
- Dashboard count parity (issues, MRs, discussions, notes)
- Issue list parity (IID ordering, state/author filters, ascending sort)
- MR list parity (IID ordering, state filter)
- Shared field parity (title, state, author, project_path)
- Empty database handling
- Terminal safety sanitization (dangerous sequences stripped)

Uses full-schema in-memory DB via create_connection + run_migrations.
Closes bd-wrw1, bd-2o49 (Phase 5.6 epic).
2026-02-19 08:01:55 -05:00
teernisse
01491b4180 feat(tui): add soak + pagination race tests (bd-14hv)
7 soak tests: 50k-event sustained load, watchdog timeout, render
interleaving, screen cycling, mode oscillation, depth bounds, multi-seed.
7 pagination race tests: concurrent read/write with snapshot fence,
multi-reader, within-fence writes, stress 1000 iterations.
2026-02-19 07:49:22 -05:00
teernisse
5143befe46 feat(tui): add 14 performance benchmark tests (bd-wnuo)
S/M/L tiered benchmarks measuring TUI update+render cycles with
synthetic data fixtures. SLO gates: S-tier <10ms update/<20ms render,
M-tier <50ms each. L-tier advisory only. All pass with generous margins.
2026-02-19 07:42:51 -05:00
teernisse
1e06cec3df feat(tui): add 10 navigation property tests (bd-3eis)
Deterministic seeded PRNG verifies NavigationStack invariants across
200k+ operations: depth >= 1, push/pop identity, forward cleared,
jump list only tracks detail screens, reset clears all, breadcrumbs
match depth, no panic under arbitrary sequences.
2026-02-19 01:13:20 -05:00
teernisse
9d6352a6af feat(tui): add 9 stress/fuzz tests for resize storm, rapid keys, event fuzz (bd-nu0d) 2026-02-19 01:09:02 -05:00
teernisse
656db00c04 feat(tui): add 16 race condition reliability tests (bd-3fjk)
- 4 stale response tests: issue list, dashboard, MR list, cross-screen isolation
- 4 SQLITE_BUSY error handling tests: toast display, nav preservation, idempotent toasts, error-then-success
- 7 cancel race tests: cancel/resubmit, rapid 5-submit sequence, key isolation, complete removes handle, stale completion no-op, stuck loading prevention, cancel_all
- 1 issue detail stale guard test
- Added active_cancel_token() method to TaskSupervisor for test observability
2026-02-19 01:03:25 -05:00
teernisse
9bcc512639 feat(tui): add 9 user flow integration tests (bd-2ygk)
Implements end-to-end flow tests covering all PRD Section 6 journeys:
- Morning triage (dashboard -> issue list -> detail -> back)
- Direct screen jumps (g-prefix chain: gt -> gw -> gi -> gh)
- Quick search (g/ -> results -> drill-in -> back with preserved state)
- Sync and browse (gs -> sync lifecycle -> complete -> browse)
- Expert navigation (gw -> Who -> verify expert mode default)
- Command palette (Ctrl+P -> verify open/filtered -> Esc close)
- Timeline navigation (gt -> events -> drill-in -> back)
- Bootstrap sync flow (Bootstrap -> gs -> SyncCompleted -> Dashboard)
- MR drill-in and back (gm -> detail -> Esc -> cursor preserved)

Key testing patterns:
- State generation alignment for dual-guard stale detection
- Key event injection via send_key/send_go helpers
- Data injection via supervisor.submit() + Msg handlers
- Cross-screen state preservation assertions
2026-02-19 00:52:58 -05:00
teernisse
403800be22 feat(tui): add snapshot test infrastructure + terminal compat matrix (bd-2nfs)
- 6 deterministic snapshot tests at 120x40 with FakeClock frozen at 2026-01-15T12:00:00Z
- Buffer-to-plaintext serializer resolving chars, graphemes, and wide-char continuations
- Golden file management with UPDATE_SNAPSHOTS=1 env var for regeneration
- Snapshot diff output on mismatch for easy debugging
- Tests: dashboard, issue list, issue detail, MR list, search results, empty state
- TERMINAL_COMPAT.md template for manual QA across iTerm2/tmux/Alacritty/kitty/WezTerm
2026-02-19 00:38:11 -05:00
teernisse
fb40fdc677 feat(tui): Phase 3 power features — Who, Search, Timeline, Trace, File History screens
Complete TUI Phase 3 implementation with all 5 power feature screens:

- Who screen: 5 modes (expert/workload/reviews/active/overlap) with
  mode tabs, input bar, result rendering, and hint bar
- Search screen: full-text search with result list and scoring display
- Timeline screen: chronological event feed with time-relative display
- Trace screen: file provenance chains with expand/collapse, rename
  tracking, and linked issues/discussions
- File History screen: per-file MR timeline with rename chain display
  and discussion snippets

Also includes:
- Command palette overlay (fuzzy search)
- Bootstrap screen (initial sync flow)
- Action layer split from monolithic action.rs to per-screen modules
- Entity and render cache infrastructure
- Shared who_types module in core crate
- All screens wired into view/mod.rs dispatch
- 597 tests passing, clippy clean (pedantic + nursery), fmt clean
2026-02-18 22:56:38 -05:00