docs: project docs, scripts, deployment configs, and evidence
This commit is contained in:
@@ -0,0 +1,116 @@
|
||||
# 2026-03-28 Q-004 Coverage Remediation Pass 6
|
||||
|
||||
## Scope
|
||||
|
||||
- Continue remediating the remaining real `Q-004` gaps after Pass 5.
|
||||
- This pass focused on:
|
||||
- fully closing the remaining `internal/auth/providers` depth gap
|
||||
- closing still-uncovered admin page clusters:
|
||||
- `RolesPage`
|
||||
- `PermissionsPage`
|
||||
- `ProfilePage`
|
||||
|
||||
## Changes
|
||||
|
||||
### Frontend
|
||||
|
||||
- Added page and modal coverage in:
|
||||
- `frontend/admin/src/pages/admin/RolesPage/RolesPage.test.tsx`
|
||||
- `frontend/admin/src/pages/admin/RolesPage/RoleFormModal.test.tsx`
|
||||
- `frontend/admin/src/pages/admin/RolesPage/RolePermissionsModal.test.tsx`
|
||||
- `frontend/admin/src/pages/admin/PermissionsPage/PermissionsPage.test.tsx`
|
||||
- `frontend/admin/src/pages/admin/PermissionsPage/PermissionFormModal.test.tsx`
|
||||
- `frontend/admin/src/pages/admin/ProfilePage/ProfilePage.test.tsx`
|
||||
- Newly covered frontend behavior includes:
|
||||
- roles page filtering, reset, refresh, pagination, edit/create, permission assignment, status toggle, delete, and error retry
|
||||
- role create/edit modal submit, validation-error swallow path, and service-error path
|
||||
- role permissions modal load, check, submit, load-error, and submit-error paths
|
||||
- permissions page tree/list views, create/create-child/edit, refresh, status toggle, delete, and error retry
|
||||
- permission create/edit modal parent-default, parent-option recursion, validation-error swallow path, and service-error path
|
||||
- profile page fetch/hydration, submit success, fetch failure, and update failure
|
||||
|
||||
### Backend
|
||||
|
||||
- Expanded provider transport coverage further in:
|
||||
- `internal/auth/providers/provider_http_roundtrip_additional_test.go`
|
||||
- Newly covered provider logic includes:
|
||||
- `AlipayProvider.ExchangeCode` / `GetUserInfo`
|
||||
- `DouyinProvider.ExchangeCode` / `GetUserInfo`
|
||||
- `GitHubProvider.ExchangeCode` / `GetUserInfo` / `getPrimaryEmail`
|
||||
- `GoogleProvider.ExchangeCode` / `RefreshToken`
|
||||
- `QQProvider.ExchangeCode` / `ValidateToken`
|
||||
- `TwitterProvider.ExchangeCode` / `GetUserInfo` / `RefreshToken` / `ValidateToken` / `RevokeToken`
|
||||
- `WeChatProvider.ExchangeCode` / `GetUserInfo` / `RefreshToken`
|
||||
- `WeiboProvider.ExchangeCode` / `GetUserInfo`
|
||||
- `FacebookProvider.ExchangeCode` / `ValidateToken` / `GetLongLivedToken`
|
||||
- direct `postFormWithContext` request construction coverage
|
||||
|
||||
## Verified Commands
|
||||
|
||||
```powershell
|
||||
cd D:\project
|
||||
$env:GOCACHE='D:\project\.tmp\gocache'
|
||||
$env:GOPATH='D:\project\.tmp\go'
|
||||
$env:GOMODCACHE='D:\project\.tmp\go\pkg\mod'
|
||||
go test ./internal/auth/providers -count=1
|
||||
go test ./internal/auth/providers -coverprofile='.tmp\providers.cover.out' -count=1
|
||||
go tool cover -func='.tmp\providers.cover.out'
|
||||
go test ./internal/auth/providers ./internal/repository -cover -count=1
|
||||
go test ./... -count=1
|
||||
go vet ./...
|
||||
go build ./cmd/server
|
||||
|
||||
cd D:\project\frontend\admin
|
||||
npm.cmd run test:run -- src/pages/admin/RolesPage/RolesPage.test.tsx src/pages/admin/RolesPage/RoleFormModal.test.tsx src/pages/admin/RolesPage/RolePermissionsModal.test.tsx
|
||||
npm.cmd run test:run -- src/pages/admin/PermissionsPage/PermissionsPage.test.tsx src/pages/admin/PermissionsPage/PermissionFormModal.test.tsx
|
||||
npm.cmd run test:run -- src/pages/admin/ProfilePage/ProfilePage.test.tsx
|
||||
npm.cmd run lint
|
||||
npm.cmd run build
|
||||
npm.cmd run test:coverage
|
||||
```
|
||||
|
||||
## Results
|
||||
|
||||
### Frontend coverage
|
||||
|
||||
- Overall:
|
||||
- statements `68.32%`
|
||||
- branches `54.12%`
|
||||
- functions `68.15%`
|
||||
- lines `69.28%`
|
||||
- Target areas:
|
||||
- `src/pages/admin/RolesPage`: `94.53%` statements
|
||||
- `RolesPage.tsx`: `91.54%`
|
||||
- `RoleFormModal.tsx`: `100%`
|
||||
- `RolePermissionsModal.tsx`: `96.77%`
|
||||
- `src/pages/admin/PermissionsPage`: `93.51%` statements
|
||||
- `PermissionsPage.tsx`: `91.3%`
|
||||
- `PermissionFormModal.tsx`: `97.43%`
|
||||
- `src/pages/admin/ProfilePage/ProfilePage.tsx`: `91.42%`
|
||||
|
||||
### Backend coverage
|
||||
|
||||
- `internal/auth/providers`: `80.6%`
|
||||
- `internal/repository`: `37.1%`
|
||||
|
||||
## Validation Notes
|
||||
|
||||
- Frontend full coverage now completes with `34` passing test files and `113` passing tests.
|
||||
- The successful frontend coverage run still emits one post-summary jsdom `AggregateError` network-noise line.
|
||||
- It does not fail the command.
|
||||
- It is still a real residual hygiene issue and should continue to be tracked honestly.
|
||||
|
||||
## Real Conclusion
|
||||
|
||||
- This pass materially changed the real gap map:
|
||||
- `internal/auth/providers` is no longer one of the primary `Q-004` blockers
|
||||
- `RolesPage`, `PermissionsPage`, and `ProfilePage` are no longer among the dominant uncovered admin page clusters
|
||||
- `Q-004` still cannot be honestly declared closed.
|
||||
- The main remaining real gaps are now concentrated in:
|
||||
- `internal/repository` depth, still only `37.1%`
|
||||
- still-uncovered frontend admin components, especially:
|
||||
- `UsersPage` drawers/modals
|
||||
- `WebhooksPage` modal/drawer components
|
||||
- deeper remaining `ProfileSecurityPage` branches
|
||||
- Secondary remaining gap:
|
||||
- frontend validation still has the recurring post-summary jsdom `AggregateError` noise
|
||||
@@ -0,0 +1,112 @@
|
||||
# 2026-03-28 Q-004 Coverage Remediation Pass 7
|
||||
|
||||
## Scope
|
||||
|
||||
- Continue strict `Q-004` closure work after Pass 6.
|
||||
- This pass focused on:
|
||||
- fully closing the remaining `UsersPage` modal/drawer cluster
|
||||
- fully closing the remaining `WebhooksPage` modal/drawer cluster
|
||||
- materially lifting `internal/repository`
|
||||
- fixing newly exposed repository correctness defects found during stricter coverage work
|
||||
|
||||
## Changes
|
||||
|
||||
### Frontend
|
||||
|
||||
- Added component-level coverage in:
|
||||
- `frontend/admin/src/pages/admin/UsersPage/AssignRolesModal.test.tsx`
|
||||
- `frontend/admin/src/pages/admin/UsersPage/UserEditDrawer.test.tsx`
|
||||
- `frontend/admin/src/pages/admin/UsersPage/UserDetailDrawer.test.tsx`
|
||||
- `frontend/admin/src/pages/admin/UsersPage/CreateUserModal.behavior.test.tsx`
|
||||
- `frontend/admin/src/pages/admin/WebhooksPage/DeliveryDetailModal.test.tsx`
|
||||
- `frontend/admin/src/pages/admin/WebhooksPage/WebhookFormModal.test.tsx`
|
||||
- `frontend/admin/src/pages/admin/WebhooksPage/WebhookDeliveriesDrawer.test.tsx`
|
||||
- Newly covered frontend behavior includes:
|
||||
- assign-role modal state sync, transfer changes, submit success, submit failure, and cancel reset
|
||||
- user edit drawer form hydration, birthday normalization, validation-error swallow path, service-error path, and close reset
|
||||
- user detail drawer loading, success rendering, empty fallback, fetch-failure fallback, and optional-field placeholder rendering
|
||||
- create-user modal close/reset, disabled activation-email backfill, validation-error swallow path, and service-error path
|
||||
- delivery detail modal success/failure rendering, JSON formatting branch, raw payload fallback, and close path
|
||||
- webhook form modal create/edit mode branching, validation-error swallow path, and service-error path
|
||||
- webhook deliveries drawer load, refresh, detail-open, no-webhook guard, and load-failure path
|
||||
|
||||
### Backend
|
||||
|
||||
- Added repository depth coverage in:
|
||||
- `internal/repository/repository_relationships_test.go`
|
||||
- Newly covered backend logic includes:
|
||||
- `RoleRepository` lifecycle, status queries, default-role queries, search, parent queries, and ID-batch queries
|
||||
- `PermissionRepository` lifecycle, type/status queries, join-based enabled permission queries, parent queries, and ID-batch queries
|
||||
- `UserRoleRepository` create/batch-create/batch-delete/delete/delete-by-user/delete-by-role and ID projection helpers
|
||||
- `RolePermissionRepository` create/batch-create/batch-delete/delete/delete-by-role/delete-by-permission and projection helpers
|
||||
- Real defects found and fixed during this pass:
|
||||
- `internal/repository/role.go`
|
||||
- explicit `status=0` role creation was being swallowed by DB defaults and persisted as enabled
|
||||
- `internal/repository/permission.go`
|
||||
- explicit `status=0` permission creation was being swallowed by DB defaults and persisted as enabled
|
||||
|
||||
## Verified Commands
|
||||
|
||||
```powershell
|
||||
cd D:\project
|
||||
$env:GOCACHE='D:\project\.tmp\gocache'
|
||||
$env:GOPATH='D:\project\.tmp\go'
|
||||
$env:GOMODCACHE='D:\project\.tmp\go\pkg\mod'
|
||||
go test ./internal/repository -run 'Test(RoleRepositoryLifecycleAndQueries|PermissionRepositoryLifecycleAndQueries|UserRoleAndRolePermissionRepositoriesLifecycle)$' -count=1
|
||||
go test ./internal/repository -cover -count=1
|
||||
go test ./... -count=1
|
||||
go vet ./...
|
||||
go build ./cmd/server
|
||||
|
||||
cd D:\project\frontend\admin
|
||||
npm.cmd run test:run -- src/pages/admin/UsersPage/AssignRolesModal.test.tsx src/pages/admin/UsersPage/UserEditDrawer.test.tsx src/pages/admin/UsersPage/UserDetailDrawer.test.tsx src/pages/admin/UsersPage/CreateUserModal.behavior.test.tsx src/pages/admin/UsersPage/CreateUserModal.test.tsx src/pages/admin/UsersPage/UsersPage.test.tsx
|
||||
npm.cmd run test:run -- src/pages/admin/WebhooksPage/DeliveryDetailModal.test.tsx src/pages/admin/WebhooksPage/WebhookFormModal.test.tsx src/pages/admin/WebhooksPage/WebhookDeliveriesDrawer.test.tsx src/pages/admin/WebhooksPage/WebhooksPage.test.tsx
|
||||
npm.cmd run lint
|
||||
npm.cmd run build
|
||||
npm.cmd run test:coverage
|
||||
```
|
||||
|
||||
## Results
|
||||
|
||||
### Frontend coverage
|
||||
|
||||
- Overall:
|
||||
- statements `74.54%`
|
||||
- branches `63.57%`
|
||||
- functions `74.61%`
|
||||
- lines `75.35%`
|
||||
- Target areas:
|
||||
- `src/pages/admin/UsersPage`: `95.06%` statements
|
||||
- `AssignRolesModal.tsx`: `100%`
|
||||
- `CreateUserModal.tsx`: `100%`
|
||||
- `UserDetailDrawer.tsx`: `100%`
|
||||
- `UserEditDrawer.tsx`: `100%`
|
||||
- `UsersPage.tsx`: `90.98%`
|
||||
- `src/pages/admin/WebhooksPage`: `94.92%` statements
|
||||
- `DeliveryDetailModal.tsx`: `100%`
|
||||
- `WebhookDeliveriesDrawer.tsx`: `96.66%`
|
||||
- `WebhookFormModal.tsx`: `96.42%`
|
||||
- `WebhooksPage.tsx`: `93.15%`
|
||||
|
||||
### Backend coverage
|
||||
|
||||
- `internal/repository`: `67.1%`
|
||||
|
||||
## Validation Notes
|
||||
|
||||
- Frontend full coverage now completes with `41` passing test files and `134` passing tests.
|
||||
- The successful frontend coverage run still emits one post-summary jsdom `AggregateError` network-noise line.
|
||||
- It does not fail the command.
|
||||
- It is still a real residual hygiene issue and should continue to be tracked honestly.
|
||||
|
||||
## Real Conclusion
|
||||
|
||||
- This pass materially changed the real `Q-004` map again:
|
||||
- `UsersPage` is no longer one of the remaining dominant uncovered admin clusters
|
||||
- `WebhooksPage` is no longer one of the remaining dominant uncovered admin clusters
|
||||
- `internal/repository` is no longer at the earlier closure-blocking `37.1%` depth
|
||||
- `Q-004` still cannot be honestly declared closed.
|
||||
- The remaining real gaps are now more concentrated in:
|
||||
- deeper remaining frontend hotspots such as `ProfileSecurityPage`, `LoginPage`, `RegisterPage`, `AuthProvider`, and `lib/http`
|
||||
- remaining backend repository depth outside the newly covered relation/role/permission paths
|
||||
- frontend validation hygiene due the recurring post-summary jsdom `AggregateError` noise
|
||||
@@ -0,0 +1,70 @@
|
||||
# 2026-03-28 Q-004 Coverage Remediation Pass 8
|
||||
|
||||
## Scope
|
||||
|
||||
- Continue strict `Q-004` closure work after Pass 7.
|
||||
- Fully close the remaining `AuthProvider` frontend provider cluster before moving to the next task.
|
||||
- Re-verify that closure through targeted tests plus full frontend validation.
|
||||
|
||||
## Changes
|
||||
|
||||
### Frontend
|
||||
|
||||
- Expanded provider behavior coverage in:
|
||||
- `frontend/admin/src/app/providers/AuthProvider.test.tsx`
|
||||
- Newly covered behavior includes:
|
||||
- reusing an already-authenticated in-memory session when the access token is still valid
|
||||
- authenticated-but-missing-user fallback when no backend session cookie exists
|
||||
- refresh-session success with role lookup success
|
||||
- refresh-session success with role lookup failure returning an empty role set
|
||||
- refresh-session failure cleanup
|
||||
- `onLoginSuccess` token persistence, user persistence, role persistence, and CSRF bootstrap
|
||||
- `refreshUser` success and error-logging branches
|
||||
- `logout` success and failure cleanup branches, including navigation to `/login`
|
||||
|
||||
### Backend
|
||||
|
||||
- No backend code changes were required in this pass.
|
||||
|
||||
## Verified Commands
|
||||
|
||||
```powershell
|
||||
cd D:\project\frontend\admin
|
||||
npm.cmd run test:run -- src/app/providers/AuthProvider.test.tsx
|
||||
npm.cmd run lint
|
||||
npm.cmd run build
|
||||
npm.cmd run test:coverage
|
||||
```
|
||||
|
||||
## Results
|
||||
|
||||
### Frontend coverage
|
||||
|
||||
- Overall:
|
||||
- statements `76.00%`
|
||||
- branches `63.91%`
|
||||
- functions `75.07%`
|
||||
- lines `76.84%`
|
||||
- Target areas:
|
||||
- `src/app/providers`: statements `96.38%`, branches `93.75%`
|
||||
- `src/app/providers/AuthProvider.tsx`: statements `100%`, branches `100%`, functions `100%`, lines `100%`
|
||||
- `src/pages/auth/LoginPage/LoginPage.tsx`: statements `47.93%`, branches `63.63%`
|
||||
- `src/pages/auth/RegisterPage/RegisterPage.tsx`: statements `77.63%`, branches `60.65%`
|
||||
- `src/pages/admin/ProfileSecurityPage/ProfileSecurityPage.tsx`: statements `70.17%`, branches `48.97%`
|
||||
|
||||
## Validation Notes
|
||||
|
||||
- Frontend full coverage now completes with `41` passing test files and `141` passing tests.
|
||||
- The successful frontend coverage run still emits one post-summary jsdom `AggregateError` network-noise line.
|
||||
- It does not fail the command.
|
||||
- It remains a real validation-hygiene issue and should continue to be tracked honestly.
|
||||
|
||||
## Real Conclusion
|
||||
|
||||
- `AuthProvider` is no longer an open `Q-004` gap.
|
||||
- `Q-004` still cannot be honestly declared closed.
|
||||
- The remaining highest-value frontend gaps are now more concentrated in:
|
||||
- `LoginPage`
|
||||
- `RegisterPage`
|
||||
- deeper remaining `ProfileSecurityPage` branches
|
||||
- `lib/http`
|
||||
@@ -0,0 +1,72 @@
|
||||
# 2026-03-28 Q-004 Coverage Remediation Pass 9
|
||||
|
||||
## Scope
|
||||
|
||||
- Continue strict `Q-004` closure work after Pass 8.
|
||||
- Fully close the remaining `LoginPage` frontend page cluster before moving to the next task.
|
||||
- Re-verify closure through targeted tests plus full frontend validation.
|
||||
|
||||
## Changes
|
||||
|
||||
### Frontend
|
||||
|
||||
- Expanded login-page behavior coverage in:
|
||||
- `frontend/admin/src/pages/auth/LoginPage/LoginPage.test.tsx`
|
||||
- Newly covered behavior includes:
|
||||
- fallback to default auth capabilities when capability loading fails
|
||||
- password login success and failure
|
||||
- safe redirect usage from router state and sanitized fallback from unsafe redirect queries
|
||||
- email-code send success and validation-error swallow path
|
||||
- email-code login success and failure
|
||||
- sms-code send success and failure
|
||||
- sms-code login success and failure
|
||||
- OAuth provider rendering, disabled-provider filtering, startup success, and startup failure
|
||||
|
||||
### Backend
|
||||
|
||||
- No backend code changes were required in this pass.
|
||||
|
||||
## Verified Commands
|
||||
|
||||
```powershell
|
||||
cd D:\project\frontend\admin
|
||||
npm.cmd run test:run -- src/pages/auth/LoginPage/LoginPage.test.tsx
|
||||
npm.cmd run lint
|
||||
npm.cmd run build
|
||||
npm.cmd run test:coverage
|
||||
```
|
||||
|
||||
## Results
|
||||
|
||||
### Frontend coverage
|
||||
|
||||
- Overall:
|
||||
- statements `78.38%`
|
||||
- branches `64.77%`
|
||||
- functions `76.92%`
|
||||
- lines `79.19%`
|
||||
- Target areas:
|
||||
- `src/pages/auth/LoginPage/LoginPage.tsx`: statements `92.56%`, branches `84.09%`, functions `86.2%`, lines `95.61%`
|
||||
- `src/pages/auth/RegisterPage/RegisterPage.tsx`: statements `77.63%`, branches `60.65%`
|
||||
- `src/pages/admin/ProfileSecurityPage/ProfileSecurityPage.tsx`: statements `70.17%`, branches `48.97%`
|
||||
- `src/lib/http/client.ts`: statements `52.17%`, branches `43.26%`
|
||||
- `src/lib/http/csrf.ts`: statements `25.71%`, branches `19.23%`
|
||||
|
||||
## Validation Notes
|
||||
|
||||
- Frontend full coverage now completes with `41` passing test files and `155` passing tests.
|
||||
- The successful frontend coverage run still emits one post-summary jsdom `AggregateError` network-noise line.
|
||||
- It does not fail the command.
|
||||
- It remains a real validation-hygiene issue and should continue to be tracked honestly.
|
||||
- One attempt to run `npm.cmd run lint` and `npm.cmd run build` concurrently produced a transient Windows/Vite `index.html` emit-path failure.
|
||||
- The required standalone `npm.cmd run build` rerun passed immediately afterward.
|
||||
- This pass does not have enough evidence to classify that transient as a deterministic project defect.
|
||||
|
||||
## Real Conclusion
|
||||
|
||||
- `LoginPage` is no longer an open `Q-004` gap.
|
||||
- `Q-004` still cannot be honestly declared closed.
|
||||
- The remaining highest-value frontend gaps are now more concentrated in:
|
||||
- `RegisterPage`
|
||||
- deeper remaining `ProfileSecurityPage` branches
|
||||
- `lib/http`
|
||||
@@ -0,0 +1,71 @@
|
||||
# 2026-03-28 Q-004 Coverage Remediation Pass 10
|
||||
|
||||
## Scope
|
||||
|
||||
- Continue strict `Q-004` closure work after Pass 9.
|
||||
- Fully close the remaining `RegisterPage` frontend page cluster before moving to the next task.
|
||||
- Re-verify closure through targeted tests plus full frontend validation.
|
||||
|
||||
## Changes
|
||||
|
||||
### Frontend
|
||||
|
||||
- Expanded register-page behavior coverage in:
|
||||
- `frontend/admin/src/pages/auth/RegisterPage/RegisterPage.test.tsx`
|
||||
- Newly covered behavior includes:
|
||||
- fallback to default capabilities when capability loading fails
|
||||
- footer rendering when password-reset capability is enabled
|
||||
- sms-code send success, validation swallow path, and backend-failure path
|
||||
- sms-backed registration payload submission
|
||||
- submit blocking when sms-backed registration is missing a valid phone-code path
|
||||
- registration failure handling
|
||||
- inactive-account success summary with and without activation email
|
||||
- first-admin bootstrap warning rendering
|
||||
|
||||
### Backend
|
||||
|
||||
- No backend code changes were required in this pass.
|
||||
|
||||
## Verified Commands
|
||||
|
||||
```powershell
|
||||
cd D:\project\frontend\admin
|
||||
npm.cmd run test:run -- src/pages/auth/RegisterPage/RegisterPage.test.tsx
|
||||
npm.cmd run lint
|
||||
npm.cmd run build
|
||||
npm.cmd run test:coverage
|
||||
```
|
||||
|
||||
## Results
|
||||
|
||||
### Frontend coverage
|
||||
|
||||
- Overall:
|
||||
- statements `78.91%`
|
||||
- branches `66.06%`
|
||||
- functions `77.07%`
|
||||
- lines `79.73%`
|
||||
- Target areas:
|
||||
- `src/pages/auth/RegisterPage/RegisterPage.tsx`: statements `93.42%`, branches `85.24%`, functions `87.5%`, lines `95.89%`
|
||||
- `src/pages/admin/ProfileSecurityPage/ProfileSecurityPage.tsx`: statements `70.17%`, branches `48.97%`
|
||||
- `src/lib/http/client.ts`: statements `52.17%`, branches `43.26%`
|
||||
- `src/lib/http/csrf.ts`: statements `25.71%`, branches `19.23%`
|
||||
|
||||
## Validation Notes
|
||||
|
||||
- Frontend full coverage now completes with `41` passing test files and `163` passing tests.
|
||||
- The required sequential frontend validation path passed:
|
||||
- `lint`
|
||||
- `build`
|
||||
- `test:coverage`
|
||||
- The successful frontend coverage run still emits one post-summary jsdom `AggregateError` network-noise line.
|
||||
- It does not fail the command.
|
||||
- It remains a real validation-hygiene issue and should continue to be tracked honestly.
|
||||
|
||||
## Real Conclusion
|
||||
|
||||
- `RegisterPage` is no longer an open `Q-004` gap.
|
||||
- `Q-004` still cannot be honestly declared closed.
|
||||
- The remaining highest-value frontend gaps are now more concentrated in:
|
||||
- deeper remaining `ProfileSecurityPage` branches
|
||||
- `lib/http`
|
||||
@@ -0,0 +1,71 @@
|
||||
# 2026-03-28 Q-004 Coverage Remediation Pass 11
|
||||
|
||||
## Scope
|
||||
|
||||
- Continue strict `Q-004` closure work after Pass 10.
|
||||
- Fully close the remaining low-coverage `src/lib/http/csrf.ts` module before moving to the next task.
|
||||
- Re-verify closure through targeted tests plus full frontend validation.
|
||||
|
||||
## Changes
|
||||
|
||||
### Frontend
|
||||
|
||||
- Added dedicated module coverage in:
|
||||
- `frontend/admin/src/lib/http/csrf.test.ts`
|
||||
- Newly covered behavior includes:
|
||||
- memory token set/get/clear
|
||||
- cookie token lookup and header fallback
|
||||
- cookie-first bootstrap path that skips the network request
|
||||
- csrf bootstrap through relative API base urls
|
||||
- csrf bootstrap through slashless relative API base urls
|
||||
- csrf bootstrap through absolute API base urls
|
||||
- cookie fallback after bootstrap request failure
|
||||
- null-result handling when bootstrap succeeds without returning a token
|
||||
- no-document guard behavior
|
||||
|
||||
### Backend
|
||||
|
||||
- No backend code changes were required in this pass.
|
||||
|
||||
## Verified Commands
|
||||
|
||||
```powershell
|
||||
cd D:\project\frontend\admin
|
||||
npm.cmd run test:run -- src/lib/http/csrf.test.ts
|
||||
npm.cmd run lint
|
||||
npm.cmd run build
|
||||
npm.cmd run test:coverage
|
||||
```
|
||||
|
||||
## Results
|
||||
|
||||
### Frontend coverage
|
||||
|
||||
- Overall:
|
||||
- statements `80.06%`
|
||||
- branches `67.61%`
|
||||
- functions `78.00%`
|
||||
- lines `80.91%`
|
||||
- Target areas:
|
||||
- `src/lib/http/csrf.ts`: statements `100%`, branches `88.46%`, functions `100%`, lines `100%`
|
||||
- `src/lib/http/client.ts`: statements `52.17%`, branches `43.26%`
|
||||
- `src/pages/admin/ProfileSecurityPage/ProfileSecurityPage.tsx`: statements `70.17%`, branches `48.97%`
|
||||
|
||||
## Validation Notes
|
||||
|
||||
- Frontend full coverage now completes with `42` passing test files and `171` passing tests.
|
||||
- The required sequential frontend validation path passed:
|
||||
- `lint`
|
||||
- `build`
|
||||
- `test:coverage`
|
||||
- The successful frontend coverage run still emits one post-summary jsdom `AggregateError` network-noise line.
|
||||
- It does not fail the command.
|
||||
- It remains a real validation-hygiene issue and should continue to be tracked honestly.
|
||||
|
||||
## Real Conclusion
|
||||
|
||||
- `src/lib/http/csrf.ts` is no longer an open `Q-004` gap.
|
||||
- `Q-004` still cannot be honestly declared closed.
|
||||
- The remaining highest-value frontend gaps are now more concentrated in:
|
||||
- `src/lib/http/client.ts`
|
||||
- deeper remaining `ProfileSecurityPage` branches
|
||||
@@ -0,0 +1,74 @@
|
||||
# 2026-03-28 Q-004 Coverage Remediation Pass 12
|
||||
|
||||
## Scope
|
||||
|
||||
- Continue strict `Q-004` closure work after Pass 11.
|
||||
- Fully close the remaining low-coverage `frontend/admin/src/lib/http/client.ts` module before moving to the next task.
|
||||
- Re-verify closure through targeted tests plus full frontend validation.
|
||||
|
||||
## Changes
|
||||
|
||||
### Frontend
|
||||
|
||||
- Extended module coverage in:
|
||||
- `frontend/admin/src/lib/http/client.test.ts`
|
||||
- Newly covered behavior includes:
|
||||
- business-error refresh rejection and session cleanup
|
||||
- request retry during an already in-flight refresh
|
||||
- failed shared-refresh retry when no access token remains
|
||||
- caller-provided `AbortSignal` propagation
|
||||
- download retry path that still ends in `401`
|
||||
- Hardened refresh hygiene in:
|
||||
- `frontend/admin/src/lib/http/client.ts`
|
||||
- Production code change:
|
||||
- the cached shared refresh promise is now stored as a non-rejecting waiter promise
|
||||
- this keeps concurrent waiters working while avoiding an unhandled rejected promise when refresh fails
|
||||
|
||||
### Backend
|
||||
|
||||
- No backend code changes were required in this pass.
|
||||
|
||||
## Verified Commands
|
||||
|
||||
```powershell
|
||||
cd D:\project\frontend\admin
|
||||
npm.cmd run test:run -- src/lib/http/client.test.ts
|
||||
npm.cmd run lint
|
||||
npm.cmd run build
|
||||
npm.cmd run test:coverage
|
||||
```
|
||||
|
||||
## Results
|
||||
|
||||
### Frontend coverage
|
||||
|
||||
- Overall:
|
||||
- statements `83.86%`
|
||||
- branches `72.68%`
|
||||
- functions `79.87%`
|
||||
- lines `84.72%`
|
||||
- Target areas:
|
||||
- `src/lib/http/client.ts`: statements `100%`, branches `92.30%`, functions `100%`, lines `100%`
|
||||
- `src/lib/http/csrf.ts`: statements `100%`, branches `88.46%`, functions `100%`, lines `100%`
|
||||
- `src/pages/admin/ProfileSecurityPage/ProfileSecurityPage.tsx`: statements `70.17%`, branches `48.97%`, functions `67.92%`, lines `70.40%`
|
||||
|
||||
## Validation Notes
|
||||
|
||||
- Frontend full coverage now completes with `42` passing test files and `193` passing tests.
|
||||
- The required sequential frontend validation path passed:
|
||||
- `test:run -- src/lib/http/client.test.ts`
|
||||
- `lint`
|
||||
- `build`
|
||||
- `test:coverage`
|
||||
- The successful frontend coverage run still emits one post-summary jsdom `AggregateError` network-noise line.
|
||||
- It does not fail the command.
|
||||
- It remains a real validation-hygiene issue and should continue to be tracked honestly.
|
||||
|
||||
## Real Conclusion
|
||||
|
||||
- `src/lib/http/client.ts` is no longer an open `Q-004` gap.
|
||||
- The `lib/http` hotspot is now closure-grade for the targeted modules covered in this pass.
|
||||
- `Q-004` still cannot be honestly declared closed.
|
||||
- The remaining highest-value frontend gap is now more concentrated in:
|
||||
- deeper remaining `ProfileSecurityPage` branches
|
||||
- the post-summary jsdom `AggregateError` coverage-noise hygiene issue
|
||||
@@ -0,0 +1,70 @@
|
||||
# 2026-03-28 Q-004 Coverage Remediation Pass 13
|
||||
|
||||
## Scope
|
||||
|
||||
- Continue strict `Q-004` closure work after Pass 12.
|
||||
- Fully close the remaining deep-branch hotspot in `frontend/admin/src/pages/admin/ProfileSecurityPage/ProfileSecurityPage.tsx` before selecting the next gap.
|
||||
- Re-verify closure through targeted page tests plus full frontend validation.
|
||||
|
||||
## Changes
|
||||
|
||||
### Frontend
|
||||
|
||||
- Extended page coverage in:
|
||||
- `frontend/admin/src/pages/admin/ProfileSecurityPage/ProfileSecurityPage.behavior.test.tsx`
|
||||
- Newly covered behavior includes:
|
||||
- initial security-data load failure handling
|
||||
- OAuth callback success and error handling
|
||||
- password-update submission
|
||||
- bound social-account unbind flow and post-action refresh
|
||||
- no-user guard behavior for protected actions
|
||||
- existing TOTP, avatar, and device behavior remained green under the rewritten page-level tests
|
||||
|
||||
### Backend
|
||||
|
||||
- No backend code changes were required in this pass.
|
||||
|
||||
## Verified Commands
|
||||
|
||||
```powershell
|
||||
cd D:\project\frontend\admin
|
||||
npm.cmd run test:run -- src/pages/admin/ProfileSecurityPage
|
||||
npm.cmd run lint
|
||||
npm.cmd run build
|
||||
npm.cmd run test:coverage
|
||||
```
|
||||
|
||||
## Results
|
||||
|
||||
### Frontend coverage
|
||||
|
||||
- Overall:
|
||||
- statements `85.89%`
|
||||
- branches `74.91%`
|
||||
- functions `81.87%`
|
||||
- lines `86.71%`
|
||||
- Target areas:
|
||||
- `src/pages/admin/ProfileSecurityPage/ProfileSecurityPage.tsx`: statements `90.35%`, branches `75.51%`, functions `92.45%`, lines `90.13%`
|
||||
- `src/lib/http/client.ts`: statements `100%`, branches `92.30%`, functions `100%`, lines `100%`
|
||||
- `src/lib/http/csrf.ts`: statements `100%`, branches `88.46%`, functions `100%`, lines `100%`
|
||||
|
||||
## Validation Notes
|
||||
|
||||
- Frontend full coverage now completes with `42` passing test files and `199` passing tests.
|
||||
- The required sequential frontend validation path passed:
|
||||
- `test:run -- src/pages/admin/ProfileSecurityPage`
|
||||
- `lint`
|
||||
- `build`
|
||||
- `test:coverage`
|
||||
- The successful frontend coverage run still emits one post-summary jsdom `AggregateError` network-noise line.
|
||||
- It does not fail the command.
|
||||
- It remains a real validation-hygiene issue and should continue to be tracked honestly.
|
||||
|
||||
## Real Conclusion
|
||||
|
||||
- `src/pages/admin/ProfileSecurityPage/ProfileSecurityPage.tsx` is no longer an open `Q-004` gap.
|
||||
- `Q-004` still cannot be honestly declared closed.
|
||||
- With `client.ts` and `ProfileSecurityPage` closed, the next highest-value frontend gaps shift to:
|
||||
- auth recovery pages that still have `0%` coverage, especially `src/pages/auth/ForgotPasswordPage/ForgotPasswordPage.tsx`
|
||||
- `src/pages/auth/ResetPasswordPage/ResetPasswordPage.tsx`
|
||||
- the post-summary jsdom `AggregateError` coverage-noise hygiene issue
|
||||
@@ -0,0 +1,74 @@
|
||||
# 2026-03-28 Q-004 Coverage Remediation Pass 14
|
||||
|
||||
## Scope
|
||||
|
||||
- Continue strict `Q-004` closure work after Pass 13.
|
||||
- Fully close the remaining auth recovery page hotspots in:
|
||||
- `frontend/admin/src/pages/auth/ForgotPasswordPage/ForgotPasswordPage.tsx`
|
||||
- `frontend/admin/src/pages/auth/ResetPasswordPage/ResetPasswordPage.tsx`
|
||||
- Re-verify closure through targeted page tests plus full frontend validation.
|
||||
|
||||
## Changes
|
||||
|
||||
### Frontend
|
||||
|
||||
- Added page-level coverage in:
|
||||
- `frontend/admin/src/pages/auth/ForgotPasswordPage/ForgotPasswordPage.test.tsx`
|
||||
- `frontend/admin/src/pages/auth/ResetPasswordPage/ResetPasswordPage.test.tsx`
|
||||
- Newly covered behavior includes:
|
||||
- password-reset capability enabled and disabled states
|
||||
- capability-load failure fallback on forgot-password
|
||||
- forgot-password success and backend failure handling
|
||||
- reset-token missing, invalid, and valid states
|
||||
- reset-password success flow and backend failure handling
|
||||
|
||||
### Backend
|
||||
|
||||
- No backend code changes were required in this pass.
|
||||
|
||||
## Verified Commands
|
||||
|
||||
```powershell
|
||||
cd D:\project\frontend\admin
|
||||
npm.cmd run test:run -- src/pages/auth/ForgotPasswordPage/ForgotPasswordPage.test.tsx src/pages/auth/ResetPasswordPage/ResetPasswordPage.test.tsx
|
||||
npm.cmd run lint
|
||||
npm.cmd run build
|
||||
npm.cmd run test:coverage
|
||||
```
|
||||
|
||||
## Results
|
||||
|
||||
### Frontend coverage
|
||||
|
||||
- Overall:
|
||||
- statements `89.06%`
|
||||
- branches `77.14%`
|
||||
- functions `83.56%`
|
||||
- lines `89.96%`
|
||||
- Target areas:
|
||||
- `src/pages/auth/ForgotPasswordPage/ForgotPasswordPage.tsx`: statements `100%`, branches `75%`, functions `100%`, lines `100%`
|
||||
- `src/pages/auth/ResetPasswordPage/ResetPasswordPage.tsx`: statements `95%`, branches `94.44%`, functions `100%`, lines `95%`
|
||||
- `src/pages/admin/ProfileSecurityPage/ProfileSecurityPage.tsx`: statements `90.35%`, branches `75.51%`, functions `92.45%`, lines `90.13%`
|
||||
|
||||
## Validation Notes
|
||||
|
||||
- Frontend full coverage now completes with `44` passing test files and `209` passing tests.
|
||||
- The required sequential frontend validation path passed:
|
||||
- `test:run -- src/pages/auth/ForgotPasswordPage/ForgotPasswordPage.test.tsx src/pages/auth/ResetPasswordPage/ResetPasswordPage.test.tsx`
|
||||
- `lint`
|
||||
- `build`
|
||||
- `test:coverage`
|
||||
- The successful frontend coverage run still emits one post-summary jsdom `AggregateError` network-noise line.
|
||||
- It does not fail the command.
|
||||
- It remains a real validation-hygiene issue and should continue to be tracked honestly.
|
||||
|
||||
## Real Conclusion
|
||||
|
||||
- `src/pages/auth/ForgotPasswordPage/ForgotPasswordPage.tsx` is no longer an open `Q-004` gap.
|
||||
- `src/pages/auth/ResetPasswordPage/ResetPasswordPage.tsx` is no longer an open `Q-004` gap.
|
||||
- `Q-004` still cannot be honestly declared closed.
|
||||
- After this pass, the remaining higher-value frontend gaps shift more toward:
|
||||
- app shell and routing surfaces such as `src/app/App.tsx`, `src/app/RootLayout.tsx`, and `src/app/router.tsx`
|
||||
- still-uncovered safety fallback UI such as `src/components/common/ErrorBoundary/ErrorBoundary.tsx`
|
||||
- still-uncovered admin shell/page entry points such as `src/pages/admin/DashboardPage/DashboardPage.tsx`
|
||||
- the post-summary jsdom `AggregateError` coverage-noise hygiene issue
|
||||
@@ -0,0 +1,77 @@
|
||||
# 2026-03-28 Q-004 Coverage Remediation Pass 15
|
||||
|
||||
## Scope
|
||||
|
||||
- Continue strict `Q-004` closure work after Pass 14.
|
||||
- Close the remaining low-cost shell and safety-fallback hotspots in:
|
||||
- `frontend/admin/src/app/App.tsx`
|
||||
- `frontend/admin/src/app/RootLayout.tsx`
|
||||
- `frontend/admin/src/components/common/ErrorBoundary/ErrorBoundary.tsx`
|
||||
- Re-verify closure through targeted shell tests plus full frontend validation.
|
||||
|
||||
## Changes
|
||||
|
||||
### Frontend
|
||||
|
||||
- Added shell and boundary coverage in:
|
||||
- `frontend/admin/src/app/App.test.tsx`
|
||||
- `frontend/admin/src/app/RootLayout.test.tsx`
|
||||
- `frontend/admin/src/components/common/ErrorBoundary/ErrorBoundary.test.tsx`
|
||||
- Newly covered behavior includes:
|
||||
- app shell wiring between `ErrorBoundary`, `Suspense`, and `RouterProvider`
|
||||
- `RootLayout` wrapping the route outlet in `AuthProvider`
|
||||
- `ErrorBoundary` child passthrough, custom fallback rendering, default fallback rendering, and reset behavior
|
||||
- Test hygiene hardening:
|
||||
- `ErrorBoundary` tests now suppress expected jsdom uncaught-error noise from deliberate throw cases so the targeted path stays clean
|
||||
|
||||
### Backend
|
||||
|
||||
- No backend code changes were required in this pass.
|
||||
|
||||
## Verified Commands
|
||||
|
||||
```powershell
|
||||
cd D:\project\frontend\admin
|
||||
npm.cmd run test:run -- src/app/App.test.tsx src/app/RootLayout.test.tsx src/components/common/ErrorBoundary/ErrorBoundary.test.tsx
|
||||
npm.cmd run lint
|
||||
npm.cmd run build
|
||||
npm.cmd run test:coverage
|
||||
```
|
||||
|
||||
## Results
|
||||
|
||||
### Frontend coverage
|
||||
|
||||
- Overall:
|
||||
- statements `89.72%`
|
||||
- branches `77.57%`
|
||||
- functions `84.48%`
|
||||
- lines `90.64%`
|
||||
- Target areas:
|
||||
- `src/app/App.tsx`: statements `100%`, branches `100%`, functions `100%`, lines `100%`
|
||||
- `src/app/RootLayout.tsx`: statements `100%`, branches `100%`, functions `100%`, lines `100%`
|
||||
- `src/components/common/ErrorBoundary/ErrorBoundary.tsx`: statements `100%`, branches `83.33%`, functions `100%`, lines `100%`
|
||||
|
||||
## Validation Notes
|
||||
|
||||
- Frontend full coverage now completes with `47` passing test files and `214` passing tests.
|
||||
- The required sequential frontend validation path passed:
|
||||
- `test:run -- src/app/App.test.tsx src/app/RootLayout.test.tsx src/components/common/ErrorBoundary/ErrorBoundary.test.tsx`
|
||||
- `lint`
|
||||
- `build`
|
||||
- `test:coverage`
|
||||
- The successful frontend coverage run still emits one post-summary jsdom `AggregateError` network-noise line.
|
||||
- It does not fail the command.
|
||||
- It remains a real validation-hygiene issue and should continue to be tracked honestly.
|
||||
|
||||
## Real Conclusion
|
||||
|
||||
- `src/app/App.tsx` is no longer an open `Q-004` gap.
|
||||
- `src/app/RootLayout.tsx` is no longer an open `Q-004` gap.
|
||||
- `src/components/common/ErrorBoundary/ErrorBoundary.tsx` is no longer an open `Q-004` gap.
|
||||
- `Q-004` still cannot be honestly declared closed.
|
||||
- After this pass, the remaining higher-value frontend gaps narrow further to:
|
||||
- `src/app/router.tsx`
|
||||
- `src/pages/admin/DashboardPage/DashboardPage.tsx`
|
||||
- shared page-state coverage such as `src/components/feedback/PageState/PageState.tsx`
|
||||
- the post-summary jsdom `AggregateError` coverage-noise hygiene issue
|
||||
@@ -0,0 +1,88 @@
|
||||
# 2026-03-28 Q-004 Coverage Remediation Pass 16
|
||||
|
||||
## Scope
|
||||
|
||||
- Continue strict `Q-004` closure work after Pass 15.
|
||||
- Fully close the remaining router hotspot in:
|
||||
- `frontend/admin/src/app/router.tsx`
|
||||
- Re-verify closure through targeted router tests and full frontend validation.
|
||||
|
||||
## Changes
|
||||
|
||||
### Frontend
|
||||
|
||||
- Replaced the shallow route-table assertions in:
|
||||
- `frontend/admin/src/app/router.test.tsx`
|
||||
- New coverage now verifies:
|
||||
- exact public route registration
|
||||
- exact protected route registration
|
||||
- `RequireAuth` shell wrapping and nested `AdminLayout`
|
||||
- `RequireAdmin` wrapping for admin-only routes
|
||||
- default `Navigate` redirect to `/dashboard` with `replace`
|
||||
- lazy route resolution for every page entry
|
||||
- `lazyPage()` error handling when the requested export is not a React component
|
||||
- Test isolation hardening:
|
||||
- cleaned up dynamic `vi.doMock()` registrations with explicit `vi.doUnmock()` in `afterEach`
|
||||
- this removed cross-file mock leakage that briefly caused full-suite hangs
|
||||
|
||||
### Backend
|
||||
|
||||
- No backend code changes were required in this pass.
|
||||
|
||||
## Verified Commands
|
||||
|
||||
```powershell
|
||||
cd D:\project\frontend\admin
|
||||
npm.cmd run test:run -- src/app/router.test.tsx
|
||||
npm.cmd run test:run
|
||||
npm.cmd run lint
|
||||
npm.cmd run build
|
||||
npm.cmd run test:coverage
|
||||
```
|
||||
|
||||
## Results
|
||||
|
||||
### Frontend coverage
|
||||
|
||||
- Overall:
|
||||
- statements `90.74%`
|
||||
- branches `77.74%`
|
||||
- functions `87.40%`
|
||||
- lines `90.87%`
|
||||
- Target area:
|
||||
- `src/app/router.tsx`: statements `100%`, branches `100%`, functions `100%`, lines `100%`
|
||||
|
||||
### Validation outcomes
|
||||
|
||||
- Full frontend test run now completes with:
|
||||
- `47` passing test files
|
||||
- `215` passing tests
|
||||
- Full frontend coverage run now completes with:
|
||||
- `47` passing test files
|
||||
- `215` passing tests
|
||||
- The required sequential frontend validation path passed:
|
||||
- `test:run -- src/app/router.test.tsx`
|
||||
- `test:run`
|
||||
- `lint`
|
||||
- `build`
|
||||
- `test:coverage`
|
||||
|
||||
## Validation Notes
|
||||
|
||||
- During this pass, a real test-hygiene regression was found and fixed:
|
||||
- dynamic route test mocks leaked into later test files
|
||||
- symptom: full `test:run` and `test:coverage` stalled until the command timeout
|
||||
- fix: explicit `vi.doUnmock()` cleanup for every mocked router dependency
|
||||
- The successful frontend coverage run still emits one post-summary jsdom `AggregateError` network-noise line.
|
||||
- It does not fail the command.
|
||||
- It remains a real validation-hygiene issue and cannot be hidden.
|
||||
|
||||
## Real Conclusion
|
||||
|
||||
- `src/app/router.tsx` is no longer an open `Q-004` gap.
|
||||
- `Q-004` still cannot be honestly declared closed.
|
||||
- After this pass, the main remaining frontend gaps narrow further to:
|
||||
- `src/pages/admin/DashboardPage/DashboardPage.tsx`
|
||||
- `src/components/feedback/PageState/PageState.tsx`
|
||||
- additional lower-coverage shared/admin surfaces outside this pass
|
||||
- the post-summary jsdom `AggregateError` coverage-noise hygiene issue
|
||||
@@ -0,0 +1,74 @@
|
||||
# 2026-03-28 Q-004 Coverage Remediation Pass 17
|
||||
|
||||
## Scope
|
||||
|
||||
- Continue strict `Q-004` closure work after Pass 16.
|
||||
- Fully close the remaining dashboard hotspot in:
|
||||
- `frontend/admin/src/pages/admin/DashboardPage/DashboardPage.tsx`
|
||||
- Re-verify closure through targeted dashboard tests and full frontend validation.
|
||||
|
||||
## Changes
|
||||
|
||||
### Frontend
|
||||
|
||||
- Added dedicated dashboard coverage in:
|
||||
- `frontend/admin/src/pages/admin/DashboardPage/DashboardPage.test.tsx`
|
||||
- Newly covered behavior includes:
|
||||
- initial loading state
|
||||
- successful stats rendering
|
||||
- retriable error state
|
||||
- retry recovery path
|
||||
- empty payload fallback when the stats payload is missing
|
||||
- Test setup intentionally isolates shell dependencies and service responses so the page state machine is exercised deterministically.
|
||||
|
||||
### Backend
|
||||
|
||||
- No backend code changes were required in this pass.
|
||||
|
||||
## Verified Commands
|
||||
|
||||
```powershell
|
||||
cd D:\project\frontend\admin
|
||||
npm.cmd run test:run -- src/pages/admin/DashboardPage/DashboardPage.test.tsx
|
||||
npm.cmd run lint
|
||||
npm.cmd run build
|
||||
npm.cmd run test:coverage
|
||||
```
|
||||
|
||||
## Results
|
||||
|
||||
### Frontend coverage
|
||||
|
||||
- Overall:
|
||||
- statements `91.66%`
|
||||
- branches `78.26%`
|
||||
- functions `87.86%`
|
||||
- lines `91.82%`
|
||||
- Target area:
|
||||
- `src/pages/admin/DashboardPage/DashboardPage.tsx`: statements `100%`, branches `100%`, functions `100%`, lines `100%`
|
||||
|
||||
### Validation outcomes
|
||||
|
||||
- Full frontend coverage run now completes with:
|
||||
- `48` passing test files
|
||||
- `218` passing tests
|
||||
- The required sequential frontend validation path passed:
|
||||
- `test:run -- src/pages/admin/DashboardPage/DashboardPage.test.tsx`
|
||||
- `lint`
|
||||
- `build`
|
||||
- `test:coverage`
|
||||
|
||||
## Validation Notes
|
||||
|
||||
- The successful frontend coverage run still emits one post-summary jsdom `AggregateError` network-noise line.
|
||||
- It does not fail the command.
|
||||
- It remains a real validation-hygiene issue and cannot be hidden.
|
||||
|
||||
## Real Conclusion
|
||||
|
||||
- `src/pages/admin/DashboardPage/DashboardPage.tsx` is no longer an open `Q-004` gap.
|
||||
- `Q-004` still cannot be honestly declared closed.
|
||||
- After this pass, the main remaining frontend gaps narrow further to:
|
||||
- `src/components/feedback/PageState/PageState.tsx`
|
||||
- additional lower-coverage shared/admin surfaces outside this pass
|
||||
- the post-summary jsdom `AggregateError` coverage-noise hygiene issue
|
||||
@@ -0,0 +1,75 @@
|
||||
# 2026-03-28 Q-004 Coverage Remediation Pass 18
|
||||
|
||||
## Scope
|
||||
|
||||
- Continue strict `Q-004` closure work after Pass 17.
|
||||
- Fully close the remaining shared page-state hotspot in:
|
||||
- `frontend/admin/src/components/feedback/PageState/PageState.tsx`
|
||||
- Re-verify closure through targeted component tests and full frontend validation.
|
||||
|
||||
## Changes
|
||||
|
||||
### Frontend
|
||||
|
||||
- Added dedicated page-state coverage in:
|
||||
- `frontend/admin/src/components/feedback/PageState/PageState.test.tsx`
|
||||
- Newly covered behavior includes:
|
||||
- `PageLoading` default and custom tips
|
||||
- `PageEmpty` without action
|
||||
- `PageEmpty` with action button and click handling
|
||||
- `PageError` default rendering
|
||||
- `PageError` retry and extra-action rendering
|
||||
|
||||
### Backend
|
||||
|
||||
- No backend code changes were required in this pass.
|
||||
|
||||
## Verified Commands
|
||||
|
||||
```powershell
|
||||
cd D:\project\frontend\admin
|
||||
npm.cmd run test:run -- src/components/feedback/PageState/PageState.test.tsx
|
||||
npm.cmd run lint
|
||||
npm.cmd run build
|
||||
npm.cmd run test:coverage
|
||||
```
|
||||
|
||||
## Results
|
||||
|
||||
### Frontend coverage
|
||||
|
||||
- Overall:
|
||||
- statements `91.71%`
|
||||
- branches `78.52%`
|
||||
- functions `88.01%`
|
||||
- lines `91.86%`
|
||||
- Target area:
|
||||
- `src/components/feedback/PageState/PageState.tsx`: statements `100%`, branches `100%`, functions `100%`, lines `100%`
|
||||
|
||||
### Validation outcomes
|
||||
|
||||
- Full frontend coverage run now completes with:
|
||||
- `49` passing test files
|
||||
- `223` passing tests
|
||||
- The required sequential frontend validation path passed:
|
||||
- `test:run -- src/components/feedback/PageState/PageState.test.tsx`
|
||||
- `lint`
|
||||
- `build`
|
||||
- `test:coverage`
|
||||
|
||||
## Validation Notes
|
||||
|
||||
- The successful frontend coverage run still emits one post-summary jsdom `AggregateError` network-noise line.
|
||||
- It does not fail the command.
|
||||
- It remains a real validation-hygiene issue and cannot be hidden.
|
||||
|
||||
## Real Conclusion
|
||||
|
||||
- `src/components/feedback/PageState/PageState.tsx` is no longer an open `Q-004` gap.
|
||||
- `Q-004` still cannot be honestly declared closed.
|
||||
- After this pass, the remaining higher-value frontend gaps narrow further to:
|
||||
- `src/layouts/AdminLayout/AdminLayout.tsx`
|
||||
- `src/pages/admin/ImportExportPage/ImportExportPage.tsx`
|
||||
- `src/lib/errors/AppError.ts`
|
||||
- `src/lib/storage/token-storage.ts`
|
||||
- the post-summary jsdom `AggregateError` coverage-noise hygiene issue
|
||||
@@ -0,0 +1,79 @@
|
||||
# 2026-03-28 Q-004 Coverage Remediation Pass 19
|
||||
|
||||
## Scope
|
||||
|
||||
- Continue strict `Q-004` closure work after Pass 18.
|
||||
- Fully close the remaining admin shell hotspot in:
|
||||
- `frontend/admin/src/layouts/AdminLayout/AdminLayout.tsx`
|
||||
- Re-verify closure through targeted layout tests and full frontend validation.
|
||||
|
||||
## Changes
|
||||
|
||||
### Frontend
|
||||
|
||||
- Reworked layout coverage in:
|
||||
- `frontend/admin/src/layouts/AdminLayout/AdminLayout.test.tsx`
|
||||
- Newly covered behavior includes:
|
||||
- loading state while the session restores
|
||||
- admin desktop navigation flow
|
||||
- breadcrumb navigation
|
||||
- desktop collapse state
|
||||
- mobile menu / drawer flow
|
||||
- dropdown profile / security / logout actions
|
||||
- admin vs non-admin menu selection
|
||||
- avatar, nickname, username, and default-user fallbacks
|
||||
- explicit `children` rendering over the router outlet
|
||||
|
||||
### Backend
|
||||
|
||||
- No backend code changes were required in this pass.
|
||||
|
||||
## Verified Commands
|
||||
|
||||
```powershell
|
||||
cd D:\project\frontend\admin
|
||||
npm.cmd run test:run -- src/layouts/AdminLayout/AdminLayout.test.tsx
|
||||
npm.cmd run lint
|
||||
npm.cmd run build
|
||||
npm.cmd run test:coverage
|
||||
```
|
||||
|
||||
## Results
|
||||
|
||||
### Frontend coverage
|
||||
|
||||
- Overall:
|
||||
- statements `92.06%`
|
||||
- branches `79.29%`
|
||||
- functions `89.09%`
|
||||
- lines `92.22%`
|
||||
- Target area:
|
||||
- `src/layouts/AdminLayout/AdminLayout.tsx`: statements `100%`, branches `100%`, functions `100%`, lines `100%`
|
||||
|
||||
### Validation outcomes
|
||||
|
||||
- Full frontend coverage run now completes with:
|
||||
- `49` passing test files
|
||||
- `224` passing tests
|
||||
- The required sequential frontend validation path passed:
|
||||
- `test:run -- src/layouts/AdminLayout/AdminLayout.test.tsx`
|
||||
- `lint`
|
||||
- `build`
|
||||
- `test:coverage`
|
||||
|
||||
## Validation Notes
|
||||
|
||||
- The successful frontend coverage run still emits one post-summary jsdom `AggregateError` network-noise line.
|
||||
- It does not fail the command.
|
||||
- It remains a real validation-hygiene issue and cannot be hidden.
|
||||
|
||||
## Real Conclusion
|
||||
|
||||
- `src/layouts/AdminLayout/AdminLayout.tsx` is no longer an open `Q-004` gap.
|
||||
- `Q-004` still cannot be honestly declared closed.
|
||||
- After this pass, the remaining higher-value frontend gaps narrow further to:
|
||||
- `src/lib/storage/token-storage.ts`
|
||||
- `src/lib/errors/AppError.ts`
|
||||
- `src/pages/admin/ImportExportPage/ImportExportPage.tsx`
|
||||
- `src/pages/NotFoundPage/NotFoundPage.tsx`
|
||||
- the post-summary jsdom `AggregateError` coverage-noise hygiene issue
|
||||
@@ -0,0 +1,75 @@
|
||||
# 2026-03-28 Q-004 Coverage Remediation Pass 20
|
||||
|
||||
## Scope
|
||||
|
||||
- Continue strict `Q-004` closure work after Pass 19.
|
||||
- Fully close the remaining high-risk storage hotspot in:
|
||||
- `frontend/admin/src/lib/storage/token-storage.ts`
|
||||
- Re-verify closure through targeted storage tests and full frontend validation.
|
||||
|
||||
## Changes
|
||||
|
||||
### Frontend
|
||||
|
||||
- Added dedicated storage coverage in:
|
||||
- `frontend/admin/src/lib/storage/token-storage.test.ts`
|
||||
- Newly covered behavior includes:
|
||||
- in-memory refresh token read/write
|
||||
- blank and `undefined` normalization to `null`
|
||||
- explicit token clearing
|
||||
- presence checks for the in-memory token
|
||||
- session presence cookie detection
|
||||
- the no-`document` fallback branch
|
||||
|
||||
### Backend
|
||||
|
||||
- No backend code changes were required in this pass.
|
||||
|
||||
## Verified Commands
|
||||
|
||||
```powershell
|
||||
cd D:\project\frontend\admin
|
||||
npm.cmd run test:run -- src/lib/storage/token-storage.test.ts
|
||||
npm.cmd run lint
|
||||
npm.cmd run build
|
||||
npm.cmd run test:coverage
|
||||
```
|
||||
|
||||
## Results
|
||||
|
||||
### Frontend coverage
|
||||
|
||||
- Overall:
|
||||
- statements `92.32%`
|
||||
- branches `79.63%`
|
||||
- functions `89.70%`
|
||||
- lines `92.49%`
|
||||
- Target area:
|
||||
- `src/lib/storage/token-storage.ts`: statements `100%`, branches `100%`, functions `100%`, lines `100%`
|
||||
|
||||
### Validation outcomes
|
||||
|
||||
- Full frontend coverage run now completes with:
|
||||
- `50` passing test files
|
||||
- `229` passing tests
|
||||
- The required sequential frontend validation path passed:
|
||||
- `test:run -- src/lib/storage/token-storage.test.ts`
|
||||
- `lint`
|
||||
- `build`
|
||||
- `test:coverage`
|
||||
|
||||
## Validation Notes
|
||||
|
||||
- The successful frontend coverage run still emits one post-summary jsdom `AggregateError` network-noise line.
|
||||
- It does not fail the command.
|
||||
- It remains a real validation-hygiene issue and cannot be hidden.
|
||||
|
||||
## Real Conclusion
|
||||
|
||||
- `src/lib/storage/token-storage.ts` is no longer an open `Q-004` gap.
|
||||
- `Q-004` still cannot be honestly declared closed.
|
||||
- After this pass, the remaining higher-value frontend gaps narrow further to:
|
||||
- `src/lib/errors/AppError.ts`
|
||||
- `src/pages/admin/ImportExportPage/ImportExportPage.tsx`
|
||||
- `src/pages/NotFoundPage/NotFoundPage.tsx`
|
||||
- the post-summary jsdom `AggregateError` coverage-noise hygiene issue
|
||||
@@ -0,0 +1,82 @@
|
||||
# 2026-03-28 Q-004 Coverage Remediation Pass 21
|
||||
|
||||
## Scope
|
||||
|
||||
- Continue strict `Q-004` closure work after Pass 20.
|
||||
- Fully close the shared error-model hotspot in:
|
||||
- `frontend/admin/src/lib/errors/AppError.ts`
|
||||
- `frontend/admin/src/lib/errors/index.ts`
|
||||
- Re-verify closure through targeted error-module tests and full frontend validation.
|
||||
|
||||
## Changes
|
||||
|
||||
### Frontend
|
||||
|
||||
- Added dedicated error-module coverage in:
|
||||
- `frontend/admin/src/lib/errors/AppError.test.ts`
|
||||
- Newly covered behavior includes:
|
||||
- `AppError` constructor defaults
|
||||
- explicit option handling with `cause`
|
||||
- backend response to error-type mapping
|
||||
- factory helpers for auth / forbidden / validation / network errors
|
||||
- `isAuthError`, `isForbidden`, and `isNetworkError`
|
||||
- user-facing message mapping across all error types
|
||||
- `isAppError`
|
||||
- `getErrorMessage`
|
||||
- `isFormValidationError`
|
||||
|
||||
### Backend
|
||||
|
||||
- No backend code changes were required in this pass.
|
||||
|
||||
## Verified Commands
|
||||
|
||||
```powershell
|
||||
cd D:\project\frontend\admin
|
||||
npm.cmd run test:run -- src/lib/errors/AppError.test.ts
|
||||
npm.cmd run lint
|
||||
npm.cmd run build
|
||||
npm.cmd run test:coverage
|
||||
```
|
||||
|
||||
## Results
|
||||
|
||||
### Frontend coverage
|
||||
|
||||
- Overall:
|
||||
- statements `93.07%`
|
||||
- branches `81.35%`
|
||||
- functions `90.32%`
|
||||
- lines `93.26%`
|
||||
- Target areas:
|
||||
- `src/lib/errors/AppError.ts`: statements `100%`, branches `100%`, functions `100%`, lines `100%`
|
||||
- `src/lib/errors/index.ts`: statements `100%`, branches `100%`, functions `100%`, lines `100%`
|
||||
|
||||
### Validation outcomes
|
||||
|
||||
- Full frontend coverage run now completes with:
|
||||
- `51` passing test files
|
||||
- `238` passing tests
|
||||
- The required sequential frontend validation path passed:
|
||||
- `test:run -- src/lib/errors/AppError.test.ts`
|
||||
- `lint`
|
||||
- `build`
|
||||
- `test:coverage`
|
||||
|
||||
## Validation Notes
|
||||
|
||||
- The successful frontend coverage run still emits one post-summary jsdom `AggregateError` network-noise line.
|
||||
- It does not fail the command.
|
||||
- It remains a real validation-hygiene issue and cannot be hidden.
|
||||
|
||||
## Real Conclusion
|
||||
|
||||
- `src/lib/errors/AppError.ts` is no longer an open `Q-004` gap.
|
||||
- `src/lib/errors/index.ts` is no longer an open `Q-004` gap.
|
||||
- `Q-004` still cannot be honestly declared closed.
|
||||
- After this pass, the remaining higher-value frontend gaps narrow further to:
|
||||
- `src/pages/admin/ImportExportPage/ImportExportPage.tsx`
|
||||
- `src/pages/NotFoundPage/NotFoundPage.tsx`
|
||||
- `src/lib/hooks/useBreadcrumbs.ts`
|
||||
- `src/app/providers/ThemeProvider.tsx`
|
||||
- the post-summary jsdom `AggregateError` coverage-noise hygiene issue
|
||||
@@ -0,0 +1,87 @@
|
||||
# 2026-03-28 Q-004 Coverage Remediation Pass 22
|
||||
|
||||
## Scope
|
||||
|
||||
- Continue strict `Q-004` closure work after Pass 21.
|
||||
- Fully close the remaining `ImportExportPage` hotspot in:
|
||||
- `frontend/admin/src/pages/admin/ImportExportPage/ImportExportPage.tsx`
|
||||
- Re-verify closure through targeted page tests and full frontend validation.
|
||||
|
||||
## Changes
|
||||
|
||||
### Frontend
|
||||
|
||||
- Expanded page-level coverage in:
|
||||
- `frontend/admin/src/pages/admin/ImportExportPage/ImportExportPage.test.tsx`
|
||||
- Newly covered behavior includes:
|
||||
- import template download success with the default format
|
||||
- import format switching and template download failure handling
|
||||
- unsupported file-type rejection
|
||||
- oversized file rejection before the service call
|
||||
- supported import failure handling
|
||||
- successful CSV import summary rendering
|
||||
- XLSX import warning-state rendering with backend row errors
|
||||
- import-flow reset after a completed run
|
||||
- export empty-field guard
|
||||
- export field selection updates
|
||||
- export submission with keyword present
|
||||
- export submission with keyword omitted
|
||||
- export failure handling
|
||||
- The test file now also shields `rc-table` from jsdom's unsupported pseudo-element `getComputedStyle` path so the page-level test no longer introduces that extra noise.
|
||||
|
||||
### Backend
|
||||
|
||||
- No backend code changes were required in this pass.
|
||||
|
||||
## Verified Commands
|
||||
|
||||
```powershell
|
||||
cd D:\project\frontend\admin
|
||||
npm.cmd run test:run -- src/pages/admin/ImportExportPage/ImportExportPage.test.tsx
|
||||
npm.cmd run lint
|
||||
npm.cmd run build
|
||||
npm.cmd run test:coverage
|
||||
```
|
||||
|
||||
## Results
|
||||
|
||||
### Frontend coverage
|
||||
|
||||
- Overall:
|
||||
- statements `93.56%`
|
||||
- branches `81.95%`
|
||||
- functions `90.93%`
|
||||
- lines `93.71%`
|
||||
- Target area:
|
||||
- `src/pages/admin/ImportExportPage/ImportExportPage.tsx`: statements `100%`, branches `100%`, functions `100%`, lines `100%`
|
||||
|
||||
### Validation outcomes
|
||||
|
||||
- Targeted page validation passed:
|
||||
- `1` passing test file
|
||||
- `8` passing tests
|
||||
- Full frontend coverage run now completes with:
|
||||
- `51` passing test files
|
||||
- `242` passing tests
|
||||
- The required sequential frontend validation path passed:
|
||||
- `test:run -- src/pages/admin/ImportExportPage/ImportExportPage.test.tsx`
|
||||
- `lint`
|
||||
- `build`
|
||||
- `test:coverage`
|
||||
|
||||
## Validation Notes
|
||||
|
||||
- The successful frontend coverage run still emits post-summary jsdom `AggregateError` network-noise lines.
|
||||
- The command exits with code `0`.
|
||||
- This remains a real validation-hygiene issue and cannot be hidden or described as a fully clean run.
|
||||
- The `ImportExportPage` test no longer emits the extra jsdom `window.getComputedStyle(..., pseudoElt)` noise that appeared during the first draft of this pass.
|
||||
|
||||
## Real Conclusion
|
||||
|
||||
- `src/pages/admin/ImportExportPage/ImportExportPage.tsx` is no longer an open `Q-004` gap.
|
||||
- `Q-004` still cannot be honestly declared closed.
|
||||
- After this pass, the remaining higher-value frontend gaps narrow further to:
|
||||
- `src/pages/NotFoundPage/NotFoundPage.tsx`
|
||||
- `src/lib/hooks/useBreadcrumbs.ts`
|
||||
- `src/app/providers/ThemeProvider.tsx`
|
||||
- the post-summary jsdom `AggregateError` coverage-noise hygiene issue
|
||||
@@ -0,0 +1,75 @@
|
||||
# 2026-03-28 Q-004 Coverage Remediation Pass 23
|
||||
|
||||
## Scope
|
||||
|
||||
- Continue strict `Q-004` closure work after Pass 22.
|
||||
- Fully close the remaining standalone 404 page hotspot in:
|
||||
- `frontend/admin/src/pages/NotFoundPage/NotFoundPage.tsx`
|
||||
- Re-verify closure through targeted page tests and full frontend validation.
|
||||
|
||||
## Changes
|
||||
|
||||
### Frontend
|
||||
|
||||
- Added dedicated 404-page coverage in:
|
||||
- `frontend/admin/src/pages/NotFoundPage/NotFoundPage.test.tsx`
|
||||
- Newly covered behavior includes:
|
||||
- 404 status rendering
|
||||
- missing-page subtitle rendering
|
||||
- primary recovery action rendering
|
||||
- navigation back to `/dashboard`
|
||||
|
||||
### Backend
|
||||
|
||||
- No backend code changes were required in this pass.
|
||||
|
||||
## Verified Commands
|
||||
|
||||
```powershell
|
||||
cd D:\project\frontend\admin
|
||||
npm.cmd run test:run -- src/pages/NotFoundPage/NotFoundPage.test.tsx
|
||||
npm.cmd run lint
|
||||
npm.cmd run build
|
||||
npm.cmd run test:coverage
|
||||
```
|
||||
|
||||
## Results
|
||||
|
||||
### Frontend coverage
|
||||
|
||||
- Overall:
|
||||
- statements `93.69%`
|
||||
- branches `81.95%`
|
||||
- functions `91.24%`
|
||||
- lines `93.85%`
|
||||
- Target area:
|
||||
- `src/pages/NotFoundPage/NotFoundPage.tsx`: statements `100%`, branches `100%`, functions `100%`, lines `100%`
|
||||
|
||||
### Validation outcomes
|
||||
|
||||
- Targeted page validation passed:
|
||||
- `1` passing test file
|
||||
- `1` passing test
|
||||
- Full frontend coverage run now completes with:
|
||||
- `52` passing test files
|
||||
- `243` passing tests
|
||||
- The required sequential frontend validation path passed:
|
||||
- `test:run -- src/pages/NotFoundPage/NotFoundPage.test.tsx`
|
||||
- `lint`
|
||||
- `build`
|
||||
- `test:coverage`
|
||||
|
||||
## Validation Notes
|
||||
|
||||
- The successful frontend coverage run still emits post-summary jsdom `AggregateError` network-noise lines.
|
||||
- The command exits with code `0`.
|
||||
- This remains a real validation-hygiene issue and cannot be hidden or described as a fully clean run.
|
||||
|
||||
## Real Conclusion
|
||||
|
||||
- `src/pages/NotFoundPage/NotFoundPage.tsx` is no longer an open `Q-004` gap.
|
||||
- `Q-004` still cannot be honestly declared closed.
|
||||
- After this pass, the remaining higher-value frontend gaps narrow further to:
|
||||
- `src/lib/hooks/useBreadcrumbs.ts`
|
||||
- `src/app/providers/ThemeProvider.tsx`
|
||||
- the post-summary jsdom `AggregateError` coverage-noise hygiene issue
|
||||
@@ -0,0 +1,76 @@
|
||||
# 2026-03-28 Q-004 Coverage Remediation Pass 24
|
||||
|
||||
## Scope
|
||||
|
||||
- Continue strict `Q-004` closure work after Pass 23.
|
||||
- Fully close the breadcrumb-hook hotspot in:
|
||||
- `frontend/admin/src/lib/hooks/useBreadcrumbs.ts`
|
||||
- Re-verify closure through targeted hook tests and full frontend validation.
|
||||
|
||||
## Changes
|
||||
|
||||
### Frontend
|
||||
|
||||
- Refined the hook implementation in:
|
||||
- `frontend/admin/src/lib/hooks/useBreadcrumbs.ts`
|
||||
- Removed redundant parent-injection logic that was dead under the current route model and added closure-grade tests in:
|
||||
- `frontend/admin/src/lib/hooks/useBreadcrumbs.test.tsx`
|
||||
- Newly verified behavior includes:
|
||||
- root-path empty breadcrumb output
|
||||
- single-segment terminal breadcrumb output
|
||||
- nested breadcrumb output for known child routes
|
||||
- skipping unknown route segments while retaining known ancestors
|
||||
|
||||
### Backend
|
||||
|
||||
- No backend code changes were required in this pass.
|
||||
|
||||
## Verified Commands
|
||||
|
||||
```powershell
|
||||
cd D:\project\frontend\admin
|
||||
npm.cmd run test:run -- src/lib/hooks/useBreadcrumbs.test.tsx
|
||||
npm.cmd run lint
|
||||
npm.cmd run build
|
||||
npm.cmd run test:coverage
|
||||
```
|
||||
|
||||
## Results
|
||||
|
||||
### Frontend coverage
|
||||
|
||||
- Overall:
|
||||
- statements `93.84%`
|
||||
- branches `82.29%`
|
||||
- functions `91.21%`
|
||||
- lines `94.01%`
|
||||
- Target area:
|
||||
- `src/lib/hooks/useBreadcrumbs.ts`: statements `100%`, branches `100%`, functions `100%`, lines `100%`
|
||||
|
||||
### Validation outcomes
|
||||
|
||||
- Targeted hook validation passed:
|
||||
- `1` passing test file
|
||||
- `4` passing tests
|
||||
- Full frontend coverage run now completes with:
|
||||
- `53` passing test files
|
||||
- `247` passing tests
|
||||
- The required sequential frontend validation path passed:
|
||||
- `test:run -- src/lib/hooks/useBreadcrumbs.test.tsx`
|
||||
- `lint`
|
||||
- `build`
|
||||
- `test:coverage`
|
||||
|
||||
## Validation Notes
|
||||
|
||||
- The successful frontend coverage run still emits post-summary jsdom `AggregateError` network-noise lines.
|
||||
- The command exits with code `0`.
|
||||
- This remains a real validation-hygiene issue and cannot be hidden or described as a fully clean run.
|
||||
|
||||
## Real Conclusion
|
||||
|
||||
- `src/lib/hooks/useBreadcrumbs.ts` is no longer an open `Q-004` gap.
|
||||
- `Q-004` still cannot be honestly declared closed.
|
||||
- After this pass, the remaining higher-value frontend gaps narrow further to:
|
||||
- `src/app/providers/ThemeProvider.tsx`
|
||||
- the post-summary jsdom `AggregateError` coverage-noise hygiene issue
|
||||
@@ -0,0 +1,73 @@
|
||||
# 2026-03-28 Q-004 Coverage Remediation Pass 25
|
||||
|
||||
## Scope
|
||||
|
||||
- Continue strict `Q-004` closure work after Pass 24.
|
||||
- Fully close the theme-provider hotspot in:
|
||||
- `frontend/admin/src/app/providers/ThemeProvider.tsx`
|
||||
- Re-verify closure through targeted provider tests and full frontend validation.
|
||||
|
||||
## Changes
|
||||
|
||||
### Frontend
|
||||
|
||||
- Added dedicated provider coverage in:
|
||||
- `frontend/admin/src/app/providers/ThemeProvider.test.tsx`
|
||||
- Newly verified behavior includes:
|
||||
- child rendering through `ConfigProvider`
|
||||
- locale propagation to `ConfigProvider`
|
||||
- theme token propagation to `ConfigProvider`
|
||||
- component-level theme override propagation for `Table`, `Card`, `Button`, `Input`, and `Select`
|
||||
|
||||
### Backend
|
||||
|
||||
- No backend code changes were required in this pass.
|
||||
|
||||
## Verified Commands
|
||||
|
||||
```powershell
|
||||
cd D:\project\frontend\admin
|
||||
npm.cmd run test:run -- src/app/providers/ThemeProvider.test.tsx
|
||||
npm.cmd run lint
|
||||
npm.cmd run build
|
||||
npm.cmd run test:coverage
|
||||
```
|
||||
|
||||
## Results
|
||||
|
||||
### Frontend coverage
|
||||
|
||||
- Overall:
|
||||
- statements `93.93%`
|
||||
- branches `82.29%`
|
||||
- functions `91.37%`
|
||||
- lines `94.10%`
|
||||
- Target area:
|
||||
- `src/app/providers/ThemeProvider.tsx`: statements `100%`, branches `100%`, functions `100%`, lines `100%`
|
||||
|
||||
### Validation outcomes
|
||||
|
||||
- Targeted provider validation passed:
|
||||
- `1` passing test file
|
||||
- `1` passing test
|
||||
- Full frontend coverage run now completes with:
|
||||
- `54` passing test files
|
||||
- `248` passing tests
|
||||
- The required sequential frontend validation path passed:
|
||||
- `test:run -- src/app/providers/ThemeProvider.test.tsx`
|
||||
- `lint`
|
||||
- `build`
|
||||
- `test:coverage`
|
||||
|
||||
## Validation Notes
|
||||
|
||||
- The successful frontend coverage run still emits post-summary jsdom `AggregateError` network-noise lines.
|
||||
- The command exits with code `0`.
|
||||
- This remains a real validation-hygiene issue and cannot be hidden or described as a fully clean run.
|
||||
|
||||
## Real Conclusion
|
||||
|
||||
- `src/app/providers/ThemeProvider.tsx` is no longer an open `Q-004` gap.
|
||||
- All previously identified frontend code hotspots for this closure track are now covered and re-verified.
|
||||
- `Q-004` still cannot be honestly declared closed because one real validation-hygiene issue remains:
|
||||
- the post-summary jsdom `AggregateError` coverage-noise issue
|
||||
@@ -0,0 +1,58 @@
|
||||
# 2026-03-28 Q-004 Coverage Remediation Pass 26
|
||||
|
||||
## Scope
|
||||
|
||||
- Re-verify the last open `Q-004` hygiene blocker after Pass 25.
|
||||
- Confirm the `frontend/admin` `Q-004` closure track is now honestly closable.
|
||||
- Re-check the previously unstable `router.tsx` full-suite coverage result in the same full validation run.
|
||||
|
||||
## Changes
|
||||
|
||||
### Frontend
|
||||
|
||||
- No additional frontend code changes were required in this pass.
|
||||
- This pass is a strict re-validation of the previously landed frontend fixes that removed the real remaining blockers.
|
||||
|
||||
### Backend
|
||||
|
||||
- No backend code changes were required in this pass.
|
||||
|
||||
## Verified Commands
|
||||
|
||||
```powershell
|
||||
cd D:\project\frontend\admin
|
||||
npm.cmd run lint
|
||||
npm.cmd run build
|
||||
npm.cmd run test:coverage
|
||||
```
|
||||
|
||||
## Results
|
||||
|
||||
### Frontend coverage
|
||||
|
||||
- Overall:
|
||||
- statements `93.98%`
|
||||
- branches `82.29%`
|
||||
- functions `91.37%`
|
||||
- lines `94.15%`
|
||||
- Key re-check:
|
||||
- `src/app/router.tsx`: statements `100%`, branches `100%`, functions `100%`, lines `100%`
|
||||
|
||||
### Validation outcomes
|
||||
|
||||
- `lint` passed.
|
||||
- `build` passed.
|
||||
- Full frontend coverage passed with:
|
||||
- `54` passing test files
|
||||
- `248` passing tests
|
||||
- The latest successful `test:coverage` run no longer prints the previously recurring post-summary jsdom `AggregateError` network-noise lines.
|
||||
- The short-lived full-suite `router.tsx` coverage regression did not reproduce in the latest run.
|
||||
- A separate npm warning still prints after command completion:
|
||||
- `Unknown user config "//git@github.com/"`
|
||||
- this is external environment noise from npm user config, not a project-generated frontend failure
|
||||
|
||||
## Real Conclusion
|
||||
|
||||
- All previously identified frontend hotspots in this `Q-004` closure track remain closed and re-verified.
|
||||
- The last real validation-hygiene blocker is now closed.
|
||||
- The `frontend/admin` `Q-004` closure track can now be honestly declared closed.
|
||||
Reference in New Issue
Block a user