Repository navigation
refactor(tui): drop dead notice field, dedupe helpers - #1405
Merged
Merged
Conversation
Contributor
|
No changes needed from you. A maintainer will review this pull request. |
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
NoticeStatedrops its deadinterruptfield: the shell writes it,composeNoticeLinenever reads itoneLine()/abbreviate()collapse helpers share one implementationgapRowscomputes once in a sharedMarkdownSplitbuilder used by both split pathsagentName !== undefinednull check is gone —firstderives fromagentName?.[0]Verification
bun testover the co-located suites (notice-line, copy-path, tool-formatter, tool-formatter-web-brand, markdown-parser, at-mention/list): 177 pass, 0 failbun run typecheckpasses;oxfmt --checkandoxlintpass on the seven changed filesinterruptis unread — grep finds nostate.interruptread incomposeNoticeLineor anywhere insrc/tui; the field and theshell/chrome.tsassignment are removedoneLine(text, max=56)andabbreviate(value, max)are identical (replace(/\s+/g," ").trim(), thenslice(0, max-1) + "…"when overmax); both call sites share the samemax-1ellipsis;copy-pathnow callsabbreviate(payload.text, 56)splitAtSettledHeadingandsplitAtSettledBlockboth derivefirstContentfromrest.findIndex((line) => line.trim().length > 0); both now build throughsettledSplitfirst = agentName?.[0], sofirst != nullalready implies a non-emptyagentName; the extraagentName !== undefinedcheck is redundant and removed (branch text unchanged)Fixes CL-10529