@agent-native/core 0.80.2 → 0.80.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/corpus/README.md +2 -2
- package/corpus/core/CHANGELOG.md +66 -2
- package/corpus/core/docs/content/locales/ar-SA/real-time-collaboration.mdx +2 -2
- package/corpus/core/docs/content/locales/ar-SA/template-design.mdx +1 -1
- package/corpus/core/docs/content/locales/de-DE/real-time-collaboration.mdx +3 -3
- package/corpus/core/docs/content/locales/de-DE/template-design.mdx +1 -1
- package/corpus/core/docs/content/locales/es-ES/real-time-collaboration.mdx +2 -2
- package/corpus/core/docs/content/locales/es-ES/template-design.mdx +1 -1
- package/corpus/core/docs/content/locales/fr-FR/real-time-collaboration.mdx +2 -2
- package/corpus/core/docs/content/locales/fr-FR/template-design.mdx +1 -1
- package/corpus/core/docs/content/locales/hi-IN/template-design.mdx +1 -1
- package/corpus/core/docs/content/locales/ja-JP/real-time-collaboration.mdx +2 -2
- package/corpus/core/docs/content/locales/ja-JP/template-design.mdx +1 -1
- package/corpus/core/docs/content/locales/ko-KR/real-time-collaboration.mdx +2 -2
- package/corpus/core/docs/content/locales/ko-KR/template-design.mdx +1 -1
- package/corpus/core/docs/content/locales/pt-BR/real-time-collaboration.mdx +2 -2
- package/corpus/core/docs/content/locales/pt-BR/template-design.mdx +1 -1
- package/corpus/core/docs/content/locales/zh-CN/real-time-collaboration.mdx +2 -2
- package/corpus/core/docs/content/locales/zh-CN/template-design.mdx +1 -1
- package/corpus/core/docs/content/locales/zh-TW/real-time-collaboration.mdx +2 -2
- package/corpus/core/docs/content/locales/zh-TW/template-design.mdx +1 -1
- package/corpus/core/docs/content/real-time-collaboration.mdx +2 -2
- package/corpus/core/docs/content/template-design.mdx +1 -1
- package/corpus/core/package.json +3 -7
- package/corpus/core/src/action.ts +32 -0
- package/corpus/core/src/agent/durable-background.ts +32 -11
- package/corpus/core/src/agent/production-agent.ts +14 -1
- package/corpus/core/src/agent/run-loop-with-resume.ts +3 -1
- package/corpus/core/src/brand-kit/fig/index.ts +17 -37
- package/corpus/core/src/cli/index.ts +1 -1
- package/corpus/core/src/cli/mcp-config-writers.ts +187 -51
- package/corpus/core/src/cli/plan-local.ts +445 -108
- package/corpus/core/src/cli/skills.ts +32 -8
- package/corpus/core/src/client/AssistantChat.tsx +11 -1
- package/corpus/core/src/client/agent-chat.ts +12 -1
- package/corpus/core/src/client/composer/PromptComposer.tsx +100 -41
- package/corpus/core/src/client/org/OrgSwitcher.tsx +1 -1
- package/corpus/core/src/client/sharing/ShareButton.tsx +3 -27
- package/corpus/core/src/collab/presence.ts +1 -1
- package/corpus/core/src/mcp/connect-route.ts +34 -5
- package/corpus/core/src/server/action-discovery.ts +4 -0
- package/corpus/core/src/server/action-routes.ts +14 -0
- package/corpus/core/src/server/agent-chat-plugin.ts +20 -0
- package/corpus/core/src/vite/client.ts +15 -1
- package/corpus/templates/analytics/actions/dashboard-mutation-api.ts +2 -0
- package/corpus/templates/analytics/actions/update-dashboard.ts +8 -0
- package/corpus/templates/analytics/app/components/layout/Layout.tsx +1 -1
- package/corpus/templates/analytics/app/components/layout/Sidebar.tsx +117 -33
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/index.tsx +4 -0
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/types.ts +7 -0
- package/corpus/templates/analytics/changelog/2026-06-27-dashboards-can-now-nest-under-a-parent-in-the-sidebar-via-a-.md +6 -0
- package/corpus/templates/analytics/changelog/2026-06-29-analytics-pages-now-sit-closer-under-the-header-with-tighter.md +6 -0
- package/corpus/templates/assets/actions/generate-image-batch.ts +3 -0
- package/corpus/templates/assets/actions/generate-image.ts +3 -0
- package/corpus/templates/assets/changelog/2026-06-29-longer-agent-generation-window.md +6 -0
- package/corpus/templates/assets/netlify.toml +3 -3
- package/corpus/templates/assets/server/plugins/agent-chat.ts +4 -1
- package/corpus/templates/clips/app/components/capture-install-options.tsx +7 -8
- package/corpus/templates/clips/app/components/player/timestamped-comment-button.tsx +162 -0
- package/corpus/templates/clips/app/components/recorder/recorder-engine.ts +1 -1
- package/corpus/templates/clips/app/i18n/ar-SA.ts +4 -0
- package/corpus/templates/clips/app/i18n/de-DE.ts +4 -0
- package/corpus/templates/clips/app/i18n/en-US.ts +4 -0
- package/corpus/templates/clips/app/i18n/es-ES.ts +4 -0
- package/corpus/templates/clips/app/i18n/fr-FR.ts +4 -0
- package/corpus/templates/clips/app/i18n/hi-IN.ts +4 -0
- package/corpus/templates/clips/app/i18n/ja-JP.ts +4 -0
- package/corpus/templates/clips/app/i18n/ko-KR.ts +4 -0
- package/corpus/templates/clips/app/i18n/pt-BR.ts +4 -0
- package/corpus/templates/clips/app/i18n/zh-CN.ts +4 -0
- package/corpus/templates/clips/app/i18n/zh-TW.ts +4 -0
- package/corpus/templates/clips/app/routes/r.$recordingId.tsx +42 -18
- package/corpus/templates/content/AGENTS.md +12 -0
- package/corpus/templates/content/app/blocks/BuilderDocsBlocks.tsx +10 -0
- package/corpus/templates/content/app/components/editor/BubbleToolbar.tsx +1 -0
- package/corpus/templates/content/app/components/editor/ContentReferencePreview.tsx +185 -0
- package/corpus/templates/content/app/components/editor/DocumentEditor.tsx +3 -0
- package/corpus/templates/content/app/components/editor/VisualEditor.tsx +19 -0
- package/corpus/templates/content/app/components/editor/extensions/ContentReferenceNode.tsx +82 -0
- package/corpus/templates/content/app/global.css +9 -0
- package/corpus/templates/content/app/i18n/zh-TW.ts +12 -0
- package/corpus/templates/content/app/i18n-data.ts +140 -0
- package/corpus/templates/content/changelog/2026-06-29-reusable-mdx-references-now-preview-linked-local-documents-i.md +6 -0
- package/corpus/templates/content/shared/builder-docs-blocks.ts +8 -0
- package/corpus/templates/content/shared/builder-mdx.ts +141 -4
- package/corpus/templates/content/shared/nfm.ts +62 -0
- package/corpus/templates/design/.agents/skills/design-systems/SKILL.md +10 -11
- package/corpus/templates/design/AGENTS.md +5 -0
- package/corpus/templates/design/_gitignore +7 -0
- package/corpus/templates/design/actions/apply-visual-edit.ts +22 -12
- package/corpus/templates/design/actions/create-design-system.ts +15 -4
- package/corpus/templates/design/actions/create-file.ts +20 -1
- package/corpus/templates/design/actions/delete-design-system.ts +2 -2
- package/corpus/templates/design/actions/duplicate-design.ts +35 -9
- package/corpus/templates/design/actions/generate-design.ts +146 -69
- package/corpus/templates/design/actions/generate-screens.ts +51 -19
- package/corpus/templates/design/actions/get-design-snapshot.ts +5 -1
- package/corpus/templates/design/actions/get-design.ts +2 -0
- package/corpus/templates/design/actions/import-design-project.ts +28 -9
- package/corpus/templates/design/actions/import-document.ts +22 -8
- package/corpus/templates/design/actions/index-design-system-with-builder.ts +6 -153
- package/corpus/templates/design/actions/navigate.ts +105 -54
- package/corpus/templates/design/actions/set-default-design-system.ts +17 -3
- package/corpus/templates/design/actions/show-design-questions.ts +2 -0
- package/corpus/templates/design/actions/update-design.ts +2 -1
- package/corpus/templates/design/actions/view-screen.ts +12 -6
- package/corpus/templates/design/app/components/design/CanvasContextMenu.tsx +4 -4
- package/corpus/templates/design/app/components/design/DesignCanvas.tsx +159 -41
- package/corpus/templates/design/app/components/design/DesignExtensionsPanel.tsx +8 -4
- package/corpus/templates/design/app/components/design/DrawOverlay.tsx +37 -42
- package/corpus/templates/design/app/components/design/EditPanel.tsx +336 -183
- package/corpus/templates/design/app/components/design/LayersPanel.tsx +153 -34
- package/corpus/templates/design/app/components/design/MultiScreenCanvas.tsx +135 -33
- package/corpus/templates/design/app/components/design/QuestionFlow.tsx +6 -0
- package/corpus/templates/design/app/components/design/TweaksPanel.tsx +2 -1
- package/corpus/templates/design/app/components/design/inspector/AlignmentMatrix.tsx +4 -10
- package/corpus/templates/design/app/components/design/inspector/AutoLayoutMatrix.tsx +84 -43
- package/corpus/templates/design/app/components/design/inspector/ConstraintsWidget.tsx +4 -4
- package/corpus/templates/design/app/components/design/inspector/{FigmaColorPicker.tsx → DesignColorPicker.tsx} +89 -62
- package/corpus/templates/design/app/components/design/inspector/ExportSettingsPanel.tsx +14 -26
- package/corpus/templates/design/app/components/design/inspector/GradientEditor.tsx +40 -12
- package/corpus/templates/design/app/components/design/inspector/ImageFillControls.tsx +13 -4
- package/corpus/templates/design/app/components/design/inspector/SHADER_INTEGRATION.md +13 -13
- package/corpus/templates/design/app/components/design/inspector/ScrubInput.tsx +13 -9
- package/corpus/templates/design/app/components/design/inspector/ShaderControls.tsx +13 -4
- package/corpus/templates/design/app/components/design/inspector/ShaderFillsPanel.tsx +6 -6
- package/corpus/templates/design/app/components/design/inspector/{figma-icons.tsx → design-icons.tsx} +2 -2
- package/corpus/templates/design/app/components/design/inspector/index.ts +12 -12
- package/corpus/templates/design/app/components/design/inspector/scrub-input-utils.ts +5 -2
- package/corpus/templates/design/app/components/editor/PromptDialog.tsx +3 -3
- package/corpus/templates/design/app/components/layout/Layout.tsx +5 -2
- package/corpus/templates/design/app/components/layout/Sidebar.tsx +1 -1
- package/corpus/templates/design/app/components/visual-editor/CanvasCommentPins.tsx +167 -91
- package/corpus/templates/design/app/components/visual-editor/DrawOverlay.tsx +16 -3
- package/corpus/templates/design/app/components/visual-editor/SaveStatusIndicator.tsx +15 -0
- package/corpus/templates/design/app/global.css +4 -0
- package/corpus/templates/design/app/hooks/use-design-system.ts +4 -1
- package/corpus/templates/design/app/hooks/use-navigation-state.ts +38 -3
- package/corpus/templates/design/app/hooks/useDesignHotkeys.ts +9 -2
- package/corpus/templates/design/app/i18n/zh-TW.ts +22 -0
- package/corpus/templates/design/app/i18n-data.ts +527 -0
- package/corpus/templates/design/app/lib/design-systems.ts +6 -4
- package/corpus/templates/design/app/lib/design-templates.ts +15 -3
- package/corpus/templates/design/app/pages/DesignEditor.tsx +641 -158
- package/corpus/templates/design/app/pages/DesignSystemSetup.tsx +42 -34
- package/corpus/templates/design/app/pages/VisualEdit.tsx +100 -0
- package/corpus/templates/design/app/root.tsx +42 -9
- package/corpus/templates/design/app/routes/visual-edit.tsx +7 -0
- package/corpus/templates/design/changelog/2026-06-28-live-cursors-now-keep-names-beside-a-cleaner-pointer-marker.md +1 -1
- package/corpus/templates/design/changelog/2026-06-28-mode-switching-now-lives-in-a-compact-bottom-right-icon-dock.md +1 -1
- package/corpus/templates/design/changelog/2026-06-28-visual-code-design-mode.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-design-generation-prompts-now-show-connect-ai-before-sending.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-design-mode-top-chrome-now-groups-collaborators-preview-shar.md +1 -1
- package/corpus/templates/design/changelog/2026-06-29-fixed-design-editor-exports-and-gradient-edits-so-multi-scre.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-longer-hosted-agent-turns.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-png-export-handles-modern-css-color-functions-more-reliably.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-png-export-now-ignores-duplicate-clicks-while-a-download-is-.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-public-visual-edit-and-shared-design-links-now-invite-visito.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-visual-edit-actions-now-reject-missing-design-targets-before.md +6 -0
- package/corpus/templates/design/e2e/README.md +71 -0
- package/corpus/templates/design/e2e/global-setup.ts +157 -0
- package/corpus/templates/design/e2e/helpers.ts +148 -0
- package/corpus/templates/design/netlify.toml +3 -4
- package/corpus/templates/design/package.json +5 -1
- package/corpus/templates/design/playwright.config.ts +51 -0
- package/corpus/templates/design/server/handlers/index-design-system-with-builder.ts +121 -0
- package/corpus/templates/design/server/handlers/uploads.ts +89 -38
- package/corpus/templates/design/server/lib/builder-design-system-proxy.ts +181 -0
- package/corpus/templates/design/server/lib/coding-handoff.ts +33 -4
- package/corpus/templates/design/server/lib/design-export.ts +35 -8
- package/corpus/templates/design/server/plugins/agent-chat.ts +4 -0
- package/corpus/templates/design/server/plugins/auth.ts +10 -1
- package/corpus/templates/design/server/routes/api/index-design-system-with-builder.post.ts +1 -0
- package/corpus/templates/design/shared/api.ts +2 -0
- package/corpus/templates/design/shared/apply-edits.ts +12 -8
- package/corpus/templates/design/shared/canvas-math.ts +19 -1
- package/corpus/templates/design/shared/code-layer.ts +87 -28
- package/corpus/templates/design/shared/generation-session.ts +1 -0
- package/corpus/templates/design/shared/resolve-tweaks.ts +4 -3
- package/corpus/templates/design/shared/shader-presets.ts +10 -0
- package/corpus/templates/design/shared/source-mode.ts +9 -0
- package/corpus/templates/design/vitest.config.ts +2 -1
- package/corpus/templates/mail/app/components/layout/AppLayout.tsx +1 -1
- package/corpus/templates/plan/.agents/skills/visual-plan/references/canvas.md +1 -1
- package/corpus/templates/plan/.agents/skills/visual-plan/references/local-files.md +14 -5
- package/corpus/templates/plan/.agents/skills/visual-recap/references/local-files.md +14 -5
- package/corpus/templates/plan/AGENTS.md +1 -1
- package/corpus/templates/plan/actions/create-plan-design.ts +1 -1
- package/corpus/templates/plan/actions/validate-local-plan-source.ts +110 -0
- package/corpus/templates/plan/app/pages/PlansPage.tsx +1 -0
- package/corpus/templates/plan/docs/commenting-ux-plan.md +2 -2
- package/corpus/templates/plan/server/lib/plan-connector-catalog.ts +1 -0
- package/corpus/templates/plan/server/lib/public-action-paths.ts +1 -0
- package/corpus/templates/plan/server/plan-content.ts +1 -1
- package/corpus/templates/plan/server/ui-plan-html.ts +2 -2
- package/corpus/templates/slides/actions/index-design-system-with-builder.ts +6 -153
- package/corpus/templates/slides/app/components/design-system/DesignSystemSetup.tsx +53 -38
- package/corpus/templates/slides/app/components/design-system/{fig-import-response.ts → builder-index-response.ts} +9 -6
- package/corpus/templates/slides/app/components/visual-editor/MultiSelectChip.tsx +1 -1
- package/corpus/templates/slides/changelog/2026-06-29-design-system-setup-now-indexes-uploaded-design-files-throug.md +6 -0
- package/corpus/templates/slides/changelog/2026-06-29-longer-hosted-agent-turns.md +6 -0
- package/corpus/templates/slides/netlify.toml +3 -6
- package/corpus/templates/slides/server/handlers/index-design-system-with-builder.ts +116 -0
- package/corpus/templates/slides/server/lib/builder-design-system-proxy.ts +179 -0
- package/corpus/templates/slides/server/plugins/agent-chat.ts +4 -1
- package/corpus/templates/slides/server/routes/api/index-design-system-with-builder.post.ts +1 -0
- package/dist/action.d.ts +23 -0
- package/dist/action.d.ts.map +1 -1
- package/dist/action.js +9 -0
- package/dist/action.js.map +1 -1
- package/dist/agent/durable-background.d.ts +9 -7
- package/dist/agent/durable-background.d.ts.map +1 -1
- package/dist/agent/durable-background.js +27 -11
- package/dist/agent/durable-background.js.map +1 -1
- package/dist/agent/production-agent.d.ts +10 -0
- package/dist/agent/production-agent.d.ts.map +1 -1
- package/dist/agent/production-agent.js +4 -1
- package/dist/agent/production-agent.js.map +1 -1
- package/dist/agent/run-loop-with-resume.d.ts +2 -1
- package/dist/agent/run-loop-with-resume.d.ts.map +1 -1
- package/dist/agent/run-loop-with-resume.js +2 -2
- package/dist/agent/run-loop-with-resume.js.map +1 -1
- package/dist/brand-kit/fig/index.d.ts +4 -4
- package/dist/brand-kit/fig/index.d.ts.map +1 -1
- package/dist/brand-kit/fig/index.js +14 -27
- package/dist/brand-kit/fig/index.js.map +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/mcp-config-writers.d.ts +15 -7
- package/dist/cli/mcp-config-writers.d.ts.map +1 -1
- package/dist/cli/mcp-config-writers.js +198 -45
- package/dist/cli/mcp-config-writers.js.map +1 -1
- package/dist/cli/plan-local.d.ts +30 -0
- package/dist/cli/plan-local.d.ts.map +1 -1
- package/dist/cli/plan-local.js +281 -56
- package/dist/cli/plan-local.js.map +1 -1
- package/dist/cli/skills.d.ts +2 -2
- package/dist/cli/skills.d.ts.map +1 -1
- package/dist/cli/skills.js +32 -8
- package/dist/cli/skills.js.map +1 -1
- package/dist/client/AssistantChat.d.ts.map +1 -1
- package/dist/client/AssistantChat.js +11 -1
- package/dist/client/AssistantChat.js.map +1 -1
- package/dist/client/agent-chat.d.ts.map +1 -1
- package/dist/client/agent-chat.js +15 -2
- package/dist/client/agent-chat.js.map +1 -1
- package/dist/client/composer/PromptComposer.d.ts.map +1 -1
- package/dist/client/composer/PromptComposer.js +35 -1
- package/dist/client/composer/PromptComposer.js.map +1 -1
- package/dist/client/org/OrgSwitcher.js +1 -1
- package/dist/client/org/OrgSwitcher.js.map +1 -1
- package/dist/client/sharing/ShareButton.d.ts +1 -1
- package/dist/client/sharing/ShareButton.d.ts.map +1 -1
- package/dist/client/sharing/ShareButton.js +2 -15
- package/dist/client/sharing/ShareButton.js.map +1 -1
- package/dist/collab/presence.d.ts +1 -1
- package/dist/collab/presence.js +1 -1
- package/dist/collab/presence.js.map +1 -1
- package/dist/collab/routes.d.ts +1 -1
- package/dist/file-upload/actions/upload-image.d.ts +2 -2
- package/dist/mcp/connect-route.d.ts.map +1 -1
- package/dist/mcp/connect-route.js +34 -5
- package/dist/mcp/connect-route.js.map +1 -1
- package/dist/observability/routes.d.ts +2 -2
- package/dist/progress/routes.d.ts +1 -1
- package/dist/resources/handlers.d.ts +1 -1
- package/dist/server/action-discovery.d.ts.map +1 -1
- package/dist/server/action-discovery.js +5 -0
- package/dist/server/action-discovery.js.map +1 -1
- package/dist/server/action-routes.d.ts.map +1 -1
- package/dist/server/action-routes.js +14 -0
- package/dist/server/action-routes.js.map +1 -1
- package/dist/server/agent-chat-plugin.d.ts +6 -0
- package/dist/server/agent-chat-plugin.d.ts.map +1 -1
- package/dist/server/agent-chat-plugin.js +12 -3
- package/dist/server/agent-chat-plugin.js.map +1 -1
- package/dist/vite/client.d.ts.map +1 -1
- package/dist/vite/client.js +12 -1
- package/dist/vite/client.js.map +1 -1
- package/docs/content/locales/ar-SA/real-time-collaboration.mdx +2 -2
- package/docs/content/locales/ar-SA/template-design.mdx +1 -1
- package/docs/content/locales/de-DE/real-time-collaboration.mdx +3 -3
- package/docs/content/locales/de-DE/template-design.mdx +1 -1
- package/docs/content/locales/es-ES/real-time-collaboration.mdx +2 -2
- package/docs/content/locales/es-ES/template-design.mdx +1 -1
- package/docs/content/locales/fr-FR/real-time-collaboration.mdx +2 -2
- package/docs/content/locales/fr-FR/template-design.mdx +1 -1
- package/docs/content/locales/hi-IN/template-design.mdx +1 -1
- package/docs/content/locales/ja-JP/real-time-collaboration.mdx +2 -2
- package/docs/content/locales/ja-JP/template-design.mdx +1 -1
- package/docs/content/locales/ko-KR/real-time-collaboration.mdx +2 -2
- package/docs/content/locales/ko-KR/template-design.mdx +1 -1
- package/docs/content/locales/pt-BR/real-time-collaboration.mdx +2 -2
- package/docs/content/locales/pt-BR/template-design.mdx +1 -1
- package/docs/content/locales/zh-CN/real-time-collaboration.mdx +2 -2
- package/docs/content/locales/zh-CN/template-design.mdx +1 -1
- package/docs/content/locales/zh-TW/real-time-collaboration.mdx +2 -2
- package/docs/content/locales/zh-TW/template-design.mdx +1 -1
- package/docs/content/real-time-collaboration.mdx +2 -2
- package/docs/content/template-design.mdx +1 -1
- package/package.json +3 -7
- package/corpus/core/src/brand-kit/fig/decode.ts +0 -410
- package/corpus/core/src/brand-kit/fig/extract-design-system.ts +0 -947
- package/corpus/core/src/brand-kit/fig/fig-to-html.ts +0 -1906
- package/corpus/templates/design/actions/import-figma.ts +0 -55
- package/corpus/templates/design/changelog/2026-06-28-figma-style-code-design-mode.md +0 -6
- package/corpus/templates/design/server/handlers/import-figma-system.ts +0 -86
- package/corpus/templates/design/server/routes/api/import-figma-system.post.ts +0 -1
- package/corpus/templates/slides/server/handlers/import-figma-system.ts +0 -101
- package/corpus/templates/slides/server/routes/api/import-figma-system.post.ts +0 -1
- package/dist/brand-kit/fig/decode.d.ts +0 -33
- package/dist/brand-kit/fig/decode.d.ts.map +0 -1
- package/dist/brand-kit/fig/decode.js +0 -358
- package/dist/brand-kit/fig/decode.js.map +0 -1
- package/dist/brand-kit/fig/extract-design-system.d.ts +0 -44
- package/dist/brand-kit/fig/extract-design-system.d.ts.map +0 -1
- package/dist/brand-kit/fig/extract-design-system.js +0 -752
- package/dist/brand-kit/fig/extract-design-system.js.map +0 -1
- package/dist/brand-kit/fig/fig-to-html.d.ts +0 -246
- package/dist/brand-kit/fig/fig-to-html.d.ts.map +0 -1
- package/dist/brand-kit/fig/fig-to-html.js +0 -1506
- package/dist/brand-kit/fig/fig-to-html.js.map +0 -1
|
@@ -45,7 +45,7 @@ interface UploadedFile {
|
|
|
45
45
|
textContent?: string;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
interface
|
|
48
|
+
interface BuilderIndexResult {
|
|
49
49
|
ok: boolean;
|
|
50
50
|
source: "builder";
|
|
51
51
|
suggestedTitle: string;
|
|
@@ -54,6 +54,9 @@ interface FigImportResult {
|
|
|
54
54
|
designSystemId: string;
|
|
55
55
|
builderUrl: string;
|
|
56
56
|
status: "in-progress";
|
|
57
|
+
localDesignSystemId?: string;
|
|
58
|
+
uploadedFileCount?: number;
|
|
59
|
+
instructions?: string;
|
|
57
60
|
}
|
|
58
61
|
|
|
59
62
|
export default function DesignSystemSetup() {
|
|
@@ -68,7 +71,6 @@ export default function DesignSystemSetup() {
|
|
|
68
71
|
const [githubUrl, setGithubUrl] = useState("");
|
|
69
72
|
const [githubLinks, setGithubLinks] = useState<GitHubLink[]>([]);
|
|
70
73
|
const [codeFiles, setCodeFiles] = useState<UploadedFile[]>([]);
|
|
71
|
-
const [figFiles] = useState<UploadedFile[]>([]);
|
|
72
74
|
const [docFiles, setDocFiles] = useState<UploadedFile[]>([]);
|
|
73
75
|
const [imageFiles, setImageFiles] = useState<UploadedFile[]>([]);
|
|
74
76
|
const [assets, setAssets] = useState<UploadedFile[]>([]);
|
|
@@ -96,42 +98,48 @@ export default function DesignSystemSetup() {
|
|
|
96
98
|
|
|
97
99
|
// --- Figma .fig import (Builder design-system indexing) -----------------
|
|
98
100
|
const realFigInputRef = useRef<HTMLInputElement>(null);
|
|
99
|
-
const [
|
|
100
|
-
const [
|
|
101
|
-
|
|
101
|
+
const [builderIndexing, setBuilderIndexing] = useState(false);
|
|
102
|
+
const [builderIndexResult, setBuilderIndexResult] =
|
|
103
|
+
useState<BuilderIndexResult | null>(null);
|
|
104
|
+
const [builderIndexError, setBuilderIndexError] = useState<string | null>(
|
|
105
|
+
null,
|
|
106
|
+
);
|
|
102
107
|
|
|
103
|
-
const
|
|
108
|
+
const handleBuilderIndexUpload = useCallback(
|
|
104
109
|
async (e: React.ChangeEvent<HTMLInputElement>) => {
|
|
105
110
|
const file = e.target.files?.[0];
|
|
106
111
|
e.target.value = "";
|
|
107
112
|
if (!file) return;
|
|
108
113
|
if (!file.name.toLowerCase().endsWith(".fig")) {
|
|
109
|
-
|
|
114
|
+
setBuilderIndexError(t("designSystemSetup.errors.chooseFig"));
|
|
110
115
|
return;
|
|
111
116
|
}
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
117
|
+
setBuilderIndexError(null);
|
|
118
|
+
setBuilderIndexResult(null);
|
|
119
|
+
setBuilderIndexing(true);
|
|
115
120
|
try {
|
|
116
121
|
const body = new FormData();
|
|
117
122
|
body.append("file", file);
|
|
118
|
-
const res = await fetch(
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
123
|
+
const res = await fetch(
|
|
124
|
+
appApiPath("/api/index-design-system-with-builder"),
|
|
125
|
+
{
|
|
126
|
+
method: "POST",
|
|
127
|
+
body,
|
|
128
|
+
},
|
|
129
|
+
);
|
|
122
130
|
const json = await res.json();
|
|
123
131
|
if (!res.ok || json?.error) {
|
|
124
132
|
throw new Error(json?.error || `Upload failed (${res.status})`);
|
|
125
133
|
}
|
|
126
|
-
|
|
134
|
+
setBuilderIndexResult(json as BuilderIndexResult);
|
|
127
135
|
} catch (err) {
|
|
128
|
-
|
|
136
|
+
setBuilderIndexError(
|
|
129
137
|
err instanceof Error
|
|
130
138
|
? err.message
|
|
131
139
|
: t("designSystemSetup.errors.parseFig"),
|
|
132
140
|
);
|
|
133
141
|
} finally {
|
|
134
|
-
|
|
142
|
+
setBuilderIndexing(false);
|
|
135
143
|
}
|
|
136
144
|
},
|
|
137
145
|
[t],
|
|
@@ -155,7 +163,7 @@ export default function DesignSystemSetup() {
|
|
|
155
163
|
githubUrl.trim() ||
|
|
156
164
|
githubLinks.length > 0 ||
|
|
157
165
|
codeFiles.length > 0 ||
|
|
158
|
-
|
|
166
|
+
builderIndexResult ||
|
|
159
167
|
docFiles.length > 0 ||
|
|
160
168
|
imageFiles.length > 0 ||
|
|
161
169
|
assets.length > 0 ||
|
|
@@ -170,7 +178,7 @@ export default function DesignSystemSetup() {
|
|
|
170
178
|
githubUrl,
|
|
171
179
|
githubLinks,
|
|
172
180
|
codeFiles,
|
|
173
|
-
|
|
181
|
+
builderIndexResult,
|
|
174
182
|
docFiles,
|
|
175
183
|
imageFiles,
|
|
176
184
|
assets,
|
|
@@ -383,9 +391,9 @@ export default function DesignSystemSetup() {
|
|
|
383
391
|
}
|
|
384
392
|
}
|
|
385
393
|
|
|
386
|
-
if (
|
|
394
|
+
if (builderIndexResult) {
|
|
387
395
|
parts.push(
|
|
388
|
-
`\n## Figma
|
|
396
|
+
`\n## Builder-Indexed Figma File\nBuilder design-system indexing has already started.\n- Design system: ${builderIndexResult.designSystemId}\n- Local selectable design system: ${builderIndexResult.localDesignSystemId ?? "(not returned)"}\n- Project: ${builderIndexResult.projectId}\n- Job: ${builderIndexResult.jobId}\n- URL: ${builderIndexResult.builderUrl}\n\nUse Builder as the source of truth for extracted tokens, assets, and guidance. Do not call \`create-design-system\` again for this Builder-indexed source.`,
|
|
389
397
|
);
|
|
390
398
|
}
|
|
391
399
|
|
|
@@ -450,7 +458,7 @@ export default function DesignSystemSetup() {
|
|
|
450
458
|
githubUrl,
|
|
451
459
|
githubLinks,
|
|
452
460
|
codeFiles,
|
|
453
|
-
|
|
461
|
+
builderIndexResult,
|
|
454
462
|
docFiles,
|
|
455
463
|
imageFiles,
|
|
456
464
|
assets,
|
|
@@ -517,15 +525,15 @@ export default function DesignSystemSetup() {
|
|
|
517
525
|
title={t("designSystemSetup.sections.figma.title")}
|
|
518
526
|
description={t("designSystemSetup.sections.figma.description")}
|
|
519
527
|
>
|
|
520
|
-
{!
|
|
528
|
+
{!builderIndexResult ? (
|
|
521
529
|
<>
|
|
522
530
|
<button
|
|
523
531
|
type="button"
|
|
524
532
|
onClick={() => realFigInputRef.current?.click()}
|
|
525
|
-
disabled={
|
|
533
|
+
disabled={builderIndexing}
|
|
526
534
|
className="w-full rounded-xl border border-dashed border-border bg-card p-8 text-center hover:border-[#609FF8]/40 cursor-pointer disabled:cursor-wait disabled:opacity-70"
|
|
527
535
|
>
|
|
528
|
-
{
|
|
536
|
+
{builderIndexing ? (
|
|
529
537
|
<div className="flex flex-col items-center gap-2">
|
|
530
538
|
<Spinner className="size-6 text-[#609FF8]" />
|
|
531
539
|
<p className="text-sm text-foreground/80">
|
|
@@ -553,24 +561,24 @@ export default function DesignSystemSetup() {
|
|
|
553
561
|
ref={realFigInputRef}
|
|
554
562
|
type="file"
|
|
555
563
|
accept=".fig"
|
|
556
|
-
onChange={
|
|
564
|
+
onChange={handleBuilderIndexUpload}
|
|
557
565
|
className="hidden"
|
|
558
566
|
/>
|
|
559
|
-
{
|
|
567
|
+
{builderIndexError && (
|
|
560
568
|
<div
|
|
561
569
|
role="alert"
|
|
562
570
|
className="mt-3 rounded-md border border-red-500/30 bg-red-500/10 px-3 py-2 text-sm text-red-300"
|
|
563
571
|
>
|
|
564
|
-
{
|
|
572
|
+
{builderIndexError}
|
|
565
573
|
</div>
|
|
566
574
|
)}
|
|
567
575
|
</>
|
|
568
576
|
) : (
|
|
569
|
-
<
|
|
570
|
-
result={
|
|
577
|
+
<BuilderIndexPreview
|
|
578
|
+
result={builderIndexResult}
|
|
571
579
|
onReset={() => {
|
|
572
|
-
|
|
573
|
-
|
|
580
|
+
setBuilderIndexResult(null);
|
|
581
|
+
setBuilderIndexError(null);
|
|
574
582
|
}}
|
|
575
583
|
/>
|
|
576
584
|
)}
|
|
@@ -1036,11 +1044,11 @@ function FileList({
|
|
|
1036
1044
|
);
|
|
1037
1045
|
}
|
|
1038
1046
|
|
|
1039
|
-
function
|
|
1047
|
+
function BuilderIndexPreview({
|
|
1040
1048
|
result,
|
|
1041
1049
|
onReset,
|
|
1042
1050
|
}: {
|
|
1043
|
-
result:
|
|
1051
|
+
result: BuilderIndexResult;
|
|
1044
1052
|
onReset: () => void;
|
|
1045
1053
|
}) {
|
|
1046
1054
|
const t = useT();
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { agentNativePath, useSession, useT } from "@agent-native/core/client";
|
|
2
|
+
import {
|
|
3
|
+
IconArrowUpRight,
|
|
4
|
+
IconBrush,
|
|
5
|
+
IconDeviceDesktop,
|
|
6
|
+
IconDeviceFloppy,
|
|
7
|
+
IconLayoutGrid,
|
|
8
|
+
} from "@tabler/icons-react";
|
|
9
|
+
import { Link } from "react-router";
|
|
10
|
+
|
|
11
|
+
import { Button } from "@/components/ui/button";
|
|
12
|
+
|
|
13
|
+
function buildSignInHref(): string {
|
|
14
|
+
const ret = "/?intent=save";
|
|
15
|
+
return `${agentNativePath("/_agent-native/sign-in")}?return=${encodeURIComponent(ret)}`;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export default function VisualEditPage() {
|
|
19
|
+
const t = useT();
|
|
20
|
+
const { session } = useSession();
|
|
21
|
+
const hasSession = Boolean(session?.email);
|
|
22
|
+
const primaryHref = hasSession ? "/" : buildSignInHref();
|
|
23
|
+
|
|
24
|
+
return (
|
|
25
|
+
<main className="min-h-[100dvh] bg-background text-foreground">
|
|
26
|
+
<div className="mx-auto flex min-h-[100dvh] w-full max-w-6xl flex-col px-5 py-5 sm:px-8 lg:px-10">
|
|
27
|
+
<header className="flex h-12 shrink-0 items-center justify-between gap-4">
|
|
28
|
+
<Link
|
|
29
|
+
to="/"
|
|
30
|
+
className="text-sm font-semibold tracking-tight text-foreground"
|
|
31
|
+
>
|
|
32
|
+
{t("navigation.brand")}
|
|
33
|
+
</Link>
|
|
34
|
+
<Button asChild variant="outline" size="sm">
|
|
35
|
+
<a href={primaryHref}>
|
|
36
|
+
{hasSession
|
|
37
|
+
? t("visualEdit.openDesign")
|
|
38
|
+
: t("visualEdit.saveCta")}
|
|
39
|
+
<IconArrowUpRight className="size-4" />
|
|
40
|
+
</a>
|
|
41
|
+
</Button>
|
|
42
|
+
</header>
|
|
43
|
+
|
|
44
|
+
<section className="grid flex-1 items-center gap-10 py-10 lg:grid-cols-[minmax(0,1fr)_26rem] lg:py-14">
|
|
45
|
+
<div className="max-w-2xl">
|
|
46
|
+
<div className="mb-4 inline-flex items-center gap-2 rounded-md border border-border bg-muted/40 px-2.5 py-1 text-xs font-medium text-muted-foreground">
|
|
47
|
+
<IconBrush className="size-3.5" />
|
|
48
|
+
{t("visualEdit.eyebrow")}
|
|
49
|
+
</div>
|
|
50
|
+
<h1 className="max-w-2xl text-4xl font-semibold tracking-normal text-foreground sm:text-5xl">
|
|
51
|
+
{t("visualEdit.title")}
|
|
52
|
+
</h1>
|
|
53
|
+
<p className="mt-4 max-w-xl text-base leading-7 text-muted-foreground">
|
|
54
|
+
{t("visualEdit.description")}
|
|
55
|
+
</p>
|
|
56
|
+
<div className="mt-7 flex flex-wrap items-center gap-3">
|
|
57
|
+
<Button asChild size="lg" className="gap-2">
|
|
58
|
+
<a href={primaryHref}>
|
|
59
|
+
<IconDeviceFloppy className="size-4" />
|
|
60
|
+
{hasSession
|
|
61
|
+
? t("visualEdit.openDesign")
|
|
62
|
+
: t("visualEdit.saveCta")}
|
|
63
|
+
</a>
|
|
64
|
+
</Button>
|
|
65
|
+
<Button asChild variant="ghost" size="lg">
|
|
66
|
+
<Link to="/templates">{t("visualEdit.templatesCta")}</Link>
|
|
67
|
+
</Button>
|
|
68
|
+
</div>
|
|
69
|
+
</div>
|
|
70
|
+
|
|
71
|
+
<div className="rounded-lg border border-border bg-card p-3 shadow-sm">
|
|
72
|
+
<div className="rounded-md border border-border bg-background">
|
|
73
|
+
<div className="flex h-10 items-center gap-2 border-b border-border px-3">
|
|
74
|
+
<span className="h-2.5 w-2.5 rounded-full bg-destructive/70" />
|
|
75
|
+
<span className="h-2.5 w-2.5 rounded-full bg-amber-400" />
|
|
76
|
+
<span className="h-2.5 w-2.5 rounded-full bg-emerald-500" />
|
|
77
|
+
<div className="ms-auto flex items-center gap-1.5 text-xs text-muted-foreground">
|
|
78
|
+
<IconDeviceDesktop className="size-3.5" />
|
|
79
|
+
{t("visualEdit.previewLabel")}
|
|
80
|
+
</div>
|
|
81
|
+
</div>
|
|
82
|
+
<div className="grid gap-3 p-4">
|
|
83
|
+
<div className="h-28 rounded-md border border-dashed border-border bg-muted/40" />
|
|
84
|
+
<div className="grid grid-cols-3 gap-3">
|
|
85
|
+
<div className="h-20 rounded-md border border-border bg-background" />
|
|
86
|
+
<div className="h-20 rounded-md border border-border bg-background" />
|
|
87
|
+
<div className="h-20 rounded-md border border-border bg-background" />
|
|
88
|
+
</div>
|
|
89
|
+
<div className="flex items-center gap-2 rounded-md border border-border bg-muted/40 px-3 py-2 text-xs text-muted-foreground">
|
|
90
|
+
<IconLayoutGrid className="size-3.5" />
|
|
91
|
+
{t("visualEdit.layoutLabel")}
|
|
92
|
+
</div>
|
|
93
|
+
</div>
|
|
94
|
+
</div>
|
|
95
|
+
</div>
|
|
96
|
+
</section>
|
|
97
|
+
</div>
|
|
98
|
+
</main>
|
|
99
|
+
);
|
|
100
|
+
}
|
|
@@ -9,13 +9,21 @@ import {
|
|
|
9
9
|
getThemeInitScript,
|
|
10
10
|
getBrowserTabId,
|
|
11
11
|
configureTracking,
|
|
12
|
+
useSession,
|
|
12
13
|
useT,
|
|
13
14
|
} from "@agent-native/core/client";
|
|
14
15
|
import { IconSun, IconMoon } from "@tabler/icons-react";
|
|
15
16
|
import { useQueryClient } from "@tanstack/react-query";
|
|
16
17
|
import { useTheme } from "next-themes";
|
|
17
18
|
import { useCallback, useState } from "react";
|
|
18
|
-
import {
|
|
19
|
+
import {
|
|
20
|
+
Links,
|
|
21
|
+
Meta,
|
|
22
|
+
Outlet,
|
|
23
|
+
Scripts,
|
|
24
|
+
ScrollRestoration,
|
|
25
|
+
useLocation,
|
|
26
|
+
} from "react-router";
|
|
19
27
|
import type { LinksFunction } from "react-router";
|
|
20
28
|
|
|
21
29
|
import { Layout as AppLayout } from "@/components/layout/Layout";
|
|
@@ -132,18 +140,43 @@ function DesignCommandMenu({
|
|
|
132
140
|
);
|
|
133
141
|
}
|
|
134
142
|
|
|
143
|
+
function RootContent() {
|
|
144
|
+
const location = useLocation();
|
|
145
|
+
const { session } = useSession();
|
|
146
|
+
const [cmdkOpen, setCmdkOpen] = useState(false);
|
|
147
|
+
const hasSession = Boolean(session?.email);
|
|
148
|
+
const isPublicVisualEdit = location.pathname === "/visual-edit";
|
|
149
|
+
useCommandMenuShortcut(
|
|
150
|
+
useCallback(() => {
|
|
151
|
+
if (hasSession && !isPublicVisualEdit) setCmdkOpen(true);
|
|
152
|
+
}, [hasSession, isPublicVisualEdit]),
|
|
153
|
+
);
|
|
154
|
+
|
|
155
|
+
const content = isPublicVisualEdit ? (
|
|
156
|
+
<Outlet />
|
|
157
|
+
) : (
|
|
158
|
+
<AppLayout>
|
|
159
|
+
<Outlet />
|
|
160
|
+
</AppLayout>
|
|
161
|
+
);
|
|
162
|
+
|
|
163
|
+
return (
|
|
164
|
+
<>
|
|
165
|
+
{hasSession && <DbSyncSetup />}
|
|
166
|
+
<Toaster richColors position="bottom-left" />
|
|
167
|
+
{hasSession && !isPublicVisualEdit && (
|
|
168
|
+
<DesignCommandMenu open={cmdkOpen} onOpenChange={setCmdkOpen} />
|
|
169
|
+
)}
|
|
170
|
+
{content}
|
|
171
|
+
</>
|
|
172
|
+
);
|
|
173
|
+
}
|
|
174
|
+
|
|
135
175
|
export default function Root() {
|
|
136
176
|
const [queryClient] = useState(() => createAgentNativeQueryClient());
|
|
137
|
-
const [cmdkOpen, setCmdkOpen] = useState(false);
|
|
138
|
-
useCommandMenuShortcut(useCallback(() => setCmdkOpen(true), []));
|
|
139
177
|
return (
|
|
140
178
|
<AppProviders queryClient={queryClient} i18n={{ catalog: i18nCatalog }}>
|
|
141
|
-
<
|
|
142
|
-
<Toaster richColors position="bottom-left" />
|
|
143
|
-
<DesignCommandMenu open={cmdkOpen} onOpenChange={setCmdkOpen} />
|
|
144
|
-
<AppLayout>
|
|
145
|
-
<Outlet />
|
|
146
|
-
</AppLayout>
|
|
179
|
+
<RootContent />
|
|
147
180
|
</AppProviders>
|
|
148
181
|
);
|
|
149
182
|
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# Design editor — real-browser E2E
|
|
2
|
+
|
|
3
|
+
End-to-end tests that drive the **visual editor** in real Chromium with
|
|
4
|
+
`@playwright/test`. They exercise the things unit tests can't: selecting,
|
|
5
|
+
resizing, moving/reparenting, the layers panel, and the iframe bridge.
|
|
6
|
+
|
|
7
|
+
## Run
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
pnpm e2e # headless
|
|
11
|
+
pnpm e2e:headed # watch it drive a real browser
|
|
12
|
+
pnpm e2e:ui # Playwright UI mode
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
- `playwright.config.ts` starts its own dev server on **:9333** backed by a
|
|
16
|
+
throwaway SQLite db (`data/e2e.db`) — `APP_NAME=design` +
|
|
17
|
+
`DESIGN_DATABASE_URL=file:...` so a `.env` Postgres URL can never leak in.
|
|
18
|
+
- Locally, if a server is already running on :9333 it is **reused**
|
|
19
|
+
(`reuseExistingServer`). The most reliable local loop is to keep a server up
|
|
20
|
+
yourself and run against it:
|
|
21
|
+
```bash
|
|
22
|
+
APP_NAME=design DESIGN_DATABASE_URL="file:./data/e2e.db" PORT=9333 pnpm dev # one terminal
|
|
23
|
+
E2E_BASE_URL=http://localhost:9333 pnpm e2e # another
|
|
24
|
+
```
|
|
25
|
+
`E2E_BASE_URL` makes Playwright skip server management entirely and just use
|
|
26
|
+
yours — handy when the cold Vite optimize is slow under Playwright's spawn.
|
|
27
|
+
|
|
28
|
+
`e2e/global-setup.ts` signs up a test user (email/password — there is **no dev
|
|
29
|
+
auth bypass**), saves the signed session to `e2e/.auth/state.json`, and seeds
|
|
30
|
+
one design with a known fixture (`e2e/.auth/seed.json`) via the authenticated
|
|
31
|
+
action endpoints. Both `.auth/` files are gitignored.
|
|
32
|
+
|
|
33
|
+
## Why the editor needs special handling (the hard-won bits)
|
|
34
|
+
|
|
35
|
+
The design renders inside a `sandbox="allow-scripts"` iframe with **no
|
|
36
|
+
`allow-same-origin`**, and a pointer-capturing shield overlay sits on top. So:
|
|
37
|
+
|
|
38
|
+
| Symptom | Wrong approach | Right approach |
|
|
39
|
+
| ----------------------------------------------------------------------- | -------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
40
|
+
| Can't read iframe DOM | `iframe.contentDocument` → `null` | `page.frameLocator('iframe').locator(...)` — CDP targets the frame directly |
|
|
41
|
+
| Clicks "intercepted by `<div data-agent-native-edit-overlay="shield">`" | normal click (actionability fails) | `.click({ force: true })` — the shield is _meant_ to get the event and drive selection |
|
|
42
|
+
| Asserting an edit happened | reading iframe state | listen for the bridge's parent `postMessage`s: `element-select`, `element-hover`, `visual-style-change`, `visual-structure-change` (see `installBridge`/`waitForBridge`) |
|
|
43
|
+
| `page.screenshot()` hangs forever | `page.screenshot()` | `cdpScreenshot()` — CDP `Page.captureScreenshot`, no stability wait (the page never idles; the agent-chat panel polls) |
|
|
44
|
+
| Node ids change between runs | hardcoding `data-agent-native-node-id` | select by **text/role**, then read the stamped id back from the `element-select` payload |
|
|
45
|
+
| Drag move/resize | HTML5 `dragTo` on the canvas | `page.mouse.move/down/up` with intermediate steps at `boundingBox()` coords (the canvas uses raw pointer events). The **layers panel** is in the parent doc and _does_ use HTML5 DnD → `locator.dragTo()`. |
|
|
46
|
+
|
|
47
|
+
`helpers.ts` wraps all of this: `gotoEditor`, `selectByText`, `dragCanvasByText`,
|
|
48
|
+
`installBridge`/`waitForBridge`, `cdpScreenshot`, `readSeedDesignId`.
|
|
49
|
+
|
|
50
|
+
## Driving your REAL, logged-in Chrome (chrome-devtools-mcp)
|
|
51
|
+
|
|
52
|
+
Playwright (above) is best for deterministic CI against a local throwaway DB.
|
|
53
|
+
To exercise the **deployed app with your actual Google session** — no test
|
|
54
|
+
user, no seeding — drive a real Chrome over CDP:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
# 1. Launch Chrome (144+) with remote debugging. Use a separate profile dir so
|
|
58
|
+
# you can sign in normally without touching your main profile.
|
|
59
|
+
"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" \
|
|
60
|
+
--remote-debugging-port=9222 \
|
|
61
|
+
--user-data-dir="$HOME/.chrome-e2e" &
|
|
62
|
+
# 2. Sign in to the deployed Design app in that window.
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Then attach the agent's **`chrome-devtools-mcp`** built-in (the `/qa` skill
|
|
66
|
+
toggles it; it runs `npx chrome-devtools-mcp@latest --autoConnect`) and drive it
|
|
67
|
+
with `navigate_page` / `take_snapshot` / `evaluate_script` / `click`. The exact
|
|
68
|
+
same editor techniques apply — `evaluate_script` can install the bridge listener
|
|
69
|
+
and read frame content; clicks go through the shield. This path uses your live
|
|
70
|
+
auth and data, so it's ideal for manual/exploratory verification and smoke-
|
|
71
|
+
testing prod, while the Playwright suite stays the deterministic regression net.
|