Skip to content

Support giving agent feedback via web UI#66

Closed
thisdotrob wants to merge 4 commits into
ReviewStage:mainfrom
thisdotrob:agent-feedback
Closed

Support giving agent feedback via web UI#66
thisdotrob wants to merge 4 commits into
ReviewStage:mainfrom
thisdotrob:agent-feedback

Conversation

@thisdotrob
Copy link
Copy Markdown

@thisdotrob thisdotrob commented Jun 5, 2026


Open in Stage

Summary by cubic

Adds browser feedback so reviewers can draft file and line comments in the web UI and submit them as a batch for the agent. stagereview show now prints a local review URL instead of auto-opening a browser.

  • New Features

    • Web UI for feedback: draft/edit/delete file and line comments, gutter line selection, and per-file comment counts.
    • CLI feedback API: CRUD routes and submit endpoint at /api/runs/:runId/feedback, persisted in SQLite.
    • Submission delivery: writes feedback/<runId>.jsonl in the repo data dir and echoes the JSON payload to stdout.
    • Shared types added in @stagereview/types/feedback.
  • Migration

    • Open the printed Review URL manually. stage-chapters now shows the link instead of launching a browser.
    • Agents should read submitted feedback from stdout or the JSONL file in the repo data dir.

Written for commit e5e2bc4. Summary will update on new commits.

Review in cubic

Add shared feedback types, SQLite persistence, local API routes, and a submission sink for stagereview show.

Wire the review UI so users can draft file and line comments, submit them as a batch, and have the agent receive the submitted payload.
Stop stagereview show from launching the default browser, print a Review URL instead, and update the stage-chapters skill to relay that link to the user.

Remove the now-unused open dependency from the CLI package.
Set mise to use Node 25.9.0 so the CLI and native SQLite dependency match the agent shell used during local stage-chapters testing.
Document that stage-chapters now prints a local review URL instead of opening the browser automatically, and mention submit-only feedback delivery.
@thisdotrob thisdotrob closed this Jun 5, 2026
@stage-review
Copy link
Copy Markdown

stage-review Bot commented Jun 5, 2026

@thisdotrob thisdotrob deleted the agent-feedback branch June 5, 2026 17:07
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit e5e2bc4. Configure here.


await opts.deliverSubmission?.(submission);
writeJson(res, 200, { submission });
opts.onSubmitted?.();
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feedback persisted before agent delivery

High Severity

The submit handler marks every draft comment as submitted in SQLite before deliverSubmission runs. If delivery fails (for example appendFile errors), the API returns an error but comments stay submitted, so the UI refetch shows them as non-editable while the agent may never receive a consistent STAGE_FEEDBACK_SUBMITTED payload.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit e5e2bc4. Configure here.

const chapterFilePathSet = useMemo(() => new Set(chapterFilePaths), [chapterFilePaths]);
const chapterFeedbackComments = useMemo(
() => filterFeedbackForChapter(feedback.comments, chapter.id),
[feedback.comments, chapter.id],
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Files tab feedback hidden on chapters

Medium Severity

Chapter pages only show feedback whose target.chapterId matches the current chapter. Comments created from the Files tab omit chapterId, so they disappear from chapter diffs and sidebar counts even when the same file appears in that chapter.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit e5e2bc4. Configure here.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e5e2bc49f8

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

return;
}

await opts.deliverSubmission?.(submission);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Preserve drafts when feedback delivery fails

If deliverSubmission rejects here (for example the feedback JSONL append fails or stdout is unavailable), submitDraftFeedback has already changed every draft to submitted in the database. The request then returns 500, but the user cannot retry because a second submit sees no drafts and edit/delete now return 409, so the feedback can be stranded without being delivered. Keep the comments draft until the sink succeeds, or otherwise make failed deliveries retryable.

Useful? React with 👍 / 👎.

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