feat(onboarding): Add feature selector for Electron#115473
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ 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.
| });`, | ||
| renderer: `document.getElementById("testError").addEventListener("click", () => {${logsCode}${metricsCode} | ||
| throw new Error("Sentry test error in renderer process"); | ||
| });`, |
There was a problem hiding this comment.
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.
Reviewed by Cursor Bugbot for commit 4752af9. Configure here.
There was a problem hiding this comment.
It is just throwing an error. It doesn't need to import anything...
…github.com/timfish/sentry into timfish/feat/elecgtron-onboarding-selector
| { | ||
| type: 'code', | ||
| language: 'html', | ||
| filename: 'index.html', |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
I think this is a bug unrelated this this PR. For whatever reason the filename is only used for tabbed snippets?


cc @bruno-garcia
This PR adds the full feature selector for Electron onboarding.