Commit Graph

588 Commits

Author SHA1 Message Date
7a511969bc Merge PR #617: resolve conflict in importer_test.go — keep all tests from both branches
All checks were successful
Secret scan / Scan diff for credential-shaped strings (push) Successful in 2s
2026-05-12 02:44:16 +00:00
f6bc90bc43 Merge pull request 'test(canvas): add WorkspaceNode component coverage (51 cases, closes #639)' (#642) from fix/issue-639-workspacenode-test-coverage into staging
All checks were successful
Secret scan / Scan diff for credential-shaped strings (push) Successful in 6s
2026-05-12 02:33:07 +00:00
3d863acdf2 Merge pull request 'fix(canvas/searchdialog): fix 2 pre-existing test failures' (#640) from fix/canvas-searchdialog-test-fixtures into staging
All checks were successful
Secret scan / Scan diff for credential-shaped strings (push) Successful in 12s
2026-05-12 02:28:57 +00:00
5c23498458 test(canvas): add WorkspaceNode component coverage (51 cases, closes #639)
All checks were successful
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 15s
sop-tier-check / tier-check (pull_request) Successful in 16s
audit-force-merge / audit (pull_request) Successful in 7s
51 test cases across 8 describe blocks:
- render: name, role, tier badges, runtime label, skills, active task, offline banner
- status states: online, offline, provisioning, paused, degraded, failed, not_configured
- interactions: click select, shift-click multi, double-click chat, context menu, drag-over, keyboard, needsRestart
- layout: sub badge, needsRestart banner
- selection: single, multi, hover class
- accessibility: role, tabIndex, aria-pressed, aria-label, handle labels

Fixes Zustand useSyncExternalStore mock by using inline mock pattern
(vi.fn with captured closure _storeSnap) instead of module-level const.
Adds getState() to mock for restartWorkspace which bypasses selector.
Fixes Position.Top/Bottom mock values, multi role=button ambiguity
via cardButton() helper, and online status empty-label assertion.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-12 02:27:19 +00:00
a95859dcd6 fix(canvas/searchdialog): fix 2 pre-existing test failures
All checks were successful
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 18s
sop-tier-check / tier-check (pull_request) Successful in 18s
audit-force-merge / audit (pull_request) Successful in 14s
Two bugs in the test suite for SearchDialog.tsx:

1. Zustand-compatible mock: the old vi.fn-only mock updated
   mockStoreState.searchOpen directly without notifying Zustand's
   useSyncExternalStore subscriber, so the Cmd+K test opened the
   dialog but the component never re-rendered (body stayed <div />).
   Fix: add subscribe() + getState() to the mock so React flushes
   the re-render when setSearchOpen fires. Also add act() wrapper
   around the keydown event for additional safety.

2. Stale React state: fireEvent.change did not reliably flush the
   onChange → query state update before ArrowDown fired, causing the
   component to read stale filtered/nodes state. Fix: manually set
   input.value, fire onChange inside act(), then call rerender() to
   force the component to see the new query before keyboard events.

Affected tests:
- "clears the query when Cmd+K opens the dialog" (was: body=<div />)
- "Enter selects the highlighted workspace" (was: selected n2 not n1)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-12 02:08:25 +00:00
95a074aabe Merge pull request 'test(canvas/chat): add AttachmentViews coverage (16 cases)' (#587) from fix/582-attachmentviews-tests into staging
All checks were successful
Secret scan / Scan diff for credential-shaped strings (push) Successful in 6s
2026-05-12 02:01:40 +00:00
5ea0d72bad Merge pull request 'test(canvas): add FilesTab + BudgetSection coverage — fixes focus-visible regression (closes #608)' (#614) from fix/608-filesTab-focusTest into staging
All checks were successful
Secret scan / Scan diff for credential-shaped strings (push) Successful in 3s
2026-05-12 01:52:09 +00:00
306dd44b00 Merge pull request 'test(canvas): fix ApprovalBanner test isolation + add EmptyState tests' (#566) from fix/545-approvalbanner-isolation into staging
All checks were successful
Secret scan / Scan diff for credential-shaped strings (push) Successful in 4s
2026-05-12 01:51:55 +00:00
575c0dd4db Merge pull request 'test(canvas): add palette-context coverage (9 cases)' (#570) from fix/568-palette-context-tests into staging
All checks were successful
Secret scan / Scan diff for credential-shaped strings (push) Successful in 5s
2026-05-12 01:51:06 +00:00
e3f1c000b4 test(canvas): add 44-case MemoryTab test suite (closes #519) (#550)
All checks were successful
Secret scan / Scan diff for credential-shaped strings (push) Successful in 4s
Co-authored-by: Molecule AI Fullstack Engineer <fullstack-engineer@agents.moleculesai.app>
Co-committed-by: Molecule AI Fullstack Engineer <fullstack-engineer@agents.moleculesai.app>
2026-05-12 01:49:55 +00:00
4bc1ea6987 test(canvas): fix ApprovalBanner spy-chain + add EmptyState coverage
All checks were successful
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 2s
sop-tier-check / tier-check (pull_request) Successful in 4s
audit-force-merge / audit (pull_request) Successful in 3s
Fix test isolation in ApprovalBanner: replace vi.spyOn per-test with
module-level vi.hoisted + vi.mock so the mock is stable across tests.

Add EmptyState.test.tsx covering:
- Loading/empty/template-fetched states
- Template grid rendering (name, tier badge, model label)
- Deploy-on-click
- Create blank workspace (POST, loading, error, retry, canvas-store wiring)
- Rendering (welcome, tips, OrgTemplatesSection)

Fix vi.hoisted pattern for multiple vi.mock calls: use a single
vi.hoisted() returning all mock fns as m.<field>, then reference m.<field>
inside each vi.mock factory. This avoids "Cannot access before
initialization" errors that arise when vi.hoisted factories are called
before module-level vi.mock hoisting completes.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-12 01:49:03 +00:00
8800a24654 test(canvas): AttachmentLightbox 18 cases + test(platform): buildBundleConfigFiles + nilIfEmpty 11 cases (closes #598, #592)
Some checks failed
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 14s
sop-tier-check / tier-check (pull_request) Failing after 13s
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-12 00:33:56 +00:00
0c4e4f6001 test(canvas): add FilesTab + BudgetSection coverage — fixes focus-visible regression
All checks were successful
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 21s
audit-force-merge / audit (pull_request) Successful in 3s
Add two test files that supersede the failing version in PR #611:

FilesTab.test.tsx (25 cases):
- NotAvailablePanel: heading, mono runtime, Chat tab hint, SVG aria-hidden,
  layout classes
- FilesToolbar: directory selector, all four options, setRoot on change,
  file count display, New/Upload/Clear conditional on /configs vs
  /workspace/home/plugins, aria-labels on all buttons, click callbacks

BudgetSection.test.tsx (14 cases, new path tabs/__tests__/):
- Loading indicator, fetch errors, 402 as exceeded banner
- Used/limit stats, unlimited display, remaining credits
- Progress bar cap at 100%, bar hidden for unlimited
- Exceeded banner on 402, clears after save
- Save errors, input update after save, null for cleared input
- Saving state while patch in flight
- isApiError402 regression coverage

Fixes #608: removes the overly-prescriptive focus-visible:ring-2 test
(PR #611 added a test for a CSS class FilesToolbar does not implement).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-12 00:23:49 +00:00
0411f7ffbf Merge pull request 'test(canvas/FilesTab): add NotAvailablePanel + FilesToolbar coverage (29 cases)' (#600) from fix/593-filetab-tests into staging
All checks were successful
Secret scan / Scan diff for credential-shaped strings (push) Successful in 13s
2026-05-12 00:03:56 +00:00
12f14e3e28 test(canvas/FilesTab): add NotAvailablePanel + FilesToolbar coverage (29 cases)
Some checks failed
sop-tier-check / tier-check (pull_request) Failing after 12s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 14s
audit-force-merge / audit (pull_request) Successful in 16s
NotAvailablePanel (12 cases):
- Heading, description text, runtime name display, SVG icon with
  aria-hidden, mono font for runtime, Chat tab guidance
- Full-height flex container class names
- h3 heading role, SVG aria-hidden, descriptive paragraph
- Short and complex runtime names

FilesToolbar (17 cases):
- Directory select with aria-label, file count display
- Export and Refresh buttons always visible
- New/Upload/Clear shown only when root="/configs", hidden for
  /workspace, /home, /plugins
- setRoot called on directory change
- onNewFile, onDownloadAll, onClearAll, onRefresh called on click
- Hidden file input present with aria-label when on /configs
- All buttons have accessible names

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-11 23:13:32 +00:00
b2fa3bc937 test(canvas): fix test infrastructure — cleanup isolation, accessibility queries, role= textbox
All checks were successful
audit-force-merge / audit (pull_request) Successful in 22s
Scope:
- form-inputs.test.tsx (new): 35 cases covering TextInput, NumberInput,
  Toggle, TagList, Section. Section coverage includes aria-expanded,
  aria-controls, content id, and aria-hidden indicator span.
- form-inputs.tsx (Section): add aria-expanded + aria-controls to the
  toggle button and a matching id on the collapsible content region;
  aria-hidden on the ▾/▸ indicator so screen readers skip it.

Test isolation fixes (afterEach(cleanup) missing → DOM element accumulation):
- ApprovalBanner.test.tsx
- StatusDot.test.tsx        — also adds { hidden: true } to getByRole("img")
                               since @testing-library/dom v10+ excludes
                               aria-hidden elements from accessible queries
- ValidationHint.test.tsx  — also fixes checkmark test that assumed
                               ✓ + "Valid format" were one text node
- TopBar.test.tsx
- RevealToggle.test.tsx
- StatusBadge.test.tsx

Tooltip.test.tsx:
- Adds vi.useFakeTimers() beforeEach / vi.useRealTimers() afterEach
  (tests called vi.advanceTimersByTime without fake timers)
- Fixes aria-describedby test to check the wrapper div, not the button

KeyValueField.tsx:
- Adds role="textbox" to the <input> element so getByRole("textbox")
  finds it in @testing-library/dom v10 (password inputs lack implicit
  textbox role in jsdom).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-11 23:00:46 +00:00
0dd24f2f2a test(canvas/chat): add AttachmentViews coverage (16 cases)
Some checks failed
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 14s
sop-tier-check / tier-check (pull_request) Failing after 14s
16-case coverage for AttachmentViews.tsx:
- PendingAttachmentPill: name, B/KB/MB size, aria-label, onRemove, one-button
- AttachmentChip: name, download glyph, size, no-size guard, title tooltip,
  onDownload, tone=user/agent accent class, one-button

Closes #582.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-11 22:14:18 +00:00
4a41646b1a test(canvas): add palette-context coverage (9 cases) for #568
All checks were successful
audit-force-merge / audit (pull_request) Successful in 6s
Implement MobileAccentProvider + usePalette + pure helpers and their
22-test suite.

Coverage:
- MOL_LIGHT / MOL_DARK singletons (never mutated)
- getPalette: accent=null → base unchanged
- getPalette: accent=base.accent → identity guard (no copy)
- getPalette: accent="#custom" → accent+online overridden
- normalizeStatus: all status → correct colour class
- tierCode: tier number → display string
- MobileAccentProvider: renders children
- usePalette(false): returns base palette for current theme
- usePalette(true): respects theme dark/light mode

Files:
- src/lib/palette-context.tsx (new — MobileAccentProvider + usePalette hook)
- src/lib/__tests__/palette-context.test.tsx (new — 22 tests)

Closes #568.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-11 21:21:00 +00:00
25fbcaf6da fix(canvas/a11y): WCAG 2.4.7 focus-visible rings on remaining interactive buttons
Some checks failed
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 19s
sop-tier-check / tier-check (pull_request) Failing after 15s
audit-force-merge / audit (pull_request) Successful in 17s
- MissingKeysModal: backdrop gains aria-label (screen-reader dismiss);
  Save, Open Settings, Cancel Deploy, Deploy/Add Keys buttons gain
  focus-visible ring
- AuditTrailPanel: filter pills, Refresh, Load More buttons gain
  focus-visible ring
- MemoryInspectorPanel: Clear search, Refresh, row expand, Forget
  buttons gain focus-visible ring
- TemplatePalette: Org Templates toggle, Refresh org, Import org,
  Import Agent Folder, Template Palette toggle, Refresh templates
  buttons gain focus-visible ring
- PricingTable: CTA button gains focus-visible ring

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-11 07:31:50 +00:00
9abbe82b15 fix(canvas): toYaml always emits tools: [] and serializes nested lists
All checks were successful
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 5s
sop-tier-check / tier-check (pull_request) Successful in 17s
audit-force-merge / audit (pull_request) Successful in 14s
Two bugs in yaml-utils.ts toYaml():

1. tools: [] was only emitted when config.tools.length > 0,
   but the test asserts it's always present. Add blank-line
   separator + unconditional list("tools", ...) so MINIMAL_CONFIG
   with tools: [] renders correctly.

2. Nested list values (e.g. runtime_config.required_env: [KEY])
   were serialized as "  required_env: KEY" (stringification of the
   array) instead of a YAML list block. Fix obj() to detect
   Array.isArray(sv) and emit a list block with 4-space indent.

Closes #269.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 11:05:02 +00:00
814c7cc460 test(canvas): add structural tests for TIER_CONFIG and COMM_TYPE_LABELS
Some checks failed
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 4s
sop-tier-check / tier-check (pull_request) Failing after 4s
Both are data constants exported from design-tokens.ts — TIER_CONFIG
maps tier levels 1-4 to label/color/border CSS classes, and
COMM_TYPE_LABELS maps a2a_send/a2a_receive/task_update to display
labels. No logic to test; structural shape coverage.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 05:51:40 +00:00
3c934dfce0 feat(canvas): document all keyboard shortcuts and interactions in the help dialog
Some checks failed
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 4s
sop-tier-check / tier-check (pull_request) Failing after 4s
Issue: MEDIUM priority from canvas accessibility audit (2026-05-09).
The existing Quick Start help dialog in Toolbar omitted most keyboard shortcuts
from useKeyboardShortcuts.ts — users couldn't discover them visually.

Changes:
- Toolbar.tsx: enhance the help dialog (role="dialog") to include all
  documented shortcuts: Esc, Enter, Shift+Enter, Cmd+], Cmd+[, Z, plus
  mouse interaction tips for Palette, Right-click, Dbl-click, Shift+click.
  Renamed from "Quick start" to "Shortcuts & tips".
- canvas-audit-items.md: update Keyboard Shortcuts section from PARTIAL
  to complete; mark help dialog item as done.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 05:26:06 +00:00
3884580aaa test(canvas): add cssVar unit tests for theme token → CSS variable mapping
Some checks failed
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 4s
sop-tier-check / tier-check (pull_request) Failing after 5s
audit-force-merge / audit (pull_request) Successful in 4s
Covers all ColorToken variants (surface, ink, accent, good, bad, warm,
bg, warn, plasma), pure-function property (deterministic output).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 05:06:42 +00:00
02a1de75aa Merge pull request 'test(canvas): add pure-function tests for deriveWsBaseUrl, statusDotClass, and readThemeCookie' (#238) from test/canvas-utility-pure-tests into main
Some checks failed
Secret scan / Scan diff for credential-shaped strings (push) Successful in 5s
publish-workspace-server-image / build-and-push (push) Failing after 11s
2026-05-10 05:03:53 +00:00
8fff99c525 Merge pull request 'test(canvas): add pure-function tests for resolveRuntime and canvas-topology utilities' (#236) from test/canvas-preflight-utils-tests into main
Some checks failed
publish-workspace-server-image / build-and-push (push) Has been cancelled
Secret scan / Scan diff for credential-shaped strings (push) Has been cancelled
2026-05-10 05:03:50 +00:00
e5da324a53 Merge pull request 'test(canvas): add pure-function tests for runtimeProfiles, getIcon, and createMessage' (#235) from test/canvas-runtimeprofiles-tests into main
Some checks failed
publish-workspace-server-image / build-and-push (push) Has been cancelled
Secret scan / Scan diff for credential-shaped strings (push) Has been cancelled
2026-05-10 05:03:47 +00:00
f72a5ecc2c Merge pull request 'test(canvas/config): add pure-function tests for parseYaml and toYaml' (#233) from test/canvas-yaml-utils-tests into main
Some checks failed
publish-workspace-server-image / build-and-push (push) Has been cancelled
Secret scan / Scan diff for credential-shaped strings (push) Has been cancelled
2026-05-10 05:03:29 +00:00
10e60d66cb test(canvas): add pure-function tests for deriveWsBaseUrl, statusDotClass, and readThemeCookie
Some checks failed
sop-tier-check / tier-check (pull_request) Failing after 4s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 5s
audit-force-merge / audit (pull_request) Successful in 6s
- ws-url.test.ts: deriveWsBaseUrl — all 4 priority paths tested:
  NEXT_PUBLIC_WS_URL (strips /ws suffix), NEXT_PUBLIC_PLATFORM_URL
  (http→ws, https→wss), window.location (https→wss, http→ws),
  precedence over lower-priority paths.
- statusDotClass.test.ts: all STATUS_CONFIG entries (online/offline/paused/
  degraded/failed/provisioning/not_configured), fallback to bg-zinc-500,
  case-sensitivity, purity.
- theme-cookie.test.ts: readThemeCookie — valid values (light/dark/system),
  undefined/empty fallback, invalid value handling, case-sensitivity,
  purity.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 04:46:35 +00:00
dc0c3e7a27 test(canvas): add pure-function tests for resolveRuntime and canvas-topology utilities
Some checks failed
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 4s
sop-tier-check / tier-check (pull_request) Failing after 4s
audit-force-merge / audit (pull_request) Successful in 5s
- preflight-resolveRuntime.test.ts: resolveRuntime from deploy-preflight.ts
  covering explicit runtime-map entries, identity fallback, -default suffix
  stripping, edge cases (empty string, multiple suffixes).
- canvas-topology-pure.test.ts: sortParentsBeforeChildren (topological
  sort, orphan handling, no-op, non-mutating), defaultChildSlot (2-col
  grid), childSlotInGrid (variable-size siblings, uniform-grid fallback),
  parentMinSize (0–5 children, grid dimensions), parentMinSizeFromChildren
  (variable sizes, empty array, width/height correctness).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 04:46:28 +00:00
4c6cfef912 test(canvas): add pure-function tests for runtimeProfiles, getIcon, createMessage
Some checks failed
sop-tier-check / tier-check (pull_request) Failing after 4s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 4s
audit-force-merge / audit (pull_request) Successful in 4s
- runtimeProfiles.test.ts: getRuntimeProfile and provisionTimeoutForRuntime
  covering undefined/unknown runtime, overrides precedence, convenience
  equivalence.
- getIcon.test.ts: 23 cases — dirs, all FILE_ICONS extensions (.md/.yaml/.py/.ts/.tsx/.js/.json/.html/.css/.sh), fallback, case insensitivity, nested paths.
- createMessage.test.ts: role, content, id, timestamp, attachment handling,
  Object.isFrozen, key shape.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 04:46:04 +00:00
9b91bda2ed test(canvas/config): add pure-function tests for parseYaml and toYaml
Some checks failed
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 5s
sop-tier-check / tier-check (pull_request) Failing after 5s
audit-force-merge / audit (pull_request) Successful in 7s
Cover parseYaml: empty input, blanks, comments, booleans, numbers,
lists, objects, 2-level nesting (env.required pattern), round-trip.
Cover toYaml: name/desc, version/tier, runtime, runtime_config,
effort/task_budget, prompt_files/skills/tools lists, a2a/delegation/
sandbox nested blocks, null-omission, trailing newline, full round-trip.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 04:45:34 +00:00
71174544ef Revert "Re-export extractMessageText for ConversationTraceModal tests"
Some checks failed
sop-tier-check / tier-check (pull_request) Failing after 4s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 5s
This reverts the JSDoc-comment removal that happened during merge, keeping
the function exported so ConversationTraceModal.test.ts can import it.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 03:29:46 +00:00
d35403d402 test(canvas): add tests for extractMessageText and providerIdForModel
Some checks failed
sop-tier-check / tier-check (pull_request) Failing after 4s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 5s
extractMessageText (ConversationTraceModal): MCP task/task format,
params.message.parts, result.parts/root.text, plain string result,
priority order, error resilience.

providerIdForModel (MissingKeysModal): model match, no match,
whitespace trimming, undefined models, no required_env, multi-env sort.

Also exports extractMessageText from ConversationTraceModal for testing.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 02:54:54 +00:00
56950021cc test(canvas): add tests for SettingsButton and TopBar
Some checks failed
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 4s
sop-tier-check / tier-check (pull_request) Failing after 4s
SettingsButton: gear button render, aria-expanded, active class toggle,
openPanel/closePanel calls, forwardRef, Radix Tooltip mock.
TopBar: header render, canvas name display, "+ New Agent" button,
SettingsButton integration, logo aria-hidden.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 02:41:37 +00:00
6eff188569 test(canvas): add tests for RevealToggle, KeyValueField, TestConnectionButton
Some checks failed
sop-tier-check / tier-check (pull_request) Failing after 5s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 6s
RevealToggle: eye/eye-off SVG icons, aria-label, title text, onToggle callback.
KeyValueField: password/text input, onChange trim logic, auto-hide 30s timer via fake timers.
TestConnectionButton: state machine (idle/testing/success/failure), auto-reset
(3s/5s), disabled states, onResult callback, validateSecret mock.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 02:30:22 +00:00
6b3ab63bc0 test(canvas): add tests for StatusBadge, ValidationHint, Spinner
Some checks failed
sop-tier-check / tier-check (pull_request) Failing after 10s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 10s
StatusBadge: all 3 status variants, aria-label, role=status, config class names.
ValidationHint: error/valid/neutral states, warning icon, valid icon, class names.
Spinner: sm/md/lg size classes, aria-hidden, motion-safe:animate-spin.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 02:15:02 +00:00
2549c4cbcc test(canvas): add component tests for SearchDialog and ContextMenu
Some checks failed
sop-tier-check / tier-check (pull_request) Failing after 4s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 4s
SearchDialog: Cmd+K/Ctrl+K shortcut, Escape close, input focus via rAF,
text filtering by name/role/status, arrow-key navigation, Enter select,
aria-combobox/listbox/option attributes, footer workspace count.

ContextMenu: null guard, node header, outside-click/Escape/Tab close,
conditional items (online vs offline vs paused), team items, dividers,
danger Delete styling, keyboard navigation, Pause/Resume API calls.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 02:09:43 +00:00
b23ca65d35 test(canvas): add component tests for OnboardingWizard and PurchaseSuccessModal
Some checks failed
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 4s
sop-tier-check / tier-check (pull_request) Failing after 4s
OnboardingWizard: visibility gates, 4-step flow, skip/dismiss,
localStorage persistence, progress bar, aria-live announcements,
auto-advance from welcome→api-key on nodes change.

PurchaseSuccessModal: URL param gating, portal rendering,
item name display, 5s auto-dismiss (fake timers), backdrop/Escape
close, replaceState URL stripping, aria-modal/focus management.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 01:50:29 +00:00
ad1a4a2d49 test(canvas): add component tests for ThemeToggle and BundleDropZone
Some checks failed
sop-tier-check / tier-check (pull_request) Failing after 4s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 4s
- ThemeToggle.test.tsx (13 tests): renders radiogroup with 3 options,
  aria radiogroup/radio semantics, aria-checked per option, setTheme
  calls on click, custom className prop
- BundleDropZone.test.tsx (11 tests): hidden file input + keyboard
  accessibility (WCAG 2.1.1), drag-over state, import success/error
  toast, auto-clear timeouts (3s error, 4s success), importing
  status indicator, file input reset on re-select

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 01:18:10 +00:00
29c6be81bd test(canvas): add component tests for Tooltip, Legend, TermsGate, ApprovalBanner
Some checks failed
sop-tier-check / tier-check (pull_request) Failing after 12s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 14s
Adds vitest tests for 4 previously untested canvas components:

- Tooltip.test.tsx (17 tests): portal rendering, 400ms hover delay,
  keyboard focus reveal, Esc dismiss (WCAG 1.4.13), aria-describedby
- Legend.test.tsx (10 tests): open/closed state, localStorage persistence,
  palette-offset positioning, status/tier/comm items, aria labels
- TermsGate.test.tsx (14 tests): loading→accepted, pending modal (WCAG
  2.4.3 focus), accept flow, error state, children always rendered
- ApprovalBanner.test.tsx (15 tests): empty state, approval card render,
  polling cleanup, approve/deny decisions, toast notifications, error recovery

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 00:44:45 +00:00
858f996196 test(canvas): add StatusDot component tests
Some checks failed
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 28s
sop-tier-check / tier-check (pull_request) Failing after 27s
Add 10 tests for StatusDot covering:
- All known STATUS_CONFIG statuses (online, offline, degraded,
  failed, paused, not_configured, provisioning)
- Correct color class applied per status
- Glow class applied when declared in STATUS_CONFIG
- motion-safe:animate-pulse on provisioning status
- Fallback to bg-zinc-500 for unknown status
- size prop (sm/md) applies correct Tailwind dimension class
- aria-hidden="true" for accessibility tree isolation

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 00:25:46 +00:00
Molecule AI Core Platform Lead
ad9e11d8c4 Merge remote-tracking branch 'origin/main' into trig-200
All checks were successful
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 4s
sop-tier-check / tier-check (pull_request) Successful in 3s
audit-force-merge / audit (pull_request) Successful in 4s
2026-05-10 00:08:44 +00:00
Molecule AI Core Platform Lead
306262a315 Merge remote-tracking branch 'origin/main' into trig-199 2026-05-10 00:02:43 +00:00
4baf60f01d fix(canvas): correct KeyboardShortcutsDialog descriptions + fix min-clamp test expectations
Some checks failed
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 8s
sop-tier-check / tier-check (pull_request) Failing after 7s
- Fix arrow-key nudge description: was "20px/100px" (wrong), now "10px/50px" (matches useKeyboardShortcuts)
- Add Cmd/Ctrl+Arrow resize shortcut row to dialog (missing since PR #192)
- Fix 3 tests in useKeyboardShortcuts.test.tsx that asserted shrink below min dimensions:
  "resizes height down" expected height:100, clamped to 110 (node starts at minHeight)
  "resizes width down" expected width:200, clamped to 210 (node starts at minWidth)
  "2px step with Shift" expected height:108, clamped to 110 (minHeight wins)
  All three tests updated to assert clamped values with explanatory comments.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 00:01:40 +00:00
1492b40b38 ci(docker): pin base image digests in all Dockerfiles
Some checks failed
sop-tier-check / tier-check (pull_request) Failing after 28s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 37s
Pins all FROM image tags to exact SHA256 digests for reproducible
builds. Without digest pinning, a registry push of a new image to the
same tag can silently change the layer content between builds — a
supply-chain risk especially for prod-deployed images.

Pinned images (7 Dockerfiles):
- golang:1.25-alpine → sha256:c4ea15b... (workspace-server/Dockerfile,
  Dockerfile.dev, Dockerfile.tenant, tests/harness/cp-stub/Dockerfile)
- alpine:3.20 → sha256:c64c687c... (workspace-server/Dockerfile,
  tests/harness/cp-stub/Dockerfile)
- node:20-alpine → sha256:afdf982... (workspace-server/Dockerfile.tenant)
- node:22-alpine → sha256:cb15fca... (canvas/Dockerfile)
- python:3.11-slim → sha256:e78299e... (workspace/Dockerfile)
- nginx:1.27-alpine → sha256:62223d6... (tests/harness/cf-proxy/Dockerfile)

Note: docker-compose.yml service images (postgres, redis, clickhouse,
litellm, ollama) are intentionally left on major-version tags — those
are runtime-pulled and updated regularly for local-dev ergonomics.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-09 23:56:39 +00:00
Molecule AI Core Platform Lead
aff8831817 Merge remote-tracking branch 'origin/main' into trig-197
All checks were successful
sop-tier-check / tier-check (pull_request) Successful in 4s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 6s
audit-force-merge / audit (pull_request) Successful in 4s
2026-05-09 23:44:38 +00:00
2da036204c test(canvas): add tests for Cmd/Ctrl+Arrow keyboard node resize
Some checks failed
sop-tier-check / tier-check (pull_request) Failing after 4s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 4s
Add 10 tests covering the Cmd/Ctrl+Arrow resize shortcut:
- ArrowUp/Down resizes height (−/+10px)
- ArrowLeft/Right resizes width (−/+10px)
- Shift modifier uses 2px step for fine control
- min-height constraint respected when shrinking
- Guard: no-op when no node selected
- Guard: skipped when modal dialog is open
- Plain arrow keys (no modifier) fire moveNode instead
- Alt+Arrow is skipped (not a resize combo)

Also extends the mock store state with `onNodesChange` and node
`width`/`height` fields needed for the resize tests.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-09 23:41:29 +00:00
4a73a72e44 test(canvas): add KeyboardShortcutsDialog a11y render tests
Some checks failed
sop-tier-check / tier-check (pull_request) Failing after 4s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 6s
Cherry-picked from feat/keyboard-shortcuts-dialog-test (99ecdd6d).
6 tests covering role=dialog, aria-modal, aria-labelledby,
no-render-when-closed, Escape-close, focus-on-open, Tab trap.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-09 23:18:14 +00:00
b837d3b065 fix(canvas): text-ink-soft → text-ink-mid for WCAG AA contrast
Replace all text-ink-soft usages across canvas components and app pages.
ink-soft (#8d92a0) on dark zinc (#0e1014) yields ~2.2:1 contrast,
failing WCAG 2.1 AA minimum of 4.5:1 for normal text.

ink-mid (#c8c2b4) on dark zinc yields ~7.6:1 — well above AA.

text-ink-mid is already the semantic token for secondary/caption text
in the warm-paper light mode; the dark-mode override was the gap.

52 files, 268 replacements. No functional change beyond contrast.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-09 23:18:14 +00:00
f5682fbb5f docs(canvas): mark keyboard node drag as done in audit
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-09 23:18:14 +00:00