Repository navigation
refactor(screens): extract editorStatus render sub-block (audit 1.1.1 slice #37) - #210
Merged
Merged
Conversation
… slice #37) Transcript key (less-style open-in-$EDITOR) render block extracted from REPL.tsx useInput v-branch to applyEditorOpenInExternalEditor in editorStatusRender.ts. PURE-ASYNC-HELPER class (3rd, like slice #23 onInit / #31 processInitialMessage / #36 agentTranscriptBootstrap). ctx carries 3 refs (gen/timer/rendering) + setEditorStatus + deferredMessages + tools (closure deps). Imported helpers (renderMessagesToPlainText/openFileInExternalEditor/writeFile/join/tmpdir) imported directly in new file, not via ctx. double-tap-drop guard + gen-capture + staleness-aware setStatus stay in helper (ref-mutate, not useInput deps). event.stopImmediatePropagation stays REPL thin shell (input-event concern). No JSX, no hooks. REPL 5660 -> 5614 (-46). 5 sole-user imports removed (writeFile, tmpdir, join, openFileInExternalEditor, renderMessagesToPlainText); dirname kept (multi-use). Byte-identical behavior. Gates: typecheck 0 / 921 tests / biome new-file-formatted (3 node-protocol infos match repo convention, like slice #33) / build:dev green. Co-Authored-By: Claude Fable 5 <[email protected]>
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.
Transcript
vkey (less-style open-in-$EDITOR) render block extracted from REPL.tsxuseInputv-branch toapplyEditorOpenInExternalEditorineditorStatusRender.ts.Class
PURE-ASYNC-HELPER (3rd — like slice #23
onInit/ #31processInitialMessage/ #36agentTranscriptBootstrap).Extraction detail
editorGenRef/editorTimerRef/editorRenderingRef) +setEditorStatus+deferredMessages+tools(closure deps). Refs typed viaMutableRefObject<...>;deferredMessages/toolstyped viaParameters<typeof renderMessagesToPlainText>(avoid type-origin chase).renderMessagesToPlainText/openFileInExternalEditor/writeFile/join/tmpdir) imported directly in new file, NOT via ctx.setStatusclosure stay in helper (ref-mutate, notuseInputdeps).event.stopImmediatePropagation()stays REPL thin shell (input-event concern, not render concern)..ts. Void return.Delta
writeFile(fs/promises),tmpdir(os),join(path —dirnamekept, multi-use),openFileInExternalEditor,renderMessagesToPlainText.Gates
bun run typecheck— 0 errorsbun test src/__tests__/— 921 pass / 0 failbunx biome checkon NEW file (formatted via--write); 3useNodejsImportProtocolinfos match repo convention (REPL source used"fs/promises"withoutnode:prefix — verbatim migration, like slice PatchArtifactTool和LoadArtifactTool未实现 — LLM无法增量修改和预览artifact #33). REPL pre-existing biome diagnostics NOT touched (Rule 3 surgical).bun run build:dev— greenContinues audit §1.1.1 god-module split (#170, 36 prior slices, REPL 7096→5660 cumulative −1436).
Co-Authored-By: Claude Fable 5 [email protected]