@agent-native/core 0.120.2 → 0.120.4
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 +3 -3
- package/corpus/core/CHANGELOG.md +28 -0
- package/corpus/core/package.json +1 -1
- package/corpus/core/src/cli/context-xray-local.ts +1 -1
- package/corpus/core/src/cli/index.ts +63 -18
- package/corpus/core/src/cli/skills.ts +5 -0
- package/corpus/core/src/cli/telemetry.ts +118 -1
- package/corpus/core/src/client/AgentPanel.tsx +10 -0
- package/corpus/core/src/client/CommandMenu.tsx +13 -1
- package/corpus/core/src/client/agent-page/AgentTabsPage.tsx +39 -4
- package/corpus/core/src/client/analytics.ts +13 -0
- package/corpus/core/src/client/error-capture.ts +6 -1
- package/corpus/core/src/client/extensions/ExtensionsListPage.tsx +12 -5
- package/corpus/core/src/client/extensions/agent-native-extension-runtime.ts +1 -1
- package/corpus/core/src/client/navigation/index.ts +2 -0
- package/corpus/core/src/client/org/OrgSwitcher.tsx +14 -32
- package/corpus/core/src/client/settings/ExtensionsSettingsContent.tsx +1 -1
- package/corpus/core/src/extensions/theme.ts +1 -1
- package/corpus/core/src/localization/default-messages.ts +2 -0
- package/corpus/core/src/server/core-routes-plugin.ts +10 -1
- package/corpus/core/src/server/framework-request-handler.ts +17 -26
- package/corpus/core/src/styles/agent-native.css +13 -0
- package/corpus/core/src/templates/chat/app/components/layout/Layout.tsx +3 -0
- package/corpus/core/src/templates/chat/app/components/layout/Sidebar.tsx +78 -45
- package/corpus/core/src/templates/chat/app/global.css +1 -1
- package/corpus/core/src/templates/default/app/global.css +1 -1
- package/corpus/core/src/tracking/error-capture.ts +151 -0
- package/corpus/core/src/tracking/index.ts +5 -0
- package/corpus/templates/analytics/app/components/dashboard/CumulativeNetChart.tsx +1 -1
- package/corpus/templates/analytics/app/components/dashboard/DashboardHistoryPanel.tsx +1 -4
- package/corpus/templates/analytics/app/components/dashboard/DashboardPanelSkeleton.tsx +1 -1
- package/corpus/templates/analytics/app/components/dashboard/DataTable.tsx +1 -1
- package/corpus/templates/analytics/app/components/dashboard/DateRangePicker.tsx +2 -2
- package/corpus/templates/analytics/app/components/dashboard/MetricCard.tsx +1 -1
- package/corpus/templates/analytics/app/components/dashboard/RecentActivity.tsx +1 -1
- package/corpus/templates/analytics/app/components/dashboard/RevenueChart.tsx +1 -1
- package/corpus/templates/analytics/app/components/dashboard/RevenueComparisonChart.tsx +1 -1
- package/corpus/templates/analytics/app/components/dashboard/SqlChart.tsx +41 -9
- package/corpus/templates/analytics/app/components/dashboard/StatsCard.tsx +1 -1
- package/corpus/templates/analytics/app/components/dashboard/TimeSeriesChart.tsx +1 -1
- package/corpus/templates/analytics/app/components/layout/CommandPalette.tsx +2 -0
- package/corpus/templates/analytics/app/components/layout/Layout.tsx +28 -14
- package/corpus/templates/analytics/app/components/layout/Sidebar.tsx +152 -124
- package/corpus/templates/analytics/app/global.css +5 -5
- package/corpus/templates/analytics/app/lib/dashboard-report-capture.ts +42 -0
- package/corpus/templates/analytics/app/pages/adhoc/_shared/KpiChart.tsx +1 -1
- package/corpus/templates/analytics/app/pages/adhoc/explorer/components/ChartTypePicker.tsx +1 -1
- package/corpus/templates/analytics/app/pages/adhoc/explorer/components/DateRangePicker.tsx +1 -1
- package/corpus/templates/analytics/app/pages/adhoc/explorer/components/EventRow.tsx +1 -1
- package/corpus/templates/analytics/app/pages/adhoc/explorer/components/SqlPreview.tsx +2 -2
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/DashboardFilterBar.tsx +3 -3
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/EmailReportDialog.tsx +2 -2
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/PanelEditorDialog.tsx +1 -1
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/SqlChartCard.tsx +1 -1
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/index.tsx +162 -51
- package/corpus/templates/analytics/app/root.tsx +28 -0
- package/corpus/templates/analytics/changelog/2026-07-24-analytics-charts-now-explain-slow-loads-and-offer-a-direct-r.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-24-borderless-secondary-surfaces.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-24-daily-dashboard-emails-now-load-signed-reports-more-reliably.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-24-manage-agent-is-clearly-marked-as-a-link-to-its-dedicated-pa.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-24-sidebar-footer-controls-follow-a-consistent-order.md +6 -0
- package/corpus/templates/analytics/seeds/dashboards/agent-native-templates-first-party.json +1 -1
- package/corpus/templates/analytics/server/db/schema.ts +5 -0
- package/corpus/templates/analytics/server/jobs/dashboard-report.ts +21 -0
- package/corpus/templates/analytics/server/lib/canonical-first-party-dashboard-repair.ts +11 -0
- package/corpus/templates/analytics/server/lib/dashboard-report-subscriptions.ts +54 -0
- package/corpus/templates/analytics/server/lib/dashboard-report.ts +235 -26
- package/corpus/templates/analytics/server/lib/first-party-metric-catalog.ts +4 -1
- package/corpus/templates/analytics/server/plugins/db.ts +9 -0
- package/corpus/templates/analytics/shared/dashboard-report-timeouts.ts +1 -1
- package/corpus/templates/assets/app/components/asset/AssetPreviewDialog.tsx +376 -0
- package/corpus/templates/assets/app/components/create/RecentDraftsSection.tsx +14 -4
- package/corpus/templates/assets/app/components/layout/Layout.tsx +5 -0
- package/corpus/templates/assets/app/components/layout/Sidebar.tsx +118 -74
- package/corpus/templates/assets/app/global.css +1 -1
- package/corpus/templates/assets/app/i18n-data.ts +10 -0
- package/corpus/templates/assets/app/routes/brand-kits.$id.tsx +99 -10
- package/corpus/templates/assets/app/routes/library.tsx +21 -198
- package/corpus/templates/assets/changelog/2026-07-21-unified-asset-preview-click-any-asset-to-open-one-preview-wi.md +6 -0
- package/corpus/templates/assets/changelog/2026-07-24-borderless-secondary-surfaces.md +6 -0
- package/corpus/templates/assets/changelog/2026-07-24-sidebar-footer-controls-follow-a-consistent-order.md +6 -0
- package/corpus/templates/brain/app/components/layout/Layout.tsx +3 -0
- package/corpus/templates/brain/app/components/layout/Sidebar.tsx +76 -43
- package/corpus/templates/brain/app/global.css +1 -1
- package/corpus/templates/brain/changelog/2026-07-24-borderless-secondary-surfaces.md +6 -0
- package/corpus/templates/brain/changelog/2026-07-24-sidebar-footer-controls-follow-a-consistent-order.md +6 -0
- package/corpus/templates/calendar/app/components/layout/Sidebar.tsx +67 -52
- package/corpus/templates/calendar/app/global.css +1 -1
- package/corpus/templates/calendar/changelog/2026-07-24-borderless-secondary-surfaces.md +6 -0
- package/corpus/templates/calendar/changelog/2026-07-24-sidebar-footer-controls-follow-a-consistent-order.md +6 -0
- package/corpus/templates/chat/app/components/layout/Layout.tsx +3 -0
- package/corpus/templates/chat/app/components/layout/Sidebar.tsx +78 -45
- package/corpus/templates/chat/app/global.css +1 -1
- package/corpus/templates/chat/changelog/2026-07-24-borderless-secondary-surfaces.md +6 -0
- package/corpus/templates/chat/changelog/2026-07-24-sidebar-footer-controls-follow-a-consistent-order.md +6 -0
- package/corpus/templates/clips/app/components/library/library-layout.tsx +65 -31
- package/corpus/templates/clips/app/components/library/organization-switcher.tsx +2 -2
- package/corpus/templates/clips/app/components/player/video-player.tsx +16 -1
- package/corpus/templates/clips/app/global.css +1 -1
- package/corpus/templates/clips/app/hooks/use-view-tracking.ts +55 -12
- package/corpus/templates/clips/app/routes/embed.$shareId.tsx +6 -5
- package/corpus/templates/clips/app/routes/r.$recordingId.tsx +7 -7
- package/corpus/templates/clips/app/routes/share.$shareId.tsx +6 -5
- package/corpus/templates/clips/changelog/2026-07-24-borderless-secondary-surfaces.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-24-sidebar-footer-controls-follow-a-consistent-order.md +6 -0
- package/corpus/templates/clips/server/plugins/db.ts +113 -68
- package/corpus/templates/content/actions/update-document.ts +145 -91
- package/corpus/templates/content/app/components/editor/CommentComposer.tsx +4 -1
- package/corpus/templates/content/app/components/editor/CommentsSidebar.tsx +366 -164
- package/corpus/templates/content/app/components/editor/DocumentEditor.tsx +51 -28
- package/corpus/templates/content/app/components/editor/database/sidebar.tsx +19 -8
- package/corpus/templates/content/app/components/sidebar/DocumentSidebar.tsx +66 -42
- package/corpus/templates/content/app/global.css +1 -1
- package/corpus/templates/content/app/i18n-data.ts +15 -0
- package/corpus/templates/content/changelog/2026-07-23-shared-pages-now-keep-durable-content-visible-and-comment-th.md +6 -0
- package/corpus/templates/content/changelog/2026-07-24-borderless-secondary-surfaces.md +6 -0
- package/corpus/templates/content/changelog/2026-07-24-comment-drafts-now-stay-open-when-saving-fails-and-long-live.md +6 -0
- package/corpus/templates/content/changelog/2026-07-24-sidebar-footer-controls-follow-a-consistent-order.md +6 -0
- package/corpus/templates/design/actions/update-file.ts +85 -18
- package/corpus/templates/design/app/components/layout/Sidebar.tsx +65 -30
- package/corpus/templates/design/app/entry.client.tsx +14 -1
- package/corpus/templates/design/app/global.css +1 -1
- package/corpus/templates/design/app/lib/design-save-outbox.ts +39 -0
- package/corpus/templates/design/changelog/2026-07-24-borderless-secondary-surfaces.md +6 -0
- package/corpus/templates/design/changelog/2026-07-24-sidebar-footer-controls-follow-a-consistent-order.md +6 -0
- package/corpus/templates/dispatch/app/global.css +1 -1
- package/corpus/templates/dispatch/changelog/2026-07-24-borderless-secondary-surfaces.md +6 -0
- package/corpus/templates/dispatch/changelog/2026-07-24-sidebar-footer-controls-follow-a-consistent-order.md +6 -0
- package/corpus/templates/forms/app/components/layout/Layout.tsx +3 -0
- package/corpus/templates/forms/app/components/layout/Sidebar.tsx +72 -37
- package/corpus/templates/forms/app/global.css +1 -1
- package/corpus/templates/forms/changelog/2026-07-24-borderless-secondary-surfaces.md +6 -0
- package/corpus/templates/forms/changelog/2026-07-24-forms-sidebar-actions-now-keep-search-language-feedback-and-.md +6 -0
- package/corpus/templates/forms/changelog/2026-07-24-sidebar-footer-controls-follow-a-consistent-order.md +6 -0
- package/corpus/templates/macros/app/components/DailyProgress.tsx +5 -5
- package/corpus/templates/macros/app/components/ExerciseCard.tsx +2 -2
- package/corpus/templates/macros/app/components/MealCard.tsx +2 -2
- package/corpus/templates/macros/app/components/WeightCard.tsx +2 -2
- package/corpus/templates/macros/app/components/layout/AppLayout.tsx +56 -29
- package/corpus/templates/macros/app/components/ui/button.tsx +1 -2
- package/corpus/templates/macros/app/components/ui/card.tsx +1 -1
- package/corpus/templates/macros/app/global.css +1 -1
- package/corpus/templates/macros/app/routes/_index.tsx +1 -1
- package/corpus/templates/macros/app/routes/analytics.tsx +4 -7
- package/corpus/templates/macros/changelog/2026-07-24-borderless-secondary-surfaces.md +6 -0
- package/corpus/templates/macros/changelog/2026-07-24-sidebar-footer-controls-follow-a-consistent-order.md +6 -0
- package/corpus/templates/mail/app/components/layout/AppLayout.tsx +125 -37
- package/corpus/templates/mail/app/global.css +1 -1
- package/corpus/templates/mail/changelog/2026-07-24-borderless-secondary-surfaces.md +6 -0
- package/corpus/templates/mail/changelog/2026-07-24-sidebar-footer-controls-follow-a-consistent-order.md +6 -0
- package/corpus/templates/plan/app/components/layout/Layout.tsx +3 -0
- package/corpus/templates/plan/app/components/layout/Sidebar.tsx +90 -60
- package/corpus/templates/plan/app/global.css +1 -1
- package/corpus/templates/plan/changelog/2026-07-24-borderless-secondary-surfaces.md +6 -0
- package/corpus/templates/plan/changelog/2026-07-24-sidebar-footer-controls-follow-a-consistent-order.md +6 -0
- package/corpus/templates/slides/app/components/layout/Sidebar.tsx +69 -32
- package/corpus/templates/slides/app/global.css +1 -1
- package/corpus/templates/slides/changelog/2026-07-24-borderless-secondary-surfaces.md +6 -0
- package/corpus/templates/slides/changelog/2026-07-24-sidebar-footer-controls-follow-a-consistent-order.md +6 -0
- package/corpus/templates/tasks/app/global.css +1 -1
- package/corpus/templates/tasks/changelog/2026-07-24-borderless-secondary-surfaces.md +6 -0
- package/corpus/toolkit/CHANGELOG.md +14 -0
- package/corpus/toolkit/README.md +8 -1
- package/corpus/toolkit/agent-native.eject.json +1 -1
- package/corpus/toolkit/package.json +1 -1
- package/corpus/toolkit/src/app-shell/index.ts +1 -0
- package/corpus/toolkit/src/app-shell/sidebar-footer-actions.tsx +48 -0
- package/corpus/toolkit/src/chat-history.css +52 -1
- package/corpus/toolkit/src/design-system/default-adapter.tsx +1 -1
- package/corpus/toolkit/src/editor/useCollabReconcile.ts +83 -15
- package/corpus/toolkit/src/ui/button.tsx +1 -2
- package/corpus/toolkit/src/ui/card.tsx +1 -1
- package/corpus/toolkit/src/ui/table.tsx +4 -11
- package/dist/cli/context-xray-local.js +1 -1
- package/dist/cli/context-xray-local.js.map +1 -1
- package/dist/cli/index.js +56 -17
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/skills.d.ts.map +1 -1
- package/dist/cli/skills.js +5 -0
- package/dist/cli/skills.js.map +1 -1
- package/dist/cli/telemetry.d.ts +7 -0
- package/dist/cli/telemetry.d.ts.map +1 -1
- package/dist/cli/telemetry.js +91 -1
- package/dist/cli/telemetry.js.map +1 -1
- package/dist/client/AgentPanel.d.ts +7 -1
- package/dist/client/AgentPanel.d.ts.map +1 -1
- package/dist/client/AgentPanel.js +2 -2
- package/dist/client/AgentPanel.js.map +1 -1
- package/dist/client/CommandMenu.d.ts +2 -0
- package/dist/client/CommandMenu.d.ts.map +1 -1
- package/dist/client/CommandMenu.js +12 -1
- package/dist/client/CommandMenu.js.map +1 -1
- package/dist/client/agent-page/AgentTabsPage.d.ts +4 -0
- package/dist/client/agent-page/AgentTabsPage.d.ts.map +1 -1
- package/dist/client/agent-page/AgentTabsPage.js +8 -4
- package/dist/client/agent-page/AgentTabsPage.js.map +1 -1
- package/dist/client/analytics.d.ts.map +1 -1
- package/dist/client/analytics.js +7 -0
- package/dist/client/analytics.js.map +1 -1
- package/dist/client/error-capture.d.ts.map +1 -1
- package/dist/client/error-capture.js +8 -1
- package/dist/client/error-capture.js.map +1 -1
- package/dist/client/extensions/ExtensionsListPage.d.ts.map +1 -1
- package/dist/client/extensions/ExtensionsListPage.js +2 -2
- package/dist/client/extensions/ExtensionsListPage.js.map +1 -1
- package/dist/client/extensions/agent-native-extension-runtime.js +1 -1
- package/dist/client/extensions/agent-native-extension-runtime.js.map +1 -1
- package/dist/client/navigation/index.d.ts +1 -1
- package/dist/client/navigation/index.d.ts.map +1 -1
- package/dist/client/navigation/index.js +1 -1
- package/dist/client/navigation/index.js.map +1 -1
- package/dist/client/org/OrgSwitcher.d.ts.map +1 -1
- package/dist/client/org/OrgSwitcher.js +9 -13
- package/dist/client/org/OrgSwitcher.js.map +1 -1
- package/dist/client/settings/ExtensionsSettingsContent.js +1 -1
- package/dist/client/settings/ExtensionsSettingsContent.js.map +1 -1
- package/dist/collab/awareness.d.ts +2 -2
- package/dist/collab/awareness.d.ts.map +1 -1
- package/dist/collab/struct-routes.d.ts +1 -1
- package/dist/extensions/theme.js +1 -1
- package/dist/extensions/theme.js.map +1 -1
- package/dist/file-upload/actions/upload-image.d.ts +1 -1
- package/dist/localization/default-messages.d.ts +2 -0
- package/dist/localization/default-messages.d.ts.map +1 -1
- package/dist/localization/default-messages.js +2 -0
- package/dist/localization/default-messages.js.map +1 -1
- package/dist/provider-api/actions/provider-api.d.ts +2 -2
- package/dist/secrets/routes.d.ts +9 -9
- package/dist/server/core-routes-plugin.d.ts.map +1 -1
- package/dist/server/core-routes-plugin.js +8 -1
- package/dist/server/core-routes-plugin.js.map +1 -1
- package/dist/server/framework-request-handler.d.ts.map +1 -1
- package/dist/server/framework-request-handler.js +17 -27
- package/dist/server/framework-request-handler.js.map +1 -1
- package/dist/server/realtime-token.d.ts +1 -1
- package/dist/styles/agent-native.css +13 -0
- package/dist/templates/chat/app/components/layout/Layout.tsx +3 -0
- package/dist/templates/chat/app/components/layout/Sidebar.tsx +78 -45
- package/dist/templates/chat/app/global.css +1 -1
- package/dist/templates/chat/changelog/2026-07-24-borderless-secondary-surfaces.md +6 -0
- package/dist/templates/chat/changelog/2026-07-24-sidebar-footer-controls-follow-a-consistent-order.md +6 -0
- package/dist/templates/default/app/global.css +1 -1
- package/dist/tracking/error-capture.d.ts +14 -0
- package/dist/tracking/error-capture.d.ts.map +1 -0
- package/dist/tracking/error-capture.js +113 -0
- package/dist/tracking/error-capture.js.map +1 -0
- package/dist/tracking/index.d.ts +1 -0
- package/dist/tracking/index.d.ts.map +1 -1
- package/dist/tracking/index.js +1 -0
- package/dist/tracking/index.js.map +1 -1
- package/package.json +2 -2
- package/src/cli/context-xray-local.ts +1 -1
- package/src/cli/index.ts +63 -18
- package/src/cli/skills.ts +5 -0
- package/src/cli/telemetry.ts +118 -1
- package/src/client/AgentPanel.tsx +10 -0
- package/src/client/CommandMenu.tsx +13 -1
- package/src/client/agent-page/AgentTabsPage.tsx +39 -4
- package/src/client/analytics.ts +13 -0
- package/src/client/error-capture.ts +6 -1
- package/src/client/extensions/ExtensionsListPage.tsx +12 -5
- package/src/client/extensions/agent-native-extension-runtime.ts +1 -1
- package/src/client/navigation/index.ts +2 -0
- package/src/client/org/OrgSwitcher.tsx +14 -32
- package/src/client/settings/ExtensionsSettingsContent.tsx +1 -1
- package/src/extensions/theme.ts +1 -1
- package/src/localization/default-messages.ts +2 -0
- package/src/server/core-routes-plugin.ts +10 -1
- package/src/server/framework-request-handler.ts +17 -26
- package/src/styles/agent-native.css +13 -0
- package/src/templates/chat/app/components/layout/Layout.tsx +3 -0
- package/src/templates/chat/app/components/layout/Sidebar.tsx +78 -45
- package/src/templates/chat/app/global.css +1 -1
- package/src/templates/chat/changelog/2026-07-24-borderless-secondary-surfaces.md +6 -0
- package/src/templates/chat/changelog/2026-07-24-sidebar-footer-controls-follow-a-consistent-order.md +6 -0
- package/src/templates/default/app/global.css +1 -1
- package/src/tracking/error-capture.ts +151 -0
- package/src/tracking/index.ts +5 -0
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import { AgentSidebar } from "@agent-native/core/client/agent-chat";
|
|
2
2
|
import { agentNativePath, appPath } from "@agent-native/core/client/api-path";
|
|
3
3
|
import { DevDatabaseLink } from "@agent-native/core/client/db-admin";
|
|
4
|
-
import { useT } from "@agent-native/core/client/i18n";
|
|
4
|
+
import { LanguagePicker, useT } from "@agent-native/core/client/i18n";
|
|
5
|
+
import { openCommandMenu } from "@agent-native/core/client/navigation";
|
|
5
6
|
import { OrgSwitcher } from "@agent-native/core/client/org";
|
|
6
7
|
import { FeedbackButton } from "@agent-native/core/client/ui";
|
|
7
|
-
import {
|
|
8
|
+
import {
|
|
9
|
+
HeaderActionsProvider,
|
|
10
|
+
SidebarFooterActions,
|
|
11
|
+
} from "@agent-native/toolkit/app-shell";
|
|
8
12
|
import {
|
|
9
13
|
IconFlame,
|
|
10
14
|
IconLoader2,
|
|
@@ -13,6 +17,7 @@ import {
|
|
|
13
17
|
IconSettings,
|
|
14
18
|
IconLayoutSidebarLeftCollapse,
|
|
15
19
|
IconLayoutSidebarLeftExpand,
|
|
20
|
+
IconSearch,
|
|
16
21
|
} from "@tabler/icons-react";
|
|
17
22
|
import {
|
|
18
23
|
useIsFetching,
|
|
@@ -197,6 +202,48 @@ function SidebarContent({
|
|
|
197
202
|
const ToggleIcon = collapsed
|
|
198
203
|
? IconLayoutSidebarLeftExpand
|
|
199
204
|
: IconLayoutSidebarLeftCollapse;
|
|
205
|
+
const collapseButton = onToggleCollapsed ? (
|
|
206
|
+
<Tooltip>
|
|
207
|
+
<TooltipTrigger asChild>
|
|
208
|
+
<button
|
|
209
|
+
type="button"
|
|
210
|
+
aria-label={collapsed ? t("sidebar.expand") : t("sidebar.collapse")}
|
|
211
|
+
className="flex h-8 w-8 items-center justify-center rounded-md text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground"
|
|
212
|
+
onClick={onToggleCollapsed}
|
|
213
|
+
>
|
|
214
|
+
<ToggleIcon className="h-4 w-4" />
|
|
215
|
+
</button>
|
|
216
|
+
</TooltipTrigger>
|
|
217
|
+
<TooltipContent side="right">
|
|
218
|
+
{collapsed ? t("sidebar.expand") : t("sidebar.collapse")}
|
|
219
|
+
</TooltipContent>
|
|
220
|
+
</Tooltip>
|
|
221
|
+
) : null;
|
|
222
|
+
const searchButton = (
|
|
223
|
+
<Tooltip>
|
|
224
|
+
<TooltipTrigger asChild>
|
|
225
|
+
<button
|
|
226
|
+
type="button"
|
|
227
|
+
onClick={openCommandMenu}
|
|
228
|
+
aria-label={t("root.search")}
|
|
229
|
+
className="flex h-8 w-8 items-center justify-center rounded-md text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground"
|
|
230
|
+
>
|
|
231
|
+
<IconSearch className="h-4 w-4" />
|
|
232
|
+
</button>
|
|
233
|
+
</TooltipTrigger>
|
|
234
|
+
<TooltipContent side="right">{t("root.search")}</TooltipContent>
|
|
235
|
+
</Tooltip>
|
|
236
|
+
);
|
|
237
|
+
const translateButton = (
|
|
238
|
+
<LanguagePicker variant="ghost-icon" label={t("settings.languageLabel")} />
|
|
239
|
+
);
|
|
240
|
+
const feedbackButton = (
|
|
241
|
+
<FeedbackButton
|
|
242
|
+
variant={collapsed ? "icon" : "sidebar"}
|
|
243
|
+
side="right"
|
|
244
|
+
className={collapsed ? "size-8" : "min-w-0"}
|
|
245
|
+
/>
|
|
246
|
+
);
|
|
200
247
|
|
|
201
248
|
return (
|
|
202
249
|
<div className="flex h-full flex-col">
|
|
@@ -225,32 +272,6 @@ function SidebarContent({
|
|
|
225
272
|
</span>
|
|
226
273
|
</div>
|
|
227
274
|
)}
|
|
228
|
-
{onToggleCollapsed && (
|
|
229
|
-
<Tooltip>
|
|
230
|
-
<TooltipTrigger asChild>
|
|
231
|
-
<Button
|
|
232
|
-
type="button"
|
|
233
|
-
variant="ghost"
|
|
234
|
-
size="icon"
|
|
235
|
-
aria-label={
|
|
236
|
-
collapsed
|
|
237
|
-
? t("sidebar.expandLeftSidebar")
|
|
238
|
-
: t("sidebar.collapseLeftSidebar")
|
|
239
|
-
}
|
|
240
|
-
className={cn(
|
|
241
|
-
"hidden h-8 w-8 text-muted-foreground hover:text-foreground md:inline-flex",
|
|
242
|
-
collapsed && "mx-auto",
|
|
243
|
-
)}
|
|
244
|
-
onClick={onToggleCollapsed}
|
|
245
|
-
>
|
|
246
|
-
<ToggleIcon className="h-4 w-4" />
|
|
247
|
-
</Button>
|
|
248
|
-
</TooltipTrigger>
|
|
249
|
-
<TooltipContent side="right">
|
|
250
|
-
{collapsed ? t("sidebar.expand") : t("sidebar.collapse")}
|
|
251
|
-
</TooltipContent>
|
|
252
|
-
</Tooltip>
|
|
253
|
-
)}
|
|
254
275
|
</div>
|
|
255
276
|
|
|
256
277
|
<nav className="flex-1 space-y-1 overflow-y-auto px-2 py-2">
|
|
@@ -326,11 +347,17 @@ function SidebarContent({
|
|
|
326
347
|
<>
|
|
327
348
|
<div className="space-y-2 px-3 py-2">
|
|
328
349
|
<DevDatabaseLink />
|
|
329
|
-
<FeedbackButton />
|
|
330
350
|
<OrgSwitcher />
|
|
331
351
|
</div>
|
|
332
352
|
</>
|
|
333
353
|
)}
|
|
354
|
+
<SidebarFooterActions
|
|
355
|
+
collapsed={collapsed}
|
|
356
|
+
feedback={feedbackButton}
|
|
357
|
+
translate={translateButton}
|
|
358
|
+
search={searchButton}
|
|
359
|
+
collapse={collapseButton}
|
|
360
|
+
/>
|
|
334
361
|
</div>
|
|
335
362
|
);
|
|
336
363
|
}
|
|
@@ -12,8 +12,7 @@ const buttonVariants = cva(
|
|
|
12
12
|
default: "bg-foreground text-background hover:bg-foreground/90",
|
|
13
13
|
destructive:
|
|
14
14
|
"bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
15
|
-
outline:
|
|
16
|
-
"border border-border/50 bg-transparent hover:bg-secondary/60 hover:border-border",
|
|
15
|
+
outline: "bg-accent text-accent-foreground hover:bg-accent/80",
|
|
17
16
|
secondary:
|
|
18
17
|
"bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
19
18
|
ghost: "hover:bg-secondary/60",
|
|
@@ -9,7 +9,7 @@ const Card = React.forwardRef<
|
|
|
9
9
|
<div
|
|
10
10
|
ref={ref}
|
|
11
11
|
className={cn(
|
|
12
|
-
"rounded-2xl
|
|
12
|
+
"rounded-2xl bg-card text-card-foreground shadow-sm transition-all duration-200",
|
|
13
13
|
className,
|
|
14
14
|
)}
|
|
15
15
|
{...props}
|
|
@@ -131,7 +131,7 @@ export default function IndexPage() {
|
|
|
131
131
|
>
|
|
132
132
|
<IconChevronLeft className="h-5 w-5 sm:h-4 sm:w-4 rtl:-scale-x-100" />
|
|
133
133
|
</Button>
|
|
134
|
-
<div className="min-w-[140px] sm:min-w-[160px] text-center px-3 sm:px-4 py-2 rounded-full bg-card
|
|
134
|
+
<div className="min-w-[140px] sm:min-w-[160px] text-center px-3 sm:px-4 py-2 rounded-full bg-card">
|
|
135
135
|
<span className="text-sm font-medium text-foreground">
|
|
136
136
|
{isSameDay(date, new Date())
|
|
137
137
|
? t("entry.today")
|
|
@@ -167,10 +167,7 @@ export default function AnalyticsPage() {
|
|
|
167
167
|
unit: t("analytics.daysUnit"),
|
|
168
168
|
},
|
|
169
169
|
].map((stat) => (
|
|
170
|
-
<div
|
|
171
|
-
key={stat.label}
|
|
172
|
-
className="p-3 sm:p-4 rounded-xl bg-card/40 border border-border/30"
|
|
173
|
-
>
|
|
170
|
+
<div key={stat.label} className="p-3 sm:p-4 rounded-xl bg-card/40">
|
|
174
171
|
<p className="text-[10px] uppercase tracking-widest text-muted-foreground font-medium mb-1.5 sm:mb-2">
|
|
175
172
|
{stat.label}
|
|
176
173
|
</p>
|
|
@@ -187,7 +184,7 @@ export default function AnalyticsPage() {
|
|
|
187
184
|
</div>
|
|
188
185
|
|
|
189
186
|
{/* Calorie Trend Chart */}
|
|
190
|
-
<Card className="
|
|
187
|
+
<Card className="bg-card/60 backdrop-blur-md overflow-hidden">
|
|
191
188
|
<CardHeader className="pb-4">
|
|
192
189
|
<CardTitle className="text-base font-medium">
|
|
193
190
|
Calorie Trend (
|
|
@@ -306,7 +303,7 @@ export default function AnalyticsPage() {
|
|
|
306
303
|
</Card>
|
|
307
304
|
|
|
308
305
|
{/* Weekly Net Calories */}
|
|
309
|
-
<Card className="
|
|
306
|
+
<Card className="bg-card/60 backdrop-blur-md overflow-hidden">
|
|
310
307
|
<CardHeader className="pb-4">
|
|
311
308
|
<CardTitle className="text-base font-medium">
|
|
312
309
|
Weekly Net Calories vs Goal (
|
|
@@ -333,7 +330,7 @@ export default function AnalyticsPage() {
|
|
|
333
330
|
</Card>
|
|
334
331
|
|
|
335
332
|
{/* Weight Chart */}
|
|
336
|
-
<Card className="
|
|
333
|
+
<Card className="bg-card/60 backdrop-blur-md overflow-hidden">
|
|
337
334
|
<CardHeader className="pb-4">
|
|
338
335
|
<CardTitle className="text-base font-medium">
|
|
339
336
|
Weight Trend (
|
|
@@ -5,9 +5,11 @@ import {
|
|
|
5
5
|
import { agentNativePath } from "@agent-native/core/client/api-path";
|
|
6
6
|
import { appApiPath } from "@agent-native/core/client/api-path";
|
|
7
7
|
import { DevDatabaseLink } from "@agent-native/core/client/db-admin";
|
|
8
|
-
import { useT } from "@agent-native/core/client/i18n";
|
|
8
|
+
import { LanguagePicker, useT } from "@agent-native/core/client/i18n";
|
|
9
|
+
import { openCommandMenu } from "@agent-native/core/client/navigation";
|
|
9
10
|
import { InvitationBanner, OrgSwitcher } from "@agent-native/core/client/org";
|
|
10
11
|
import { FeedbackButton } from "@agent-native/core/client/ui";
|
|
12
|
+
import { SidebarFooterActions } from "@agent-native/toolkit/app-shell";
|
|
11
13
|
import { normalizeMailLabel } from "@shared/gmail-labels";
|
|
12
14
|
import type { Label } from "@shared/types";
|
|
13
15
|
import {
|
|
@@ -383,6 +385,60 @@ function AppLayoutInner({ children }: AppLayoutProps) {
|
|
|
383
385
|
if (!sidebarPinned || isMobile) setSidebarOpen(false);
|
|
384
386
|
}, [sidebarPinned, isMobile]);
|
|
385
387
|
|
|
388
|
+
const collapseButton =
|
|
389
|
+
sidebarPinned && !isMobile ? (
|
|
390
|
+
<Tooltip>
|
|
391
|
+
<TooltipTrigger asChild>
|
|
392
|
+
<button
|
|
393
|
+
type="button"
|
|
394
|
+
onClick={() => setSidebarCollapsed((value) => !value)}
|
|
395
|
+
className="flex h-8 w-8 items-center justify-center rounded text-muted-foreground hover:bg-accent/50 hover:text-foreground"
|
|
396
|
+
aria-label={
|
|
397
|
+
showCollapsedSidebar
|
|
398
|
+
? t("sidebar.expandSidebar")
|
|
399
|
+
: t("sidebar.collapseSidebar")
|
|
400
|
+
}
|
|
401
|
+
>
|
|
402
|
+
{showCollapsedSidebar ? (
|
|
403
|
+
<IconLayoutSidebarLeftExpand className="h-4 w-4 rtl:-scale-x-100" />
|
|
404
|
+
) : (
|
|
405
|
+
<IconLayoutSidebarLeftCollapse className="h-4 w-4 rtl:-scale-x-100" />
|
|
406
|
+
)}
|
|
407
|
+
</button>
|
|
408
|
+
</TooltipTrigger>
|
|
409
|
+
<TooltipContent side="right">
|
|
410
|
+
{showCollapsedSidebar
|
|
411
|
+
? t("sidebar.expandSidebar")
|
|
412
|
+
: t("sidebar.collapseSidebar")}
|
|
413
|
+
</TooltipContent>
|
|
414
|
+
</Tooltip>
|
|
415
|
+
) : null;
|
|
416
|
+
const searchButton = (
|
|
417
|
+
<Tooltip>
|
|
418
|
+
<TooltipTrigger asChild>
|
|
419
|
+
<button
|
|
420
|
+
type="button"
|
|
421
|
+
onClick={openCommandMenu}
|
|
422
|
+
className="flex h-8 w-8 items-center justify-center rounded text-muted-foreground hover:bg-accent/50 hover:text-foreground"
|
|
423
|
+
aria-label={t("mail.search.label")}
|
|
424
|
+
>
|
|
425
|
+
<IconSearch className="h-4 w-4" />
|
|
426
|
+
</button>
|
|
427
|
+
</TooltipTrigger>
|
|
428
|
+
<TooltipContent side="right">{t("mail.search.label")}</TooltipContent>
|
|
429
|
+
</Tooltip>
|
|
430
|
+
);
|
|
431
|
+
const translateButton = (
|
|
432
|
+
<LanguagePicker variant="ghost-icon" label={t("settings.languageLabel")} />
|
|
433
|
+
);
|
|
434
|
+
const feedbackButton = (
|
|
435
|
+
<FeedbackButton
|
|
436
|
+
variant={showCollapsedSidebar ? "icon" : "sidebar"}
|
|
437
|
+
side="right"
|
|
438
|
+
className={showCollapsedSidebar ? "size-8" : "min-w-0"}
|
|
439
|
+
/>
|
|
440
|
+
);
|
|
441
|
+
|
|
386
442
|
// Drag-to-reorder tabs
|
|
387
443
|
const [dragPinnedId, setDragPinnedId] = useState<string | null>(null);
|
|
388
444
|
const [dropIndicator, setDropIndicator] = useState<{
|
|
@@ -890,6 +946,13 @@ function AppLayoutInner({ children }: AppLayoutProps) {
|
|
|
890
946
|
},
|
|
891
947
|
]);
|
|
892
948
|
|
|
949
|
+
useEffect(() => {
|
|
950
|
+
const handler = () => setPaletteOpen(true);
|
|
951
|
+
window.addEventListener("agent-native:open-command-menu", handler);
|
|
952
|
+
return () =>
|
|
953
|
+
window.removeEventListener("agent-native:open-command-menu", handler);
|
|
954
|
+
}, []);
|
|
955
|
+
|
|
893
956
|
// Sequence shortcuts (g + key = go to view)
|
|
894
957
|
const qc = useQueryClient();
|
|
895
958
|
useSequenceShortcuts([
|
|
@@ -1436,45 +1499,12 @@ function AppLayoutInner({ children }: AppLayoutProps) {
|
|
|
1436
1499
|
: "justify-between px-4",
|
|
1437
1500
|
)}
|
|
1438
1501
|
>
|
|
1439
|
-
{showCollapsedSidebar ? (
|
|
1440
|
-
<Tooltip>
|
|
1441
|
-
<TooltipTrigger asChild>
|
|
1442
|
-
<button
|
|
1443
|
-
type="button"
|
|
1444
|
-
onClick={() => setSidebarCollapsed(false)}
|
|
1445
|
-
className="flex h-10 w-10 items-center justify-center rounded text-muted-foreground hover:bg-accent/50 hover:text-foreground"
|
|
1446
|
-
aria-label={t("sidebar.expandSidebar")}
|
|
1447
|
-
>
|
|
1448
|
-
<IconLayoutSidebarLeftExpand className="h-4 w-4 rtl:-scale-x-100" />
|
|
1449
|
-
</button>
|
|
1450
|
-
</TooltipTrigger>
|
|
1451
|
-
<TooltipContent side="right">
|
|
1452
|
-
{t("sidebar.expandSidebar")}
|
|
1453
|
-
</TooltipContent>
|
|
1454
|
-
</Tooltip>
|
|
1455
|
-
) : (
|
|
1502
|
+
{showCollapsedSidebar ? null : (
|
|
1456
1503
|
<>
|
|
1457
1504
|
<span className="text-[13px] font-medium text-foreground">
|
|
1458
1505
|
{t("mail.appName")}
|
|
1459
1506
|
</span>
|
|
1460
1507
|
<div className="flex items-center gap-1">
|
|
1461
|
-
{sidebarPinned && !isMobile ? (
|
|
1462
|
-
<Tooltip>
|
|
1463
|
-
<TooltipTrigger asChild>
|
|
1464
|
-
<button
|
|
1465
|
-
type="button"
|
|
1466
|
-
onClick={() => setSidebarCollapsed(true)}
|
|
1467
|
-
className="flex h-7 w-7 items-center justify-center rounded text-muted-foreground hover:bg-accent/50 hover:text-foreground"
|
|
1468
|
-
aria-label={t("sidebar.collapseSidebar")}
|
|
1469
|
-
>
|
|
1470
|
-
<IconLayoutSidebarLeftCollapse className="h-4 w-4 rtl:-scale-x-100" />
|
|
1471
|
-
</button>
|
|
1472
|
-
</TooltipTrigger>
|
|
1473
|
-
<TooltipContent>
|
|
1474
|
-
{t("sidebar.collapseSidebar")}
|
|
1475
|
-
</TooltipContent>
|
|
1476
|
-
</Tooltip>
|
|
1477
|
-
) : null}
|
|
1478
1508
|
<Tooltip>
|
|
1479
1509
|
<TooltipTrigger asChild>
|
|
1480
1510
|
<button
|
|
@@ -1745,7 +1775,6 @@ function AppLayoutInner({ children }: AppLayoutProps) {
|
|
|
1745
1775
|
|
|
1746
1776
|
<div className="flex items-center justify-end gap-1 px-2 py-2">
|
|
1747
1777
|
<DevDatabaseLink />
|
|
1748
|
-
<FeedbackButton className="min-w-0 flex-1" />
|
|
1749
1778
|
<Tooltip>
|
|
1750
1779
|
<TooltipTrigger asChild>
|
|
1751
1780
|
<Link
|
|
@@ -1789,6 +1818,14 @@ function AppLayoutInner({ children }: AppLayoutProps) {
|
|
|
1789
1818
|
</div>
|
|
1790
1819
|
</>
|
|
1791
1820
|
)}
|
|
1821
|
+
<SidebarFooterActions
|
|
1822
|
+
collapsed={showCollapsedSidebar}
|
|
1823
|
+
feedback={feedbackButton}
|
|
1824
|
+
translate={translateButton}
|
|
1825
|
+
search={searchButton}
|
|
1826
|
+
collapse={collapseButton}
|
|
1827
|
+
className={showCollapsedSidebar ? undefined : "px-0 py-0"}
|
|
1828
|
+
/>
|
|
1792
1829
|
</div>
|
|
1793
1830
|
</>
|
|
1794
1831
|
)}
|
|
@@ -1975,6 +2012,51 @@ function StandardLayout({ children }: AppLayoutProps) {
|
|
|
1975
2012
|
const queuedDrafts = useQueuedDraftCount();
|
|
1976
2013
|
const view = location.pathname.split("/").filter(Boolean)[0] || "";
|
|
1977
2014
|
|
|
2015
|
+
const collapseButton = (
|
|
2016
|
+
<Tooltip>
|
|
2017
|
+
<TooltipTrigger asChild>
|
|
2018
|
+
<button
|
|
2019
|
+
type="button"
|
|
2020
|
+
onClick={() => setSidebarOpen(false)}
|
|
2021
|
+
className="flex h-8 w-8 items-center justify-center rounded text-muted-foreground hover:bg-accent/50 hover:text-foreground"
|
|
2022
|
+
aria-label={t("sidebar.collapseSidebar")}
|
|
2023
|
+
>
|
|
2024
|
+
<IconLayoutSidebarLeftCollapse className="h-4 w-4 rtl:-scale-x-100" />
|
|
2025
|
+
</button>
|
|
2026
|
+
</TooltipTrigger>
|
|
2027
|
+
<TooltipContent side="right">
|
|
2028
|
+
{t("sidebar.collapseSidebar")}
|
|
2029
|
+
</TooltipContent>
|
|
2030
|
+
</Tooltip>
|
|
2031
|
+
);
|
|
2032
|
+
const searchButton = (
|
|
2033
|
+
<Tooltip>
|
|
2034
|
+
<TooltipTrigger asChild>
|
|
2035
|
+
<button
|
|
2036
|
+
type="button"
|
|
2037
|
+
onClick={() => {
|
|
2038
|
+
setSidebarOpen(false);
|
|
2039
|
+
window.setTimeout(
|
|
2040
|
+
() => document.getElementById("mail-search")?.focus(),
|
|
2041
|
+
0,
|
|
2042
|
+
);
|
|
2043
|
+
}}
|
|
2044
|
+
className="flex h-8 w-8 items-center justify-center rounded text-muted-foreground hover:bg-accent/50 hover:text-foreground"
|
|
2045
|
+
aria-label={t("mail.search.label")}
|
|
2046
|
+
>
|
|
2047
|
+
<IconSearch className="h-4 w-4" />
|
|
2048
|
+
</button>
|
|
2049
|
+
</TooltipTrigger>
|
|
2050
|
+
<TooltipContent side="right">{t("mail.search.label")}</TooltipContent>
|
|
2051
|
+
</Tooltip>
|
|
2052
|
+
);
|
|
2053
|
+
const translateButton = (
|
|
2054
|
+
<LanguagePicker variant="ghost-icon" label={t("settings.languageLabel")} />
|
|
2055
|
+
);
|
|
2056
|
+
const feedbackButton = (
|
|
2057
|
+
<FeedbackButton variant="sidebar" side="right" className="min-w-0" />
|
|
2058
|
+
);
|
|
2059
|
+
|
|
1978
2060
|
// Extensions (`/extensions` list and `/extensions/:id` viewer) render their own h-12
|
|
1979
2061
|
// toolbar inside the shared
|
|
1980
2062
|
// ExtensionViewer / ExtensionsListPage components. Skip our header to avoid stacking.
|
|
@@ -2113,7 +2195,6 @@ function StandardLayout({ children }: AppLayoutProps) {
|
|
|
2113
2195
|
|
|
2114
2196
|
<div className="flex items-center justify-end gap-1 px-2 py-2">
|
|
2115
2197
|
<DevDatabaseLink />
|
|
2116
|
-
<FeedbackButton className="min-w-0 flex-1" />
|
|
2117
2198
|
<div className="flex shrink-0 items-center gap-0.5">
|
|
2118
2199
|
<Tooltip>
|
|
2119
2200
|
<TooltipTrigger asChild>
|
|
@@ -2154,6 +2235,13 @@ function StandardLayout({ children }: AppLayoutProps) {
|
|
|
2154
2235
|
<ThemeToggle className="h-8 w-8 shrink-0" />
|
|
2155
2236
|
</div>
|
|
2156
2237
|
</div>
|
|
2238
|
+
<SidebarFooterActions
|
|
2239
|
+
feedback={feedbackButton}
|
|
2240
|
+
translate={translateButton}
|
|
2241
|
+
search={searchButton}
|
|
2242
|
+
collapse={collapseButton}
|
|
2243
|
+
className="px-0 py-0"
|
|
2244
|
+
/>
|
|
2157
2245
|
</div>
|
|
2158
2246
|
</div>
|
|
2159
2247
|
</>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AgentSidebar,
|
|
3
|
+
isAgentChatHomeHandoffActive,
|
|
3
4
|
useAgentChatHomeHandoff,
|
|
4
5
|
useAgentChatHomeHandoffLinks,
|
|
5
6
|
} from "@agent-native/core/client/agent-chat";
|
|
@@ -92,6 +93,7 @@ export function Layout({ children }: LayoutProps) {
|
|
|
92
93
|
activePath: location.pathname,
|
|
93
94
|
enabled: !chatRoute,
|
|
94
95
|
});
|
|
96
|
+
const chatHomeHandoffPending = isAgentChatHomeHandoffActive("plans");
|
|
95
97
|
useAgentChatHomeHandoffLinks({
|
|
96
98
|
storageKey: "plans",
|
|
97
99
|
chatPath: "/",
|
|
@@ -206,6 +208,7 @@ export function Layout({ children }: LayoutProps) {
|
|
|
206
208
|
position="right"
|
|
207
209
|
defaultOpen={false}
|
|
208
210
|
chatViewTransition
|
|
211
|
+
chatViewTransitionHandoff={chatHomeHandoffPending}
|
|
209
212
|
storageKey="plans"
|
|
210
213
|
openOnChatRunning={chatHomeHandoffActive}
|
|
211
214
|
agentPageHref="/agent"
|