[APIView] WI-17: Approval SPA Update
- Dominant language
- C#
- Stars
- 135
- Forks
- 260
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 130
Description
## Goal
Update the Angular SPA to operate on version-level approvals and display inheritance provenance.
**Area:** Approvals · **Depends on:** WI-15 · **Stable alone:** ⚠️ Must activate together with WI-15 — deploy independently, flip flag together
## Deliverables
### Frontend changes
| Component/Service | Change |
|---|---|
| `review-page-options.component.ts` | Approval button operates on `apiVersionId`. Show "Approved (inherited from v12.1.0)" when `ApprovalInheritedFromVersionId` is set. |
| `revisions-list.component.ts` | Version list shows version-level approval with badge: inherited vs. human-approved |
| `ReviewContextService` | Add `activeApiVersionId$` BehaviorSubject alongside `reviewId$` and `language$` |
| `APIRevisionsController` API model | Add `apiVersionId` field to revision response DTO |
| Approval prerequisites (`shouldDisableApproval`) | Evaluate guards against version: missing version, unresolved must-fix (version-scoped), Copilot status |
### Tests
Frontend unit tests: approval button sends `apiVersionId`; inherited approval shows provenance badge; `shouldDisableApproval` evaluates version-level guards.
### Documentation
Update `docs/release_approval.md`:
- §1a: Approval is per-version, not per-revision
- §4: Toggle operates on `APIVersionModel`
- §5: Carry-forward replaced by version-level inheritance with per-language policy
Update `docs/overview.md` §4c: `APIRevisionsManager` no longer owns approval; `APIVersionsManager` does.
Contributor guide
Research direction
Start with review-page-options.component.ts, revisions-list.component.ts, ReviewContextService, and the APIRevisionsController API model, then review WI-15 before changing approval behavior. Run the existing frontend unit tests for the approval button, inheritance badge, and shouldDisableApproval guards. Done means version-level approval and provenance work across the listed components, and the specified sections of docs/release_approval.md and docs/overview.md are updated.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- angular, csharp, typescript
- Domain
- api, documentation, frontend, testing
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 42/100