Skip to content

[4/7] TUI rendering & navigation for N-level headers #180

Description

@shouze

Context

The interactive TUI renders exactly one section-header style today (src/render.ts, around the section-row block): a magenta ── label line, with pick-mode bar support and a multi-team hint detected via label.includes(" + "). Row in src/types.ts has no depth field. Header-row mouse hit-testing lives in src/render/mouse-hit.ts.

Part of EPIC #125. Depends on #177.

Solution

  • Add a level (or reuse tree depth) to Row so buildRows (src/render/rows.ts) can emit one row per header at any depth.
  • Render depth-dependent indentation/style in src/render.ts (increasing indent per level, consistent color family), preserving pick-mode bar and multi-team hint behavior at whichever depth is a combined section.
  • Adjust hit-testing in src/render/mouse-hit.ts and src/render/layout-constants.ts for header rows spanning multiple depths.
  • Verify fold/unfold, filter mode, and scrolling still behave correctly with nested headers.

Acceptance Criteria

  • A 2+ level hierarchy renders visually distinct nested header rows in the TUI, each independently navigable with /.
  • Pick mode (p) and the multi-team hint still work correctly on a combined section at any depth.
  • Mouse clicks on any header row at any depth hit-test to the correct row/zone.
  • Fold/unfold and filter mode work unchanged with nested headers.

Definition of Done

  • Updated tests in src/render.test.ts, src/render/mouse-hit.test.ts, and rows-related tests.
  • Manual TUI verification checklist completed (navigation through nested headers, fold/unfold, filter mode, mouse clicks) and noted in the PR description.
  • bun test, bun run lint, bun run format:check, bun run knip, bun run build.ts all green.
  • Depends on [1/7] Data model & core hierarchical grouping algorithm #177 being merged first.

Activity

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

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions