molecule-core/canvas/src/components
Hongming Wang 26b5b21238 Fix CommunicationOverlay rate-limit storm: cap fan-out + gate on visibility
User report 2026-05-04: 8+ workspace tenant (Design Director + 6 sub-agents
+ 3 standalones) saw sustained 429s in canvas console hitting
/workspaces/<id>/activity?limit=5. Server-side rate limit is 600 req/min/IP.

Three compounding issues in CommunicationOverlay:
1. Polled regardless of visibility — collapsed panel still hammered the API
2. 10s cadence — 6 req every 10s = 36 req/min from this overlay alone
3. Fan-out cap of 6 workspaces — scaled linearly with workspace count

Fix:
- Gate setInterval on `visible` (effect re-runs when collapsed/expanded)
- Cadence 10s → 30s
- Fan-out cap 6 → 3

Combined: ~36 req/min worst case → 6 req/min worst case (6x reduction),
0 req/min when collapsed.

Tests:
- Fan-out cap: 6 online nodes mounted → exactly 3 fetches (was 6)
- Offline gate: offline workspace never polled
- Cadence: timer at 10s = no new fetch; timer at 30s = next batch fires

Each test would fail if the corresponding dial regressed.

Follow-up (out of scope): structurally right fix is to consume the
WORKSPACE_ACTIVITY WS broadcast instead of polling per-workspace. Server
already publishes the events; canvas just isn't subscribing yet.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-04 03:18:42 -07:00
..
__tests__ Fix CommunicationOverlay rate-limit storm: cap fan-out + gate on visibility 2026-05-04 03:18:42 -07:00
canvas fix(canvas): restore text-white on saturated buttons + close zinc gaps 2026-05-03 02:04:20 -07:00
settings fix(canvas): add role=status + aria-live to remaining loading states 2026-05-03 07:11:48 -07:00
tabs canvas/{OrgImportPreflightModal,SkillsTab}: hover sweep + custom-source focus ring 2026-05-03 22:28:41 -07:00
ui fix(canvas/a11y): add aria-hidden to 6 decorative SVGs + aria-label to OrgTokensTab input 2026-04-24 12:40:52 +00:00
A2ATopologyOverlay.tsx fix(canvas): A2ATopologyOverlay re-fetch storm hammering /activity → 429 2026-05-03 23:39:36 -07:00
ApprovalBanner.tsx fix(canvas): ApprovalBanner Approve/Deny button polish 2026-05-03 12:56:00 -07:00
AuditTrailPanel.tsx fix(canvas): restore text-white on saturated buttons + close zinc gaps 2026-05-03 02:04:20 -07:00
AuthGate.tsx feat(canvas): warm-paper theme + Tailwind v4 migration 2026-05-03 01:43:55 -07:00
BatchActionBar.tsx canvas/BatchActionBar: wire Esc to clear selection (matches button title) 2026-05-03 16:31:23 -07:00
BundleDropZone.tsx canvas/BundleDropZone: theme-flip drag overlay + announce import + reduced-motion 2026-05-03 17:26:15 -07:00
Canvas.tsx fix(canvas): wire ReactFlow colorMode to resolvedTheme 2026-05-03 04:11:35 -07:00
CommunicationOverlay.tsx Fix CommunicationOverlay rate-limit storm: cap fan-out + gate on visibility 2026-05-04 03:18:42 -07:00
ConfirmDialog.tsx fix(canvas): ConfirmDialog hover + focus polish 2026-05-03 12:28:24 -07:00
ConsoleModal.tsx canvas/ConsoleModal: fix no-op hovers + add Copy success feedback 2026-05-03 16:58:31 -07:00
ContextMenu.tsx canvas/ContextMenu: clamp position to viewport + semantic focus ring 2026-05-03 14:40:18 -07:00
ConversationTraceModal.tsx fix(canvas): restore text-white on saturated buttons + close zinc gaps 2026-05-03 02:04:20 -07:00
CookieConsent.tsx canvas/CookieConsent: stop pretending to be a modal + fix link/button focus 2026-05-03 15:37:06 -07:00
CreateWorkspaceDialog.tsx canvas/CreateWorkspaceDialog: hover sweep + semantic placeholders + focus rings 2026-05-03 22:56:33 -07:00
DeleteCascadeConfirmDialog.tsx canvas/DeleteCascadeConfirmDialog: fix Cancel no-op hover + Delete light hover + focus rings 2026-05-03 17:53:29 -07:00
EmptyState.tsx fix(canvas): restore text-white on saturated buttons + close zinc gaps 2026-05-03 02:04:20 -07:00
ErrorBoundary.tsx fix(canvas): restore text-white on saturated buttons + close zinc gaps 2026-05-03 02:04:20 -07:00
ExternalConnectModal.tsx feat(external-connect): comprehensive setup — fix Claude Code channel snippet + add per-tab Help section 2026-05-03 17:46:55 -07:00
Legend.tsx canvas/Legend: focus rings + 24x24 close-button touch target 2026-05-03 16:04:04 -07:00
MemoryInspectorPanel.tsx fix(canvas): restore text-white on saturated buttons + close zinc gaps 2026-05-03 02:04:20 -07:00
MissingKeysModal.tsx fix(canvas): restore text-white on saturated buttons + close zinc gaps 2026-05-03 02:04:20 -07:00
OnboardingWizard.tsx canvas/OnboardingWizard: theme-flip colors + fix hover traps + focus rings 2026-05-03 18:49:19 -07:00
OrgImportPreflightModal.tsx canvas/{OrgImportPreflightModal,SkillsTab}: hover sweep + custom-source focus ring 2026-05-03 22:28:41 -07:00
PricingTable.tsx fix(canvas): restore text-white on saturated buttons + close zinc gaps 2026-05-03 02:04:20 -07:00
ProviderModelSelector.tsx feat(canvas): warm-paper theme + Tailwind v4 migration 2026-05-03 01:43:55 -07:00
ProvisioningTimeout.tsx fix(canvas): restore text-white on saturated buttons + close zinc gaps 2026-05-03 02:04:20 -07:00
SearchDialog.tsx canvas/SearchDialog: auto-highlight first match + semantic placeholder 2026-05-03 15:09:01 -07:00
SidePanel.tsx fix(canvas): chat bubble + sub-tab contrast in light theme 2026-05-03 09:58:18 -07:00
Spinner.tsx
StatusDot.tsx fix(canvas): a11y fixes + budget_used TypeScript guard + orgs-page test fix (#1367) 2026-04-21 11:08:24 +00:00
TemplatePalette.tsx fix(canvas): restore text-white on saturated buttons + close zinc gaps 2026-05-03 02:04:20 -07:00
TermsGate.tsx canvas/TermsGate: stop hiding the dialog from screen readers + a11y polish 2026-05-03 18:21:42 -07:00
ThemeToggle.tsx feat(canvas): warm-paper theme + Tailwind v4 migration 2026-05-03 01:43:55 -07:00
Toaster.tsx canvas/Toaster: add Esc dismiss + focus-visible ring + larger touch target 2026-05-03 13:55:24 -07:00
Toolbar.tsx fix(canvas): Toolbar contrast + focus rings 2026-05-03 11:26:28 -07:00
Tooltip.tsx a11y(canvas): Tooltip Esc-to-dismiss (WCAG 1.4.13) 2026-05-03 13:23:08 -07:00
WorkspaceNode.tsx fix(canvas): WorkspaceNode + tier-config contrast in light theme 2026-05-03 10:28:49 -07:00
WorkspaceUsage.tsx feat(canvas): warm-paper theme + Tailwind v4 migration 2026-05-03 01:43:55 -07:00