Repository navigation
Conversation
…ders
`src/shared` is a flat directory of ~1,150 entries. The worktree, github, and
linear domains accounted for 71 of them, so finding the module you wanted meant
scanning a wall of same-prefixed filenames.
Move each domain into its own folder and drop the now-redundant prefix:
src/shared/github-pr-types.ts -> src/shared/github/pull-request-types.ts
src/shared/worktree-id.ts -> src/shared/worktree/id.ts
src/shared/linear-links.ts -> src/shared/linear/links.ts
This follows the existing `network/` and `new-workspace/` convention in the
same directory, which also drop the prefix inside the folder.
Whole clusters move, including tests. Foldering only part of a domain would be
worse than flat: a reader would have to check both `github/` and the flat
directory, and `github-auth-types.ts` / `github-project-types.ts` are type
modules that belong with the rest.
Import specifiers were rewritten by resolving each one to an absolute path and
recomputing it, not by string substitution, so the `@/../../shared/...` alias
forms are handled correctly. 502 specifiers across 299 files.
Two things `tsc` cannot catch, handled explicitly:
- `github-project-types.ts` carries its own `max-lines` bypass, so its baseline
entry is REPOINTED to the new path rather than pruned. Pruning would drop the
bypass and then flag the new path as a fresh violation. Ratchet stays at 345.
- `mobile/` is outside `pnpm typecheck` and cannot be typechecked here
(`mobile/node_modules` is empty). Instead every relative specifier in the repo
was resolved against the filesystem: 174 unresolved before this change and 174
after — identical, so nothing broke in mobile either.
The pinned `tests/e2e/.cross-version-checkouts` fixtures are deliberately NOT
rewritten; they are a snapshot of an older release and still reference the old
paths.
Verified: cold `tsc --noEmit` green on node, cli, and web (buildinfo deleted
first — these projects are `composite: true` and reuse stale caches).
|
Too many files changed for review (319 files, 100 file limit). Bypass the limit by tagging |
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.
What
src/sharedis a flat directory of ~1,150 entries. The worktree, github, and linear domains alone accounted for 71 of them, so finding a module meant scanning a wall of same-prefixed filenames.Each domain moves into its own folder with the now-redundant prefix dropped, following the existing
network/andnew-workspace/convention in the same directory:src/shared/worktree/src/shared/github/src/shared/linear/Whole clusters move, including tests. Foldering only part of a domain would be worse than leaving it flat — a reader would have to check both
github/and the flat directory, andgithub-auth-types.ts/github-project-types.tsare themselves type modules that belong with the rest. Zero files with these prefixes remain flat.Import specifiers were rewritten by resolving each to an absolute path and recomputing it, not by string substitution — which is why the
@/../../shared/github-auth-typesalias forms came out right. 502 specifiers across 299 files.Two things
tsccannot catchgithub-project-types.tscarries its ownmax-linesbypass. Its baseline entry is repointed, not pruned —--prunewould drop the bypass and then flag the new path as a fresh violation. Ratchet stays at 345.mobile/is outsidepnpm typecheckand can't be typechecked here (mobile/node_modulesis empty;expo/tsconfig.base.jsonmissing — pre-existing). It was modified, so instead every relative specifier in the repo was resolved against the filesystem: 174 unresolved before, 174 after — identical, so mobile is fine too.The pinned
tests/e2e/.cross-version-checkoutsfixtures are deliberately not rewritten — they're a snapshot of an older release and correctly still reference the old paths.Verification
tsc --noEmitgreen on node, cli, and web (buildinfo deleted first — these projects arecomposite: trueand reuse stale caches, see refactor(preload): split the preload contract into per-domain api modules #14403).src/relay/agent-exec-handler.test.ts(2) — fails identically on cleanmain.project-view-wrapper-source-context-boundary.test.ts(1) —Test timed out in 30000ms; takes 23.6s in isolation, so it sits just under the default timeout and tips over under parallel load. Also failed on refactor(preload): split the preload contract into per-domain api modules #14403, which never touched these files.oxlint+ react-doctor +oxfmtclean via pre-commit.Known leftover
A dated design-handoff doc (
docs/reference/terminal-session-correctness-handoff-2026-08-07/) citessrc/shared/worktree-id.ts:15-28. Left as-is: it's a point-in-time archive whose line numbers are already stale, and rewriting it would misrepresent what was true at that date.