Skip to content

Start fresh when re-adding a reviewer - #288

Merged
HamptonMakes merged 11 commits into
block:mainfrom
seanprashad:seanprashad/readd-reviewers
Nov 5, 2026
Merged

HamptonMakes merged 11 commits into
block:mainfrom
seanprashad:seanprashad/readd-reviewers

Conversation

@seanprashad

@seanprashad seanprashad commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

What changed and why

Removing a reviewer clears their review decisions across all reviewed versions. Re-adding them creates a fresh Pending request. Old response retries cannot restore a removed decision. Other active reviews remain unchanged.

Discussion comments and request/withdrawal audit history stay in place. API withdrawal still preserves review decisions.

Demo

pr288-before-after

@seanprashad seanprashad changed the title Restore removed reviewers when re-added Start fresh when re-adding a reviewer Oct 29, 2026
@seanprashad
seanprashad marked this pull request as ready for review October 29, 2026 18:58
Signed-off-by: Sean Prashad <13009507+seanprashad@users.noreply.github.com>
Signed-off-by: Sean Prashad <13009507+seanprashad@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Review removal leaves obsolete decision labels on surviving comments, and reviewer reassignment leaves open composers submitting to stale URLs that return 404.

2 open issues
What changed in this PR

This PR separates reviewer removal in CoPlan’s web UI from API withdrawal. Removal deletes prior review decisions so re-adding the reviewer creates a fresh Pending request, while preserving discussion comments and request/withdrawal history.

Changes:

  • Add permanent removal and replacement of withdrawn requests.
  • Reject stale request IDs and preserve other active reviews.
  • Update agent guidance and add service, request, and browser coverage.
File Description
spec/​system/​plan_reviews_spec.rb Covers re-addition, themes, history, and stale forms.
spec/​services/​coplan/​reviews/​remove_spec.rb Tests removal, replacement, audit preservation, and concurrent retries.
spec/​requests/​review_requests_spec.rb Checks authorization for permanent removal.
spec/​requests/​api/​v1/​review_requests_spec.rb Verifies removed IDs cannot affect replacement requests.
engine/​app/​views/​coplan/​reviews/​_roster.html.erb Renames the action to “Remove reviewer.”
engine/​app/​views/​coplan/​agent_instructions/​guides/​live.text.erb Documents removal events.
engine/​app/​views/​coplan/​agent_instructions/​guides/​comments.text.erb Explains removal versus withdrawal and stale-ID handling.
engine/​app/​services/​coplan/​reviews/​request.rb Supports fresh replacements and identity-bound re-requests.
engine/​app/​services/​coplan/​reviews/​remove.rb Deletes requests and decisions while preserving request history.
engine/​app/​javascript/​controllers/​coplan/​review_tray_controller.js Sends removal and replacement options from web controls.
engine/​app/​controllers/​coplan/​review_requests_controller.rb Routes web removal and guards updates against deleted requests.
engine/​app/​controllers/​coplan/​api/​v1/​review_requests_controller.rb Binds updates to the original request identity.

Review effort: Balanced

Signed-off-by: Sean Prashad <13009507+seanprashad@users.noreply.github.com>
Signed-off-by: Sean Prashad <13009507+seanprashad@users.noreply.github.com>
Signed-off-by: Sean Prashad <13009507+seanprashad@users.noreply.github.com>
Signed-off-by: Sean Prashad <13009507+seanprashad@users.noreply.github.com>
Signed-off-by: Sean Prashad <13009507+seanprashad@users.noreply.github.com>
Signed-off-by: Sean Prashad <13009507+seanprashad@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues are reported for the changes separating reviewer removal from API withdrawal.

No open issues 🎉

2 resolved since last review

Review effort: Balanced

Copy link
Copy Markdown
Collaborator

🤖 @codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-04T17:08:48.936781Z 9ca8527 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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

Copy link
Copy Markdown

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: 9ca85272e4

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@HamptonMakes HamptonMakes left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

There is a gap where we are losing old approvals, which I thikn we should keep for provenance... I'll add that in a follow-on PR.

@HamptonMakes
HamptonMakes merged commit b7737ae into block:main Nov 5, 2026
15 checks passed
@HamptonMakes

Copy link
Copy Markdown
Collaborator

🤖 Follow-up requested by @HamptonMakes: #305 preserves historical approvals, change requests, notes, and attribution when a reviewer is removed, while re-addition still starts a fresh Pending assignment. It also records the removal actor and time. This is a standalone PR against main. The gap in this merged PR is that removal deletes earlier decisions; #305 prevents future loss but cannot recover decisions already deleted. Local regression tests pass; CI and automated reviews are running on the follow-up.

HamptonMakes added a commit to arielahdoot/coplan that referenced this pull request Nov 5, 2026
* origin/main:
  fix(engine): toggle task checkboxes only from the box itself (block#300)
  Put the plan title on the document (block#299)
  Look up a plan by its address in the API (block#301)
  Show discussion avatars in the page margin (block#291)
  Start fresh when re-adding a reviewer (block#288)
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.

3 participants