Files
loki/drizzle/0108_feedback_read.sql
CatoandClaude Fable 5.1 737f261712 feat(feedback): Loki reads a report before you build it — meaning, impact, an editable ask — and keeps a before picture (#1238)
* feat(feedback): Loki reads a report before you build it — the meaning, the impact, an ask you can edit — and keeps a before picture

The owner, on a collaborator reporting feedback (2026-10-17): "if Manu
gives bullshit feedback, automatically implementing it might be a bad
idea … I also want to know what he means and what the impacts would be.
Maybe I want to do some changes to that feedback." And after it ships:
"I would like to see the before and after."

- Loki's read (lib/feedback/read-report, read-report-parse; POST
  /api/feedback/[id]/read): what the person means, what changes for the
  people using the site and for us, how big it is (small / medium /
  large), what to be careful about, and the ask Loki would give the
  agent. Stored once on the row (site_feedback.read, migration 0108);
  one fast model call on the owner's budget, asked for as the queue is
  open, never from a timer. The report is fenced as a stranger's text.
- The decision card shows it under "From … / Asked", and the ask is
  editable in place ("Change the ask", "Back to Loki's"). Build sends the
  edited ask; composeFeedbackFixPrompt leads with THE ASK and keeps the
  report as the context it came from, so a collaborator's feedback is
  built as the owner understood it, never verbatim.
- Who reported it: a claimed report shows the reporter's name and their
  role on the project ("Manu · viewer"), so the owner can tell a
  collaborator's note from a stranger's.
- Before and after: when a fix is dispatched, Loki takes a phone-sized
  picture of the page as it is (lib/feedback/before-picture, one headless
  screenshot, no model, never blocks the dispatch) and keeps it on the
  run as payload.beforePicture beside the after picture verify-live keeps.
  /api/feedback/[id]/looked returns both; the card shows them side by
  side, labelled; /api/orchestration/runs/[id]/picture?which=before and
  RunFollow.beforePictureUrl carry it to the chat card and Watch.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TNLstupcdvsPfTjy8yjR67

* chore(drizzle): format the 0108 snapshot the way format:check expects

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TNLstupcdvsPfTjy8yjR67

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-17 05:27:32 -07:00

1 line
52 B
SQL

ALTER TABLE "site_feedback" ADD COLUMN "read" jsonb;