@agent-native/core 0.77.16 → 0.77.17

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.
Files changed (60) hide show
  1. package/corpus/README.md +1 -1
  2. package/corpus/core/CHANGELOG.md +8 -0
  3. package/corpus/core/package.json +1 -1
  4. package/corpus/core/src/client/AgentPanel.tsx +4 -0
  5. package/corpus/core/src/client/org/OrgSwitcher.tsx +4 -0
  6. package/corpus/core/src/client/use-db-sync.ts +19 -2
  7. package/corpus/core/src/server/auth-marketing.ts +15 -0
  8. package/corpus/core/src/server/onboarding-html.ts +47 -1
  9. package/corpus/templates/analytics/.agents/skills/dashboard-management/SKILL.md +76 -0
  10. package/corpus/templates/analytics/actions/update-dashboard.ts +1 -0
  11. package/corpus/templates/analytics/app/components/dashboard/SqlChart.tsx +13 -2
  12. package/corpus/templates/analytics/app/i18n-data.ts +10 -0
  13. package/corpus/templates/analytics/app/lib/sql-query.ts +97 -21
  14. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/SqlChartCard.tsx +22 -1
  15. package/corpus/templates/analytics/app/root.tsx +15 -6
  16. package/corpus/templates/analytics/changelog/2026-06-25-dashboard-charts-no-longer-refresh-in-the-background-during-.md +6 -0
  17. package/corpus/templates/analytics/changelog/2026-06-25-first-party-dashboards-use-indexed-event-dates-for-faster-da.md +6 -0
  18. package/corpus/templates/analytics/changelog/2026-06-25-retention-and-active-user-dashboard-panels-now-count-account.md +6 -0
  19. package/corpus/templates/analytics/seeds/dashboards/agent-native-templates-first-party.json +58 -58
  20. package/corpus/templates/analytics/server/db/schema.ts +2 -0
  21. package/corpus/templates/analytics/server/handlers/sql-query.ts +1 -1
  22. package/corpus/templates/analytics/server/lib/dashboard-catalog.ts +1 -1
  23. package/corpus/templates/analytics/server/lib/first-party-analytics.ts +16 -6
  24. package/corpus/templates/analytics/server/lib/first-party-metric-catalog.ts +88 -56
  25. package/corpus/templates/analytics/server/plugins/db.ts +73 -0
  26. package/corpus/templates/clips/AGENTS.md +5 -0
  27. package/corpus/templates/clips/changelog/2026-06-25-github-issue-and-pull-request-pages-can-now-preview-playable.md +6 -0
  28. package/corpus/templates/clips/chrome-extension/PERMISSIONS.md +8 -2
  29. package/corpus/templates/clips/chrome-extension/public/manifest.json +14 -2
  30. package/corpus/templates/clips/chrome-extension/src/github-preview-content.ts +233 -0
  31. package/corpus/templates/clips/chrome-extension/src/github-preview.html +12 -0
  32. package/corpus/templates/clips/chrome-extension/src/github-preview.ts +414 -0
  33. package/corpus/templates/clips/chrome-extension/vite.config.ts +5 -0
  34. package/corpus/templates/mail/actions/archive-email.ts +13 -3
  35. package/corpus/templates/mail/app/hooks/use-emails.ts +5 -2
  36. package/corpus/templates/mail/changelog/2026-06-25-archive-failures-now-explain-when-gmail-needs-reconnecting-p.md +6 -0
  37. package/corpus/templates/mail/shared/archive-errors.ts +137 -0
  38. package/corpus/templates/plan/changelog/2026-06-25-hosted-signup-now-shows-how-to-switch-visual-plan-to-local-files.md +6 -0
  39. package/dist/client/AgentPanel.d.ts.map +1 -1
  40. package/dist/client/AgentPanel.js +2 -1
  41. package/dist/client/AgentPanel.js.map +1 -1
  42. package/dist/client/org/OrgSwitcher.d.ts.map +1 -1
  43. package/dist/client/org/OrgSwitcher.js +3 -1
  44. package/dist/client/org/OrgSwitcher.js.map +1 -1
  45. package/dist/client/use-db-sync.d.ts +9 -0
  46. package/dist/client/use-db-sync.d.ts.map +1 -1
  47. package/dist/client/use-db-sync.js +8 -1
  48. package/dist/client/use-db-sync.js.map +1 -1
  49. package/dist/collab/awareness.d.ts +2 -2
  50. package/dist/collab/awareness.d.ts.map +1 -1
  51. package/dist/observability/routes.d.ts +5 -5
  52. package/dist/server/agent-engine-api-key-route.d.ts +2 -2
  53. package/dist/server/auth-marketing.d.ts +4 -0
  54. package/dist/server/auth-marketing.d.ts.map +1 -1
  55. package/dist/server/auth-marketing.js +9 -0
  56. package/dist/server/auth-marketing.js.map +1 -1
  57. package/dist/server/onboarding-html.d.ts.map +1 -1
  58. package/dist/server/onboarding-html.js +46 -1
  59. package/dist/server/onboarding-html.js.map +1 -1
  60. package/package.json +1 -1
@@ -6,10 +6,12 @@ import {
6
6
  IconDotsVertical,
7
7
  IconMaximize,
8
8
  IconPencil,
9
+ IconRefresh,
9
10
  IconTrash,
10
11
  IconCode,
11
12
  IconDownload,
12
13
  } from "@tabler/icons-react";
14
+ import { useQueryClient } from "@tanstack/react-query";
13
15
  import { useCallback, useEffect, useRef, useState } from "react";
14
16
 
15
17
  import { ChartFillHeight, SqlChart } from "@/components/dashboard/SqlChart";
@@ -43,6 +45,7 @@ import {
43
45
  TooltipTrigger,
44
46
  } from "@/components/ui/tooltip";
45
47
 
48
+ import { serializePanelSql } from "./panel-sql";
46
49
  import type { SqlPanel } from "./types";
47
50
  import { ViewSqlPopover } from "./ViewSqlPopover";
48
51
 
@@ -66,6 +69,7 @@ export function SqlChartCard({
66
69
  editable = true,
67
70
  }: SqlChartCardProps) {
68
71
  const t = useT();
72
+ const queryClient = useQueryClient();
69
73
  const {
70
74
  attributes,
71
75
  listeners,
@@ -95,6 +99,18 @@ export function SqlChartCard({
95
99
  setExportCsv(handler ? () => handler : null);
96
100
  }, []);
97
101
 
102
+ const handleRefresh = useCallback(() => {
103
+ setShouldLoadData(true);
104
+ void queryClient.invalidateQueries({
105
+ queryKey: [
106
+ "sql-chart",
107
+ panel.id,
108
+ serializePanelSql(resolvedSql ?? panel.sql),
109
+ panel.source,
110
+ ],
111
+ });
112
+ }, [panel.id, panel.source, panel.sql, queryClient, resolvedSql]);
113
+
98
114
  useEffect(() => {
99
115
  if (panel.chartType === "section") {
100
116
  setShouldLoadData(true);
@@ -116,7 +132,7 @@ export function SqlChartCard({
116
132
  }
117
133
  },
118
134
  {
119
- rootMargin: "800px 0px",
135
+ rootMargin: "320px 0px",
120
136
  threshold: 0.01,
121
137
  },
122
138
  );
@@ -310,6 +326,11 @@ export function SqlChartCard({
310
326
  {t("sidebar.edit")}
311
327
  </DropdownMenuItem>
312
328
  )}
329
+ {!editable ? <DropdownMenuSeparator /> : null}
330
+ <DropdownMenuItem onSelect={handleRefresh}>
331
+ <IconRefresh className="h-4 w-4 mr-2" />
332
+ {t("sqlDashboard.refresh")}
333
+ </DropdownMenuItem>
313
334
  {editable ? (
314
335
  <DropdownMenuItem
315
336
  onSelect={(e) => {
@@ -8,7 +8,7 @@ import {
8
8
  } from "@agent-native/core/client";
9
9
  import { configureTracking } from "@agent-native/core/client";
10
10
  import { useQueryClient } from "@tanstack/react-query";
11
- import { useState } from "react";
11
+ import { useCallback, useState } from "react";
12
12
  import { Links, Meta, Outlet, Scripts, ScrollRestoration } from "react-router";
13
13
  import type { LinksFunction } from "react-router";
14
14
 
@@ -79,12 +79,21 @@ export function Layout({ children }: { children: React.ReactNode }) {
79
79
 
80
80
  function DbSyncBridge() {
81
81
  // Invalidate react-query caches on DB changes (agent edits, other tabs,
82
- // cron jobs). The hook invalidates every active query on any non-own
83
- // change event, so we no longer need to enumerate dashboard / analysis
84
- // / explorer keys here. Screen-refresh is handled automatically inside
85
- // AgentSidebar.
82
+ // cron jobs). SQL chart queries can be expensive, so they stay on explicit
83
+ // refresh/filter semantics instead of joining the broad action fallback.
84
+ // Screen-refresh is handled automatically inside AgentSidebar.
86
85
  const queryClient = useQueryClient();
87
- useDbSync({ queryClient, ignoreSource: TAB_ID });
86
+ const shouldInvalidateForAction = useCallback(
87
+ (query: { queryKey: readonly unknown[] }) => {
88
+ return query.queryKey[0] !== "sql-chart";
89
+ },
90
+ [],
91
+ );
92
+ useDbSync({
93
+ queryClient,
94
+ ignoreSource: TAB_ID,
95
+ actionInvalidatePredicate: shouldInvalidateForAction,
96
+ });
88
97
  return null;
89
98
  }
90
99
 
@@ -0,0 +1,6 @@
1
+ ---
2
+ type: fixed
3
+ date: 2026-06-25
4
+ ---
5
+
6
+ Dashboard charts no longer refresh in the background during agent activity and load more steadily on large dashboards.
@@ -0,0 +1,6 @@
1
+ ---
2
+ type: improved
3
+ date: 2026-06-25
4
+ ---
5
+
6
+ First-party dashboards use indexed event dates for faster date-range charts.
@@ -0,0 +1,6 @@
1
+ ---
2
+ type: fixed
3
+ date: 2026-06-25
4
+ ---
5
+
6
+ Retention and active-user dashboard panels now exclude docs traffic, smooth retention cohorts, and use clearer signed-in visitor labels.