fix(customer-operations): unified service-status model + E2E coverage#177
Open
mdtazizulislam wants to merge 9 commits into
Open
fix(customer-operations): unified service-status model + E2E coverage#177mdtazizulislam wants to merge 9 commits into
mdtazizulislam wants to merge 9 commits into
Conversation
Audit found API status was computed independently by the header, the dashboard, and every page (each calling its own useCocApi), so the header could show 'API Healthy' while a page showed Degraded/Unavailable, and direct (no-token) access produced inconsistent per-page error states. Root-cause fixes (frontend only): - coc-api.ts: extract one cocFetch() as the single request + status mapper (host/route/status/bearer never returned to the UI). - coc-status.tsx (new): CocServiceStatusProvider does ONE shared health probe and is token-aware. Exposes a unified status: healthy | degraded | unavailable | locked (locked = no SSO token / direct access). CocServiceBanner renders the one safe state used by every page. - CocHeader + useOpsData read the unified status; all pages render CocServiceBanner instead of per-fetch error banners. Header and content can no longer disagree; direct access shows a safe 'Sign-in required' locked state. Tests: - e2e/coc-e2e.spec.ts (Playwright): canonical lock, SSO token capture+scrub, Bearer attachment, locked direct-access, unified status (healthy/degraded), SPA-nav consistency, all 19 routes render with no raw URL/status exposure, and no horizontal overflow at mobile/tablet/desktop/4K. 10/10 pass. - domain-canonical.test.ts (vitest): canonical/OG/robots/manifest/redirect config locked to the custom domain (runs in CI). No backend/API/database/auth changes. No UI redesign. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MiPyhqoV9Pt7XN2tiFpS4A
…ebar scroll fixity Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MiPyhqoV9Pt7XN2tiFpS4A
…/missing-regexp-anchor) Replace the unanchored hostname regex in page.route() with Playwright glob string matchers so no URL-context regex is introduced. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MiPyhqoV9Pt7XN2tiFpS4A
Runs curl assertions against the deployed production URLs from a GitHub-hosted runner (open egress) to verify the real 301 redirect, custom-domain 200, canonical lock, and absence of netlify.app in served HTML. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MiPyhqoV9Pt7XN2tiFpS4A
✅ Deploy Preview for ai-powered-cyber ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for zonforge-customer-operations canceled.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Audit found API status was computed independently by the header, the dashboard,
and every page (each calling its own useCocApi), so the header could show
'API Healthy' while a page showed Degraded/Unavailable, and direct (no-token)
access produced inconsistent per-page error states.
Root-cause fixes (frontend only):
(host/route/status/bearer never returned to the UI).
and is token-aware. Exposes a unified status: healthy | degraded | unavailable
| locked (locked = no SSO token / direct access). CocServiceBanner renders the
one safe state used by every page.
CocServiceBanner instead of per-fetch error banners. Header and content can no
longer disagree; direct access shows a safe 'Sign-in required' locked state.
Tests:
Bearer attachment, locked direct-access, unified status (healthy/degraded),
SPA-nav consistency, all 19 routes render with no raw URL/status exposure,
and no horizontal overflow at mobile/tablet/desktop/4K. 10/10 pass.
config locked to the custom domain (runs in CI).
No backend/API/database/auth changes. No UI redesign.
Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01MiPyhqoV9Pt7XN2tiFpS4A