Expand PlanCollaborator roles: add approver and highlighted#98
Merged
HamptonMakes merged 1 commit intomainfrom Apr 28, 2026
Merged
Expand PlanCollaborator roles: add approver and highlighted#98HamptonMakes merged 1 commit intomainfrom
HamptonMakes merged 1 commit intomainfrom
Conversation
Phase 2 Item 6: Collaborator Roles Expansion - Add 'approver' and 'highlighted' to PlanCollaborator::ROLES - Migration: add approved_at (datetime) and highlighted_reason (text) columns - Model: scopes (.authors, .reviewers, .approvers, .highlighted), approve!/approved? helpers, highlighted_reason validation, before_validation callback to clear stale role-specific data on role change - API: collaborator_json conditionally includes approved_at and highlighted_reason - Factory: add :approver and :highlighted traits - Spec: 13 examples covering roles, validations, scopes, approval flow, cleanup Amp-Thread-ID: https://ampcode.com/threads/T-019db6dc-e2ac-72de-a66f-e7f513adadf9 Co-authored-by: Amp <amp@ampcode.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase 2 Item 6: Collaborator Roles Expansion
Adds
approverandhighlightedroles toPlanCollaborator::ROLES, laying the groundwork for reviewer assignment UI (item 7) and homepage queue (item 10).Changes
ROLESconstant, scopes (.authors,.reviewers,.approvers,.highlighted),approve!/approved?helpers,highlighted_reasonpresence validation,before_validationcallback to clear stale role-specific data on role changeapproved_at(datetime) andhighlighted_reason(text) columns oncoplan_plan_collaboratorscollaborator_jsonconditionally includesapproved_atfor approvers andhighlighted_reasonfor highlighted collaborators:approverand:highlightedtraitsNotification behavior
Only authors get
new_commentnotifications (unchanged). Approvers/reviewers are notified only when they're direct thread participants.