Azure / Azure/azure-sdk-tools

[APIView] WI-17: Approval SPA Update

Open
#15,008 0 comments 0 reactions 0 assignees View on GitHub
APIView
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.