Skip to content

Conversation

@0xApotheosis
Copy link
Member

@0xApotheosis 0xApotheosis commented Dec 3, 2025

Description

Fix CI by extracting @cetusprotocol and `@mysten' packages.

Issue (if applicable)

Unblocks release.

Risk

Low - if CI is green we are good.

What protocols, transaction types, wallets or contract interactions might be affected by this PR?

None

Testing

Engineering

CI should now be green.

Operations

  • 🏁 My feature is behind a flag and doesn't require operations testing (yet)

Screenshots (if applicable)

N/A


Note

Update Vite manual chunking to extract @CetusProtocol and @Mysten into separate bundles.

  • Build (Vite):
    • Update rollupOptions.output.manualChunks to split vendor chunks:
      • @cetusprotocol -> @cetusprotocol
      • @mysten -> @mysten

Written by Cursor Bugbot for commit 77df6b4. This will update automatically on new commits. Configure here.

Summary by CodeRabbit

  • Chores
    • Optimized build configuration to improve module bundling efficiency during the application build process.

✏️ Tip: You can customize this high-level summary in your review settings.

@0xApotheosis 0xApotheosis requested a review from a team as a code owner December 3, 2025 23:40
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 3, 2025

📝 Walkthrough

Walkthrough

Extended Vite's manual chunking configuration to assign @cetusprotocol and @mysten package imports to dedicated chunk keys in the id-based grouping system for optimized bundle splitting.

Changes

Cohort / File(s) Summary
Build Configuration
vite.config.mts
Added @cetusprotocol and @mysten as separate chunk keys in manual chunking's id-based grouping to isolate these dependencies into dedicated output chunks.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

  • Single-file configuration change with repetitive pattern additions
  • No logic modifications or behavioral impact on other systems

Possibly related PRs

  • shapeshift/web#11233: Adds viem as a dedicated chunk key using the same id-based manualChunks pattern
  • shapeshift/web#11232: Modifies the same build.rollupOptions.output.manualChunks id-based grouping in vite.config.mts

Suggested reviewers

  • NeOMakinG

Poem

🐰 With carrots chunked and bundled tight,
@CetusProtocol swims just right,
@Mysten grains in piles so neat,
Our Vite config's quite a treat!

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'chore: extract cetus + mysten from build' directly and clearly describes the main change in the pull request, which extends manual chunking in vite.config.mts to treat @CetusProtocol and @Mysten as separate chunk keys.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix-ci

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 86d96ad and 77df6b4.

📒 Files selected for processing (1)
  • vite.config.mts (1 hunks)
🧰 Additional context used
🧠 Learnings (4)
📓 Common learnings
Learnt from: gomesalexandre
Repo: shapeshift/web PR: 11170
File: patches/@shapeshiftoss+bitcoinjs-lib+7.0.0-shapeshift.0.patch:9-19
Timestamp: 2025-11-25T21:43:10.838Z
Learning: In shapeshift/web, gomesalexandre will not expand PR scope to fix latent bugs in unused API surface (like bitcoinjs-lib patch validation methods) when comprehensive testing proves the actual used code paths work correctly, preferring to avoid costly hdwallet/web verdaccio publish cycles and full regression testing for conceptual issues with zero runtime impact.
Learnt from: gomesalexandre
Repo: shapeshift/web PR: 11078
File: src/setupVitest.ts:11-15
Timestamp: 2025-11-20T12:00:45.005Z
Learning: In shapeshift/web, src/setupVitest.ts must redirect 'ethers' to 'ethers5' for shapeshiftoss/hdwallet-trezor (and -trezor-connect), same as ledger and shapeshift-multichain. Removing 'trezor' from the regex causes CI/Vitest failures due to ethers v6 vs v5 API differences.
Learnt from: NeOMakinG
Repo: shapeshift/web PR: 10231
File: src/components/AssetSearch/components/AssetList.tsx:2-2
Timestamp: 2025-08-08T15:00:49.887Z
Learning: Project shapeshift/web: NeOMakinG prefers avoiding minor a11y/UI nitpicks (e.g., adding aria-hidden to decorative icons in empty states like src/components/AssetSearch/components/AssetList.tsx) within feature PRs; defer such suggestions to a follow-up instead of blocking the PR.
Learnt from: kaladinlight
Repo: shapeshift/web PR: 10263
File: vite.config.mts:133-134
Timestamp: 2025-08-12T17:52:34.672Z
Learning: In vite.config.mts for shapeshift/web, the team prefers explicit package names in manualChunks configuration rather than pattern-based matching with path boundaries. They want granular control over which specific packages go into each chunk.
Learnt from: kaladinlight
Repo: shapeshift/web PR: 10263
File: vite.config.mts:133-133
Timestamp: 2025-08-12T17:53:56.322Z
Learning: In vite.config.mts for shapeshift/web, kaladinlight prefers to avoid changing working chunk configurations even for better categorization when there's risk of breaking the build. They prioritize build stability over perfect semantic grouping in the short term.
Learnt from: kaladinlight
Repo: shapeshift/web PR: 10376
File: vite.config.mts:136-137
Timestamp: 2025-08-29T18:09:45.982Z
Learning: In the ShapeShift web repository vite.config.mts, the commonjsOptions.exclude configuration using bare package name strings like ['shapeshiftoss/caip', 'shapeshiftoss/types'] works correctly for excluding specific packages from CommonJS transformation, despite theoretical concerns about module ID matching patterns.
📚 Learning: 2025-08-12T17:52:34.672Z
Learnt from: kaladinlight
Repo: shapeshift/web PR: 10263
File: vite.config.mts:133-134
Timestamp: 2025-08-12T17:52:34.672Z
Learning: In vite.config.mts for shapeshift/web, the team prefers explicit package names in manualChunks configuration rather than pattern-based matching with path boundaries. They want granular control over which specific packages go into each chunk.

Applied to files:

  • vite.config.mts
📚 Learning: 2025-08-12T17:53:56.322Z
Learnt from: kaladinlight
Repo: shapeshift/web PR: 10263
File: vite.config.mts:133-133
Timestamp: 2025-08-12T17:53:56.322Z
Learning: In vite.config.mts for shapeshift/web, kaladinlight prefers to avoid changing working chunk configurations even for better categorization when there's risk of breaking the build. They prioritize build stability over perfect semantic grouping in the short term.

Applied to files:

  • vite.config.mts
📚 Learning: 2025-08-29T18:09:45.982Z
Learnt from: kaladinlight
Repo: shapeshift/web PR: 10376
File: vite.config.mts:136-137
Timestamp: 2025-08-29T18:09:45.982Z
Learning: In the ShapeShift web repository vite.config.mts, the commonjsOptions.exclude configuration using bare package name strings like ['shapeshiftoss/caip', 'shapeshiftoss/types'] works correctly for excluding specific packages from CommonJS transformation, despite theoretical concerns about module ID matching patterns.

Applied to files:

  • vite.config.mts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Call / Static
🔇 Additional comments (1)
vite.config.mts (1)

190-191: New @cetusprotocol / @mysten chunks are consistent and low‑risk

These two id.includes(...) checks match the existing manualChunks style (e.g. @arbitrum, @metamask, @walletconnect), keep the change tightly scoped, and respect the preference for explicit package-based chunking in this file. This should only influence bundle splitting, not runtime behavior, so it’s an appropriate low‑risk tweak to help CI.

Please confirm via CI/build output that the new chunks are created as expected and that the original failure mode is resolved.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@gomesalexandre gomesalexandre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deployed on gome to confirm Cloudflare action is happy, but pre-stamping!

Copy link
Contributor

@gomesalexandre gomesalexandre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@0xApotheosis doesn't hurt getting this one in as a first build size improvement, but looks like we may need to extract more:

Image

@0xApotheosis
Copy link
Member Author

Indeed, more to do @gomesalexandre! ty, I'll merge this and then take another pass.

@0xApotheosis 0xApotheosis merged commit 46cc758 into develop Dec 3, 2025
7 of 8 checks passed
@0xApotheosis 0xApotheosis deleted the fix-ci branch December 3, 2025 23:57
@coderabbitai coderabbitai bot mentioned this pull request Dec 4, 2025
1 task
Comment on lines +190 to +191
if (id.includes('@cetusprotocol')) return '@cetusprotocol'
if (id.includes('@mysten')) return '@mysten'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@0xApotheosis Brain stopping to brain for tonight but if we want to give a try to this, took a look at recent additions (re: yarn.lock diff) and looks like:

  • valibot version change brought by mysten added 1.74Mb
  • @0noco/graphqllsp brought by mysten added 1.46Mb
  • graphql brought by mysten added something similar to the above

Few others but actually smol diff

Obviously once web is built those Mb numbers are very different and we're really looking at the size of the main .js file in the build, but gut feel is tackling either valibot alone and/or the gql tooling packages may be the goer!

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.

3 participants