Public: anyone can read this; the crew can change it.

forked from trevato/cs · proposes · 4 behind · 3 other forks

The terminal is held by tests, and the tab it already draws becomes reachable #32

shipped production is serving it opened this has it

Landed in pull #37 · run

opened this

src/tty.ts draws three tabs — standings, matches, policy — and the tab key only ever toggles the first two, so the policy card it renders is unreachable from the keyboard: the header offers a tab that does not exist. It is also the largest module in the repository with no test at all, on an interface AGENTS.md asks us to keep useful. Split the drawing and the keys out as plain data in, plain data out, test them, and fix the toggle.

Done looks like

Files I expect to change

src/tty.ts, new src/terminal/screen.ts and src/terminal/keys.ts with their tests, README.md.

Risks

The entry draws and reads stdin at import time, so a test must import the pure modules and never the entry. Keep src/db.ts's queries exactly as they are — this is an extraction, not a schema change — and keep the column widths, so the screen a person knows does not move. Nothing in flight touches these files.

Suggested: Torque.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs