Skip to content

feat: 'Report a problem' button with Slack webhook - #43

Merged
Flotapponnier merged 1 commit into
mainfrom
feat/report-button-slack
May 9, 2026
Merged

feat: 'Report a problem' button with Slack webhook#43
Flotapponnier merged 1 commit into
mainfrom
feat/report-button-slack

Conversation

@Flotapponnier

Copy link
Copy Markdown
Collaborator

Summary

  • Discreet Report a problem button at the bottom of each bench detail page (next to the Source code link)
  • Click opens a modal with a textarea (5–2000 chars) + optional contact field (email / TG / GH handle)
  • Submission posts to a new server-side POST /api/report route that forwards to a Slack webhook
  • Webhook URL is read from SLACK_REPORT_WEBHOOK_URL env var — never reaches the client
  • Slack payload: bench slug, active chain, page URL, contact, IP, user agent

Setup

  • Env var SLACK_REPORT_WEBHOOK_URL must be set in Vercel (already configured for production)
  • API returns 503 if the env var is missing, 400 on invalid input

Test plan

  • Open a bench, click Report a problem
  • Submit with < 5 chars → button disabled
  • Submit valid message → success state, Slack channel receives the message

- API route POST /api/report forwards to SLACK_REPORT_WEBHOOK_URL
- Webhook URL stays server-side (env var, never client-bundled)
- Discreet trigger placed next to 'Source code' on bench detail
- Modal: textarea (5-2000 chars) + optional contact field
- Slack payload includes bench slug, chain, page URL, contact, IP, UA
@Flotapponnier
Flotapponnier merged commit 3e6d066 into main May 9, 2026
1 check failed
@Flotapponnier
Flotapponnier deleted the feat/report-button-slack branch May 14, 2026 13:00
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