H-6327: Integrate Sentry feedback button into ViewportControls#8537
H-6327: Integrate Sentry feedback button into ViewportControls#8537
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
3 Skipped Deployments
|
PR SummaryMedium Risk Overview Adds a new exported Written by Cursor Bugbot for commit d8ec669. This will update automatically on new commits. Configure here. |
This stack of pull requests is managed by Graphite. Learn more about stacking. |
🤖 Augment PR SummarySummary: This PR adds an extension point for extra viewport control buttons and uses it to expose a Sentry “Give feedback” button in Petrinaut. Changes:
🤖 Was this summary useful? React with 👍 or 👎 |
70d198a to
1b89853
Compare
1b89853 to
1bf2e71
Compare
e91ad49 to
2cd6534
Compare
CiaranMn
left a comment
There was a problem hiding this comment.
The testing instructions say this:
Checkout the branch
Run yarn dev in apps/petrinaut-website
Confirm the floating Sentry feedback button is gone
Confirm a purple feedback button appears at the bottom of the viewport controls (bottom-right)
Click it and confirm the Sentry feedback dialog opens
But the Sentry feedback dialog does not in fact open. I understand this is because Sentry is not configured for staging, and therefore the button will do nothing, but there is no way of telling this and we are likely to get people reporting this as a bug in local / staging at some point. Can we add an alert that explains the click has been registered but Sentry is not configured, so it's clear what is happening?
Merge activity
|
Add a `viewportActions` prop to Petrinaut that allows consumers to inject custom action buttons into the viewport controls panel. Use this to move the Sentry feedback trigger from a floating overlay into the controls, with a purple button style and bug report icon. - Add `ViewportAction` type with key, icon, label, tooltip, onClick, style, className, and ref fields - Thread `viewportActions` through Petrinaut → EditorView → SDCPNView → ViewportControls - Set `autoInject: false` on Sentry feedbackIntegration - Use React 19 ref cleanup to attach/detach Sentry feedback listener Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
3125bda to
46e4caf
Compare
e95f163 to
6d6cfca
Compare
When Sentry isn't configured (local dev, staging), the feedback button was silently inert. Now it shows an alert explaining the situation. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

🌟 What is the purpose of this PR?
The Sentry "Give feedback" button was floating on top of the UI and hiding elements underneath it. This PR moves it into the
ViewportControlspanel by introducing aviewportActionsprop on thePetrinautcomponent, allowing consumers to inject custom action buttons.🔗 Related links
🔍 What does this change?
ViewportActiontype (key,icon,label,tooltip,onClick,style,className,ref) exported from@hashintel/petrinautviewportActions?: ViewportAction[]prop toPetrinautProps, threaded through toViewportControlsViewportControlsrenders each action as anIconButtonafter the built-in buttonsautoInject: falseon Sentry'sfeedbackIntegrationto remove the floating buttonuseSentryFeedbackAction()hook in the website that returns aViewportActionusing Sentry'sgetFeedback().attachTo()API with a React 19 ref cleanup patternMdBugReporticonPre-Merge Checklist 🚀
🚢 Has this modified a publishable library?
This PR:
📜 Does this require a change to the docs?
The changes in this PR:
🕸️ Does this require a change to the Turbo Graph?
The changes in this PR:
❓ How to test this?
yarn devinapps/petrinaut-website