Orchestrate a pending pull-request review
Compose pending inline comments into one review submission, retain failures for retry, and prevent duplicate review creation.Description
Requirements
Export PendingReviewComposer from src/App.tsx.
Render pending comments in caller order with path, line, and editable body context.
Send one immutable snapshot of event and comments while submission is pending.
Keep all pending comments and the selected event when submitReview rejects.
Invoke onSubmitted once after success and clear local pending submission state.
Expose visible status and interactive controls with native semantics, accessible names, and keyboard operation appropriate to the workflow.
Do not mutate props, nested caller-owned values, or arrays supplied to the component.
Approve with notes
Two comments and APPROVE are submitted
One request carries both comments in order
Render pending comments in caller order with path, line, and editable body context.
Network failure
submitReview rejects
Comments remain available and Submit can be retried
Send one immutable snapshot of event and comments while submission is pending.
Constraints
Use React state and effects only where the observable component contract requires themUse injected adapters instead of accessing network, storage, timers, or browser globals directlyKeep one authoritative state transition for each user or adapter event
Hints
Hint 1
Start with the renders-pending-comments behavior and make its observable result deterministic.
Hint 2
Model submits-review-once independently before combining it with the remaining states.
Hint 3
Verify the boundary described by clears-after-success without changing caller-owned input.