Repository navigation
refactor(tui): dedupe renderer tests, prompt builders, validators, labels, links, truncator - #1115
Merged
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.