Feedback
Feedback and What's new buttons in the dashboard, on a Chirio board.The feedback slice puts Feedback and What's new buttons in the dashboard header, on a board you run on Chirio. They are the same buttons Once UI, Tavilio and Aveiro use. No surface requires it, so it is asked for by name:
It adds no dependency. The server calls Chirio over global fetch, and the widget is one script tag.
- Feedback (lightbulb) opens a drawer with Chirio's post form. A user reports a bug or asks for something, and can attach an annotated screenshot of the page.
- What's new (megaphone) opens your board's changelog in the same drawer. It carries a dot while there is news the user has not opened.
- The drawer's arrow opens the public board (chirio.dev/b/<board>), where people vote and follow the roadmap.
Posts arrive under the signed-in user's name, email and avatar. The browser never sees your API key: /api/feedback-token asks Chirio for a 12-hour token naming the user, and the widget hands that token to the form. In demo mode (no Supabase) there is no token, and the widget asks for an email if the board lets anyone post.
Chirio is free to start: the Free plan has 1 board and 100 units a month. Sign up on Chirio, then:
- Create a board in Chirio and note its slug.
- Create a Chirio project API key.
- Set CHIRIO_API_KEY and CHIRIO_FEEDBACK_BOARD (the slug).
Without CHIRIO_API_KEY a production build has no buttons and no script, so the app builds and runs with no environment at all. In development the header shows a lightbulb that opens these steps instead, until the key is set. CHIRIO_URL points at another Chirio host (default https://www.chirio.dev).
- src/lib/feedback/chirio.ts: configuration and mintFeedbackToken().
- src/app/api/feedback-token/route.ts: the widget's token for the signed-in user.
- src/app/(product)/components/FeedbackButtons.tsx: the buttons and the drawer.
- src/app/(product)/components/FeedbackSetup.tsx: the setup steps shown in development without a key.
- src/app/(product)/layout.tsx: loads the widget script when the key is set.
The buttons live in the dashboard header, so the slice pairs with the dashboard surface. Selling plans with the billing slice? Pass the organization's plan as plan and paid in the token route, and paying users are answered first on the board.