Repository navigation
perf(web): speed up SPA loading and preserve form state on revalidation - #7
Merged
Merged
Conversation
- Self-host Inter via @fontsource-variable and drop Google Fonts links - Remove motion; use a CSS animation for the data-table action bar - Split CodeViewer (syntax highlighting) into a lazy chunk and extract CopyButton so the HTTP repeater no longer pulls the highlighter - Load Monaco only when an editable file is opened, using trimmed language/feature registration instead of the full editor package - Replace Recharts memory pies with lightweight SVG donuts - Poll extension tasks with recursive timeouts, avoiding overlapping requests and backing off while the tab is hidden - Keep file buffers in a ref so typing does not re-render the manager - Prefetch sidebar and dashboard links on intent
Loaders allocate fresh objects on every revalidation, so effects keyed on object identity reset forms and wiped in-progress edits whenever a fetcher action ran (for example "Test Connection" on the create-shell page). Compare serialized seed values instead with the new useSeedSync hook, and let the shell create/edit route skip revalidation for connection tests. Apply the same fix to the profile, project, plugin, role, and user forms and to the extension plugin selection.
- Serve /assets/** with public, immutable, one-year caching and keep the SPA HTML revalidating so new deployments roll over immediately - Enable gzip response compression for payloads of 2 KB or more - Cover both cache headers with an integration test
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #7 +/- ##
============================================
+ Coverage 52.95% 53.02% +0.07%
Complexity 554 554
============================================
Files 109 109
Lines 3165 3170 +5
Branches 397 397
============================================
+ Hits 1676 1681 +5
Misses 1241 1241
Partials 248 248
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This branch was successfully deployed
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
Cuts first-load cost for the SPA and fixes a form-state bug triggered by loader revalidation.
Frontend performance
@fontsource-variable/inter) and remove the Google Fonts preconnects/stylesheet from the critical pathmotion(only used by the data-table action bar) and animate with CSSCodeViewerinto a deferred chunk and extractCopyButtonso the HTTP repeater no longer pulls the highlightershell-inforoute payload: 314.55 KiB → 19.74 KiB raw, 93.02 KiB → 5.11 KiB gzip)Form state fix
Loaders allocate fresh but equal objects on every revalidation. Effects keyed on object identity therefore reset react-hook-form and wipe in-progress edits after any fetcher action - for example clicking Test Connection on
/shells/create.The new
useSeedSynchook compares serialized seed values, so only genuine record changes sync. It is applied to the shell, profile, project, plugin, role, and user forms, plus the extension plugin selection. Connection tests also skip revalidation entirely.Server
/assets/**served withCache-Control: public, max-age=31536000, immutableno-cacheso deployments roll over immediatelyTest plan
bun run fmt && bun run fmt:checkbun run typecheckbun run lintbun run test:run- 30 files / 82 testsbun run build./gradlew :noone-server:build/shells/create, click Test Connection - input preserved