Commit Graph
2 Commits
Author SHA1 Message Date
CatoandClaude d2501ad2cf feat(loki): the Live update shows the page after the fix, beside the before (#1205)
The "Live" update in chat had the reporter's screenshot and nothing of the
page as it is now — to see the result the owner still had to open the site.

- post-shipped-update.ts takes an after picture of the live page at phone
  size (takePagePicture, the same one-at-a-time browser the fix check uses),
  scrolled to the element the reporter pointed at. When the fix check already
  took one (payload.fixPicture), that is reused instead of a second browser.
- It is stored like any chat picture (conversation_images) and the update
  carries its path; the card shows before and after side by side, even on a
  phone.
- No picture for a failed deploy (the page is the old one) or a
  behind-the-scenes change (nothing on the page changed). No browser or a page
  that will not load: the update still posts, without the picture.


Claude-Session: https://claude.ai/code/session_01MqXhtjrmVb4vKE6oKSyHVg

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-15 04:38:59 -07:00
CatoandClaude Opus 5.5 f30ae002a5 feat(loki): structured updates in chat and feedback — benefit to users and us, downsides, costs, behind-the-scenes changes (#1145)
* feat(loki): the chat posts real progress updates — the story, the picture, the walkthrough

The owner, 2026-10-11: chat should post "pictures, screenshots, videos,
walkthroughs … real updates. It's like the team of engineers updating the
manager". It posted one markdown block when a run closed — the agent's raw
summary and "Pull request: https://…" as text you could not tap — and
nothing at all when the fix went live.

- progress-update.ts: one structured update, sections in a fixed order —
  asked, what was wrong, what was done, why this way, also considered,
  what could come next, checked — from the PR's design note, falling back
  to the handoff. Stored as meta.update with a plain-text twin in content.
- ProgressUpdateCard: the card the thread renders for it — stage chip,
  labelled sections, the report's screenshot as the before picture, and
  Watch the fix / the page / what changed.
- Two moments post: a run closing at its PR (run-outcome-post.ts, now with
  the note, the report and its screenshot) and the fix going live or failing
  to deploy (post-shipped-update.ts, fired from the same ledger transition
  as the push/Telegram notice, so once).
- Fixes from the feedback inbox had no chat to report to; they now post
  into their project's updates thread (`updates:<project>`, migration
  0091 adds conversations.channel with a unique (user, channel) index).
  Autopilot and cron runs stay silent as before.
- Pictures travel as owner-only URLs (/api/feedback/[id]/screenshot/[n]),
  never inlined — a thread is read whole.
- Bare https URLs in any chat message are now links.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MqXhtjrmVb4vKE6oKSyHVg

* feat(feedback): decision cards say it in lines — asked, done, next, what Loki saw

The owner, 2026-10-11, on the /feedback cards: "a lot of things written in
big strings that is hard to read and understand … not very well
structured", with five buttons wrapping onto three rows.

- The headline is one short sentence. What Loki saw when it read the live
  page used to be spliced into it ("Live on /projects. The provided page
  text does not contain any terminal status surface …"); it is now
  Recommendation.evidence, its own quieter line.
- Under the headline, each fact on its own line in a label column: Asked,
  Done (the PR's design note, else the handoff), Next (the note's new
  line), Loki saw (clamped to three lines).
- Whose report and when moves up beside the kicker.
- One yes, two answers, and More: Share the walkthrough moves into the
  More row; the walkthrough button reads "Watch the fix" everywhere.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MqXhtjrmVb4vKE6oKSyHVg

* feat(feedback): every change says how it helps users; changes nobody can see say exactly what changed and the proof

The owner, 2026-10-11: "if there is a suggestion that doesn't involve user
experience — something systems or backend related, something that you cannot
screenshot and show — it still should explain exactly what was done. And I
also want to know how this change benefits users. Because every change
should benefit users."

- The design note gains Shows (on the page / behind the scenes), Under the
  hood (exactly what changed, for someone who does not code) and Proof (the
  test, measurement or log). Helps now asks for the effect on the people
  using the product, and the instruction says every change owes it.
- Chat updates: "How it helps users" right after what was done, "Under the
  hood" and "Proof it works" sections, a Behind the scenes chip, and no
  Watch the fix for a page that did not change. Work with no stated benefit
  shows that as a visible gap, never a guess.
- Feedback cards: Helps on every card; behind the scenes, Done is what changed
  in the system and Proof is shown. The recommendation stops asking the owner
  to "look" at such a fix (and the inbox stops spending a model read on it).
- The walkthrough of a behind-the-scenes fix points at nothing and plans no
  steps: it tells under the hood, how it helps users, and the proof.
- Chat builds are followed to live by their own card (#1146), so the "it's
  live" post now goes only to fixes with no chat of their own.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MqXhtjrmVb4vKE6oKSyHVg

* feat(feedback): every change states its downsides, costs and benefit to us — and "none" is shown clearly

The owner, 2026-10-11: "potential downsides are important and how it
benefits us is important … in some cases, some costs … but if there are no
downsides and no costs, that should be shown, that should be very clearly
shown."

- The design note gains Benefits us, Downsides and Costs. The instruction
  says every change must state them and write `none` only after checking.
  "none", "no extra cost" and the like normalise to NOTE_NONE; a real
  downside that merely starts with "No…" is kept as written.
- Chat updates: How it benefits us, Downsides and Costs right after How it
  helps users. "None" renders as a green check, never a blank; an owed
  section nobody answered is named as "Not stated by the developer"
  (missing[] replaces the helps-only flag).
- Feedback cards: a For us line; no downsides and no extra cost collapse to
  one "✓ None — no downsides, no extra cost" row; gaps are listed under
  Not stated. The label column widens so the labels fit on one line.
- The owner's walkthrough tells How it benefits us and Downsides & costs,
  saying "none" out loud; the reporter's never includes either.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MqXhtjrmVb4vKE6oKSyHVg

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-11 15:41:18 -07:00