fix(ui): hide the feedback FAB on chat routes - #258
Merged
Conversation
The widget was mounted from the server root layout, where its built-in pathname detection reads window.location once and never re-runs — the root layout does not re-render on client-side navigation. So hideOnRoutes only took effect on a hard load, and the FAB stayed up after navigating into a conversation, covering the message submit button. Move it into ClientLayout and pass usePathname() explicitly so the hide tracks SPA navigation. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
ThreatCrush Security Scan91 finding(s) HIGH/CRITICAL: 5 | MEDIUM: 10 | LOW: 76
…and 41 more. Full results in the Security tab. Snippets are redacted; ThreatCrush never prints matched credential material. |
This was referenced Aug 16, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The feedback button was covering the message submit button in the chat window.
Why it wasn't already hidden
hideOnRoutes={['/chat', '/chats', '/u', '/anon']}was already set, but the widget was mounted from the server root layout (src/app/layout.jsx). Without an explicitpathnameprop,FeedbackWidgetfalls back to readingwindow.location.pathnameduring render — and a root layout never re-renders on client-side navigation. So the route check only ran once, on initial load: navigate from/into a conversation and the FAB stayed up.Fix
Move the widget into
ClientLayout, which already callsusePathname(), and pass it through explicitly. The widget's own docs call this out as the supported way to makehideOnRoutestrack SPA navigation. Same property, same route list — only where it's mounted changes.Verification
pnpm buildcompiles and type-checks both changed files.supabaseUrl is requiredfor/api/auth/key-backup— verified pre-existing by stashing the change and rebuilding: identical failure. It's a missing-env artifact of building without secrets, unrelated to this diff.🤖 Generated with Claude Code