Skip to content

feat: threaded mini-chat per comment for fast iteration in the sidebar #7

Description

@samgob

Partner to the status.json issue I just filed — both came out of building an agent workflow on top of this skill.

Problem

Current model is one-shot: user comments → agent edits the page in response → done. If the user wants to push back on the agent's edit ("actually wait, change X" / "what about Y") their options are:

  • Submit a new comment on a different block (loses the connection to the original thread)
  • Scroll back to find the original block and add another comment to it (works, but each comment is still a fresh transaction)

There's no native way to have a threaded back-and-forth where the second message is clearly a follow-up to the first.

In agent-driven workflows this matters a lot. The body of the page holds the full detail of the agent's response (tables, links, code, schemas, etc.) — that's the right place for it. But the fast iteration loop on a specific point ("yes, but smaller" / "drop the second bullet" / "what's the source") wants to live in a compact sidebar lane, not as new full-fledged comments scattered through the body.

Proposal: Google-Docs-style comment threads in the sidebar

Each comment chip in the sidebar shows:

  • 1-line summary of the original comment
  • Status badge (Open / Working / Resolved)
  • Message count + unread dot if there are agent replies the user hasn't seen
  • A reply input that POSTs to /feedback with a parent_comment_id field

Click the chip → expand the thread inline. ~5 messages visible; older messages collapse. Each message has a tiny avatar (user vs agent) + the message text. Agent messages are short ("Filed 2 rows, $31.44 total"); the full detail of what the agent did still lives in the main body, anchored to the change wrapper. The sidebar is the conversation; the body is the result.

Schema sketch (additive — preserves current behavior)

feedback/comments.json (or extend inbox.jsonl entries):

{
  "id": "c-1779895383963-ok40",
  "type": "elements",
  "comment": "Yea go ahead and spin up...",
  "elements": [...],
  "created_at": "2026-05-27T15:23:03Z",
  "messages": [
    {
      "from": "user",
      "text": "Yea go ahead and spin up...",
      "at": "2026-05-27T15:23:03Z"
    },
    {
      "from": "agent",
      "text": "Filed 2 rows, total $31.44. Details in body.",
      "at": "2026-05-27T15:32:00Z",
      "links_to_change": "ch-expenses-filed"
    },
    {
      "from": "user",
      "text": "Wait, also check row 7",
      "at": "2026-05-27T15:36:00Z"
    }
  ],
  "status": "open"
}

Existing single-shot consumers (just reading inbox.jsonl for the original comment text) keep working — the messages array is additive.

UI sketch

  • Right-side comment sidebar (similar to current behavior)
  • Each comment chip: 1-line summary + status badge + unread count
  • Click → expand inline thread (compact)
  • Reply input at the bottom of each expanded thread
  • Resolved threads collapse but stay accessible (toggle to show)

Full detail of the agent's response continues to live in the main body — the sidebar is just the conversational lane.

Happy to send a PR

This one is bigger than the status.json change — touches the comment-submission flow + the sidebar UI + the schema. Suggest landing it after #status-json (smaller, lower risk). Happy to send the PR; would want to align on the schema first so any downstream consumers don't break.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions