Sprint C: React Context, StagingArea refactor, CommitGraph virtualization#23
Merged
Conversation
…virtualization C1: Replace 160-prop drilling with AppStateContext - Add AppStateContext.tsx with AppContextValue type combining AppSidebarProps + extra fields - Rewrite App.tsx to build single ctxValue and wrap in AppStateContext.Provider - Convert AppSidebar and MainView to zero-prop components using useAppContext() C2: Split StagingArea.tsx into focused hooks - Extract useFileOperations (status, staging, discard, stash, diff) - Extract useCommitForm (commit message, amend, signoff, handleCommit) - Extract useAiCommit (AI auto-commit state, job events, cancel) - Extract useConflictResolver (conflict editor, navigation, resolution) - StagingArea.tsx reduced from ~1280 to ~260 lines C3: CommitGraph virtualization - Track scroll position and container height via passive scroll listener - Compute visible node window with 8-row overscan - Render only visible commit rows with top/bottom spacer divs - Filter SVG edges and nodes to visible range only - Fixes performance with 1000+ commit repositories Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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
AppSidebarandMainView. AddedAppStateContext.tsxwith a singleAppContextValuetype.App.tsxnow builds one context object and bothAppSidebarandMainViewbecome zero-prop components that calluseAppContext().useFileOperations,useCommitForm,useAiCommit,useConflictResolver).StagingArea.tsxis now ~260 lines of thin orchestration.Test plan
npx tsc --noEmitpasses with zero errors🤖 Generated with Claude Code