Skip to content

Make review feedback editable and newest-first - #32

Open
chinkeikk wants to merge 1 commit into
petergyang:mainfrom
chinkeikk:feat/editable-latest-comments
Open

Make review feedback editable and newest-first#32
chinkeikk wants to merge 1 commit into
petergyang:mainfrom
chinkeikk:feat/editable-latest-comments

Conversation

@chinkeikk

@chinkeikk chinkeikk commented Aug 17, 2026

Copy link
Copy Markdown

What & why

Human Review currently lets reviewers save comments, but editing an existing comment is difficult to discover. If the reviewer notices a mistake after saving, the obvious workaround is to add another comment. That can leave the agent with two conflicting instructions.

Comments are also shown oldest-first, so the feedback a reviewer just added or revised can fall below the visible area of a long review.

This PR makes feedback explicitly editable, orders it by latest activity, and ensures the agent receives the correct revision based on whether the feedback has already been delivered.

Example

A reviewer initially writes:

Change the heading to “Start your free trial.”

They then decide it should say:

Change the heading to “Book a demo.”

  • Before delivery: the pending feedback is updated in place, so the agent receives only “Book a demo.”
  • After delivery: Human Review preserves the original delivery record and sends the revision as a correction that supersedes it.

The edited comment also moves to the top of the feedback rail, keeping the latest activity visible.

Changes

Explicit comment editing

  • Add a visible Edit action to each feedback card instead of relying on the reviewer to discover that the comment text itself is clickable.
  • Pre-fill the editor with the current wording.
  • Mark revised feedback as edited.

Latest activity first

  • Display newly created comments at the top of the feedback rail.
  • Move an edited comment back to the top, since it is now the most recently active item.

Safe delivery semantics

  • If feedback is revised before the agent receives it, replace the wording in the waiting batch rather than adding a conflicting second instruction.
  • If feedback is revised after delivery, create an explicit correction linked to the earlier instruction.
  • Keep that correction available when the older delivered batch is acknowledged, so it is not accidentally cleared before the agent receives it.

Compatibility

  • Existing saved comments continue to work.
  • The feedback payload remains backward-compatible; correction metadata is additive.
  • Editing changes only the feedback instruction, not the reviewed document itself.

Tests

Regression coverage verifies:

  • comments are ordered by latest activity;
  • editing moves a comment to the top;
  • a pre-delivery revision replaces the waiting wording;
  • a post-delivery revision is represented as a correction;
  • acknowledging the earlier batch does not discard that correction;
  • correction delivery metadata survives the full poll/ack flow.

93 tests pass on the v0.6.1 base. git diff --check also passes.

Add explicit comment editing, order comments by latest activity, update stranded feedback batches in place, and represent post-delivery revisions as corrections that survive acknowledgment. Include regression coverage for ordering, pending revisions, and correction delivery.
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