Extract noisy JSX/statement IIFEs (CL-5351 slice C) - #325
Merged
Conversation
2 tasks
Collaborator
Author
Hard review (greybeard + CTO)Verdict: APPROVE GreybeardNoisy JSX IIFEs extracted to named helpers/components; provider-manager persist deduped. Intentional fire-and-forget IIFEs left alone. Behavior-preserving refactor with typecheck + targeted tests green. CTOSurface area down, readability up. Merge independently of durability/hooks slices. No blockers. |
Behavior-preserving refactors only: hoist work/accept ordering and copy-mode windowing in app.tsx, PromptActionBar + renderInputLines in chat-input, re-auth hint boolean in agent-modal, plain manage_tasks parse block in use-stream, and shared persistWithMergeBase for the two provider-manager disk writes.
Collapse dual try/catch in persistWithMergeBase into one path, destructure PromptActionBar props directly, and compute input lines once before the bordered/plain body branch.
TheGreatAxios
force-pushed
the
cl-5351-iife-cleanup
branch
from
August 5, 2026 06:16
9219f24 to
c326c4d
Compare
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
IIFEs cleaned
src/tui/app.tsxwork/accept orderworkBlock/acceptBlock/workAcceptBlocksabove returnsrc/tui/app.tsxcopy-mode windowwindowedCopyTargetshelper + precomputed window slicesrc/tui/components/chat-input.tsxaction barPromptActionBarcomponentsrc/tui/components/chat-input.tsxinput borderrenderInputLines+inputBodyabove returnsrc/tui/components/agent-modal.tsxre-auth hintshowReauthHintboolean above returnsrc/tui/use-stream.tsmanage_tasks parsesrc/tui/hooks/use-provider-manager.tspersistWithMergeBasefor catalog + tier disk writesIntentional IIFEs left alone
Telemetry, OAuth completed, abort close, CRC table, and other fire-and-forget patterns outside this slice.
Test plan
bun run typecheckbun testonuse-provider-manager,chat-input(unit + component),copy(105 pass)Closes nothing — partial progress on CL-5351.