feat(modernization): promote deferred routes to in-scope and unify page header styles

Promote /tables, /excel-query, /query-tool, /mid-section-defect from
deferred to full shell-governed in-scope routes with canonical redirects,
content contracts, governance artifacts, and updated CI gates.

Unify all page header gradients to #667eea → #764ba2 and h1 font-size
to 24px for visual consistency across all dashboard pages. Remove
Native Route-View dev annotations from job-query, excel-query, and
query-tool headers.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
egg
2026-02-12 13:20:06 +08:00
parent 0ed69ce326
commit c38b5f646a
67 changed files with 1073 additions and 252 deletions

View File

@@ -0,0 +1,2 @@
schema: spec-driven
created: 2026-02-12

View File

@@ -0,0 +1,68 @@
## Context
This follow-up change consumes the explicit handoff from `full-modernization-architecture-blueprint` phase 1. Deferred routes were intentionally excluded to control blast radius, but they now represent the remaining architecture gap.
Current deferred-route risks:
- Shell contract incompleteness and mixed navigation behavior.
- Legacy runtime fallback dependency.
- Content modernization parity not yet formalized.
- Potential legacy bug carry-over if migration is done implementation-first.
## Goals / Non-Goals
**Goals**
- Complete shell-governed route coverage for deferred routes.
- Adopt canonical shell routing and explicit compatibility policy.
- Execute contract-first content modernization with parity and rollback controls.
- Enforce mandatory manual acceptance and BUG revalidation before sign-off.
- Enforce mandatory pre-change confirmation before each deferred-route implementation starts.
**Non-Goals**
- Reworking already in-scope phase-1 routes again.
- Changing backend business data semantics beyond compatibility safeguards.
- Bundling unrelated admin/report features into this follow-up.
- Restricting this change to already-`released` routes only (deferred routes are the intended modernization scope even when currently marked `dev`).
## Decisions
### D1. Deferred routes are promoted to in-scope as a single governed wave
- `/tables`, `/excel-query`, `/query-tool`, `/mid-section-defect` are all in-scope for this change.
### D2. Canonical policy matches phase 1
- Canonical shell path is `/portal-shell/<route>`.
- Direct entry behavior remains explicit compatibility (redirect or compatibility render) with preserved query semantics.
### D3. Content migration remains route-by-route, not big-bang
- Only one deferred route can be in cutover state at a time.
- Next route is blocked until current route has parity pass + manual sign-off + bug replay pass.
### D4. Legacy bug carry-over prevention is a hard gate
- Known bug baseline must be recorded before implementation.
- Reproduced known bugs on modernized path block sign-off and legacy retirement.
### D5. Pre-change confirmation is required per route
- Before changing `/tables`, `/excel-query`, `/query-tool`, or `/mid-section-defect`, maintainers must record route-scoped pre-change confirmation.
- Pre-change confirmation must include: current route status snapshot, scope boundary check, baseline contract/bug references, and planned rollback flag.
- Implementation work for a route is blocked until its pre-change confirmation is recorded.
## Risks / Trade-offs
- Deferred routes may have heavier legacy coupling than phase-1 routes.
- Route-by-route cutover increases total elapsed time but reduces rollback blast radius.
- Asset-readiness enforcement can block releases earlier; rollout plan must phase warn->block.
## Migration Plan
1. Freeze deferred-route scope matrix for this follow-up change.
2. Extend shell route contracts and metadata coverage to full completeness.
3. Record pre-change confirmation for the first deferred route to be modernized.
4. Define route content contracts + golden fixtures + interaction parity checks.
5. Execute per-route migration with feature-flagged cutover and manual acceptance.
6. Retire deferred-route runtime fallback posture after acceptance and readiness gates pass.
7. Update runbook/rollback docs and close handoff linkage.
## Rollback Strategy
- Keep route-scoped cutover flags for immediate per-route rollback.
- Allow temporary gate downgrade (`block` -> `warn`) only with explicit waiver and expiry.
- Preserve route-level evidence (parity, manual sign-off, bug replay) to support rollback decisions.

View File

@@ -0,0 +1,35 @@
## Why
`full-modernization-architecture-blueprint` intentionally deferred these routes:
- `/tables`
- `/excel-query`
- `/query-tool`
- `/mid-section-defect`
Those routes still run on legacy posture (direct-entry-first + fallback continuity + mixed style ownership). A dedicated follow-up change is required to finish modernization without reopening scope in phase 1.
## What Changes
- Promote all deferred routes to first-class in-scope shell-governed targets.
- Apply canonical shell routing policy and explicit direct-entry compatibility behavior for each deferred route.
- Modernize deferred route page-content flow (filters/charts/interactions) with contract-first parity gates.
- Require route-by-route pre-change confirmation records before any implementation work starts on each deferred route.
- Apply the same mandatory manual acceptance + BUG revalidation blocking policy used in phase 1.
- Move deferred routes from fallback-era runtime posture to asset-readiness + governed retirement posture.
## Capabilities
### Modified Capabilities
- `unified-shell-route-coverage`: deferred routes become in-scope and CI-blocking for route contract completeness.
- `spa-shell-navigation`: deferred routes adopt canonical shell entry policy and governed compatibility behavior.
- `page-content-modernization-safety`: deferred routes require contract baselines, parity evidence, manual sign-off, and known-bug revalidation.
- `asset-readiness-and-fallback-retirement`: deferred routes adopt release-time asset checks and governed fallback retirement milestones.
## Impact
- Frontend route modules for `/tables`, `/excel-query`, `/query-tool`, `/mid-section-defect`.
- Shell contract and navigation governance in `frontend/src/portal-shell/**`.
- Backend route handlers serving deferred routes and compatibility behavior.
- Quality gate artifacts, runbook updates, and rollout/rollback policy for deferred-route cutover.
- Scope boundary clarification: this follow-up explicitly targets deferred routes (currently `dev` in page status) and does not require routes to already be `released` before modernization.

View File

@@ -0,0 +1,18 @@
## MODIFIED Requirements
### Requirement: Deferred-route assets SHALL be release-ready before promotion
Deferred routes SHALL adopt release-time asset-readiness checks and SHALL fail promotion when required assets are missing.
#### Scenario: Deferred-route readiness validation
- **WHEN** release artifacts are prepared for follow-up phase promotion
- **THEN** required assets for `/tables`, `/excel-query`, `/query-tool`, and `/mid-section-defect` SHALL be validated
- **THEN** missing required assets SHALL fail release gating
### Requirement: Deferred-route runtime fallback SHALL be retired by governed policy
Deferred routes SHALL not remain on runtime fallback posture after follow-up modernization completion criteria are met.
#### Scenario: Deferred-route fallback retirement
- **WHEN** a deferred route passes readiness + parity + manual acceptance gates
- **THEN** runtime fallback posture for that route SHALL be retired according to milestone policy
- **THEN** rollback control SHALL remain available via explicit route-level governance switch

View File

@@ -0,0 +1,41 @@
## MODIFIED Requirements
### Requirement: Deferred-route content modernization SHALL remain contract-first
Before deferred routes are cut over to modernized implementations, each route SHALL define filter/query/data-state contracts and critical interaction expectations.
#### Scenario: Deferred-route contract baseline defined
- **WHEN** `/tables`, `/excel-query`, `/query-tool`, or `/mid-section-defect` enters modernization
- **THEN** a route-level baseline SHALL capture filter input semantics, query payload shape, and critical state expectations
### Requirement: Deferred-route implementation SHALL require pre-change confirmation
Each deferred route SHALL complete a route-scoped pre-change confirmation before implementation begins.
#### Scenario: Route enters implementation queue
- **WHEN** a deferred route is selected for modernization implementation
- **THEN** a pre-change confirmation record SHALL exist before any route code changes proceed
- **THEN** the record SHALL include current route status snapshot, baseline contract references, known-bug baseline reference, and rollback flag plan
### Requirement: Deferred-route modernization scope SHALL NOT be limited to already-released routes
Deferred modernization scope SHALL follow the deferred route matrix, even if those routes are currently marked `dev`.
#### Scenario: Route status is dev in page registry
- **WHEN** `/tables`, `/excel-query`, `/query-tool`, or `/mid-section-defect` is currently `dev`
- **THEN** the route SHALL remain eligible for modernization in this follow-up change
- **THEN** already-`released` in-scope routes outside deferred scope SHALL not be reopened by this change unless explicitly required for shared governance wiring
### Requirement: Deferred-route cutover SHALL require parity + manual acceptance
Deferred routes SHALL NOT complete cutover without parity evidence and explicit manual sign-off.
#### Scenario: Parity and sign-off before route progression
- **WHEN** a deferred route reports implementation complete
- **THEN** golden fixture parity checks and interaction parity checks SHALL pass
- **THEN** manual acceptance checklist sign-off SHALL be recorded
- **THEN** next deferred route cutover SHALL be blocked until sign-off is complete
### Requirement: Legacy bug carry-over SHALL be blocked for deferred routes
Known legacy bugs in deferred-route migrated scope SHALL be replayed during acceptance and SHALL block sign-off if reproduced.
#### Scenario: Deferred-route bug replay gate
- **WHEN** deferred-route manual acceptance executes
- **THEN** known-bug replay checks SHALL run
- **THEN** reproduced known bugs SHALL fail route sign-off and block legacy retirement

View File

@@ -0,0 +1,14 @@
## MODIFIED Requirements
### Requirement: Deferred routes SHALL become shell-contract governed in this follow-up phase
All routes deferred by phase 1 (`/tables`, `/excel-query`, `/query-tool`, `/mid-section-defect`) SHALL be represented as in-scope shell contracts with complete ownership and visibility metadata.
#### Scenario: Deferred route contract promotion
- **WHEN** follow-up route coverage validation is executed
- **THEN** each deferred route SHALL have route metadata, owner metadata, and visibility/access policy metadata
- **THEN** missing metadata SHALL fail route governance validation
#### Scenario: CI gate blocks deferred route contract gaps
- **WHEN** CI evaluates route-governance completeness for this follow-up change
- **THEN** any deferred route missing required contract fields SHALL block promotion

View File

@@ -0,0 +1,41 @@
## 1. Scope and Governance Freeze
- [x] 1.1 Publish frozen in-scope matrix for `/tables`, `/excel-query`, `/query-tool`, `/mid-section-defect`
- [x] 1.2 Define completion criteria, deprecation milestones, and exception registry updates for deferred-route phase
- [x] 1.3 Record explicit upstream linkage to `full-modernization-architecture-blueprint` handoff artifacts
- [x] 1.4 Add deferred-route pre-change confirmation template and required fields (status snapshot, contract baseline refs, known-bug baseline ref, rollback flag plan)
- [x] 1.5 Record scope boundary note that deferred/dev routes are in-scope for this change and released-only restriction does not apply
## 2. Shell Route Contract Completion
- [x] 2.1 Promote deferred routes to in-scope in shell route contracts with complete metadata
- [x] 2.2 Implement governed navigation targets and visibility policy validation for all deferred routes
- [x] 2.3 Add CI-blocking checks for missing deferred-route contract metadata in this phase
## 3. Canonical Routing and Compatibility
- [x] 3.1 Define canonical shell entry behavior for each deferred route
- [x] 3.2 Implement explicit compatibility policy for direct non-canonical entry with query continuity
- [x] 3.3 Add integration tests for canonical redirect and compatibility semantics
## 4. Page-Content Modernization Safety
- [x] 4.0 Before each route implementation starts, record and approve route-scoped pre-change confirmation
- [x] 4.1 Define per-route content contracts (filter semantics, payload, chart/table shape, state transitions)
- [x] 4.2 Build golden fixtures and interaction parity checks for each deferred route
- [x] 4.3 Add route-scoped feature flags and rollback controls for deferred-route cutover
- [x] 4.4 Define and enforce per-route manual acceptance checklist and sign-off records
- [x] 4.5 Record known-bug baselines before implementation and require bug replay during acceptance
- [x] 4.6 Block sign-off and legacy retirement when known bugs reproduce on modernized routes
## 5. Asset Readiness and Fallback Retirement
- [x] 5.1 Extend asset-readiness manifest/checks to deferred routes
- [x] 5.2 Enforce fail-fast release behavior when deferred-route assets are missing
- [x] 5.3 Retire deferred-route runtime fallback posture per governance milestones
## 6. Quality Gates, CI, and Rollout
- [x] 6.1 Extend functional/visual/accessibility/performance gates to deferred routes
- [x] 6.2 Wire CI jobs for route governance, quality gates, and readiness checks for deferred scope
- [x] 6.3 Update rollout runbook, rollback controls, and observability checkpoints for deferred-route cutover