Conversation
🦋 Changeset detectedLatest commit: 07d25a8 The changes in this PR will be included in the next version bump. This PR includes changesets to release 10 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (44)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. WalkthroughThe PR replaces ChangesReact server view API
Carbon catalogue binding
Next.js route integration
Named catalogue exports
Estimated code review effort: 4 (Complex) | ~45 minutes Merge Risk: ⚪ Minimal · up to No actionable correctness, security, data-integrity, or availability risk remains for merge. Sequence Diagram(s)sequenceDiagram
participant RouteSegment
participant withSay
participant Catalogue
participant ReactCache
participant ServerComponent
RouteSegment->>withSay: resolve locale
withSay->>Catalogue: match and load view
withSay->>ReactCache: establish view
withSay->>ServerComponent: render component
ServerComponent->>ReactCache: read view with getSay
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 36.36% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 11 functions across 25 files. (19 skipped: 19 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
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 |
Greptile SummaryThis PR replaces React’s server-side
Confidence Score: 5/5The PR appears safe to merge; no concrete correctness, security, or repository-rule violations remain. The new APIs are applied consistently, changed importers and documentation are migrated, and the investigated request-state, typing, caching, and release-versioning concerns do not establish failures within the documented contracts. Reviews (1): Last reviewed commit: "Bind Carbon's withSay to a catalogue wit..." | Re-trigger Greptile |
Both React and Carbon now bind their
withSayto a catalogue, and the examples export their catalogue by name.@saykit/react(major)<SayScope>is gone, replaced bycreateWithSay(catalogue)plussetSay/getSay.A scope-shaped API cannot work on the App Router: Next renders a page segment before the layout above it, so a layout that establishes the view has not run yet when the page reads it. That is what broke
pnpm buildin the Next.js example, with'getSay' must be called below a 'SayScope'while prerendering/en. A scope also forced an extra component split, since the component reading the view had to sit below the one opening it.Every route segment that renders messages now wraps itself:
The view lives in React's per-request
cache(), so a concurrent request rendering another locale reads its own.setSayis exported for a caller that already has a view, and warns once per request in development if a second locale takes over.Next.js example also switched to Next's global
LayoutProps/PagePropsinstead of hand-declared types, dropped a redundantcatalogue.matchin favour ofgetSay().locale, and moved the storefront's currency formatting into the ICU message with<Say.Number style="::currency/EUR" />.@saykit/carbon(major)withSayis no longer exported on its own.createWithSay(catalogue)returns one bound to the catalogue, so a command takes only its properties mapping:The derived-class cache moved inside the binding, so it is per catalogue. The component and modal overload is unchanged, it never took a catalogue.
SayPlugin(catalogue)still does, it backsinteraction.sayandguild.say.Examples
Every example's
i18n.tsnow usesexport const catalogueinstead of a default export, with importers and docs updated to match.Checks
pnpm checkpasses across all 19 packages, 750 tests pass, and the Next.js example prerenders/en,/frand/plagain.Summary by CodeRabbit
New Features
createWithSay(catalogue)to create reusable, catalogue-boundwithSaywrappers.setSay(view)for establishing a server-side translation view.Bug Fixes
Documentation