Repository navigation
refactor(repl): extract haiku title extraction to helper (audit §1.1.1 slice #26) - #196
Merged
Merged
Conversation
…1 slice #26) PURE-ROUTING SUB-BLOCK extraction (same class as slice #25 apiMetricsCapture). Body at REPL.tsx:3101-3138 (37 LOC, 5 closure deps) → maybeExtractHaikuTitle() in src/utils/haikuTitleExtraction.ts. Behavior byte-identical: guard moved into helper; ctx carries titleDisabled/sessionTitle/agentTitle/haikuTitleAttemptedRef/setHaikuTitle. One-shot ref gates Haiku call (first real user message only, skips synthetic breadcrumbs via tag-prefix checks). fire-and-forget void generateSessionTitle. REPL import cleanup: 3 sole-user tags (BASH_INPUT_TAG/COMMAND_MESSAGE_TAG/ COMMAND_NAME_TAG) + 2 sole-user fns (extractFallbackTitle/generateSessionTitle) removed; LOCAL_COMMAND_STDOUT_TAG + getContentText kept (other users). REPL 6172→6128 (-44). Cumulative -924→-968. Gates: typecheck 0 / 914 tests pass / biome new-file clean / build:dev ok. 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.
PURE-ROUTING SUB-BLOCK extraction (same class as slice #25 apiMetricsCapture).
What
Body at
REPL.tsx:3101-3138(37 LOC, 5 closure deps) →maybeExtractHaikuTitle()insrc/utils/haikuTitleExtraction.ts.Why
Audit §1.1.1 god-module split (task #170). Slice #26 of ongoing REPL.tsx decomposition. Lowest-risk candidate per investigator survey (LOW risk, pure compute + fire-and-forget + one setter, no JSX/await).
Behavior
Byte-identical. Guard moved into helper; ctx carries
titleDisabled/sessionTitle/agentTitle/haikuTitleAttemptedRef/setHaikuTitle. One-shot ref gates Haiku call (first real user message only, skips synthetic breadcrumbs via tag-prefix checks). fire-and-forgetvoid generateSessionTitle.Import cleanup
5 sole-user symbols removed from REPL: 3 tags (
BASH_INPUT_TAG/COMMAND_MESSAGE_TAG/COMMAND_NAME_TAG) + 2 fns (extractFallbackTitle/generateSessionTitle).LOCAL_COMMAND_STDOUT_TAG+getContentTextkept (other users).Gates
REPL 6172→6128 (-44). Cumulative -924→-968.