molecule-core/canvas/src/lib
Molecule AI Fullstack Engineer 6200a11048
All checks were successful
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 10s
sop-tier-check / tier-check (pull_request) Successful in 13s
audit-force-merge / audit (pull_request) Successful in 8s
test(canvas/lib): add hydrate.test.ts — 7 cases for exponential-backoff canvas hydration
Tests canvas/src/lib/hydrate.ts: hydrateCanvas() with exponential backoff retry.

Cases:
1. Success on first attempt → { error: null }
2. Viewport fetch failure is non-fatal → store still hydrates
3. Success after 1 retry → onRetrying(1) called once, result { error: null }
4. onRetrying called correctly on each failed attempt
5. All attempts fail → error message after MAX_RETRIES
6. onRetrying called MAX_RETRIES-1 times before final exhausted attempt
7. Total elapsed time ≈ sum of exponential delays (1s + 2s = 3s)

Each attempt makes 2 parallel api.get calls (workspaces + viewport); mocks
set up per parallel-call to avoid Promise.all consuming wrong mock slots.

Issue: #701

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-12 09:46:29 +00:00
..
__tests__ test(canvas/lib): add hydrate.test.ts — 7 cases for exponential-backoff canvas hydration 2026-05-12 09:46:29 +00:00
api feat(canvas): SaaS cross-origin — slug header + cookie credentials (Phase F) 2026-04-14 20:08:39 -07:00
validation fix(ci): handle merge_group + shallow-clone BASE in secret-scan 2026-04-26 14:08:19 -07:00
api.ts fix(canvas): consolidate platform-auth headers via shared helper (#178) 2026-05-07 14:36:02 -07:00
auth.ts fix(canvas): consume CP logout_url to break the SSO re-auth loop 2026-05-05 12:21:49 -07:00
billing.ts fix(canvas): apply flat-rate pricing copy for Phase 34 launch (Issue #1833) 2026-04-24 17:54:23 +00:00
canvas-actions.ts initial commit — Molecule AI platform 2026-04-13 11:55:37 -07:00
credits.ts feat(canvas): warm-paper theme + Tailwind v4 migration 2026-05-03 01:43:55 -07:00
deploy-preflight.ts review: drop destructive Override + single-fetch configuredKeys 2026-05-01 13:40:58 -07:00
design-tokens.ts feat(canvas): render misconfigured workspaces with the configuration_status from agent_card 2026-05-04 15:14:40 -07:00
hydrate.ts initial commit — Molecule AI platform 2026-04-13 11:55:37 -07:00
palette-context.tsx test(canvas): add palette-context coverage (9 cases) for #568 2026-05-11 21:21:00 +00:00
runtime-names.ts initial commit — Molecule AI platform 2026-04-13 11:55:37 -07:00
runtimeProfiles.ts refactor(canvas): remove RUNTIME_PROFILES.hermes — value flows server-side now (#2054 phase 3) 2026-04-26 07:12:44 -07:00
services.ts refactor(secrets): strip Service dropdown from Add-Key form 2026-04-22 16:41:43 -07:00
tenant.ts fix(canvas): align tier text contracts with 4-tier reality (T1/T2/T3/T4) 2026-05-03 05:56:18 -07:00
theme-cookie.ts feat(canvas): warm-paper theme + Tailwind v4 migration 2026-05-03 01:43:55 -07:00
theme-provider.tsx feat(canvas): warm-paper theme + Tailwind v4 migration 2026-05-03 01:43:55 -07:00
theme.ts feat(canvas): warm-paper theme + Tailwind v4 migration 2026-05-03 01:43:55 -07:00
utils.ts chore(canvas): initialize shadcn/ui — components.json + cn utility 2026-04-18 07:57:17 -07:00
ws-close.ts fix(canvas): Legend avoids TemplatePalette + silence WS handshake races 2026-04-23 16:03:01 -07:00
ws-url.ts fix: code review findings — token UI, auth hardening, WS dedup 2026-04-16 10:42:26 -07:00