@agent-native/core 0.120.2 → 0.120.3
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 +20 -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/app/components/sidebar/DocumentSidebar.tsx +66 -42
- package/corpus/templates/content/app/global.css +1 -1
- package/corpus/templates/content/changelog/2026-07-24-borderless-secondary-surfaces.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/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/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 +8 -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/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/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/resources/handlers.d.ts +1 -1
- 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,6 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AgentSidebar,
|
|
3
3
|
focusAgentChat,
|
|
4
|
+
isAgentChatHomeHandoffActive,
|
|
4
5
|
navigateWithAgentChatViewTransition,
|
|
5
6
|
useAgentChatHomeHandoff,
|
|
6
7
|
useAgentChatHomeHandoffLinks,
|
|
@@ -37,6 +38,7 @@ export function Layout({ children }: LayoutProps) {
|
|
|
37
38
|
activePath: location.pathname,
|
|
38
39
|
enabled: !isAskRoute,
|
|
39
40
|
});
|
|
41
|
+
const chatHomeHandoffPending = isAgentChatHomeHandoffActive("forms");
|
|
40
42
|
useAgentChatHomeHandoffLinks({
|
|
41
43
|
storageKey: "forms",
|
|
42
44
|
chatPath: "/ask",
|
|
@@ -90,6 +92,7 @@ export function Layout({ children }: LayoutProps) {
|
|
|
90
92
|
agentPageHref="/agent"
|
|
91
93
|
defaultOpen={false}
|
|
92
94
|
chatViewTransition
|
|
95
|
+
chatViewTransitionHandoff={chatHomeHandoffPending}
|
|
93
96
|
storageKey="forms"
|
|
94
97
|
browserTabId={TAB_ID}
|
|
95
98
|
openOnChatRunning={chatHomeHandoffActive}
|
|
@@ -5,9 +5,11 @@ import {
|
|
|
5
5
|
} from "@agent-native/core/client/agent-chat";
|
|
6
6
|
import { appPath } 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 { 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 {
|
|
12
14
|
IconArrowUp,
|
|
13
15
|
IconPlus,
|
|
@@ -20,6 +22,7 @@ import {
|
|
|
20
22
|
IconForms,
|
|
21
23
|
IconLayoutSidebarLeftCollapse,
|
|
22
24
|
IconLayoutSidebarLeftExpand,
|
|
25
|
+
IconSearch,
|
|
23
26
|
} from "@tabler/icons-react";
|
|
24
27
|
import { useState, useRef, useEffect, type MouseEvent } from "react";
|
|
25
28
|
import { Link, useLocation, useNavigate } from "react-router";
|
|
@@ -70,6 +73,59 @@ export function Sidebar() {
|
|
|
70
73
|
});
|
|
71
74
|
const effectiveCollapsed = collapsed && !isMobile;
|
|
72
75
|
|
|
76
|
+
const collapseButton = (
|
|
77
|
+
<Tooltip>
|
|
78
|
+
<TooltipTrigger asChild>
|
|
79
|
+
<button
|
|
80
|
+
type="button"
|
|
81
|
+
onClick={() => setCollapsed((value) => !value)}
|
|
82
|
+
className="flex size-8 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-accent/50 hover:text-foreground"
|
|
83
|
+
aria-label={
|
|
84
|
+
effectiveCollapsed
|
|
85
|
+
? t("sidebar.expandSidebar")
|
|
86
|
+
: t("sidebar.collapseSidebar")
|
|
87
|
+
}
|
|
88
|
+
>
|
|
89
|
+
{effectiveCollapsed ? (
|
|
90
|
+
<IconLayoutSidebarLeftExpand className="h-4 w-4 rtl:-scale-x-100" />
|
|
91
|
+
) : (
|
|
92
|
+
<IconLayoutSidebarLeftCollapse className="h-4 w-4 rtl:-scale-x-100" />
|
|
93
|
+
)}
|
|
94
|
+
</button>
|
|
95
|
+
</TooltipTrigger>
|
|
96
|
+
<TooltipContent side="right">
|
|
97
|
+
{effectiveCollapsed
|
|
98
|
+
? t("sidebar.expandSidebar")
|
|
99
|
+
: t("sidebar.collapseSidebar")}
|
|
100
|
+
</TooltipContent>
|
|
101
|
+
</Tooltip>
|
|
102
|
+
);
|
|
103
|
+
const searchButton = (
|
|
104
|
+
<Tooltip>
|
|
105
|
+
<TooltipTrigger asChild>
|
|
106
|
+
<button
|
|
107
|
+
type="button"
|
|
108
|
+
onClick={openCommandMenu}
|
|
109
|
+
className="flex size-8 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-accent/50 hover:text-foreground"
|
|
110
|
+
aria-label={t("root.searchForms")}
|
|
111
|
+
>
|
|
112
|
+
<IconSearch className="h-4 w-4" />
|
|
113
|
+
</button>
|
|
114
|
+
</TooltipTrigger>
|
|
115
|
+
<TooltipContent side="right">{t("root.searchForms")}</TooltipContent>
|
|
116
|
+
</Tooltip>
|
|
117
|
+
);
|
|
118
|
+
const translateButton = (
|
|
119
|
+
<LanguagePicker variant="ghost-icon" label={t("settings.languageLabel")} />
|
|
120
|
+
);
|
|
121
|
+
const feedbackButton = (
|
|
122
|
+
<FeedbackButton
|
|
123
|
+
variant={effectiveCollapsed ? "icon" : "sidebar"}
|
|
124
|
+
side="right"
|
|
125
|
+
className={effectiveCollapsed ? "size-8" : "min-w-0"}
|
|
126
|
+
/>
|
|
127
|
+
);
|
|
128
|
+
|
|
73
129
|
useEffect(() => {
|
|
74
130
|
if (popoverOpen) {
|
|
75
131
|
setPrompt("");
|
|
@@ -198,22 +254,6 @@ export function Sidebar() {
|
|
|
198
254
|
const sidebarContent = effectiveCollapsed ? (
|
|
199
255
|
<div className="agent-layout-left-drawer flex h-screen w-12 min-w-0 shrink-0 flex-col items-center overflow-hidden border-e border-border bg-sidebar py-2 transition-[width] duration-200 ease-out">
|
|
200
256
|
<TooltipProvider delayDuration={0}>
|
|
201
|
-
<Tooltip>
|
|
202
|
-
<TooltipTrigger asChild>
|
|
203
|
-
<button
|
|
204
|
-
type="button"
|
|
205
|
-
onClick={() => setCollapsed(false)}
|
|
206
|
-
className="forms-sidebar-nav-item flex size-10 items-center justify-center rounded-lg text-muted-foreground/55 transition-[background-color,box-shadow,color,transform] duration-150 ease-out hover:bg-accent/50 hover:text-muted-foreground active:scale-[0.96] motion-reduce:active:scale-100"
|
|
207
|
-
aria-label={t("sidebar.expandSidebar")}
|
|
208
|
-
>
|
|
209
|
-
<IconLayoutSidebarLeftExpand className="h-4 w-4 rtl:-scale-x-100" />
|
|
210
|
-
</button>
|
|
211
|
-
</TooltipTrigger>
|
|
212
|
-
<TooltipContent side="right">
|
|
213
|
-
{t("sidebar.expandSidebar")}
|
|
214
|
-
</TooltipContent>
|
|
215
|
-
</Tooltip>
|
|
216
|
-
|
|
217
257
|
<nav className="mt-1 flex min-h-0 flex-1 flex-col items-center gap-1 overflow-y-auto">
|
|
218
258
|
<Tooltip>
|
|
219
259
|
<TooltipTrigger asChild>
|
|
@@ -318,6 +358,13 @@ export function Sidebar() {
|
|
|
318
358
|
</Tooltip>
|
|
319
359
|
</div>
|
|
320
360
|
</nav>
|
|
361
|
+
<SidebarFooterActions
|
|
362
|
+
collapsed
|
|
363
|
+
feedback={feedbackButton}
|
|
364
|
+
translate={translateButton}
|
|
365
|
+
search={searchButton}
|
|
366
|
+
collapse={collapseButton}
|
|
367
|
+
/>
|
|
321
368
|
</TooltipProvider>
|
|
322
369
|
</div>
|
|
323
370
|
) : (
|
|
@@ -368,24 +415,6 @@ export function Sidebar() {
|
|
|
368
415
|
<IconX size={18} />
|
|
369
416
|
</Button>
|
|
370
417
|
)}
|
|
371
|
-
{!isMobile && (
|
|
372
|
-
<Tooltip>
|
|
373
|
-
<TooltipTrigger asChild>
|
|
374
|
-
<Button
|
|
375
|
-
variant="ghost"
|
|
376
|
-
size="icon"
|
|
377
|
-
className="size-10 text-muted-foreground/55 transition-[background-color,box-shadow,color,transform] hover:bg-accent/50 hover:text-muted-foreground active:scale-[0.96] motion-reduce:active:scale-100"
|
|
378
|
-
onClick={() => setCollapsed(true)}
|
|
379
|
-
aria-label={t("sidebar.collapseSidebar")}
|
|
380
|
-
>
|
|
381
|
-
<IconLayoutSidebarLeftCollapse className="h-4 w-4 rtl:-scale-x-100" />
|
|
382
|
-
</Button>
|
|
383
|
-
</TooltipTrigger>
|
|
384
|
-
<TooltipContent side="right">
|
|
385
|
-
{t("sidebar.collapseSidebar")}
|
|
386
|
-
</TooltipContent>
|
|
387
|
-
</Tooltip>
|
|
388
|
-
)}
|
|
389
418
|
</div>
|
|
390
419
|
|
|
391
420
|
<ScrollArea className="min-h-0 min-w-0 flex-1">
|
|
@@ -469,10 +498,16 @@ export function Sidebar() {
|
|
|
469
498
|
<div className="shrink-0 space-y-2 px-3 py-2">
|
|
470
499
|
<OrgSwitcher />
|
|
471
500
|
<DevDatabaseLink />
|
|
472
|
-
<div className="flex
|
|
473
|
-
<FeedbackButton className="min-w-0 flex-1" />
|
|
501
|
+
<div className="flex justify-end">
|
|
474
502
|
<ThemeToggle className="h-9 w-9 shrink-0" />
|
|
475
503
|
</div>
|
|
504
|
+
<SidebarFooterActions
|
|
505
|
+
feedback={feedbackButton}
|
|
506
|
+
translate={translateButton}
|
|
507
|
+
search={searchButton}
|
|
508
|
+
collapse={collapseButton}
|
|
509
|
+
className="px-0 py-0"
|
|
510
|
+
/>
|
|
476
511
|
</div>
|
|
477
512
|
</div>
|
|
478
513
|
);
|
|
@@ -124,7 +124,7 @@ export function DailyProgress({
|
|
|
124
124
|
};
|
|
125
125
|
|
|
126
126
|
return (
|
|
127
|
-
<div className="relative overflow-hidden rounded-2xl
|
|
127
|
+
<div className="relative overflow-hidden rounded-2xl bg-card p-4 sm:p-5">
|
|
128
128
|
<div className="macros-summary-grid">
|
|
129
129
|
{/* Left Side */}
|
|
130
130
|
<div className="space-y-8 flex flex-col justify-center">
|
|
@@ -134,7 +134,7 @@ export function DailyProgress({
|
|
|
134
134
|
{t("daily.summary")}
|
|
135
135
|
</p>
|
|
136
136
|
</div>
|
|
137
|
-
<div className="px-3 py-1.5 rounded-full bg-muted/40
|
|
137
|
+
<div className="px-3 py-1.5 rounded-full bg-muted/40 flex items-center">
|
|
138
138
|
<span className="text-[10px] font-medium text-muted-foreground uppercase tracking-widest leading-none">
|
|
139
139
|
{t("daily.goalWithValue", { value: goalCalories })}
|
|
140
140
|
</span>
|
|
@@ -215,7 +215,7 @@ export function DailyProgress({
|
|
|
215
215
|
].map((m) => (
|
|
216
216
|
<div
|
|
217
217
|
key={m.label}
|
|
218
|
-
className="p-2.5 sm:p-3 rounded-xl bg-muted/30
|
|
218
|
+
className="p-2.5 sm:p-3 rounded-xl bg-muted/30"
|
|
219
219
|
>
|
|
220
220
|
<p className="text-[10px] uppercase tracking-wider text-muted-foreground mb-1">
|
|
221
221
|
{m.label}
|
|
@@ -230,14 +230,14 @@ export function DailyProgress({
|
|
|
230
230
|
</div>
|
|
231
231
|
|
|
232
232
|
{/* Right Side: Charts */}
|
|
233
|
-
<div className="macros-summary-chart
|
|
233
|
+
<div className="macros-summary-chart flex-col justify-center transition-all duration-300">
|
|
234
234
|
<Tabs
|
|
235
235
|
value={activeChart}
|
|
236
236
|
onValueChange={setActiveChart}
|
|
237
237
|
className="flex flex-col space-y-6"
|
|
238
238
|
>
|
|
239
239
|
<div className="flex items-center justify-between">
|
|
240
|
-
<TabsList className="bg-muted/40
|
|
240
|
+
<TabsList className="bg-muted/40 h-8">
|
|
241
241
|
<TabsTrigger
|
|
242
242
|
value="weight"
|
|
243
243
|
className="gap-2 text-[10px] uppercase tracking-wider h-6 px-3"
|
|
@@ -26,8 +26,8 @@ export function ExerciseCard({
|
|
|
26
26
|
}: ExerciseCardProps) {
|
|
27
27
|
const t = useT();
|
|
28
28
|
return (
|
|
29
|
-
<div className="group relative flex items-center gap-3 overflow-hidden rounded-xl
|
|
30
|
-
<div className="flex items-center justify-center w-9 h-9 shrink-0 rounded-lg bg-orange-500/10
|
|
29
|
+
<div className="group relative flex items-center gap-3 overflow-hidden rounded-xl bg-card p-3 hover:bg-accent/40 sm:gap-4 sm:p-4">
|
|
30
|
+
<div className="flex items-center justify-center w-9 h-9 shrink-0 rounded-lg bg-orange-500/10">
|
|
31
31
|
<IconFlame className="h-4 w-4 text-orange-400" />
|
|
32
32
|
</div>
|
|
33
33
|
<div className="flex-1 min-w-0">
|
|
@@ -26,8 +26,8 @@ export function MealCard({
|
|
|
26
26
|
}: MealCardProps) {
|
|
27
27
|
const t = useT();
|
|
28
28
|
return (
|
|
29
|
-
<div className="group relative flex items-center gap-3 overflow-hidden rounded-xl
|
|
30
|
-
<div className="flex items-center justify-center w-9 h-9 shrink-0 rounded-lg bg-emerald-500/10
|
|
29
|
+
<div className="group relative flex items-center gap-3 overflow-hidden rounded-xl bg-card p-3 hover:bg-accent/40 sm:gap-4 sm:p-4">
|
|
30
|
+
<div className="flex items-center justify-center w-9 h-9 shrink-0 rounded-lg bg-emerald-500/10">
|
|
31
31
|
<IconToolsKitchen2 className="h-4 w-4 text-emerald-400" />
|
|
32
32
|
</div>
|
|
33
33
|
<div className="flex-1 min-w-0">
|
|
@@ -40,8 +40,8 @@ export function WeightCard({
|
|
|
40
40
|
const [showDeleteConfirm, setShowDeleteConfirm] = useState(false);
|
|
41
41
|
|
|
42
42
|
return (
|
|
43
|
-
<div className="group relative flex items-center gap-3 rounded-xl
|
|
44
|
-
<div className="flex items-center justify-center w-9 h-9 shrink-0 rounded-lg bg-blue-500/10
|
|
43
|
+
<div className="group relative flex items-center gap-3 rounded-xl bg-card p-3 hover:bg-accent/40 sm:gap-4 sm:p-4">
|
|
44
|
+
<div className="flex items-center justify-center w-9 h-9 shrink-0 rounded-lg bg-blue-500/10">
|
|
45
45
|
<IconScale className="h-4 w-4 text-blue-400" />
|
|
46
46
|
</div>
|
|
47
47
|
<div className="flex-1 min-w-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 (
|