Skip to content

fix(customer-operations): unified service-status model + E2E coverage#177

Open
mdtazizulislam wants to merge 9 commits into
mainfrom
ci/coc-edge-verify
Open

fix(customer-operations): unified service-status model + E2E coverage#177
mdtazizulislam wants to merge 9 commits into
mainfrom
ci/coc-edge-verify

Conversation

@mdtazizulislam

Copy link
Copy Markdown
Owner

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

claude added 5 commits June 30, 2026 06:30
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
@netlify

netlify Bot commented Jun 30, 2026

Copy link
Copy Markdown

Deploy Preview for ai-powered-cyber ready!

Name Link
🔨 Latest commit cb44431
🔍 Latest deploy log https://app.netlify.com/projects/ai-powered-cyber/deploys/6a441068d7a16e0008c1e560
😎 Deploy Preview https://deploy-preview-177--ai-powered-cyber.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 96
Accessibility: 99
Best Practices: 92
SEO: 100
PWA: -
View the detailed breakdown and full score reports
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Jun 30, 2026

Copy link
Copy Markdown

Deploy Preview for zonforge-customer-operations canceled.

Name Link
🔨 Latest commit cb44431
🔍 Latest deploy log https://app.netlify.com/projects/zonforge-customer-operations/deploys/6a4410689a57810008ff87d5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants