perf: lazy-load heavy routes, on-demand highlight.js, and optimize first-load UX#33
Closed
markbang wants to merge 1 commit into
Closed
perf: lazy-load heavy routes, on-demand highlight.js, and optimize first-load UX#33markbang wants to merge 1 commit into
markbang wants to merge 1 commit into
Conversation
…rst-load UX - Route-level code splitting: Docs, Playground, and Embed routes now use TanStack Router lazy files to reduce initial bundle size - highlight.js (66 kB) and its CSS theme are now dynamically loaded only in the embed route instead of being bundled globally - Removed unused dependencies (jsdom, @testing-library/dom) - Filled in missing manifest.json fields for PWA install experience - Added preconnect/dns-prefetch hints for unpkg.com CDN - Added top loading bar for route transitions - DevTools panels now import dynamically in dev mode only - Set build target to esnext for smaller output Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
1 issue found across 16 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="apps/site/src/routes/playground/index.lazy.tsx">
<violation number="1" location="apps/site/src/routes/playground/index.lazy.tsx:42">
P2: Use the existing `serializePlaygroundState` helper instead of re-serializing each query param inline to avoid logic drift.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
| } | ||
|
|
||
| const url = new URL(window.location.href); | ||
| url.searchParams.set("baseUrl", state.baseUrl); |
There was a problem hiding this comment.
P2: Use the existing serializePlaygroundState helper instead of re-serializing each query param inline to avoid logic drift.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/site/src/routes/playground/index.lazy.tsx, line 42:
<comment>Use the existing `serializePlaygroundState` helper instead of re-serializing each query param inline to avoid logic drift.</comment>
<file context>
@@ -0,0 +1,84 @@
+ }
+
+ const url = new URL(window.location.href);
+ url.searchParams.set("baseUrl", state.baseUrl);
+ url.searchParams.set("memoId", state.memoId);
+ url.searchParams.set("theme", state.theme);
</file context>
Owner
Author
|
Superseded by #34 - rebased on latest main with resolved conflicts. |
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.
Summary
.lazy.tsxfilesname,short_name, anddescriptionfor PWA installpreconnect/dns-prefetchhints for unpkg.com CDNjsdomand@testing-library/domdependenciesesnextfor smaller modern-browser outputTest plan
pnpm validatepasses (lint + check + test + test:artifacts + build)🤖 Generated with Claude Code
Summary by cubic
Speeds up first load by lazy-loading Docs, Playground, and Embed routes and loading
highlight.jsonly when needed. Also adds a small loading bar during route transitions and improves PWA metadata.Performance
.lazy.tsxfor Docs, Playground, and Embed.highlight.js(66 kB JS + 2 kB CSS) only on the embed route; removed from global bundle.preconnect/dns-prefetchforhttps://unpkg.com.esnextwith CSS minification for smaller modern bundles.jsdom,@testing-library/dom.UX
name,short_name, anddescription.Written for commit 9d9f196. Summary will update on new commits. Review in cubic