Skip to content

fix(sla): resolve SLA page from selected API - #1351

Open
Agencybuilds wants to merge 2 commits into
CalloraOrg:mainfrom
Agencybuilds:fix/sla-per-api
Open

Agencybuilds wants to merge 2 commits into
CalloraOrg:mainfrom
Agencybuilds:fix/sla-per-api

Conversation

@Agencybuilds

Copy link
Copy Markdown
Contributor

Closes #1325

Summary

Resolves the SLA page dynamically per API rather than using a hardcoded GrantFox-only literal route.

  • Data model: Added optional sla?: { uptimeTargetPct: number; p99LatencyMs?: number; incidentResponseMinutes?: number; maintenanceWindow?: string; supportTier?: string; creditThresholdPct?: number } to APIItem, and populated SLA terms for sample APIs.
  • Dynamic route: Updated route to /marketplace/:apiId/sla in App.tsx and updated renderRoute.tsx so /marketplace/:apiId/sla passes through to App.tsx for any API ID while preserving /marketplace standalone rendering.
  • SlaCard rewrite:
    • Dynamically resolves API metadata via fetchCatalog(signal).
    • Loading: Renders skeleton with aria-busy="true".
    • Not Found: Renders an alert panel (role="alert") with a link back to /marketplace.
    • No Published SLA: Informs the user with a distinct notice banner ("This provider has not published an SLA") and displays historical telemetry ("Observed Uptime", "Observed Average Latency") clearly labeled as observed and not contractual.
    • Contractual SLA: Displays SLA metrics derived from api.sla + api.version with individual copy-to-clipboard buttons and aria-live polite feedback.
    • Breadcrumb & Title: Breadcrumb navigates Marketplace → api.name (linking to /details/:id) → SLA, and document title includes the API name.
  • ApiDetailPage Link: Added direct SLA links in both the overview and sidebar of ApiDetailPage.
  • Documentation: Updated docs/SlaCard-CopyToClipboard.md and README.md.

Test Plan

  • src/pages/SlaCard.test.tsx: 17 tests covering per-API SLA (geocode-01), no-SLA observed telemetry (translate-01), unknown ID not-found state, loading skeleton, and clipboard copy interactions.
  • src/renderRoute.test.tsx: 4 tests validating routing exclusions for /marketplace/:apiId/sla, standalone /marketplace, query branches, and the ApiDetailPage SLA link.
  • src/RouteSplitting.test.tsx: 7 tests passing.
  • Full vitest run: 142 test files, 2,128 tests passing.
  • npx tsc -p tsconfig.json --noEmit and npm run build pass.

@drips-wave

drips-wave Bot commented Oct 19, 2026

Copy link
Copy Markdown

@Agencybuilds Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

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.

Render the SLA page for the selected API instead of hardcoded GrantFox Wave Compute content

1 participant