Files
henryor af5535dfcc docs(openspec): archiva el change console-tech-debt-cleanup
Persiste proposal, specs delta (auth, api-client, access-requests,
platform-shell, testing), design con 8 ADRs, tasks (27 items en 10 fases),
verify-report (28 tests, 0 críticos, 0 warnings tras el cierre) y
archive-report final.

Cierra el ciclo SDD del cleanup de deuda técnica del console.
2026-05-07 21:14:56 -05:00

1.5 KiB

Platform Shell Specification

Delta for: Platform Shell — console-tech-debt-cleanup

ADDED Requirements

Requirement: ErrorBoundary at Platform Shell

The platform shell layout component MUST be wrapped in a React ErrorBoundary. When any child component throws an unhandled render error, the boundary MUST render a fallback screen inside the platform layout (not a blank page). The fallback MUST include a logout link or button so the operator can recover without a manual browser reload.

Scenario: Child component throws — fallback renders

  • GIVEN the platform shell is mounted with a child component that throws during render
  • WHEN the error propagates up
  • THEN the ErrorBoundary catches the error
  • AND the fallback screen renders in place of the blank page
  • AND the fallback is visible within the platform layout (not a full white screen)

Scenario: Fallback includes recovery action

  • GIVEN the ErrorBoundary fallback is visible
  • WHEN the operator clicks the logout/recovery link in the fallback
  • THEN logout() is called and the user is redirected to /login
  • AND the operator can start a new session without refreshing the browser manually

Scenario: ErrorBoundary does not catch async errors

  • GIVEN a TanStack Query mutation or async operation throws
  • WHEN the error is not a render-phase throw
  • THEN the ErrorBoundary does NOT intercept it
  • AND the existing per-component error handling (toast, isError state) remains responsible