af057ff165
Keep current plans and release controls discoverable without losing historical evidence, and include the reviewed Windows start/stop workflow.
1.6 KiB
1.6 KiB
V2 Phase 3 Structured Review UI Read Path
Date: 2026-07-01
Scope
This slice moves the contract detail review display toward the structured review result tables.
It keeps legacy review_tasks.risk_items and review_tasks.citations as fallback data. No database migration, column removal, or API response breaking change is included.
Changes
- Added Contract Web proxy routes:
/api/contract-platform/contracts/{id}/review-risks/api/contract-platform/contracts/{id}/review-citations
- Added frontend service types and readers for structured review risks/citations.
- Updated the contract detail page to:
- Load structured risks/citations for succeeded review tasks.
- Prefer structured risk rows when available.
- Prefer structured citation rows when available.
- Show citations under their linked risk item when
risk_item_idis available. - Keep legacy task JSON as fallback for old or partially backfilled data.
Validation
Local validation:
npm --workspace @yuqei/contract-web run typecheck
npm --workspace @yuqei/contract-web run build
python -m pytest yuqei-contract-platform\services\contract-api\tests\test_structured_review_results.py -q
Observed build result:
- Next.js build completed successfully.
- New proxy routes were included in the route table:
/api/contract-platform/contracts/[id]/review-citations/api/contract-platform/contracts/[id]/review-risks
Next Step
Continue the same migration pattern into admin/review management surfaces: prefer structured review-risks and review-citations, keep legacy task JSON fallback, then add UI regression coverage for risk-linked citation display.