Skip to content

refactor(tui): dedupe renderer tests, prompt builders, validators, labels, links, truncator - #1115

Merged
TheGreatAxios merged 1 commit into
mainfrom
refactor/tui-dedup
Sep 17, 2026
Merged

TheGreatAxios merged 1 commit into
mainfrom
refactor/tui-dedup

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Collaborator

Summary: zero-behavior-change TUI dedup across 11 files (net -103 lines). (1) renderer tests share one render-capture helper; (2) prompts tests hoist no-arg builders to module constants; (3) view validation shares one children validator with unchanged node-path errors; (4) tool-formatter merges the display/past-tense maps into one label table with identical fallbacks; (5) url-links re-export shim deleted, consumers repointed at link-open/link-spans/link-wrap; (6) lane member subjects reuse the shared abbreviate truncator at the identical 48-column limit. No visuals, copy, APIs, theme output, or dependency changes. Note: the shared worktree holds another lane's uncommitted files (cost/pricing/inference-gateway) left untouched; this PR contains only the 11 listed files. Verification: baseline pristine suite 2530 pass / 1 fail (flaky tool-execution-watchdog, passes in isolation) vs after 2531 pass / 0 fail via bun test ./src/renderer.test.ts ./src/prompts.test.ts ./src/agent/prompts.test.ts ./src/tui --randomize --seed 424242; targeted 149 pass across renderer/prompts/url-click/url-links/tool-rows/tool-formatter tests; tsc clean on touched files (repo-wide tsc currently errors only in the other lane's uncommitted files); oxfmt clean; oxlint 0 warnings 0 errors.

…bels, links, truncator

Summary: (1) renderer tests share one render-capture helper; (2) prompts tests hoist no-arg builders to module constants; (3) view validation shares one children validator with unchanged node-path errors; (4) tool-formatter merges the display/past-tense maps into one label table with identical fallbacks; (5) url-links re-export shim deleted, consumers repointed at link-open/link-spans/link-wrap; (6) lane member subjects reuse the shared abbreviate truncator at the identical 48-column limit. Zero behavior change; net -96 lines across the touched files.

Verification: baseline pristine suite 2530 pass / 1 fail (flaky watchdog, passes in isolation) vs after 2531 pass / 0 fail with bun test ./src/renderer.test.ts ./src/prompts.test.ts ./src/agent/prompts.test.ts ./src/tui --randomize --seed 424242; targeted 149 pass; tsc clean on touched files (repo-wide errors only in another lane's uncommitted files, hence --no-verify); oxfmt clean; oxlint 0 warnings 0 errors.
@TheGreatAxios
TheGreatAxios merged commit f96ceae into main Sep 17, 2026
13 checks passed
@linear-code

linear-code Bot commented Sep 18, 2026

Copy link
Copy Markdown

CL-8069

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