Skip to content
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

Add optional report feature to error dialog #2229

Merged
merged 13 commits into from
Jan 12, 2025
Merged

Add optional report feature to error dialog #2229

merged 13 commits into from
Jan 12, 2025

Conversation

christian-byrne
Copy link
Collaborator

@christian-byrne christian-byrne commented Jan 11, 2025

This PR introduces an issue report panel that allows users to submit reports for encountered issues. Users can select the information to include using checkboxes, optionally provide contact details, and indicate whether they wish to be notified if their input helps resolve the issue or if they want follow-up support.

Currently, this form is integrated into the graph execution error dialog but is designed to be reusable in any component.

error-report.mp4

┆Issue is synchronized with this Notion page by Unito

Copy link

socket-security bot commented Jan 11, 2025

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@sentry/[email protected] Transitive: network +6 10.5 MB sentry-bot

View full report↗︎

@christian-byrne christian-byrne marked this pull request as ready for review January 11, 2025 23:09
Copy link
Member

@huchenlei huchenlei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm with nits

@@ -69,7 +69,16 @@
"command": "Command",
"keybinding": "Keybinding",
"upload": "Upload",
"export": "Export"
"export": "Export",
"submitErrorReport": "Submit Error Report (Optional)",
Copy link
Member

@huchenlei huchenlei Jan 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we move these translations to a sub-namespace? The g namespace should be used for some common translations that used in multiple places.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, thanks.

src/main.ts Outdated
@@ -24,6 +25,15 @@ const ComfyUIPreset = definePreset(Aura, {

const app = createApp(App)
const pinia = createPinia()
Sentry.init({
app,
dsn: 'https://e2d0c0bd392ffdce48e856c2a055f437@o4507954455314432.ingest.us.sentry.io/4508621568475136',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does this dsn get generated? We should probably have it defined in vite (Probably as a env var that injected during build time) instead of hardcode it here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The dsn is generated when the Sentry project is created. From relevant section of docs:

If your application is shipped to client devices, if possible, we recommend having a way to configure the DSN dynamically. In an ideal scenario, you can "ship" a new DSN to your application without the customer downloading the latest version. We recognize that this may not always be practical, but we cannot offer further advice as this scenario is implementation specific.

Creating a new one entails no longer receiving messages from users on older versons.

In either case, I will define it in vite. That way I can also disable in test env I believe.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is now injected during build time via SENTRY_DSN var. I changed the release workflow to use a GH secret with same name. It will also be disabled in CI env now.

__SENTRY_ENABLED__: JSON.stringify(
!(process.env.CI === 'true' || process.env.NODE_ENV === 'development')
),
__SENTRY_DSN__: JSON.stringify(process.env.SENTRY_DSN || '')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we disable sentry when DSN is not specified?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. Good Idea.

@huchenlei huchenlei merged commit 9d3bc0f into main Jan 12, 2025
10 checks passed
@huchenlei huchenlei deleted the error-reporting branch January 12, 2025 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants