-
Notifications
You must be signed in to change notification settings - Fork 492
fix: replace vite preload error reload with error logging #8261
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🎨 Storybook Build Status✅ Build completed successfully! ⏰ Completed at: 01/23/2026, 06:46:35 PM UTC 🔗 Links🎉 Your Storybook is ready for review! |
📝 WalkthroughWalkthroughReplaced the previous vite preload-error handling in Changes
Sequence Diagram(s)sequenceDiagram
participant VitePreloader as Vite Preloader
participant App as App.vue
participant Sentry as Sentry (external)
VitePreloader->>App: emit vite:preloadError(error)
App->>App: event.preventDefault()\nconsole.error(error)
alt cloud distribution
App->>Sentry: captureException(error)
else non-cloud
App-->>App: no Sentry capture (console only)
end
🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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 |
🎭 Playwright Tests:
|
Bundle Size ReportSummary
Category Glance Per-category breakdownApp Entry Points — 22.2 kB (baseline 22.7 kB) • 🟢 -483 BMain entry bundles and manifests
Status: 1 added / 1 removed Graph Workspace — 949 kB (baseline 949 kB) • ⚪ 0 BGraph editor runtime, canvas, workflow orchestration
Status: 1 added / 1 removed Views & Navigation — 80.7 kB (baseline 80.7 kB) • ⚪ 0 BTop-level views, pages, and routed surfaces
Status: 9 added / 9 removed Panels & Settings — 440 kB (baseline 440 kB) • 🟢 -8 BConfiguration panels, inspectors, and settings screens
Status: 10 added / 10 removed User & Accounts — 3.94 kB (baseline 3.94 kB) • ⚪ 0 BAuthentication, profile, and account management bundles
Status: 3 added / 3 removed Editors & Dialogs — 2.83 kB (baseline 2.83 kB) • ⚪ 0 BModals, dialogs, drawers, and in-app editors
Status: 2 added / 2 removed UI Components — 33.7 kB (baseline 33.7 kB) • ⚪ 0 BReusable component library chunks
Status: 5 added / 5 removed Data & Services — 3.17 MB (baseline 3.17 MB) • 🟢 -275 BStores, services, APIs, and repositories
Status: 8 added / 8 removed Utilities & Hooks — 24 kB (baseline 24 kB) • ⚪ 0 BHelpers, composables, and utility bundles
Status: 7 added / 7 removed Vendor & Third-Party — 10.7 MB (baseline 10.7 MB) • ⚪ 0 BExternal libraries and shared vendor chunks
Other — 6.36 MB (baseline 6.36 MB) • 🟢 -192 BBundles that do not match a named category
Status: 30 added / 30 removed |
christian-byrne
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we log to Sentry if isCloud is true? There are some examples of this in
7a481c8 to
6361329
Compare
d739735 to
6eb0737
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@src/App.vue`:
- Around line 52-59: The preload error handler currently only reports to Sentry
when __DISTRIBUTION__ === 'cloud', leaving non-cloud runs silent; update the
window.addEventListener('vite:preloadError', ...) handler to log the error
payload in non-cloud environments (e.g., via console.error) while keeping the
Sentry.captureException call for cloud, referencing the existing event listener
and the __DISTRIBUTION__ check to locate the code.
6eb0737 to
8edf734
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@src/App.vue`:
- Around line 52-60: The vite:preloadError handler must call
event.preventDefault() to stop Vite from rethrowing the import error; inside the
window.addEventListener('vite:preloadError', (event) => { ... }) callback, call
event.preventDefault() immediately (before Sentry.captureException or
console.error) so the error is treated as handled, then proceed with the
existing cloud branch (Sentry.captureException with tags) or the console.error
branch.
Summary
The reload approach didn't fully work because CSS and other preload errors emit different error types. Log errors for Sentry tracking instead, to be solved on the backend by serving chunks from past deployments.
fix #8153
┆Issue is synchronized with this Notion page by Unito