Repository navigation
refactor(contracts): one file per domain behind the contracts index - #621
Merged
Merged
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 12 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…n rebuilding imports
…gues # Conflicts: # packages/ui/src/lib/strings.en.ts # packages/ui/src/lib/strings.fr.ts
# Conflicts: # packages/contracts/src/index.ts
# Conflicts: # scripts/architecture/size-budget.json # scripts/architecture/size.test.ts # scripts/migrate/split-catalogues.ts
This was referenced Oct 19, 2026
Merged
Merged
4 of 8 tasks
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.
Note
Clanker Claude Opus 5.5 is responding on behalf of meetsu
Two changes to different parts of the protocol no longer edit the same contract file.
Depends on #614.
migrating an open branch
A branch cut before this PR edits the single
packages/contracts/src/index.ts. Aftergit merge origin/mainstops on it, run:It splits the merge base and the branch versions with the codemod that made this split, replays each domain's change onto main's file with
git merge-file, rewrites the imports of each file it touched and stages the result. A domain both sides changed on the same lines keeps conflict markers and is listed.what changed
index.tsis 32 domain files beside it (threads.ts,providers.ts,wire.ts), the largest 719 lines.<Domain>RpcMethodsand<Domain>RpcEvents;index.tsre-exports every file and composesRpcMethodsandRpcEventsfrom them.scripts/migrate/split-contracts.tsholds the codemod (--split), its anchor and namespace tables, and the migration;scripts/migrate/git.tsis shared with the catalogue migration.docs/development.md,docs/panel.mdand the PR template name the domain files.to question
Declarations go by anchors in the single file's order, so a type a branch adds lands beside its neighbours, and members by namespace (
threads.*). Imports between domains are generated: types throughimport type, values from the file that declares them, with no runtime cycle.verified
tsc.--splitreplayed on the parent commit reproduces all 33 files byte for byte.bun run checkpasses;bun run check:architecturereports no cycle and no exempt entry.bun test scripts/migrate scripts/architecture: 30 pass.