Skip to content

App: extract 11 hooks into src/app/ (#1447 pass N) - #1464

Merged
currentbits merged 13 commits into
mainfrom
coder/refactor-n-app-tsx-hooks-2acd06
Oct 5, 2026
Merged

currentbits merged 13 commits into
mainfrom
coder/refactor-n-app-tsx-hooks-2acd06

Conversation

@currentbits

Copy link
Copy Markdown
Owner

Round 5, pass N of #1447. This extracts 11 custom hooks and 2 plain modules from the App component into src/app/, one commit each. The state map, plan and reasoning are in docs/superpowers/specs/2026-10-05-app-split.md.

File Lines Concern
useIssueStarters 218 issue/CLI/PR thread starters
useViewNavigation 176 view switching and return-to
useSidebarResize 140 sidebar resize handle
useThreadRemoval 139 archive/delete/remove handlers
useOnboarding 101 first-run tour handlers
useAgentsPanelCollapse 95 agents panel collapse
useThreadRoster 92 thread-list derived values
useSuggestionHandlers 83 suggested-work chip handlers
useAppShortcuts 68 window shortcuts
useConflictForecast 57 conflict forecast refresh
useCrewHandlers 47 lead crew actions
viewport.ts, agentsPanelStorage.ts 36, 31 non-hook helpers

App.tsx: 2,732 → 2,022 lines.

Checked

  • Effect order: a script lists App's effects on main, then on this branch with each custom hook expanded at its call site. Both have the same 12 effects with the same kind and opening line, in the same order.
  • Callback identity: the crew handlers keep the same useCallback and the same dependency arrays, so memo(AgentsPanel) still skips re-renders as it has since Inspector performance: scoped summaries, non-blocking crew integration #1424.
  • Pure move, ignoring indentation: the only non-move lines are hook calls and their signatures.
  • Screenshots against main:
    • Pixel-identical: the thread view, Insights menu, Kanban and narrow viewport (YMAX 0), and the folded sidebar (YMAX 1).
    • The right-panel shot differs only in the live token counter (Σ 51.9k vs 51.3k), which ticks while the demo streams. Two runs of main differ there too.
  • npm run typecheck and npx vite build are clean. Renderer suite: 2701/2701, 0 cancelled (TAP count).

🤖 Generated with Claude Code

Willem and others added 13 commits October 5, 2026 12:20
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@currentbits
currentbits merged commit 2490657 into main Oct 5, 2026
11 of 12 checks passed
@currentbits
currentbits deleted the coder/refactor-n-app-tsx-hooks-2acd06 branch October 5, 2026 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant