Repository navigation
refactor(web): extract useDragDropConfig (App.tsx decomposition, PR 6/7) - #185
Merged
Merged
Conversation
3 tasks done
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.
Part of #148 (PR 6/7 of the series in docs/superpowers/specs/2026-11-16-app-tsx-decomposition-design.md). Stacked on #178 → #179 → #182 → #184 — shows their commits until those PRs merge.
What
hooks/useDragDropConfig.ts: the window-level config drag/drop slice moves out of App.tsx — overlay visibility state, the depth-counting drag tracker wiring, the four window listeners,handleDroppedConfig, and the Escape hard-reset seam (resetDrop(), consumed byuseGlobalShortcuts'sonEscape).[]-dep listeners effect keeps its first-rendershowToastcapture; the render-scopedropHandlerRefreassignment (latest-ref for the async config apply) is preserved verbatim; the swallowed catch witherr.message || fallbackstays;utils/configDrop.ts(pure tracker) untouched.applyConfigFile(file)seam servesDropConfigOverlay's click-to-pick path (plan gap found during execution: the overlay'sonFileSelectedprop routed through the same ref) — window-drop routing unchanged, App-side duplicate deleted.loadConfigContentnow imports wholly in the hook; App.tsx has zero drag vocabulary left (1257 lines, from 1317).Safety net
onConfigLoadedstaleness pin (deps-bag replacement — verified to fail against a wrong mechanism), resetDrop depth-zeroing discriminator, applyConfigFile seam, unmount.Test plan
cd src/profiles/web && npx vitest rungreen (366/366)npm run build(tsc) clean