refactor: flatten src/mobile into src/hooks and src/utils - #478
Merged
Conversation
- Impact: no public API change; the root barrel re-exports the same 17 names from their new paths and dist/ mirrors the flat tree - Constraint: relative imports between the moved folders keep their depth, so only the four tests reaching _internal needed a path change - Decision: drop the mobile/hooks and mobile/utils barrels instead of moving them — nothing imported them, and the compiled-source canary no longer needs a mobile case
- Impact: sidebar, reference index, skill catalog and the export check read the three category directories only - Constraint: pre-flattening URLs under mobile/ must keep redirecting, and the retired namespace can no longer be read off the tree - Decision: list the 17 former mobile pages in legacyRedirects and derive core/ for everything else, replacing the per-route legacyDestination patterns
- Impact: CLAUDE.md, AGENTS.md, .cursorrules, the Copilot instructions and contributing.md (5 locales) describe one hooks/components/utils tree - Decision: keep a single sentence naming the source root in contributing.md; the directory-choice guidance only existed for the retired split
|
Contributor
|
Size Change: -193 B (-0.18%) Total Size: 104 kB 📦 View Changed
ℹ️ View Unchanged
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #478 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 67 67
Lines 2174 2174
Branches 701 701
=========================================
Hits 2174 2174 🚀 New features to boost your workflow:
|
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.
Overview
Closes #476
Moves
src/mobile/{hooks,utils}/*intosrc/hooksandsrc/utils, then deletes what only existed because of the split: thesrc/mobileimport rule,mobileSourceRootand themobile/routes in the docs tooling, themobile/globs andfor prefixloop in CI, and thesrc/mobilesentences in the agent instructions andcontributing.md(5 locales). No public API change, so no changeset.Pre-flattening
mobile/hooks/*andmobile/utils/*URLs keep redirecting: the retired namespace can no longer be read off the tree, solegacyRedirects.mtslists the 17 former mobile pages and derivescore/for the rest. The stub count stays at 335.yarn test,test:coverage(100%),test:docs,test:skill(no drift),test:compiled,verify:pack, and the CI export check run locally (55 implementations)Checklist
yarn run fixto format and lint the code and docs?yarn run test:coverageto make sure there is no uncovered line?