Skip to content

Two-way feedback threads between users and admins - #42

Draft
bastislack wants to merge 2 commits into
devfrom
worktree-feedback-threads
Draft

Two-way feedback threads between users and admins#42
bastislack wants to merge 2 commits into
devfrom
worktree-feedback-threads

Conversation

@bastislack

@bastislack bastislack commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

allow admins + users to communicate on given feedback. This helps when the feedback is actually a question that requires an answer.

bastislack and others added 2 commits July 16, 2026 11:50
* Add reusable local Supabase dev stack (#31)

Use declarative schemas for future migrations

* chore: Remove delete grant (#32)

* fix: Mirror actual prod state of tricks in local db (#35)

* feat: Port consistency slider from old Highline Freestyle app (#28)

* feat: Port consistency slider from old Highline Freestyle app

* fix: Make sure first and last label in consistency slider have enough padding from the edges of the screen

* fix: Use declarative schema

* chore: Add delete-trick grant (#34)

* Allow users to provide feedback (#29)

* feat (Draft): Allow users to provide feedback

* feat: Allow users to provide feedback

* Quick user switch in local-db mode

* Add multiple attachments + download them

* chore: Remove stale draft feedback SQL superseded by migration

* fix: hide feedback icon when logged out (#36)

* feat: Long press trick-card to change consistency (#37)
Feedback was write-only: a user sent a message and admins could mark it
reviewed or dismissed, with no way to ask a follow-up question or explain
anything back. Users couldn't even read their own submissions, since the
only select policy on `feedback` was the admin one.

Feedback is now a thread. The `feedback` row is the head; every message,
including the user's first one, lives in `feedback_messages`. Status tracks
who owes a response — `new` (waiting on an admin), `answered` (waiting on
the user), `reviewed`/`dismissed` (terminal, read-only, attachments purged)
— and moves through the `bump_feedback_thread` trigger rather than user
UPDATE grants, so a user can't resolve their own thread.

Users get a `/feedback/mine` list and thread view, reachable from the home
app bar (now badged with an unread count) and from their profile. Admins
reply inline on the existing admin screen, which now also shows who
submitted the thread.

Admin replies are text-only for now: the storage policies scope uploads to
`<int_id>/`, so an admin-attached file would sit in a folder the user can't
read. Widening that means repathing attachments per thread.

Verified against a scratch database on the local Supabase cluster: all
migrations apply in order, the backfill preserves existing feedback rows,
status transitions behave, and the RLS boundaries hold (owner reads only
their own threads, can't forge an author, can't reply once closed, can't
change status; strangers see nothing; admins see and answer everything).
@netlify

netlify Bot commented Aug 3, 2026

Copy link
Copy Markdown

Deploy Preview for lively-torte-533cc3 ready!

Name Link
🔨 Latest commit 38f74e6
🔍 Latest deploy log https://app.netlify.com/projects/lively-torte-533cc3/deploys/6a706c887c5b580008d310d2
😎 Deploy Preview https://deploy-preview-42--lively-torte-533cc3.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@bastislack
bastislack changed the base branch from master to dev August 3, 2026 12:46
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