@agent-native/core 0.79.27 → 0.80.1
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 +34 -0
- package/corpus/core/docs/content/locales/ar-SA/skills-guide.mdx +5 -0
- package/corpus/core/docs/content/locales/ar-SA/template-design.mdx +55 -1
- package/corpus/core/docs/content/locales/de-DE/skills-guide.mdx +5 -0
- package/corpus/core/docs/content/locales/de-DE/template-design.mdx +66 -1
- package/corpus/core/docs/content/locales/es-ES/skills-guide.mdx +5 -0
- package/corpus/core/docs/content/locales/es-ES/template-design.mdx +65 -1
- package/corpus/core/docs/content/locales/fr-FR/skills-guide.mdx +5 -0
- package/corpus/core/docs/content/locales/fr-FR/template-design.mdx +64 -1
- package/corpus/core/docs/content/locales/hi-IN/skills-guide.mdx +5 -0
- package/corpus/core/docs/content/locales/hi-IN/template-design.mdx +59 -1
- package/corpus/core/docs/content/locales/ja-JP/skills-guide.mdx +5 -0
- package/corpus/core/docs/content/locales/ja-JP/template-design.mdx +62 -1
- package/corpus/core/docs/content/locales/ko-KR/skills-guide.mdx +5 -0
- package/corpus/core/docs/content/locales/ko-KR/template-design.mdx +58 -1
- package/corpus/core/docs/content/locales/pt-BR/skills-guide.mdx +5 -0
- package/corpus/core/docs/content/locales/pt-BR/template-design.mdx +62 -1
- package/corpus/core/docs/content/locales/zh-CN/skills-guide.mdx +5 -0
- package/corpus/core/docs/content/locales/zh-CN/template-design.mdx +50 -1
- package/corpus/core/docs/content/locales/zh-TW/skills-guide.mdx +5 -0
- package/corpus/core/docs/content/locales/zh-TW/template-design.mdx +52 -1
- package/corpus/core/docs/content/skills-guide.mdx +5 -0
- package/corpus/core/docs/content/template-design.mdx +59 -1
- package/corpus/core/package.json +2 -1
- package/corpus/core/src/agent/engine/index.ts +1 -0
- package/corpus/core/src/agent/engine/registry.ts +40 -0
- package/corpus/core/src/agent/production-agent.ts +6 -2
- package/corpus/core/src/application-state/handlers.ts +1 -1
- package/corpus/core/src/brand-kit/index.ts +1 -1
- package/corpus/core/src/cli/design-connect.ts +490 -0
- package/corpus/core/src/cli/index.ts +16 -0
- package/corpus/core/src/cli/skills.ts +144 -3
- package/corpus/core/src/client/AgentPanel.tsx +1 -1
- package/corpus/core/src/client/AssistantChat.tsx +43 -7
- package/corpus/core/src/client/MultiTabAssistantChat.tsx +1 -1
- package/corpus/core/src/client/agent-chat.ts +27 -3
- package/corpus/core/src/client/blocks/library/MermaidBlock.tsx +1 -1
- package/corpus/core/src/client/blocks/library/diagram.tsx +2 -2
- package/corpus/core/src/client/blocks/library/wireframe.tsx +1 -1
- package/corpus/core/src/client/chat/message-components.tsx +1 -1
- package/corpus/core/src/client/chat-model-groups.ts +1 -2
- package/corpus/core/src/client/components/LiveCursorOverlay.tsx +33 -66
- package/corpus/core/src/client/composer/TiptapComposer.tsx +99 -24
- package/corpus/core/src/client/composer/useVoiceDictation.ts +429 -260
- package/corpus/core/src/client/extensions/portable-extension.ts +1 -1
- package/corpus/core/src/client/frame-protocol.ts +17 -2
- package/corpus/core/src/client/rich-markdown-editor/RegistryBlockNode.tsx +2 -2
- package/corpus/core/src/client/sharing/ShareButton.tsx +20 -15
- package/corpus/core/src/client/use-agent-engine-configured.ts +80 -28
- package/corpus/core/src/code-agents/transcript-normalizer.ts +1 -1
- package/corpus/core/src/extensions/path.ts +1 -4
- package/corpus/core/src/integrations/a2a-continuation-processor.ts +1 -1
- package/corpus/core/src/mcp/build-server.ts +1 -1
- package/corpus/core/src/org/handlers.ts +5 -5
- package/corpus/core/src/org/plugin.ts +2 -2
- package/corpus/core/src/scripts/call-agent.ts +1 -1
- package/corpus/core/src/scripts/db/safety.ts +1 -1
- package/corpus/core/src/server/auth.ts +3 -0
- package/corpus/core/src/server/builder-design-systems.ts +308 -0
- package/corpus/core/src/server/core-routes-plugin.ts +29 -3
- package/corpus/core/src/server/index.ts +8 -0
- package/corpus/core/src/server/transcribe-voice.ts +57 -22
- package/corpus/core/src/shared/mcp-embed-headers.ts +23 -1
- package/corpus/core/src/styles/agent-native.css +60 -4
- package/corpus/core/src/templates/workspace-core/.agents/skills/voice-transcription/SKILL.md +10 -0
- package/corpus/core/src/usage/store.ts +2 -2
- package/corpus/core/src/vite/client.ts +2 -0
- package/corpus/core/src/voice/index.ts +18 -0
- package/corpus/core/src/voice/voice-cleanup-prompt.ts +38 -0
- package/corpus/core/src/voice/voice-context.ts +217 -0
- package/corpus/core/src/voice/voice-replacements.ts +75 -0
- package/corpus/templates/analytics/AGENTS.md +4 -3
- package/corpus/templates/analytics/actions/dashboard-mutation-api.ts +298 -15
- package/corpus/templates/analytics/actions/get-sql-dashboard.ts +9 -4
- package/corpus/templates/analytics/actions/list-session-recordings.ts +6 -1
- package/corpus/templates/analytics/actions/mutate-dashboard.ts +18 -2
- package/corpus/templates/analytics/actions/query-agent-native-analytics.ts +12 -2
- package/corpus/templates/analytics/app/components/layout/Sidebar.tsx +557 -400
- package/corpus/templates/analytics/app/global.css +0 -4
- package/corpus/templates/analytics/app/hooks/use-replay-storage-status.ts +66 -0
- package/corpus/templates/analytics/app/i18n/zh-TW.ts +39 -0
- package/corpus/templates/analytics/app/i18n-data.ts +424 -0
- package/corpus/templates/analytics/app/pages/Settings.tsx +333 -0
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/PanelEditorDialog.tsx +2 -1
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/dashboard-layout.ts +121 -3
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/index.tsx +82 -34
- package/corpus/templates/analytics/app/pages/sessions/SessionDetailPage.tsx +7 -0
- package/corpus/templates/analytics/app/pages/sessions/SessionsPage.tsx +144 -36
- package/corpus/templates/analytics/changelog/2026-06-28-ask-tab-now-matches-the-darker-app-background.md +6 -0
- package/corpus/templates/analytics/changelog/2026-06-28-dashboard-email-reports-now-use-cleaner-light-mode-snapshots.md +6 -0
- package/corpus/templates/analytics/changelog/2026-06-28-left-sidebar-collapses-into-an-animated-icon-rail.md +6 -0
- package/corpus/templates/analytics/changelog/2026-06-28-sessions-now-show-only-signed-in-recordings-with-playable-re.md +6 -0
- package/corpus/templates/analytics/changelog/2026-06-29-analytics-agents-can-now-place-new-charts-into-requested-das.md +6 -0
- package/corpus/templates/analytics/changelog/2026-06-29-analytics-queries-now-report-failed-source-query-errors-inst.md +6 -0
- package/corpus/templates/analytics/changelog/2026-06-29-charts-can-now-be-dropped-between-full-dashboard-rows-to-cre.md +6 -0
- package/corpus/templates/analytics/changelog/2026-06-29-dashboard-email-reports-include-the-full-dashboard-image-wit.md +6 -0
- package/corpus/templates/analytics/changelog/2026-06-29-main-surface-border-reaches-the-top.md +6 -0
- package/corpus/templates/analytics/changelog/2026-06-29-session-replay-now-records-playable-sessions-in-production-a.md +6 -0
- package/corpus/templates/analytics/changelog/2026-06-29-set-up-session-replay-storage-from-settings-connect-builder-.md +6 -0
- package/corpus/templates/analytics/scripts/cleanup-empty-session-recordings.ts +102 -0
- package/corpus/templates/analytics/seeds/dashboards/agent-native-templates-first-party.json +3 -3
- package/corpus/templates/analytics/server/lib/dashboard-report.ts +75 -30
- package/corpus/templates/analytics/server/lib/first-party-metric-catalog.ts +5 -2
- package/corpus/templates/analytics/server/lib/real-data-actions.ts +81 -20
- package/corpus/templates/analytics/server/lib/replay-storage.ts +79 -0
- package/corpus/templates/analytics/server/lib/s3-upload-provider.ts +255 -0
- package/corpus/templates/analytics/server/lib/session-replay.ts +53 -12
- package/corpus/templates/analytics/server/plugins/agent-chat.ts +11 -2
- package/corpus/templates/analytics/server/plugins/onboarding.ts +97 -0
- package/corpus/templates/assets/app/components/layout/Sidebar.tsx +4 -4
- package/corpus/templates/assets/changelog/2026-06-28-left-sidebar-collapse-motion-and-footer-chrome-are-quieter.md +6 -0
- package/corpus/templates/brain/app/components/layout/Layout.tsx +29 -2
- package/corpus/templates/brain/app/components/layout/Sidebar.tsx +131 -42
- package/corpus/templates/brain/app/i18n/zh-TW.ts +2 -0
- package/corpus/templates/brain/app/i18n-data.ts +20 -0
- package/corpus/templates/brain/changelog/2026-06-28-left-sidebar-collapses-into-an-animated-icon-rail.md +6 -0
- package/corpus/templates/calendar/app/components/layout/AppLayout.tsx +29 -1
- package/corpus/templates/calendar/app/components/layout/Sidebar.tsx +417 -299
- package/corpus/templates/calendar/app/i18n/zh-TW.ts +2 -0
- package/corpus/templates/calendar/app/i18n-data.ts +20 -0
- package/corpus/templates/calendar/changelog/2026-06-28-left-sidebar-collapses-into-an-animated-icon-rail.md +6 -0
- package/corpus/templates/chat/app/components/layout/Sidebar.tsx +6 -19
- package/corpus/templates/chat/changelog/2026-06-28-left-sidebar-collapse-motion-and-footer-chrome-are-quieter.md +6 -0
- package/corpus/templates/clips/AGENTS.md +4 -0
- package/corpus/templates/clips/actions/cleanup-transcript.ts +39 -9
- package/corpus/templates/clips/actions/finalize-meeting.ts +81 -12
- package/corpus/templates/clips/actions/lib/agents-md-context.ts +4 -1
- package/corpus/templates/clips/app/components/library/library-layout.tsx +3 -3
- package/corpus/templates/clips/app/components/meetings/share-meeting-dialog.tsx +1 -1
- package/corpus/templates/clips/app/components/player/share-dialog.tsx +2 -2
- package/corpus/templates/clips/changelog/2026-06-28-left-sidebar-footer-controls-use-less-divider-chrome.md +6 -0
- package/corpus/templates/clips/desktop/src/lib/personal-vocabulary.ts +13 -8
- package/corpus/templates/clips/desktop/src/lib/recorder.ts +24 -0
- package/corpus/templates/clips/desktop/src/lib/transcription-capture.ts +105 -5
- package/corpus/templates/clips/desktop/src/lib/voice-dictation.ts +60 -1
- package/corpus/templates/content/actions/set-image-alt-text.ts +1 -1
- package/corpus/templates/content/app/components/editor/DocumentDatabase.tsx +1 -1
- package/corpus/templates/content/app/components/editor/database/DatabaseView.tsx +1 -1
- package/corpus/templates/content/app/components/sidebar/DocumentSidebar.tsx +5 -5
- package/corpus/templates/content/changelog/2026-06-28-left-sidebar-collapse-motion-and-footer-chrome-are-quieter.md +6 -0
- package/corpus/templates/content/shared/document-export.ts +1 -1
- package/corpus/templates/design/.agents/skills/design-systems/SKILL.md +8 -18
- package/corpus/templates/design/.agents/skills/visual-edit/SKILL.md +154 -0
- package/corpus/templates/design/AGENTS.md +95 -5
- package/corpus/templates/design/DESIGN.md +82 -0
- package/corpus/templates/design/DEVELOPING.md +43 -0
- package/corpus/templates/design/actions/add-localhost-screens.ts +453 -0
- package/corpus/templates/design/actions/apply-shader.ts +277 -0
- package/corpus/templates/design/actions/apply-visual-edit.ts +303 -0
- package/corpus/templates/design/actions/connect-localhost.ts +183 -0
- package/corpus/templates/design/actions/edit-design.ts +195 -42
- package/corpus/templates/design/actions/generate-design.ts +71 -1
- package/corpus/templates/design/actions/generate-screens.ts +193 -0
- package/corpus/templates/design/actions/get-code-layer-projection.ts +191 -0
- package/corpus/templates/design/actions/get-shader.ts +119 -0
- package/corpus/templates/design/actions/index-design-system-with-builder.ts +259 -0
- package/corpus/templates/design/actions/list-localhost-connections.ts +95 -0
- package/corpus/templates/design/actions/navigate.ts +55 -2
- package/corpus/templates/design/actions/update-file.ts +9 -2
- package/corpus/templates/design/actions/view-screen.ts +68 -1
- package/corpus/templates/design/agent-native.app-skill.json +10 -0
- package/corpus/templates/design/app/components/design/CanvasContextMenu.tsx +719 -0
- package/corpus/templates/design/app/components/design/DesignCanvas.tsx +2120 -103
- package/corpus/templates/design/app/components/design/DesignEditorSkeleton.tsx +74 -38
- package/corpus/templates/design/app/components/design/DesignExtensionsPanel.tsx +401 -0
- package/corpus/templates/design/app/components/design/EditPanel.tsx +3966 -440
- package/corpus/templates/design/app/components/design/LayersPanel.tsx +1473 -0
- package/corpus/templates/design/app/components/design/MultiScreenCanvas.tsx +3940 -147
- package/corpus/templates/design/app/components/design/QuestionFlow.tsx +700 -13
- package/corpus/templates/design/app/components/design/TweaksPanel.tsx +105 -63
- package/corpus/templates/design/app/components/design/index.ts +0 -5
- package/corpus/templates/design/app/components/design/inspector/AlignmentMatrix.tsx +353 -0
- package/corpus/templates/design/app/components/design/inspector/AutoLayoutMatrix.tsx +1589 -0
- package/corpus/templates/design/app/components/design/inspector/ConstraintsWidget.tsx +511 -0
- package/corpus/templates/design/app/components/design/inspector/ExportSettingsPanel.tsx +395 -0
- package/corpus/templates/design/app/components/design/inspector/FigmaColorPicker.tsx +2010 -0
- package/corpus/templates/design/app/components/design/inspector/GradientEditor.tsx +601 -0
- package/corpus/templates/design/app/components/design/inspector/ImageFillControls.tsx +242 -0
- package/corpus/templates/design/app/components/design/inspector/SHADER_INTEGRATION.md +420 -0
- package/corpus/templates/design/app/components/design/inspector/ScrubInput.tsx +238 -0
- package/corpus/templates/design/app/components/design/inspector/ShaderControls.stories.tsx +71 -0
- package/corpus/templates/design/app/components/design/inspector/ShaderControls.tsx +575 -0
- package/corpus/templates/design/app/components/design/inspector/ShaderEffectRow.tsx +106 -0
- package/corpus/templates/design/app/components/design/inspector/ShaderFillsPanel.tsx +423 -0
- package/corpus/templates/design/app/components/design/inspector/figma-icons.tsx +741 -0
- package/corpus/templates/design/app/components/design/inspector/index.ts +87 -0
- package/corpus/templates/design/app/components/design/inspector/scrub-input-utils.ts +201 -0
- package/corpus/templates/design/app/components/design/types.ts +23 -0
- package/corpus/templates/design/app/components/layout/Layout.tsx +24 -13
- package/corpus/templates/design/app/components/layout/Sidebar.tsx +4 -4
- package/corpus/templates/design/app/components/visual-editor/CanvasCommentPins.tsx +474 -36
- package/corpus/templates/design/app/components/visual-editor/DrawOverlay.tsx +22 -5
- package/corpus/templates/design/app/components/visual-editor/SaveStatusIndicator.tsx +24 -11
- package/corpus/templates/design/app/global.css +149 -5
- package/corpus/templates/design/app/hooks/use-agent-generating.ts +4 -0
- package/corpus/templates/design/app/hooks/use-navigation-state.ts +130 -8
- package/corpus/templates/design/app/hooks/useDesignHotkeys.ts +329 -0
- package/corpus/templates/design/app/i18n/zh-TW.ts +277 -0
- package/corpus/templates/design/app/i18n-data.ts +3028 -1
- package/corpus/templates/design/app/pages/DesignEditor.tsx +5831 -904
- package/corpus/templates/design/app/pages/DesignSystemSetup.tsx +57 -221
- package/corpus/templates/design/changelog/2026-06-28-annotate-mode-now-combines-drawing-and-comment-pins-in-one-c.md +6 -0
- package/corpus/templates/design/changelog/2026-06-28-design-editor-panel-borders-are-cleaner-so-the-canvas-edge-s.md +6 -0
- package/corpus/templates/design/changelog/2026-06-28-drawing-prompts-now-reliably-open-and-submit-to-the-design-a.md +6 -0
- package/corpus/templates/design/changelog/2026-06-28-editor-app-menus-now-use-an-outline-agent-native-mark-with-b.md +6 -0
- package/corpus/templates/design/changelog/2026-06-28-figma-style-code-design-mode.md +6 -0
- package/corpus/templates/design/changelog/2026-06-28-layer-selection-now-updates-chat-context-without-opening-the.md +6 -0
- package/corpus/templates/design/changelog/2026-06-28-layer-selections-now-preserve-hidden-and-locked-canvas-state.md +6 -0
- package/corpus/templates/design/changelog/2026-06-28-left-sidebar-collapse-motion-and-footer-chrome-are-quieter.md +6 -0
- package/corpus/templates/design/changelog/2026-06-28-live-cursors-now-keep-names-beside-a-cleaner-pointer-marker.md +6 -0
- package/corpus/templates/design/changelog/2026-06-28-mode-switching-now-lives-in-a-compact-bottom-right-icon-dock.md +6 -0
- package/corpus/templates/design/changelog/2026-06-28-screen-overview-now-handles-zooming-drawing-opening-and-dele.md +6 -0
- package/corpus/templates/design/changelog/2026-06-28-screen-overview-now-selects-screens-on-click-and-opens-them-.md +6 -0
- package/corpus/templates/design/changelog/2026-06-28-screen-overview-zooms-into-the-active-screen-with-smoother-e.md +6 -0
- package/corpus/templates/design/changelog/2026-06-28-selected-element-chips-in-chat-are-shorter-and-easier-to-sca.md +6 -0
- package/corpus/templates/design/changelog/2026-06-28-the-design-editor-toolbar-is-more-compact-and-the-app-menu-m.md +6 -0
- package/corpus/templates/design/changelog/2026-06-28-tweaks-now-live-at-the-top-of-the-design-sidebar-instead-of-.md +6 -0
- package/corpus/templates/design/changelog/2026-06-28-tweaks-now-live-in-the-right-inspector-beside-the-design-tab.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-active-sidebar-rows-use-soft-highlights.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-agents-can-now-open-screen-overview-focus-screens-and-add.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-canvas-selection-no-longer-flashes-broken-prototype-html-whe.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-command-menu-selections-are-clearer-in-dark-mode.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-design-agents-now-edit-broad-copy-changes-more-reliably.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-design-editor-extensions-now-run-inline-beside-the-artboard.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-design-mode-top-chrome-now-groups-collaborators-preview-shar.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-element-selection-now-stays-on-the-intended-layer-after-sele.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-screen-overview-full-view-controls-now-sit-above-frames-inst.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-screen-overview-tools-can-draw-shapes-create-screens-and-kee.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-sidebars-use-darker-chrome-and-chat-warns-immediately.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-the-pen-tool-now-creates-anchor-based-bezier-vectors-with-ha.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-visual-edit-can-open-localhost-routes-as-url-backed-screens.md +6 -0
- package/corpus/templates/design/package.json +1 -0
- package/corpus/templates/design/server/db/schema.ts +26 -0
- package/corpus/templates/design/server/handlers/import-figma-system.ts +38 -85
- package/corpus/templates/design/server/lib/design-snapshot.ts +9 -1
- package/corpus/templates/design/server/plugins/agent-chat.ts +3 -0
- package/corpus/templates/design/shared/api.ts +27 -0
- package/corpus/templates/design/shared/canvas-frames.ts +103 -0
- package/corpus/templates/design/shared/canvas-math.ts +1058 -0
- package/corpus/templates/design/shared/code-layer.ts +2412 -0
- package/corpus/templates/design/shared/color-utils.ts +180 -0
- package/corpus/templates/design/shared/generation-session.ts +61 -0
- package/corpus/templates/design/shared/html-content.ts +21 -0
- package/corpus/templates/design/shared/pen-path.ts +207 -0
- package/corpus/templates/design/shared/shader-presets.ts +782 -0
- package/corpus/templates/design/shared/shader-safety.ts +137 -0
- package/corpus/templates/design/shared/source-mode.ts +237 -0
- package/corpus/templates/forms/app/components/layout/Sidebar.tsx +149 -6
- package/corpus/templates/forms/app/i18n/ar-SA.ts +2 -0
- package/corpus/templates/forms/app/i18n/de-DE.ts +2 -0
- package/corpus/templates/forms/app/i18n/en-US.ts +2 -0
- package/corpus/templates/forms/app/i18n/es-ES.ts +2 -0
- package/corpus/templates/forms/app/i18n/fr-FR.ts +2 -0
- package/corpus/templates/forms/app/i18n/hi-IN.ts +2 -0
- package/corpus/templates/forms/app/i18n/ja-JP.ts +2 -0
- package/corpus/templates/forms/app/i18n/ko-KR.ts +2 -0
- package/corpus/templates/forms/app/i18n/pt-BR.ts +2 -0
- package/corpus/templates/forms/app/i18n/zh-CN.ts +2 -0
- package/corpus/templates/forms/app/i18n/zh-TW.ts +2 -0
- package/corpus/templates/forms/changelog/2026-06-28-left-sidebar-collapses-into-an-animated-icon-rail.md +6 -0
- package/corpus/templates/macros/app/components/layout/AppLayout.tsx +2 -2
- package/corpus/templates/macros/changelog/2026-06-28-left-sidebar-footer-controls-use-less-divider-chrome.md +6 -0
- package/corpus/templates/mail/app/components/layout/AppLayout.tsx +408 -247
- package/corpus/templates/mail/app/i18n/ar-SA.ts +4 -0
- package/corpus/templates/mail/app/i18n/de-DE.ts +4 -0
- package/corpus/templates/mail/app/i18n/en-US.ts +4 -0
- package/corpus/templates/mail/app/i18n/es-ES.ts +4 -0
- package/corpus/templates/mail/app/i18n/fr-FR.ts +4 -0
- package/corpus/templates/mail/app/i18n/hi-IN.ts +4 -0
- package/corpus/templates/mail/app/i18n/ja-JP.ts +4 -0
- package/corpus/templates/mail/app/i18n/ko-KR.ts +4 -0
- package/corpus/templates/mail/app/i18n/pt-BR.ts +4 -0
- package/corpus/templates/mail/app/i18n/zh-CN.ts +4 -0
- package/corpus/templates/mail/app/i18n/zh-TW.ts +4 -0
- package/corpus/templates/mail/app/lib/utils.ts +2 -2
- package/corpus/templates/mail/changelog/2026-06-28-pinned-sidebar-collapses-into-an-animated-icon-rail.md +6 -0
- package/corpus/templates/plan/app/components/layout/Sidebar.tsx +6 -8
- package/corpus/templates/plan/app/components/plan/wireframe/Wireframe.tsx +1 -1
- package/corpus/templates/plan/app/global.css +61 -78
- package/corpus/templates/plan/app/pages/PlansPage.tsx +8 -0
- package/corpus/templates/plan/changelog/2026-06-28-left-sidebar-collapse-motion-and-footer-chrome-are-quieter.md +6 -0
- package/corpus/templates/plan/changelog/2026-06-28-plans-use-the-shared-neutral-light-and-dark-theme.md +6 -0
- package/corpus/templates/plan/changelog/2026-06-28-sending-open-feedback-from-a-plan-now-opens-the-inline-plan-.md +6 -0
- package/corpus/templates/slides/.agents/skills/design-systems/SKILL.md +9 -10
- package/corpus/templates/slides/AGENTS.md +3 -2
- package/corpus/templates/slides/actions/import-file.ts +26 -17
- package/corpus/templates/slides/actions/index-design-system-with-builder.ts +259 -0
- package/corpus/templates/slides/app/components/design-system/DesignSystemSetup.tsx +35 -167
- package/corpus/templates/slides/app/components/design-system/fig-import-response.ts +9 -13
- package/corpus/templates/slides/app/components/layout/Sidebar.tsx +5 -5
- package/corpus/templates/slides/app/context/DeckContext.tsx +1 -1
- package/corpus/templates/slides/app/i18n/ar-SA.ts +9 -37
- package/corpus/templates/slides/app/i18n/de-DE.ts +10 -25
- package/corpus/templates/slides/app/i18n/en-US.ts +9 -26
- package/corpus/templates/slides/app/i18n/es-ES.ts +10 -28
- package/corpus/templates/slides/app/i18n/fr-FR.ts +10 -28
- package/corpus/templates/slides/app/i18n/hi-IN.ts +9 -26
- package/corpus/templates/slides/app/i18n/ja-JP.ts +10 -22
- package/corpus/templates/slides/app/i18n/ko-KR.ts +9 -23
- package/corpus/templates/slides/app/i18n/pt-BR.ts +10 -28
- package/corpus/templates/slides/app/i18n/zh-CN.ts +9 -22
- package/corpus/templates/slides/app/i18n/zh-TW.ts +9 -22
- package/corpus/templates/slides/changelog/2026-06-28-left-sidebar-collapse-motion-and-footer-chrome-are-quieter.md +6 -0
- package/corpus/templates/slides/server/handlers/import-figma-system.ts +44 -12
- package/corpus/templates/slides/server/lib/chat-attachments.ts +1 -1
- package/corpus/templates/videos/app/components/NewCompositionPopover.tsx +1 -1
- package/corpus/templates/videos/app/components/Sidebar.tsx +2 -2
- package/corpus/templates/videos/app/components/layout/Layout.tsx +29 -2
- package/corpus/templates/videos/app/components/layout/NavSidebar.tsx +113 -30
- package/corpus/templates/videos/app/i18n/ar-SA.ts +2 -0
- package/corpus/templates/videos/app/i18n/de-DE.ts +2 -0
- package/corpus/templates/videos/app/i18n/en-US.ts +2 -0
- package/corpus/templates/videos/app/i18n/es-ES.ts +2 -0
- package/corpus/templates/videos/app/i18n/fr-FR.ts +2 -0
- package/corpus/templates/videos/app/i18n/hi-IN.ts +2 -0
- package/corpus/templates/videos/app/i18n/ja-JP.ts +2 -0
- package/corpus/templates/videos/app/i18n/ko-KR.ts +2 -0
- package/corpus/templates/videos/app/i18n/pt-BR.ts +2 -0
- package/corpus/templates/videos/app/i18n/zh-CN.ts +2 -0
- package/corpus/templates/videos/app/i18n/zh-TW.ts +2 -0
- package/corpus/templates/videos/changelog/2026-06-28-left-sidebar-collapses-into-an-animated-icon-rail.md +6 -0
- package/dist/agent/engine/index.d.ts +1 -1
- package/dist/agent/engine/index.d.ts.map +1 -1
- package/dist/agent/engine/index.js +1 -1
- package/dist/agent/engine/index.js.map +1 -1
- package/dist/agent/engine/registry.d.ts +9 -0
- package/dist/agent/engine/registry.d.ts.map +1 -1
- package/dist/agent/engine/registry.js +37 -0
- package/dist/agent/engine/registry.js.map +1 -1
- package/dist/agent/production-agent.d.ts.map +1 -1
- package/dist/agent/production-agent.js +4 -3
- package/dist/agent/production-agent.js.map +1 -1
- package/dist/application-state/handlers.js +1 -1
- package/dist/application-state/handlers.js.map +1 -1
- package/dist/brand-kit/index.d.ts +1 -1
- package/dist/brand-kit/index.js +1 -1
- package/dist/brand-kit/index.js.map +1 -1
- package/dist/cli/design-connect.d.ts +52 -0
- package/dist/cli/design-connect.d.ts.map +1 -0
- package/dist/cli/design-connect.js +409 -0
- package/dist/cli/design-connect.js.map +1 -0
- package/dist/cli/index.js +15 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/skills.d.ts +3 -0
- package/dist/cli/skills.d.ts.map +1 -1
- package/dist/cli/skills.js +139 -3
- package/dist/cli/skills.js.map +1 -1
- package/dist/client/AgentPanel.js +1 -1
- package/dist/client/AgentPanel.js.map +1 -1
- package/dist/client/AssistantChat.d.ts.map +1 -1
- package/dist/client/AssistantChat.js +38 -8
- package/dist/client/AssistantChat.js.map +1 -1
- package/dist/client/MultiTabAssistantChat.js +1 -1
- package/dist/client/MultiTabAssistantChat.js.map +1 -1
- package/dist/client/agent-chat.d.ts +6 -0
- package/dist/client/agent-chat.d.ts.map +1 -1
- package/dist/client/agent-chat.js +17 -3
- package/dist/client/agent-chat.js.map +1 -1
- package/dist/client/blocks/library/MermaidBlock.js +1 -1
- package/dist/client/blocks/library/MermaidBlock.js.map +1 -1
- package/dist/client/blocks/library/diagram.js +1 -1
- package/dist/client/blocks/library/diagram.js.map +1 -1
- package/dist/client/blocks/library/wireframe.js +1 -1
- package/dist/client/blocks/library/wireframe.js.map +1 -1
- package/dist/client/chat/message-components.js +1 -1
- package/dist/client/chat/message-components.js.map +1 -1
- package/dist/client/chat-model-groups.d.ts.map +1 -1
- package/dist/client/chat-model-groups.js +1 -2
- package/dist/client/chat-model-groups.js.map +1 -1
- package/dist/client/components/LiveCursorOverlay.d.ts +1 -2
- package/dist/client/components/LiveCursorOverlay.d.ts.map +1 -1
- package/dist/client/components/LiveCursorOverlay.js +19 -40
- package/dist/client/components/LiveCursorOverlay.js.map +1 -1
- package/dist/client/composer/TiptapComposer.d.ts +3 -1
- package/dist/client/composer/TiptapComposer.d.ts.map +1 -1
- package/dist/client/composer/TiptapComposer.js +86 -24
- package/dist/client/composer/TiptapComposer.js.map +1 -1
- package/dist/client/composer/useVoiceDictation.d.ts +9 -0
- package/dist/client/composer/useVoiceDictation.d.ts.map +1 -1
- package/dist/client/composer/useVoiceDictation.js +154 -32
- package/dist/client/composer/useVoiceDictation.js.map +1 -1
- package/dist/client/extensions/portable-extension.d.ts +1 -1
- package/dist/client/extensions/portable-extension.d.ts.map +1 -1
- package/dist/client/extensions/portable-extension.js.map +1 -1
- package/dist/client/frame-protocol.d.ts +17 -2
- package/dist/client/frame-protocol.d.ts.map +1 -1
- package/dist/client/frame-protocol.js.map +1 -1
- package/dist/client/rich-markdown-editor/RegistryBlockNode.js +2 -2
- package/dist/client/rich-markdown-editor/RegistryBlockNode.js.map +1 -1
- package/dist/client/sharing/ShareButton.d.ts +2 -0
- package/dist/client/sharing/ShareButton.d.ts.map +1 -1
- package/dist/client/sharing/ShareButton.js +7 -6
- package/dist/client/sharing/ShareButton.js.map +1 -1
- package/dist/client/use-agent-engine-configured.d.ts +5 -0
- package/dist/client/use-agent-engine-configured.d.ts.map +1 -1
- package/dist/client/use-agent-engine-configured.js +51 -25
- package/dist/client/use-agent-engine-configured.js.map +1 -1
- package/dist/code-agents/transcript-normalizer.js +1 -1
- package/dist/code-agents/transcript-normalizer.js.map +1 -1
- package/dist/collab/routes.d.ts +1 -1
- package/dist/extensions/path.d.ts +1 -1
- package/dist/extensions/path.d.ts.map +1 -1
- package/dist/extensions/path.js.map +1 -1
- package/dist/file-upload/actions/upload-image.d.ts +2 -2
- package/dist/integrations/a2a-continuation-processor.js +1 -1
- package/dist/integrations/a2a-continuation-processor.js.map +1 -1
- package/dist/mcp/build-server.d.ts +1 -1
- package/dist/mcp/build-server.d.ts.map +1 -1
- package/dist/mcp/build-server.js.map +1 -1
- package/dist/notifications/routes.d.ts +3 -3
- package/dist/observability/routes.d.ts +5 -5
- package/dist/org/handlers.js +5 -5
- package/dist/org/handlers.js.map +1 -1
- package/dist/org/plugin.js +2 -2
- package/dist/org/plugin.js.map +1 -1
- package/dist/scripts/call-agent.js +1 -1
- package/dist/scripts/call-agent.js.map +1 -1
- package/dist/scripts/db/safety.js +1 -1
- package/dist/scripts/db/safety.js.map +1 -1
- package/dist/server/agent-engine-api-key-route.d.ts +1 -1
- package/dist/server/auth.d.ts.map +1 -1
- package/dist/server/auth.js +3 -0
- package/dist/server/auth.js.map +1 -1
- package/dist/server/builder-design-systems.d.ts +28 -0
- package/dist/server/builder-design-systems.d.ts.map +1 -0
- package/dist/server/builder-design-systems.js +217 -0
- package/dist/server/builder-design-systems.js.map +1 -0
- package/dist/server/core-routes-plugin.d.ts +1 -0
- package/dist/server/core-routes-plugin.d.ts.map +1 -1
- package/dist/server/core-routes-plugin.js +20 -3
- package/dist/server/core-routes-plugin.js.map +1 -1
- package/dist/server/index.d.ts +1 -0
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +1 -0
- package/dist/server/index.js.map +1 -1
- package/dist/server/transcribe-voice.d.ts +1 -1
- package/dist/server/transcribe-voice.d.ts.map +1 -1
- package/dist/server/transcribe-voice.js +40 -24
- package/dist/server/transcribe-voice.js.map +1 -1
- package/dist/shared/mcp-embed-headers.d.ts +1 -0
- package/dist/shared/mcp-embed-headers.d.ts.map +1 -1
- package/dist/shared/mcp-embed-headers.js +20 -1
- package/dist/shared/mcp-embed-headers.js.map +1 -1
- package/dist/styles/agent-native.css +60 -4
- package/dist/templates/workspace-core/.agents/skills/voice-transcription/SKILL.md +10 -0
- package/dist/usage/store.js +2 -2
- package/dist/usage/store.js.map +1 -1
- package/dist/vite/client.d.ts.map +1 -1
- package/dist/vite/client.js +2 -0
- package/dist/vite/client.js.map +1 -1
- package/dist/voice/index.d.ts +5 -0
- package/dist/voice/index.d.ts.map +1 -0
- package/dist/voice/index.js +4 -0
- package/dist/voice/index.js.map +1 -0
- package/dist/voice/voice-cleanup-prompt.d.ts +6 -0
- package/dist/voice/voice-cleanup-prompt.d.ts.map +1 -0
- package/dist/voice/voice-cleanup-prompt.js +26 -0
- package/dist/voice/voice-cleanup-prompt.js.map +1 -0
- package/dist/voice/voice-context.d.ts +25 -0
- package/dist/voice/voice-context.d.ts.map +1 -0
- package/dist/voice/voice-context.js +156 -0
- package/dist/voice/voice-context.js.map +1 -0
- package/dist/voice/voice-replacements.d.ts +4 -0
- package/dist/voice/voice-replacements.d.ts.map +1 -0
- package/dist/voice/voice-replacements.js +52 -0
- package/dist/voice/voice-replacements.js.map +1 -0
- package/docs/content/locales/ar-SA/skills-guide.mdx +5 -0
- package/docs/content/locales/ar-SA/template-design.mdx +55 -1
- package/docs/content/locales/de-DE/skills-guide.mdx +5 -0
- package/docs/content/locales/de-DE/template-design.mdx +66 -1
- package/docs/content/locales/es-ES/skills-guide.mdx +5 -0
- package/docs/content/locales/es-ES/template-design.mdx +65 -1
- package/docs/content/locales/fr-FR/skills-guide.mdx +5 -0
- package/docs/content/locales/fr-FR/template-design.mdx +64 -1
- package/docs/content/locales/hi-IN/skills-guide.mdx +5 -0
- package/docs/content/locales/hi-IN/template-design.mdx +59 -1
- package/docs/content/locales/ja-JP/skills-guide.mdx +5 -0
- package/docs/content/locales/ja-JP/template-design.mdx +62 -1
- package/docs/content/locales/ko-KR/skills-guide.mdx +5 -0
- package/docs/content/locales/ko-KR/template-design.mdx +58 -1
- package/docs/content/locales/pt-BR/skills-guide.mdx +5 -0
- package/docs/content/locales/pt-BR/template-design.mdx +62 -1
- package/docs/content/locales/zh-CN/skills-guide.mdx +5 -0
- package/docs/content/locales/zh-CN/template-design.mdx +50 -1
- package/docs/content/locales/zh-TW/skills-guide.mdx +5 -0
- package/docs/content/locales/zh-TW/template-design.mdx +52 -1
- package/docs/content/skills-guide.mdx +5 -0
- package/docs/content/template-design.mdx +59 -1
- package/package.json +2 -1
- package/src/templates/workspace-core/.agents/skills/voice-transcription/SKILL.md +10 -0
- package/corpus/templates/design/actions/import-figma-file.ts +0 -166
- package/corpus/templates/design/app/components/design/DesignToolbar.tsx +0 -339
- package/corpus/templates/design/app/components/design/PresentMode.tsx +0 -68
- package/corpus/templates/design/app/components/design/ViewportTabs.tsx +0 -149
- package/corpus/templates/design/app/components/design/ZoomControls.tsx +0 -157
- package/corpus/templates/slides/server/lib/fig-design-system.ts +0 -110
|
@@ -20,6 +20,8 @@ import {
|
|
|
20
20
|
IconEye,
|
|
21
21
|
IconEyeOff,
|
|
22
22
|
IconPlayerPlay,
|
|
23
|
+
IconLayoutSidebarLeftCollapse,
|
|
24
|
+
IconLayoutSidebarLeftExpand,
|
|
23
25
|
} from "@tabler/icons-react";
|
|
24
26
|
import {
|
|
25
27
|
useQuery,
|
|
@@ -120,6 +122,7 @@ const DASHBOARD_SORT_MODE_KEY = "dashboard-sort-mode";
|
|
|
120
122
|
const ANALYSIS_SORT_MODE_KEY = "analysis-sort-mode";
|
|
121
123
|
const DASHBOARDS_OPEN_KEY = "analytics-sidebar-dashboards-open";
|
|
122
124
|
const ANALYSES_OPEN_KEY = "analytics-sidebar-analyses-open";
|
|
125
|
+
const SIDEBAR_COLLAPSE_KEY = "analytics.sidebar.collapsed";
|
|
123
126
|
const SIDEBAR_SKELETON_CLASS =
|
|
124
127
|
"bg-sidebar-foreground/12 dark:bg-sidebar-foreground/10";
|
|
125
128
|
|
|
@@ -1232,6 +1235,15 @@ export function Sidebar({ mobile }: { mobile?: boolean } = {}) {
|
|
|
1232
1235
|
const saved = localStorage.getItem("sidebar-width");
|
|
1233
1236
|
return saved ? Math.max(180, Math.min(480, Number(saved))) : 256;
|
|
1234
1237
|
});
|
|
1238
|
+
const [sidebarCollapsed, setSidebarCollapsed] = useState(() => {
|
|
1239
|
+
if (typeof window === "undefined") return false;
|
|
1240
|
+
try {
|
|
1241
|
+
return window.localStorage.getItem(SIDEBAR_COLLAPSE_KEY) === "1";
|
|
1242
|
+
} catch {
|
|
1243
|
+
return false;
|
|
1244
|
+
}
|
|
1245
|
+
});
|
|
1246
|
+
const effectiveCollapsed = Boolean(sidebarCollapsed && !mobile);
|
|
1235
1247
|
const isResizing = useRef(false);
|
|
1236
1248
|
const [hiddenIds, setHiddenIds] = useState(() =>
|
|
1237
1249
|
typeof window === "undefined" ? new Set<string>() : getHiddenDashboards(),
|
|
@@ -1823,6 +1835,7 @@ export function Sidebar({ mobile }: { mobile?: boolean } = {}) {
|
|
|
1823
1835
|
|
|
1824
1836
|
const handleResizeStart = useCallback(
|
|
1825
1837
|
(e: React.MouseEvent) => {
|
|
1838
|
+
if (effectiveCollapsed) return;
|
|
1826
1839
|
e.preventDefault();
|
|
1827
1840
|
isResizing.current = true;
|
|
1828
1841
|
const startX = e.clientX;
|
|
@@ -1854,441 +1867,585 @@ export function Sidebar({ mobile }: { mobile?: boolean } = {}) {
|
|
|
1854
1867
|
document.addEventListener("mousemove", onMouseMove);
|
|
1855
1868
|
document.addEventListener("mouseup", onMouseUp);
|
|
1856
1869
|
},
|
|
1857
|
-
[sidebarWidth],
|
|
1870
|
+
[effectiveCollapsed, sidebarWidth],
|
|
1858
1871
|
);
|
|
1859
1872
|
|
|
1860
1873
|
const isAdhocActive =
|
|
1861
1874
|
location.pathname.startsWith("/adhoc") ||
|
|
1862
1875
|
location.pathname.startsWith("/dashboards");
|
|
1863
1876
|
|
|
1877
|
+
useEffect(() => {
|
|
1878
|
+
if (typeof window === "undefined") return;
|
|
1879
|
+
try {
|
|
1880
|
+
window.localStorage.setItem(
|
|
1881
|
+
SIDEBAR_COLLAPSE_KEY,
|
|
1882
|
+
sidebarCollapsed ? "1" : "0",
|
|
1883
|
+
);
|
|
1884
|
+
} catch {
|
|
1885
|
+
// Ignore storage failures; the in-memory preference still works.
|
|
1886
|
+
}
|
|
1887
|
+
}, [sidebarCollapsed]);
|
|
1888
|
+
|
|
1889
|
+
const collapsedNavItems = [
|
|
1890
|
+
{
|
|
1891
|
+
icon: IconMessageCircle,
|
|
1892
|
+
label: t("navigation.ask"),
|
|
1893
|
+
href: "/ask",
|
|
1894
|
+
active: location.pathname === "/ask",
|
|
1895
|
+
onClick: (event: React.MouseEvent<HTMLAnchorElement>) => {
|
|
1896
|
+
if (
|
|
1897
|
+
location.pathname !== "/ask" &&
|
|
1898
|
+
!event.metaKey &&
|
|
1899
|
+
!event.ctrlKey &&
|
|
1900
|
+
!event.shiftKey &&
|
|
1901
|
+
!event.altKey
|
|
1902
|
+
) {
|
|
1903
|
+
event.preventDefault();
|
|
1904
|
+
navigateWithAgentChatViewTransition(navigate, "/ask");
|
|
1905
|
+
}
|
|
1906
|
+
},
|
|
1907
|
+
},
|
|
1908
|
+
{
|
|
1909
|
+
icon: IconPlayerPlay,
|
|
1910
|
+
label: t("navigation.sessions"),
|
|
1911
|
+
href: "/sessions",
|
|
1912
|
+
active: location.pathname.startsWith("/sessions"),
|
|
1913
|
+
},
|
|
1914
|
+
{
|
|
1915
|
+
icon: IconDatabase,
|
|
1916
|
+
label: t("navigation.dataSources"),
|
|
1917
|
+
href: "/data-sources",
|
|
1918
|
+
active: location.pathname === "/data-sources",
|
|
1919
|
+
},
|
|
1920
|
+
{
|
|
1921
|
+
icon: IconBook2,
|
|
1922
|
+
label: t("navigation.dataDictionary"),
|
|
1923
|
+
href: "/data-dictionary",
|
|
1924
|
+
active: location.pathname.startsWith("/data-dictionary"),
|
|
1925
|
+
},
|
|
1926
|
+
{
|
|
1927
|
+
icon: IconChartBar,
|
|
1928
|
+
label: t("navigation.dashboards"),
|
|
1929
|
+
href: "/dashboards",
|
|
1930
|
+
active: isAdhocActive,
|
|
1931
|
+
},
|
|
1932
|
+
{
|
|
1933
|
+
icon: IconReportAnalytics,
|
|
1934
|
+
label: t("navigation.analyses"),
|
|
1935
|
+
href: "/analyses",
|
|
1936
|
+
active: location.pathname.startsWith("/analyses"),
|
|
1937
|
+
},
|
|
1938
|
+
{
|
|
1939
|
+
icon: IconSettings,
|
|
1940
|
+
label: t("navigation.settings"),
|
|
1941
|
+
href: "/settings",
|
|
1942
|
+
active: location.pathname === "/settings",
|
|
1943
|
+
},
|
|
1944
|
+
];
|
|
1945
|
+
|
|
1864
1946
|
return (
|
|
1865
1947
|
<div
|
|
1866
|
-
className="relative flex h-screen min-w-0 flex-col overflow-hidden border-r border-border bg-sidebar text-sidebar-foreground"
|
|
1867
|
-
style={
|
|
1948
|
+
className="relative flex h-screen min-w-0 flex-col overflow-hidden border-r border-border bg-sidebar text-sidebar-foreground transition-[width] duration-200 ease-out"
|
|
1949
|
+
style={
|
|
1950
|
+
mobile ? undefined : { width: effectiveCollapsed ? 48 : sidebarWidth }
|
|
1951
|
+
}
|
|
1868
1952
|
>
|
|
1869
|
-
{!mobile && (
|
|
1953
|
+
{!mobile && !effectiveCollapsed && (
|
|
1870
1954
|
<div
|
|
1871
1955
|
onMouseDown={handleResizeStart}
|
|
1872
1956
|
className="absolute end-0 top-0 bottom-0 w-1 cursor-col-resize hover:bg-primary/30 active:bg-primary/50 z-10"
|
|
1873
1957
|
/>
|
|
1874
1958
|
)}
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
<
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
<
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
"flex
|
|
1927
|
-
location.pathname.startsWith("/sessions")
|
|
1928
|
-
? "bg-sidebar-accent text-sidebar-accent-foreground"
|
|
1929
|
-
: "text-muted-foreground hover:bg-sidebar-accent/50",
|
|
1930
|
-
)}
|
|
1931
|
-
>
|
|
1932
|
-
<IconPlayerPlay className="h-4 w-4" />
|
|
1933
|
-
{t("navigation.sessions")}
|
|
1934
|
-
</Link>
|
|
1935
|
-
|
|
1936
|
-
{/* Data Sources link */}
|
|
1937
|
-
<Link
|
|
1938
|
-
to="/data-sources"
|
|
1939
|
-
className={cn(
|
|
1940
|
-
"flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",
|
|
1941
|
-
location.pathname === "/data-sources"
|
|
1942
|
-
? "bg-sidebar-accent text-sidebar-accent-foreground"
|
|
1943
|
-
: "text-muted-foreground hover:bg-sidebar-accent/50",
|
|
1944
|
-
)}
|
|
1945
|
-
>
|
|
1946
|
-
<IconDatabase className="h-4 w-4" />
|
|
1947
|
-
{t("navigation.dataSources")}
|
|
1948
|
-
</Link>
|
|
1949
|
-
|
|
1950
|
-
{/* Data Dictionary link */}
|
|
1951
|
-
<Link
|
|
1952
|
-
to="/data-dictionary"
|
|
1953
|
-
className={cn(
|
|
1954
|
-
"flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",
|
|
1955
|
-
location.pathname.startsWith("/data-dictionary")
|
|
1956
|
-
? "bg-sidebar-accent text-sidebar-accent-foreground"
|
|
1957
|
-
: "text-muted-foreground hover:bg-sidebar-accent/50",
|
|
1958
|
-
)}
|
|
1959
|
-
>
|
|
1960
|
-
<IconBook2 className="h-4 w-4" />
|
|
1961
|
-
{t("navigation.dataDictionary")}
|
|
1962
|
-
</Link>
|
|
1963
|
-
|
|
1964
|
-
{/* Dashboards section */}
|
|
1965
|
-
<div className="group/section min-w-0 space-y-1">
|
|
1966
|
-
<div
|
|
1967
|
-
className={cn(
|
|
1968
|
-
"flex w-full min-w-0 items-center rounded-lg transition-all hover:text-primary",
|
|
1969
|
-
isAdhocActive
|
|
1970
|
-
? "text-sidebar-accent-foreground"
|
|
1971
|
-
: "text-muted-foreground hover:bg-sidebar-accent/50",
|
|
1972
|
-
)}
|
|
1959
|
+
{effectiveCollapsed ? (
|
|
1960
|
+
<>
|
|
1961
|
+
<div className="flex h-12 shrink-0 items-center justify-center border-b border-border px-1">
|
|
1962
|
+
<Tooltip>
|
|
1963
|
+
<TooltipTrigger asChild>
|
|
1964
|
+
<button
|
|
1965
|
+
type="button"
|
|
1966
|
+
onClick={() => setSidebarCollapsed(false)}
|
|
1967
|
+
aria-label={t("sidebar.expandSidebar")}
|
|
1968
|
+
className="flex h-10 w-10 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-sidebar-accent/50 hover:text-foreground"
|
|
1969
|
+
>
|
|
1970
|
+
<IconLayoutSidebarLeftExpand className="h-4 w-4 rtl:-scale-x-100" />
|
|
1971
|
+
</button>
|
|
1972
|
+
</TooltipTrigger>
|
|
1973
|
+
<TooltipContent side="right">
|
|
1974
|
+
{t("sidebar.expandSidebar")}
|
|
1975
|
+
</TooltipContent>
|
|
1976
|
+
</Tooltip>
|
|
1977
|
+
</div>
|
|
1978
|
+
|
|
1979
|
+
<nav className="flex min-h-0 flex-1 flex-col items-center gap-1 overflow-y-auto px-1 py-2">
|
|
1980
|
+
{collapsedNavItems.map((item) => {
|
|
1981
|
+
const Icon = item.icon;
|
|
1982
|
+
return (
|
|
1983
|
+
<Tooltip key={item.href}>
|
|
1984
|
+
<TooltipTrigger asChild>
|
|
1985
|
+
<Link
|
|
1986
|
+
to={item.href}
|
|
1987
|
+
onClick={item.onClick}
|
|
1988
|
+
aria-label={item.label}
|
|
1989
|
+
className={cn(
|
|
1990
|
+
"flex h-10 w-10 items-center justify-center rounded-md transition-colors",
|
|
1991
|
+
item.active
|
|
1992
|
+
? "bg-sidebar-accent text-sidebar-accent-foreground"
|
|
1993
|
+
: "text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground",
|
|
1994
|
+
)}
|
|
1995
|
+
>
|
|
1996
|
+
<Icon className="h-4 w-4" />
|
|
1997
|
+
</Link>
|
|
1998
|
+
</TooltipTrigger>
|
|
1999
|
+
<TooltipContent side="right">{item.label}</TooltipContent>
|
|
2000
|
+
</Tooltip>
|
|
2001
|
+
);
|
|
2002
|
+
})}
|
|
2003
|
+
</nav>
|
|
2004
|
+
</>
|
|
2005
|
+
) : (
|
|
2006
|
+
<>
|
|
2007
|
+
<div className="flex h-12 shrink-0 items-center border-b border-border px-4 lg:px-6">
|
|
2008
|
+
<Link
|
|
2009
|
+
to="/"
|
|
2010
|
+
className="flex min-w-0 flex-1 items-center gap-2 font-semibold"
|
|
1973
2011
|
>
|
|
1974
|
-
<
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
>
|
|
1980
|
-
<IconChartBar className="h-4 w-4 shrink-0" />
|
|
1981
|
-
<span className="min-w-0 flex-1 truncate">
|
|
1982
|
-
{t("navigation.dashboards")}
|
|
1983
|
-
</span>
|
|
1984
|
-
</button>
|
|
1985
|
-
<SidebarSectionSettingsPopover
|
|
1986
|
-
label={t("navigation.dashboards")}
|
|
1987
|
-
sortMode={dashboardSortMode}
|
|
1988
|
-
onSortModeChange={setDashboardSortMode}
|
|
1989
|
-
sharedOnly={dashFilter === "org"}
|
|
1990
|
-
onSharedOnlyChange={(checked) =>
|
|
1991
|
-
setDashFilter(checked ? "org" : "all")
|
|
1992
|
-
}
|
|
2012
|
+
<img
|
|
2013
|
+
src={appPath("/agent-native-icon-light.svg")}
|
|
2014
|
+
alt=""
|
|
2015
|
+
aria-hidden="true"
|
|
2016
|
+
className="block h-5 w-auto shrink-0 dark:hidden"
|
|
1993
2017
|
/>
|
|
1994
|
-
<
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2018
|
+
<img
|
|
2019
|
+
src={appPath("/agent-native-icon-dark.svg")}
|
|
2020
|
+
alt=""
|
|
2021
|
+
aria-hidden="true"
|
|
2022
|
+
className="hidden h-5 w-auto shrink-0 dark:block"
|
|
2023
|
+
/>
|
|
2024
|
+
<span className="text-lg font-bold tracking-tight">
|
|
2025
|
+
{t("navigation.brand")}
|
|
2026
|
+
</span>
|
|
2027
|
+
</Link>
|
|
2028
|
+
{!mobile && (
|
|
2029
|
+
<Tooltip>
|
|
2030
|
+
<TooltipTrigger asChild>
|
|
2031
|
+
<button
|
|
2032
|
+
type="button"
|
|
2033
|
+
onClick={() => setSidebarCollapsed(true)}
|
|
2034
|
+
aria-label={t("sidebar.collapseSidebar")}
|
|
2035
|
+
className="flex h-8 w-8 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-sidebar-accent/50 hover:text-foreground"
|
|
2036
|
+
>
|
|
2037
|
+
<IconLayoutSidebarLeftCollapse className="h-4 w-4 rtl:-scale-x-100" />
|
|
2038
|
+
</button>
|
|
2039
|
+
</TooltipTrigger>
|
|
2040
|
+
<TooltipContent side="right">
|
|
2041
|
+
{t("sidebar.collapseSidebar")}
|
|
2042
|
+
</TooltipContent>
|
|
2043
|
+
</Tooltip>
|
|
2044
|
+
)}
|
|
2045
|
+
</div>
|
|
2046
|
+
<div className="flex min-h-0 flex-1 flex-col overflow-y-auto overflow-x-hidden py-2">
|
|
2047
|
+
<nav className="grid min-w-0 items-start px-2 text-sm font-medium lg:px-4 space-y-1">
|
|
2048
|
+
{/* Ask link */}
|
|
2049
|
+
<Link
|
|
2050
|
+
to="/ask"
|
|
2051
|
+
onClick={(event) => {
|
|
2052
|
+
if (
|
|
2053
|
+
location.pathname !== "/ask" &&
|
|
2054
|
+
!event.metaKey &&
|
|
2055
|
+
!event.ctrlKey &&
|
|
2056
|
+
!event.shiftKey &&
|
|
2057
|
+
!event.altKey
|
|
2058
|
+
) {
|
|
2059
|
+
event.preventDefault();
|
|
2060
|
+
navigateWithAgentChatViewTransition(navigate, "/ask");
|
|
2061
|
+
}
|
|
2062
|
+
}}
|
|
2063
|
+
className={cn(
|
|
2064
|
+
"flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",
|
|
2065
|
+
location.pathname === "/ask"
|
|
2066
|
+
? "bg-sidebar-accent text-sidebar-accent-foreground"
|
|
2067
|
+
: "text-muted-foreground hover:bg-sidebar-accent/50",
|
|
2068
|
+
)}
|
|
2003
2069
|
>
|
|
2004
|
-
<
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
!dashOpen && "-rotate-90",
|
|
2008
|
-
)}
|
|
2009
|
-
/>
|
|
2010
|
-
</button>
|
|
2011
|
-
</div>
|
|
2070
|
+
<IconMessageCircle className="h-4 w-4" />
|
|
2071
|
+
{t("navigation.ask")}
|
|
2072
|
+
</Link>
|
|
2012
2073
|
|
|
2013
|
-
|
|
2014
|
-
<
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2074
|
+
{/* Sessions link */}
|
|
2075
|
+
<Link
|
|
2076
|
+
to="/sessions"
|
|
2077
|
+
className={cn(
|
|
2078
|
+
"flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",
|
|
2079
|
+
location.pathname.startsWith("/sessions")
|
|
2080
|
+
? "bg-sidebar-accent text-sidebar-accent-foreground"
|
|
2081
|
+
: "text-muted-foreground hover:bg-sidebar-accent/50",
|
|
2082
|
+
)}
|
|
2018
2083
|
>
|
|
2019
|
-
<
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
>
|
|
2023
|
-
<div className="ms-4 min-w-0 space-y-0.5">
|
|
2024
|
-
{displayedDashboards.map((d) => (
|
|
2025
|
-
<SortableDashboardItem
|
|
2026
|
-
key={d.id}
|
|
2027
|
-
d={d}
|
|
2028
|
-
isActive={activeDashboardId === d.id}
|
|
2029
|
-
location={location}
|
|
2030
|
-
favoriteIds={favoriteIds}
|
|
2031
|
-
onToggleFavorite={toggleFavorite}
|
|
2032
|
-
onDelete={handleDashboardDelete}
|
|
2033
|
-
onRename={handleDashboardRename}
|
|
2034
|
-
onArchive={handleDashboardArchive}
|
|
2035
|
-
onSetVisibility={handleDashboardSetVisibility}
|
|
2036
|
-
onPrefetch={prefetchDashboard}
|
|
2037
|
-
views={allViewsMap[d.id]}
|
|
2038
|
-
/>
|
|
2039
|
-
))}
|
|
2040
|
-
{filteredDashboards.length > SIDEBAR_PREVIEW_COUNT && (
|
|
2041
|
-
<button
|
|
2042
|
-
onClick={() => setDashShowAll(!dashShowAll)}
|
|
2043
|
-
className="flex items-center gap-1 px-3 py-1 text-[11px] text-muted-foreground/70 hover:text-primary"
|
|
2044
|
-
>
|
|
2045
|
-
{dashShowAll
|
|
2046
|
-
? t("sidebar.showLess")
|
|
2047
|
-
: t("sidebar.showMore", {
|
|
2048
|
-
count:
|
|
2049
|
-
filteredDashboards.length -
|
|
2050
|
-
SIDEBAR_PREVIEW_COUNT,
|
|
2051
|
-
})}
|
|
2052
|
-
</button>
|
|
2053
|
-
)}
|
|
2054
|
-
{sqlDashboardsLoading &&
|
|
2055
|
-
sqlDashboards.length === 0 &&
|
|
2056
|
-
Array.from({ length: 3 }).map((_, i) => (
|
|
2057
|
-
<div
|
|
2058
|
-
key={`sql-skeleton-${i}`}
|
|
2059
|
-
className="flex items-center gap-2 px-3 py-1"
|
|
2060
|
-
>
|
|
2061
|
-
<Skeleton
|
|
2062
|
-
className={cn(
|
|
2063
|
-
"h-3.5 w-3.5 shrink-0 rounded-sm",
|
|
2064
|
-
SIDEBAR_SKELETON_CLASS,
|
|
2065
|
-
)}
|
|
2066
|
-
/>
|
|
2067
|
-
<Skeleton
|
|
2068
|
-
className={cn(
|
|
2069
|
-
"h-3 rounded",
|
|
2070
|
-
SIDEBAR_SKELETON_CLASS,
|
|
2071
|
-
)}
|
|
2072
|
-
style={{ width: `${60 + ((i * 17) % 30)}%` }}
|
|
2073
|
-
/>
|
|
2074
|
-
</div>
|
|
2075
|
-
))}
|
|
2076
|
-
<NewDashboardDialog />
|
|
2077
|
-
</div>
|
|
2078
|
-
</SortableContext>
|
|
2079
|
-
</DndContext>
|
|
2080
|
-
)}
|
|
2081
|
-
</div>
|
|
2084
|
+
<IconPlayerPlay className="h-4 w-4" />
|
|
2085
|
+
{t("navigation.sessions")}
|
|
2086
|
+
</Link>
|
|
2082
2087
|
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
>
|
|
2093
|
-
<button
|
|
2094
|
-
type="button"
|
|
2095
|
-
onClick={toggleAnalysesOpen}
|
|
2096
|
-
className="flex min-w-0 flex-1 items-center gap-3 px-3 py-2 text-start"
|
|
2097
|
-
aria-expanded={analysesOpen}
|
|
2088
|
+
{/* Data Sources link */}
|
|
2089
|
+
<Link
|
|
2090
|
+
to="/data-sources"
|
|
2091
|
+
className={cn(
|
|
2092
|
+
"flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",
|
|
2093
|
+
location.pathname === "/data-sources"
|
|
2094
|
+
? "bg-sidebar-accent text-sidebar-accent-foreground"
|
|
2095
|
+
: "text-muted-foreground hover:bg-sidebar-accent/50",
|
|
2096
|
+
)}
|
|
2098
2097
|
>
|
|
2099
|
-
<
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
<
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
}
|
|
2112
|
-
showHidden={analysisHiddenFilter === "hidden"}
|
|
2113
|
-
onShowHiddenChange={(checked) =>
|
|
2114
|
-
setAnalysisHiddenFilter(checked ? "hidden" : "visible")
|
|
2115
|
-
}
|
|
2116
|
-
/>
|
|
2117
|
-
<button
|
|
2118
|
-
type="button"
|
|
2119
|
-
onClick={toggleAnalysesOpen}
|
|
2120
|
-
className="me-1 flex h-7 w-7 shrink-0 items-center justify-center rounded-md text-muted-foreground/70 hover:bg-sidebar-accent hover:text-foreground"
|
|
2121
|
-
aria-label={
|
|
2122
|
-
analysesOpen
|
|
2123
|
-
? t("sidebar.collapseAnalyses")
|
|
2124
|
-
: t("sidebar.expandAnalyses")
|
|
2125
|
-
}
|
|
2098
|
+
<IconDatabase className="h-4 w-4" />
|
|
2099
|
+
{t("navigation.dataSources")}
|
|
2100
|
+
</Link>
|
|
2101
|
+
|
|
2102
|
+
{/* Data Dictionary link */}
|
|
2103
|
+
<Link
|
|
2104
|
+
to="/data-dictionary"
|
|
2105
|
+
className={cn(
|
|
2106
|
+
"flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",
|
|
2107
|
+
location.pathname.startsWith("/data-dictionary")
|
|
2108
|
+
? "bg-sidebar-accent text-sidebar-accent-foreground"
|
|
2109
|
+
: "text-muted-foreground hover:bg-sidebar-accent/50",
|
|
2110
|
+
)}
|
|
2126
2111
|
>
|
|
2127
|
-
<
|
|
2112
|
+
<IconBook2 className="h-4 w-4" />
|
|
2113
|
+
{t("navigation.dataDictionary")}
|
|
2114
|
+
</Link>
|
|
2115
|
+
|
|
2116
|
+
{/* Dashboards section */}
|
|
2117
|
+
<div className="group/section min-w-0 space-y-1">
|
|
2118
|
+
<div
|
|
2128
2119
|
className={cn(
|
|
2129
|
-
"
|
|
2130
|
-
|
|
2120
|
+
"flex w-full min-w-0 items-center rounded-lg transition-all hover:text-primary",
|
|
2121
|
+
isAdhocActive
|
|
2122
|
+
? "text-sidebar-accent-foreground"
|
|
2123
|
+
: "text-muted-foreground hover:bg-sidebar-accent/50",
|
|
2131
2124
|
)}
|
|
2132
|
-
/>
|
|
2133
|
-
</button>
|
|
2134
|
-
</div>
|
|
2135
|
-
|
|
2136
|
-
{analysesOpen && (
|
|
2137
|
-
<DndContext
|
|
2138
|
-
sensors={sensors}
|
|
2139
|
-
collisionDetection={closestCenter}
|
|
2140
|
-
onDragEnd={handleAnalysisDragEnd}
|
|
2141
|
-
>
|
|
2142
|
-
<SortableContext
|
|
2143
|
-
items={displayedAnalyses.map((a) => a.id)}
|
|
2144
|
-
strategy={verticalListSortingStrategy}
|
|
2145
2125
|
>
|
|
2146
|
-
<
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
<
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2126
|
+
<button
|
|
2127
|
+
type="button"
|
|
2128
|
+
onClick={toggleDashOpen}
|
|
2129
|
+
className="flex min-w-0 flex-1 items-center gap-3 px-3 py-2 text-start"
|
|
2130
|
+
aria-expanded={dashOpen}
|
|
2131
|
+
>
|
|
2132
|
+
<IconChartBar className="h-4 w-4 shrink-0" />
|
|
2133
|
+
<span className="min-w-0 flex-1 truncate">
|
|
2134
|
+
{t("navigation.dashboards")}
|
|
2135
|
+
</span>
|
|
2136
|
+
</button>
|
|
2137
|
+
<SidebarSectionSettingsPopover
|
|
2138
|
+
label={t("navigation.dashboards")}
|
|
2139
|
+
sortMode={dashboardSortMode}
|
|
2140
|
+
onSortModeChange={setDashboardSortMode}
|
|
2141
|
+
sharedOnly={dashFilter === "org"}
|
|
2142
|
+
onSharedOnlyChange={(checked) =>
|
|
2143
|
+
setDashFilter(checked ? "org" : "all")
|
|
2144
|
+
}
|
|
2145
|
+
/>
|
|
2146
|
+
<button
|
|
2147
|
+
type="button"
|
|
2148
|
+
onClick={toggleDashOpen}
|
|
2149
|
+
className="me-1 flex h-7 w-7 shrink-0 items-center justify-center rounded-md text-muted-foreground/70 hover:bg-sidebar-accent hover:text-foreground"
|
|
2150
|
+
aria-label={
|
|
2151
|
+
dashOpen
|
|
2152
|
+
? t("sidebar.collapseDashboards")
|
|
2153
|
+
: t("sidebar.expandDashboards")
|
|
2154
|
+
}
|
|
2155
|
+
>
|
|
2156
|
+
<IconChevronDown
|
|
2157
|
+
className={cn(
|
|
2158
|
+
"h-3.5 w-3.5 shrink-0 transition-transform",
|
|
2159
|
+
!dashOpen && "-rotate-90",
|
|
2160
|
+
)}
|
|
2161
|
+
/>
|
|
2162
|
+
</button>
|
|
2163
|
+
</div>
|
|
2164
|
+
|
|
2165
|
+
{dashOpen && (
|
|
2166
|
+
<DndContext
|
|
2167
|
+
sensors={sensors}
|
|
2168
|
+
collisionDetection={closestCenter}
|
|
2169
|
+
onDragEnd={handleDashboardDragEnd}
|
|
2170
|
+
>
|
|
2171
|
+
<SortableContext
|
|
2172
|
+
items={displayedDashboards.map((d) => d.id)}
|
|
2173
|
+
strategy={verticalListSortingStrategy}
|
|
2174
|
+
>
|
|
2175
|
+
<div className="ms-4 min-w-0 space-y-0.5">
|
|
2176
|
+
{displayedDashboards.map((d) => (
|
|
2177
|
+
<SortableDashboardItem
|
|
2178
|
+
key={d.id}
|
|
2179
|
+
d={d}
|
|
2180
|
+
isActive={activeDashboardId === d.id}
|
|
2181
|
+
location={location}
|
|
2182
|
+
favoriteIds={favoriteIds}
|
|
2183
|
+
onToggleFavorite={toggleFavorite}
|
|
2184
|
+
onDelete={handleDashboardDelete}
|
|
2185
|
+
onRename={handleDashboardRename}
|
|
2186
|
+
onArchive={handleDashboardArchive}
|
|
2187
|
+
onSetVisibility={handleDashboardSetVisibility}
|
|
2188
|
+
onPrefetch={prefetchDashboard}
|
|
2189
|
+
views={allViewsMap[d.id]}
|
|
2209
2190
|
/>
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2191
|
+
))}
|
|
2192
|
+
{filteredDashboards.length > SIDEBAR_PREVIEW_COUNT && (
|
|
2193
|
+
<button
|
|
2194
|
+
onClick={() => setDashShowAll(!dashShowAll)}
|
|
2195
|
+
className="flex items-center gap-1 px-3 py-1 text-[11px] text-muted-foreground/70 hover:text-primary"
|
|
2196
|
+
>
|
|
2197
|
+
{dashShowAll
|
|
2198
|
+
? t("sidebar.showLess")
|
|
2199
|
+
: t("sidebar.showMore", {
|
|
2200
|
+
count:
|
|
2201
|
+
filteredDashboards.length -
|
|
2202
|
+
SIDEBAR_PREVIEW_COUNT,
|
|
2203
|
+
})}
|
|
2204
|
+
</button>
|
|
2205
|
+
)}
|
|
2206
|
+
{sqlDashboardsLoading &&
|
|
2207
|
+
sqlDashboards.length === 0 &&
|
|
2208
|
+
Array.from({ length: 3 }).map((_, i) => (
|
|
2209
|
+
<div
|
|
2210
|
+
key={`sql-skeleton-${i}`}
|
|
2211
|
+
className="flex items-center gap-2 px-3 py-1"
|
|
2212
|
+
>
|
|
2213
|
+
<Skeleton
|
|
2214
|
+
className={cn(
|
|
2215
|
+
"h-3.5 w-3.5 shrink-0 rounded-sm",
|
|
2216
|
+
SIDEBAR_SKELETON_CLASS,
|
|
2217
|
+
)}
|
|
2218
|
+
/>
|
|
2219
|
+
<Skeleton
|
|
2220
|
+
className={cn(
|
|
2221
|
+
"h-3 rounded",
|
|
2222
|
+
SIDEBAR_SKELETON_CLASS,
|
|
2223
|
+
)}
|
|
2224
|
+
style={{ width: `${60 + ((i * 17) % 30)}%` }}
|
|
2225
|
+
/>
|
|
2226
|
+
</div>
|
|
2227
|
+
))}
|
|
2228
|
+
<NewDashboardDialog />
|
|
2229
|
+
</div>
|
|
2230
|
+
</SortableContext>
|
|
2231
|
+
</DndContext>
|
|
2232
|
+
)}
|
|
2233
|
+
</div>
|
|
2224
2234
|
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
const Icon = item.icon;
|
|
2229
|
-
const isActive = location.pathname === item.href;
|
|
2230
|
-
return (
|
|
2231
|
-
<Link
|
|
2232
|
-
key={item.href}
|
|
2233
|
-
to={item.href}
|
|
2235
|
+
{/* Analyses section */}
|
|
2236
|
+
<div className="group/section min-w-0 space-y-1">
|
|
2237
|
+
<div
|
|
2234
2238
|
className={cn(
|
|
2235
|
-
"flex
|
|
2236
|
-
|
|
2237
|
-
? "
|
|
2239
|
+
"flex w-full min-w-0 items-center rounded-lg transition-all hover:text-primary",
|
|
2240
|
+
location.pathname.startsWith("/analyses")
|
|
2241
|
+
? "text-sidebar-accent-foreground"
|
|
2238
2242
|
: "text-muted-foreground hover:bg-sidebar-accent/50",
|
|
2239
2243
|
)}
|
|
2240
2244
|
>
|
|
2241
|
-
<
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
new CustomEvent("analytics:open-command-palette"),
|
|
2265
|
-
)
|
|
2266
|
-
}
|
|
2267
|
-
aria-label={t("sidebar.search")}
|
|
2268
|
-
className="flex items-center justify-center rounded-lg p-2 text-muted-foreground transition-all hover:text-primary cursor-pointer hover:bg-sidebar-accent/50"
|
|
2269
|
-
>
|
|
2270
|
-
<IconSearch className="h-4 w-4" />
|
|
2271
|
-
</button>
|
|
2272
|
-
</TooltipTrigger>
|
|
2273
|
-
<TooltipContent side="top">
|
|
2274
|
-
<p>
|
|
2275
|
-
{t("sidebar.searchShortcut", {
|
|
2276
|
-
shortcut: `${shortcutModifierLabel()}+K`,
|
|
2277
|
-
})}
|
|
2278
|
-
</p>
|
|
2279
|
-
</TooltipContent>
|
|
2280
|
-
</Tooltip>
|
|
2281
|
-
<LanguagePicker
|
|
2282
|
-
variant="icon"
|
|
2283
|
-
label={t("settings.languageLabel")}
|
|
2284
|
-
className="[&_[data-language-picker-trigger]]:rounded-lg [&_[data-language-picker-trigger]]:border-0 [&_[data-language-picker-trigger]]:bg-transparent [&_[data-language-picker-trigger]]:text-muted-foreground [&_[data-language-picker-trigger]]:hover:bg-sidebar-accent/50 [&_[data-language-picker-trigger]]:hover:text-primary"
|
|
2245
|
+
<button
|
|
2246
|
+
type="button"
|
|
2247
|
+
onClick={toggleAnalysesOpen}
|
|
2248
|
+
className="flex min-w-0 flex-1 items-center gap-3 px-3 py-2 text-start"
|
|
2249
|
+
aria-expanded={analysesOpen}
|
|
2250
|
+
>
|
|
2251
|
+
<IconReportAnalytics className="h-4 w-4 shrink-0" />
|
|
2252
|
+
<span className="min-w-0 flex-1 truncate">
|
|
2253
|
+
{t("navigation.analyses")}
|
|
2254
|
+
</span>
|
|
2255
|
+
</button>
|
|
2256
|
+
<SidebarSectionSettingsPopover
|
|
2257
|
+
label={t("navigation.analyses")}
|
|
2258
|
+
sortMode={analysisSortMode}
|
|
2259
|
+
onSortModeChange={setAnalysisSortMode}
|
|
2260
|
+
sharedOnly={analysisFilter === "org"}
|
|
2261
|
+
onSharedOnlyChange={(checked) =>
|
|
2262
|
+
setAnalysisFilter(checked ? "org" : "all")
|
|
2263
|
+
}
|
|
2264
|
+
showHidden={analysisHiddenFilter === "hidden"}
|
|
2265
|
+
onShowHiddenChange={(checked) =>
|
|
2266
|
+
setAnalysisHiddenFilter(checked ? "hidden" : "visible")
|
|
2267
|
+
}
|
|
2285
2268
|
/>
|
|
2269
|
+
<button
|
|
2270
|
+
type="button"
|
|
2271
|
+
onClick={toggleAnalysesOpen}
|
|
2272
|
+
className="me-1 flex h-7 w-7 shrink-0 items-center justify-center rounded-md text-muted-foreground/70 hover:bg-sidebar-accent hover:text-foreground"
|
|
2273
|
+
aria-label={
|
|
2274
|
+
analysesOpen
|
|
2275
|
+
? t("sidebar.collapseAnalyses")
|
|
2276
|
+
: t("sidebar.expandAnalyses")
|
|
2277
|
+
}
|
|
2278
|
+
>
|
|
2279
|
+
<IconChevronDown
|
|
2280
|
+
className={cn(
|
|
2281
|
+
"h-3.5 w-3.5 shrink-0 transition-transform",
|
|
2282
|
+
!analysesOpen && "-rotate-90",
|
|
2283
|
+
)}
|
|
2284
|
+
/>
|
|
2285
|
+
</button>
|
|
2286
2286
|
</div>
|
|
2287
|
+
|
|
2288
|
+
{analysesOpen && (
|
|
2289
|
+
<DndContext
|
|
2290
|
+
sensors={sensors}
|
|
2291
|
+
collisionDetection={closestCenter}
|
|
2292
|
+
onDragEnd={handleAnalysisDragEnd}
|
|
2293
|
+
>
|
|
2294
|
+
<SortableContext
|
|
2295
|
+
items={displayedAnalyses.map((a) => a.id)}
|
|
2296
|
+
strategy={verticalListSortingStrategy}
|
|
2297
|
+
>
|
|
2298
|
+
<div className="ms-4 min-w-0 space-y-0.5">
|
|
2299
|
+
{displayedAnalyses.map((a) => (
|
|
2300
|
+
<SortableRow
|
|
2301
|
+
key={a.id}
|
|
2302
|
+
id={a.id}
|
|
2303
|
+
favoriteKey={`analysis:${a.id}`}
|
|
2304
|
+
name={a.name}
|
|
2305
|
+
href={`/analyses/${a.id}`}
|
|
2306
|
+
isActive={location.pathname === `/analyses/${a.id}`}
|
|
2307
|
+
favoriteIds={favoriteIds}
|
|
2308
|
+
onToggleFavorite={toggleFavorite}
|
|
2309
|
+
onDelete={() => handleAnalysisDelete(a)}
|
|
2310
|
+
onRename={(name) => handleAnalysisRename(a, name)}
|
|
2311
|
+
hidden={analysisHiddenFilter === "hidden"}
|
|
2312
|
+
onHide={
|
|
2313
|
+
analysisHiddenFilter === "hidden"
|
|
2314
|
+
? undefined
|
|
2315
|
+
: () => handleAnalysisHide(a)
|
|
2316
|
+
}
|
|
2317
|
+
onUnhide={
|
|
2318
|
+
analysisHiddenFilter === "hidden"
|
|
2319
|
+
? () => handleAnalysisUnhide(a)
|
|
2320
|
+
: undefined
|
|
2321
|
+
}
|
|
2322
|
+
visibility={a.visibility}
|
|
2323
|
+
onSetVisibility={(v) =>
|
|
2324
|
+
handleAnalysisSetVisibility(a, v)
|
|
2325
|
+
}
|
|
2326
|
+
onPrefetch={() => prefetchAnalysis(a.id)}
|
|
2327
|
+
/>
|
|
2328
|
+
))}
|
|
2329
|
+
{filteredAnalyses.length > SIDEBAR_PREVIEW_COUNT && (
|
|
2330
|
+
<button
|
|
2331
|
+
onClick={() => setAnalysesShowAll(!analysesShowAll)}
|
|
2332
|
+
className="flex items-center gap-1 px-3 py-1 text-[11px] text-muted-foreground/70 hover:text-primary"
|
|
2333
|
+
>
|
|
2334
|
+
{analysesShowAll
|
|
2335
|
+
? t("sidebar.showLess")
|
|
2336
|
+
: t("sidebar.showMore", {
|
|
2337
|
+
count:
|
|
2338
|
+
filteredAnalyses.length -
|
|
2339
|
+
SIDEBAR_PREVIEW_COUNT,
|
|
2340
|
+
})}
|
|
2341
|
+
</button>
|
|
2342
|
+
)}
|
|
2343
|
+
{analysesLoading &&
|
|
2344
|
+
sortedAnalyses.length === 0 &&
|
|
2345
|
+
Array.from({ length: 3 }).map((_, i) => (
|
|
2346
|
+
<div
|
|
2347
|
+
key={`analysis-skeleton-${i}`}
|
|
2348
|
+
className="flex items-center gap-2 px-3 py-1"
|
|
2349
|
+
>
|
|
2350
|
+
<Skeleton
|
|
2351
|
+
className={cn(
|
|
2352
|
+
"h-3.5 w-3.5 shrink-0 rounded-sm",
|
|
2353
|
+
SIDEBAR_SKELETON_CLASS,
|
|
2354
|
+
)}
|
|
2355
|
+
/>
|
|
2356
|
+
<Skeleton
|
|
2357
|
+
className={cn(
|
|
2358
|
+
"h-3 rounded",
|
|
2359
|
+
SIDEBAR_SKELETON_CLASS,
|
|
2360
|
+
)}
|
|
2361
|
+
style={{ width: `${60 + ((i * 17) % 30)}%` }}
|
|
2362
|
+
/>
|
|
2363
|
+
</div>
|
|
2364
|
+
))}
|
|
2365
|
+
{!analysesLoading && sortedAnalyses.length === 0 && (
|
|
2366
|
+
<p className="px-3 py-1 text-[11px] text-muted-foreground/60">
|
|
2367
|
+
{t("sidebar.noAnalysesYet")}
|
|
2368
|
+
</p>
|
|
2369
|
+
)}
|
|
2370
|
+
<NewAnalysisDialog />
|
|
2371
|
+
</div>
|
|
2372
|
+
</SortableContext>
|
|
2373
|
+
</DndContext>
|
|
2374
|
+
)}
|
|
2375
|
+
</div>
|
|
2376
|
+
</nav>
|
|
2377
|
+
|
|
2378
|
+
<div className="mt-auto min-w-0 px-2 pt-2 text-sm font-medium lg:px-4">
|
|
2379
|
+
<nav className="grid min-w-0 items-start space-y-1 pb-1">
|
|
2380
|
+
{bottomItems.map((item) => {
|
|
2381
|
+
const Icon = item.icon;
|
|
2382
|
+
const isActive = location.pathname === item.href;
|
|
2383
|
+
return (
|
|
2384
|
+
<Link
|
|
2385
|
+
key={item.href}
|
|
2386
|
+
to={item.href}
|
|
2387
|
+
className={cn(
|
|
2388
|
+
"flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",
|
|
2389
|
+
isActive
|
|
2390
|
+
? "bg-sidebar-accent text-sidebar-accent-foreground"
|
|
2391
|
+
: "text-muted-foreground hover:bg-sidebar-accent/50",
|
|
2392
|
+
)}
|
|
2393
|
+
>
|
|
2394
|
+
<Icon className="h-4 w-4" />
|
|
2395
|
+
{t(item.labelKey)}
|
|
2396
|
+
</Link>
|
|
2397
|
+
);
|
|
2398
|
+
})}
|
|
2399
|
+
</nav>
|
|
2400
|
+
|
|
2401
|
+
<div className="min-w-0">
|
|
2402
|
+
<ExtensionsSidebarSection />
|
|
2403
|
+
</div>
|
|
2404
|
+
|
|
2405
|
+
<div className="space-y-2 pt-2">
|
|
2406
|
+
<OrgSwitcher />
|
|
2407
|
+
<TooltipProvider delayDuration={200}>
|
|
2408
|
+
<div className="flex items-center gap-1">
|
|
2409
|
+
<DevDatabaseLink />
|
|
2410
|
+
<FeedbackButton className="min-w-0 flex-1" />
|
|
2411
|
+
<div className="flex shrink-0 items-center gap-0.5">
|
|
2412
|
+
<Tooltip>
|
|
2413
|
+
<TooltipTrigger asChild>
|
|
2414
|
+
<button
|
|
2415
|
+
onClick={() =>
|
|
2416
|
+
window.dispatchEvent(
|
|
2417
|
+
new CustomEvent(
|
|
2418
|
+
"analytics:open-command-palette",
|
|
2419
|
+
),
|
|
2420
|
+
)
|
|
2421
|
+
}
|
|
2422
|
+
aria-label={t("sidebar.search")}
|
|
2423
|
+
className="flex items-center justify-center rounded-lg p-2 text-muted-foreground transition-all hover:text-primary cursor-pointer hover:bg-sidebar-accent/50"
|
|
2424
|
+
>
|
|
2425
|
+
<IconSearch className="h-4 w-4" />
|
|
2426
|
+
</button>
|
|
2427
|
+
</TooltipTrigger>
|
|
2428
|
+
<TooltipContent side="top">
|
|
2429
|
+
<p>
|
|
2430
|
+
{t("sidebar.searchShortcut", {
|
|
2431
|
+
shortcut: `${shortcutModifierLabel()}+K`,
|
|
2432
|
+
})}
|
|
2433
|
+
</p>
|
|
2434
|
+
</TooltipContent>
|
|
2435
|
+
</Tooltip>
|
|
2436
|
+
<LanguagePicker
|
|
2437
|
+
variant="icon"
|
|
2438
|
+
label={t("settings.languageLabel")}
|
|
2439
|
+
className="[&_[data-language-picker-trigger]]:rounded-lg [&_[data-language-picker-trigger]]:border-0 [&_[data-language-picker-trigger]]:bg-transparent [&_[data-language-picker-trigger]]:text-muted-foreground [&_[data-language-picker-trigger]]:hover:bg-sidebar-accent/50 [&_[data-language-picker-trigger]]:hover:text-primary"
|
|
2440
|
+
/>
|
|
2441
|
+
</div>
|
|
2442
|
+
</div>
|
|
2443
|
+
</TooltipProvider>
|
|
2287
2444
|
</div>
|
|
2288
|
-
</
|
|
2445
|
+
</div>
|
|
2289
2446
|
</div>
|
|
2290
|
-
|
|
2291
|
-
|
|
2447
|
+
</>
|
|
2448
|
+
)}
|
|
2292
2449
|
</div>
|
|
2293
2450
|
);
|
|
2294
2451
|
}
|