Skip to content

test(gui): RTL sprint Phase 3 — hooks, canvas, CLI health, stream bra… - #59

Merged
CameronBrooks11 merged 1 commit into
mainfrom
chore/gui-rtl-sprint-phase3
Apr 16, 2026
Merged

CameronBrooks11 merged 1 commit into
mainfrom
chore/gui-rtl-sprint-phase3

Conversation

@CameronBrooks11

Copy link
Copy Markdown
Member

…nches

  • Chunk A — pure hooks:

    • useKeyboardShortcuts: 18 tests (all key combos, input blocking, unmount cleanup)
    • useMenubarInteractions: 6 tests (toggle exclusivity, click-outside, cleanup)
    • useFileOperations: 6 tests (createFileOperations wiring, memoization)
    • usePreviewGeneration: 10 tests (validation errors, success, warnings, errors)
  • Chunk B — context + CLI health:

    • useCliHealth: 14 tests (checkOnMount, healthy/unhealthy/error/invalid, polling, manual refresh); uses vi.hoisted() for cross-module mock; fake timers scoped to polling describe block only
    • CliHealthContext: 2 tests (provider renders children, hook throws outside provider)
  • Chunk C — stream hook branch coverage:

    • useConnectionActions: 13 tests (refreshPorts all branches, connect/disconnect)
    • useManualCommandActions: 14 tests (guard conditions, special G28/M112 cmds)
    • useStreamingActions: 24 tests (select/clear/start/pause/resume/stop/cancel success + error + early-return paths)
  • Chunk D — MainTab: 7 tests (slot rendering, collapsed classes, data-collapsed)

  • Raise coverage thresholds: lines/stmts 55→60, functions 55→65, branches 35→50

  • Total: 614 tests across 53 test files (lines 79.81%, branches 91.17%, funcs 87.73%)

…nches

- Chunk A — pure hooks:
  - useKeyboardShortcuts: 18 tests (all key combos, input blocking, unmount cleanup)
  - useMenubarInteractions: 6 tests (toggle exclusivity, click-outside, cleanup)
  - useFileOperations: 6 tests (createFileOperations wiring, memoization)
  - usePreviewGeneration: 10 tests (validation errors, success, warnings, errors)

- Chunk B — context + CLI health:
  - useCliHealth: 14 tests (checkOnMount, healthy/unhealthy/error/invalid, polling,
    manual refresh); uses vi.hoisted() for cross-module mock; fake timers scoped
    to polling describe block only
  - CliHealthContext: 2 tests (provider renders children, hook throws outside provider)

- Chunk C — stream hook branch coverage:
  - useConnectionActions: 13 tests (refreshPorts all branches, connect/disconnect)
  - useManualCommandActions: 14 tests (guard conditions, special G28/M112 cmds)
  - useStreamingActions: 24 tests (select/clear/start/pause/resume/stop/cancel
    success + error + early-return paths)

- Chunk D — MainTab: 7 tests (slot rendering, collapsed classes, data-collapsed)

- Raise coverage thresholds: lines/stmts 55→60, functions 55→65, branches 35→50
- Total: 614 tests across 53 test files (lines 79.81%, branches 91.17%, funcs 87.73%)
@CameronBrooks11
CameronBrooks11 merged commit af70aa6 into main Apr 16, 2026
12 checks passed
@CameronBrooks11
CameronBrooks11 deleted the chore/gui-rtl-sprint-phase3 branch April 16, 2026 05:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant