Repository navigation
Conversation
Split the 943-line state-utils.ts into focused, single-responsibility modules: - pr-status.ts (151 lines): PR merge detection and branch status - state-rebuild.ts (194 lines): State reconstruction from run logs - worktree-discovery.ts (320 lines): Worktree discovery for state bootstrapping - state-cleanup.ts (331 lines): Cleanup of stale entries and startup reconciliation - state-utils.ts (53 lines): Re-export barrel for backward compatibility All existing imports continue to work through the barrel file. Entire-Checkpoint: be89c6723d82
5 tasks
admarble
deleted the
feature/319-refactor-state-utils-split-943-line-file-into-focu
branch
February 22, 2026 21:20
4 tasks
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
state-utils.tsinto focused, single-responsibility modulespr-status.ts(151 lines): PR merge detection and branch statusstate-rebuild.ts(194 lines): State reconstruction from run logsworktree-discovery.ts(320 lines): Worktree discovery for state bootstrappingstate-cleanup.ts(331 lines): Cleanup of stale entries and startup reconciliationstate-utils.tsto a 53-line re-export barrel file for backward compatibilityTest Plan
state-utils.test.tstests passstate.test.tstests passnpm run buildsucceeds (TypeScript compilation)npm run lintpasses (no warnings)state-utilscontinue to work unchangedPre-PR AC Verification
state-utils.tsreduced to < 300 linesstate-utilscontinue to workCloses #319
🤖 Generated with Claude Code