Skip to content

feat: add logged-in email to docs feedback#177

Merged
dcrawbuck merged 1 commit intomainfrom
duncan/sw-5059-docs-add-email-to-docs-feedback-slack-message-when-user-is
Apr 23, 2026
Merged

feat: add logged-in email to docs feedback#177
dcrawbuck merged 1 commit intomainfrom
duncan/sw-5059-docs-add-email-to-docs-feedback-slack-message-when-user-is

Conversation

@dcrawbuck
Copy link
Copy Markdown
Collaborator

@dcrawbuck dcrawbuck commented Apr 23, 2026

Adds authenticated session email enrichment for docs page feedback Slack messages while keeping the client feedback payload unchanged. Exposes email in the existing login status context so the page feedback UI can disclose possible account-email follow-up before submit and in the success state. Wraps docs pages with the login status provider so the feedback widget has session context. Verified with bun test and bun run build:cf.


Note

Medium Risk
Moderate risk because it changes how feedback is attributed by resolving user email server-side via the auth session endpoint and surfaces account-email follow-up messaging in the UI; incorrect session handling could affect privacy or Slack message contents.

Overview
Docs page feedback is now email-enriched for authenticated users: the /api/feedback handler fetches /api/auth/session using the request cookie and prefers the session’s userInfo.email when populating the Slack *User* field (falling back to any provided email).

The client-side LoginStatusContext now exposes email and exports useLoginStatus; docs pages are wrapped in LoginStatusProvider and the feedback widget conditionally informs users that follow-up may occur via their account email and persists whether an account email was used in the local “thank you” state.

Reviewed by Cursor Bugbot for commit 116e513. Bugbot is set up for automated code reviews on this repo. Configure here.

@linear
Copy link
Copy Markdown

linear Bot commented Apr 23, 2026

@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
superwall-docs-staging 116e513 Commit Preview URL

Branch Preview URL
Apr 23 2026, 01:45 AM

@dcrawbuck dcrawbuck changed the title Add logged-in email to docs feedback feat: add logged-in email to docs feedback Apr 23, 2026
@dcrawbuck dcrawbuck merged commit be31a9f into main Apr 23, 2026
3 checks passed
@dcrawbuck dcrawbuck deleted the duncan/sw-5059-docs-add-email-to-docs-feedback-slack-message-when-user-is branch April 23, 2026 02:45
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.

1 participant