Skip to content

TUI: extend coverage gate to Ink components (lift interim exclusion) #1501

Description

@cliffhall

Follow-up to #1484, which added a per-file coverage gate for the CLI and TUI.

Context

#1484 brought the TUI's non-React logic under the coverage gate (server resolution, file logger, tab metadata, and the form/URL helpers under src/utils/). The TUI's React/Ink surface was deferred as a documented interim exclusion in clients/tui/vitest.config.ts:

  • src/App.tsx (~1878 lines)
  • src/components/**/*.tsx (~16 Ink components: tabs, modals, per-capability tabs)
  • src/hooks/** (useSelectableList — needs a React renderer)

These need an Ink renderer (e.g. ink-testing-library) to exercise, which is a sizable, separate effort.

Note (post-#1532): #1532 raised the per-file gate to a uniform 90/90/90/90 (lines/statements/functions/branches) across all clients, but left the TUI React-surface exclusion above in place — so this issue is unchanged in scope. The one update: when each area's exclusion is lifted it must now clear 90 on all four dimensions, not the lower mixed thresholds this issue originally listed.

Goal

  • Add ink-testing-library (or equivalent) and write render/interaction tests for the Ink components, App.tsx, and useSelectableList.
  • Remove the corresponding entries from the exclude list in clients/tui/vitest.config.ts as each area reaches the gate (≥ 90 on lines, statements, functions, and branches — the uniform gate set by test: raise per-file coverage gate to 90 across all clients (closes #1271) #1532).
  • Goal end-state: the whole clients/tui/src tree is under the gate with no React-surface exclusions.

Acceptance criteria

  • Ink components and App.tsx are exercised under coverage instrumentation.
  • The interim React exclusions in clients/tui/vitest.config.ts are removed.
  • CI fails when TUI component coverage drops below the gate (90/90/90/90).

Metadata

Metadata

Assignees

Labels

v2Issues and PRs for v2

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions