Skip to content

feat(onboarding): Add feature selector for Electron#115473

Open
timfish wants to merge 6 commits into
getsentry:masterfrom
timfish:timfish/feat/elecgtron-onboarding-selector
Open

feat(onboarding): Add feature selector for Electron#115473
timfish wants to merge 6 commits into
getsentry:masterfrom
timfish:timfish/feat/elecgtron-onboarding-selector

Conversation

@timfish
Copy link
Copy Markdown
Contributor

@timfish timfish commented May 13, 2026

cc @bruno-garcia

This PR adds the full feature selector for Electron onboarding.

@timfish timfish requested a review from a team as a code owner May 13, 2026 10:25
@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label May 13, 2026
Comment thread static/app/gettingStartedDocs/electron/utils.tsx
Copy link
Copy Markdown
Contributor

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 4752af9. Configure here.

Comment thread static/app/gettingStartedDocs/electron/utils.tsx Outdated
});`,
renderer: `document.getElementById("testError").addEventListener("click", () => {${logsCode}${metricsCode}
throw new Error("Sentry test error in renderer process");
});`,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Renderer verify snippet missing Sentry import statement

Medium Severity

When logs or metrics features are selected, the renderer verify snippet uses Sentry.logger.info(...) and Sentry.metrics.count(...), but doesn't include import * as Sentry from "@sentry/electron/renderer". The main process verify snippet correctly includes its Sentry import. Users following this onboarding guide would get a ReferenceError when running the renderer code as shown.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 4752af9. Configure here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It is just throwing an error. It doesn't need to import anything...

Comment thread static/app/gettingStartedDocs/electron/utils.tsx
{
type: 'code',
language: 'html',
filename: 'index.html',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Bug: The filename property for single code blocks is ignored by the renderer, so filenames will not be displayed in the onboarding UI.
Severity: LOW

Suggested Fix

In static/app/components/onboarding/gettingStartedDoc/contentBlocks/defaultRenderers.tsx, update the CodeBlock function. In the conditional that handles single code blocks, pass the filename property to the OnboardingCodeSnippet component: <OnboardingCodeSnippet language={block.language} filename={block.filename}>{block.code}</OnboardingCodeSnippet>.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location: static/app/gettingStartedDocs/electron/onboarding.tsx#L130

Potential issue: In `onboarding.tsx`, single code blocks are assigned a `filename`
property. However, the renderer for these blocks in
`static/app/components/onboarding/gettingStartedDoc/contentBlocks/defaultRenderers.tsx`
does not pass this property to the `OnboardingCodeSnippet` component. The rendering
logic for single code blocks (`if ('code' in block)`) omits `filename={block.filename}`,
unlike the logic for tabbed code blocks. As a result, specified filenames like
`'index.html'` and `'renderer.js'` will not appear in the UI, potentially confusing
users during the onboarding process.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think this is a bug unrelated this this PR. For whatever reason the filename is only used for tabbed snippets?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant