feat: partial hydration - #951
Conversation
PR SummaryMedium Risk Overview The client bundle model changes: every page shares one entry that imports global CSS, runs Layout always renders the banner (no client-only guard). Theme toggle moves into its own island component. CodeTabs gets a local island wrapper (constants point at it). Type annotations in the web pipeline use dual Shiki themes for light/dark. Lockfile bumps Reviewed by Cursor Bugbot for commit 1ef01c2. Bugbot is set up for automated code reviews on this repo. Configure here. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
b7881cb to
797e8af
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #951 +/- ##
=======================================
Coverage 89.11% 89.12%
=======================================
Files 196 196
Lines 18075 18083 +8
Branches 1664 1667 +3
=======================================
+ Hits 16108 16116 +8
Misses 1960 1960
Partials 7 7 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 797e8af. Configure here.
This comment was marked as off-topic.
This comment was marked as off-topic.
9cefea8 to
8d3b7f5
Compare
|
idk why but when I take a page an scroll I have some lag spike in safari 26.5.2 |
I can't reproduce, probably a browser issue. If anything, this should lower spikes since it's less JS |
bmuenzenmeyer
left a comment
There was a problem hiding this comment.
I am still learning this architecture, but don't want to be a blocker.
|
That's probably a bug of the ui bump |
I believe so |
|
Actually, it might be because in this repo we don't account for a light/dark mode in Shiki (we use |
7282006 to
1ef01c2
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 19 out of 20 changed files in this pull request and generated no new comments.
Suppressed comments (3)
packages/core/src/generators/web/ui/index.css:20
- Selector targets
data-component, but islands are marked withdata-island-name(seewithIsland.jsx). As written, the SideBar-specific rule will never match and the flex layout tweaks won’t apply.
/* TODO(@avivkeller): make this component's CSS more agnostic */
is-land[data-component='SideBar'] {
display: flex;
packages/core/src/generators/web/ui/islands/runtime.mjs:41
JSON.parse(script.textContent)can throw (e.g. if the inline JSON is malformed or truncated), which would reject theaddInitTypecallback and leave the island stuck before it’s marked ready. Parse errors should be caught and reported like the hydration errors below.
const script = [...island.children].find(child =>
child.matches('script[data-island-props]')
);
const props = script ? JSON.parse(script.textContent) : {};
packages/core/src/utils/type-annotations/hast.mjs:107
- The inline
<code>produced from Shiki dropspreElement.properties.style. Shiki uses inline styles/CSS variables for theme colors, so removing this can break highlighting (especially with dual themes). Preserve the style on the reshaped<code>like the legacy highlighter does.
tagName: 'code',
properties: {
class: `${preElement.properties.class} type`,
},
children: codeElement.children,
|
@ovflowd Fixed! |
|
Can I get approvals so I can land this :-) |
ovflowd
left a comment
There was a problem hiding this comment.
SGTM, although we should be conscious about the footprint the ever-increasing dependencies are causing to doc-kit... I wish for doc-kit to be relatively small to install and not bloated.



Uses islands from 11ty in order to give us partial hydration