Skip to content

Add /pending endpoint so open comments are never lost#13

Open
Sfgangloff wants to merge 1 commit into
paraschopra:mainfrom
Sfgangloff:feat/pending-endpoint
Open

Add /pending endpoint so open comments are never lost#13
Sfgangloff wants to merge 1 commit into
paraschopra:mainfrom
Sfgangloff:feat/pending-endpoint

Conversation

@Sfgangloff

Copy link
Copy Markdown

Fixes #11.

The problem

The agent only learned about new comments through a Monitor on the inbox. If no Monitor was running when a comment was sent — a fresh session, a restarted server, or the page served from another app — the comment sat in the inbox unseen and the user thought it was lost.

The fix

Adds GET /pending, which returns the inbox comments that no history change has answered yet (inbox comment ids minus the union of history in_response_to). An agent can pull the open feedback at any time instead of relying on catching it live. SKILL.md now points the agent at /pending on startup.

Changed: lib/server.py, SKILL.md.

Testing

Ran the real server against fixture feedback dirs:

  • two batches, one comment answered → /pending returns exactly the two unanswered ones.
  • all answered → empty.
  • empty feedback dir → empty, no error.
  • junk inbox line + broken history.json → bad input skipped, the good comment still surfaces, HTTP 200.
  • /info still works.

The agent only learned about new comments through a Monitor on the inbox.
If no Monitor was running when a comment was sent (a fresh session, a
restarted server, the page served from another app), the comment sat in the
inbox unseen and the user thought it was lost.

This adds a GET /pending endpoint that returns the inbox comments no history
change has answered yet, so an agent can pull the open feedback at any time
instead of relying on catching it live. SKILL.md now points the agent at
/pending on startup.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.

Comments sent while no session is watching are never seen

1 participant