@agent-native/core-corpus 0.211.0 → 0.212.0-nightly-20261021010049
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 +1 -1
- package/corpus/templates/analytics/.agents/skills/dashboard-management/SKILL.md +7 -5
- package/corpus/templates/analytics/.deploy-tmp/agent-native-provided-plugins.mjs +10 -0
- package/corpus/templates/analytics/actions/save-data-note.ts +1 -1
- package/corpus/templates/analytics/actions/view-screen.ts +2 -0
- package/corpus/templates/analytics/app/components/AnalyticsReviewArtifactPreview.tsx +16 -10
- package/corpus/templates/analytics/app/components/dashboard/data-note-bands.tsx +11 -2
- package/corpus/templates/analytics/app/components/dashboard/event-markers.tsx +75 -62
- package/corpus/templates/analytics/app/i18n/en-US.ts +2 -0
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/DashboardFilterBar.tsx +138 -42
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/SqlChartCard.tsx +53 -40
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/filter-vars.ts +44 -3
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/index.tsx +16 -11
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/interpolate.ts +100 -0
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/types.ts +6 -0
- package/corpus/templates/analytics/changelog/2026-10-16-a-key-date-marker-opens-its-card-on-hover-even-where-a-chart.md +6 -0
- package/corpus/templates/analytics/changelog/2026-10-16-data-notes-under-charts-without-a-date-axis-now-follow-the-d.md +6 -0
- package/corpus/templates/analytics/changelog/2026-10-16-in-edit-mode-rename-or-delete-a-multi-select-filter-s-group-.md +6 -0
- package/corpus/templates/analytics/server/lib/analytics-query-catalog.ts +1 -53
- package/corpus/templates/analytics/server/lib/dashboard-annotation-reads.ts +7 -1
- package/corpus/templates/analytics/server/lib/dashboard-annotation-summary.ts +53 -21
- package/corpus/templates/analytics/server/lib/dashboard-report-render.ts +29 -17
- package/corpus/templates/analytics/shared/data-notes.ts +33 -8
- package/corpus/templates/analytics/shared/sql-comments.ts +61 -0
- package/corpus/templates/assets/.deploy-tmp/agent-native-provided-plugins.mjs +10 -0
- package/corpus/templates/brain/.deploy-tmp/agent-native-provided-plugins.mjs +10 -0
- package/corpus/templates/calendar/.deploy-tmp/agent-native-provided-plugins.mjs +10 -0
- package/corpus/templates/chat/.deploy-tmp/agent-native-provided-plugins.mjs +10 -0
- package/corpus/templates/clips/.agents/skills/recording/SKILL.md +2 -2
- package/corpus/templates/clips/.deploy-tmp/agent-native-provided-plugins.mjs +10 -0
- package/corpus/templates/clips/actions/abandon-recording-start.ts +57 -0
- package/corpus/templates/clips/actions/create-intake-recording.ts +98 -20
- package/corpus/templates/clips/actions/create-recording.ts +316 -81
- package/corpus/templates/clips/actions/delete-recording-permanent.ts +97 -72
- package/corpus/templates/clips/actions/lib/storage-setup-error.ts +4 -1
- package/corpus/templates/clips/actions/trash-recording.ts +18 -9
- package/corpus/templates/clips/app/components/player/transcript-import-button.tsx +9 -2
- package/corpus/templates/clips/app/hooks/use-video-storage-status.ts +4 -0
- package/corpus/templates/clips/app/i18n/en-US.ts +8 -2
- package/corpus/templates/clips/app/lib/clip-intake-create-retry.ts +36 -0
- package/corpus/templates/clips/app/lib/upload-target.ts +186 -66
- package/corpus/templates/clips/app/routes/record.tsx +201 -217
- package/corpus/templates/clips/changelog/2026-10-16-if-permanently-deleting-a-clip-fails-the-clip-and-its-video-.md +6 -0
- package/corpus/templates/clips/changelog/2026-10-16-the-replace-transcript-dialog-keeps-showing-the-file-name-wh.md +6 -0
- package/corpus/templates/clips/changelog/2026-10-16-tooltips-no-longer-pop-up-on-their-own-after-a-menu-popover-.md +6 -0
- package/corpus/templates/clips/changelog/2026-10-16-video-posters-load-again-when-your-own-storage-runs-on-a-pri.md +6 -0
- package/corpus/templates/clips/changelog/2026-10-20-clips-asks-you-to-connect-storage-before-recording-when-no-s.md +6 -0
- package/corpus/templates/clips/server/lib/hosted-clip-allowance.ts +79 -3
- package/corpus/templates/clips/server/lib/recording-failures.ts +2 -0
- package/corpus/templates/clips/server/lib/upload-lease.ts +46 -0
- package/corpus/templates/clips/server/lib/upload-recording-media.ts +5 -2
- package/corpus/templates/clips/server/lib/video-storage.ts +1 -0
- package/corpus/templates/clips/server/routes/api/thumbnail/[recordingId].get.ts +123 -24
- package/corpus/templates/content/.agents/skills/document-editing/SKILL.md +7 -2
- package/corpus/templates/content/.agents/skills/document-editing/references/databases.md +6 -2
- package/corpus/templates/content/.deploy-tmp/agent-native-provided-plugins.mjs +10 -0
- package/corpus/templates/content/actions/_database-block-actions.ts +4 -0
- package/corpus/templates/content/actions/_database-row-mutation.ts +6 -0
- package/corpus/templates/content/actions/_database-source-utils.ts +12 -1
- package/corpus/templates/content/actions/_document-edit-mutation.ts +2 -0
- package/corpus/templates/content/actions/_document-source.ts +174 -1
- package/corpus/templates/content/actions/_github-source-freshness.ts +253 -0
- package/corpus/templates/content/actions/_github-source-metadata.ts +206 -0
- package/corpus/templates/content/actions/_github-source.ts +2221 -0
- package/corpus/templates/content/actions/add-comment.ts +87 -1
- package/corpus/templates/content/actions/add-content-database-source-field-property.ts +2 -0
- package/corpus/templates/content/actions/attach-content-database-source.ts +2 -0
- package/corpus/templates/content/actions/bind-content-database-source-field.ts +2 -0
- package/corpus/templates/content/actions/change-content-database-source-role.ts +2 -0
- package/corpus/templates/content/actions/delete-document.ts +18 -3
- package/corpus/templates/content/actions/disconnect-content-database-source.ts +29 -2
- package/corpus/templates/content/actions/duplicate-database-item.ts +2 -0
- package/corpus/templates/content/actions/duplicate-database-items.ts +2 -0
- package/corpus/templates/content/actions/edit-document.ts +2 -0
- package/corpus/templates/content/actions/get-content-database-source.ts +3 -0
- package/corpus/templates/content/actions/get-content-database.ts +8 -1
- package/corpus/templates/content/actions/get-document.ts +9 -1
- package/corpus/templates/content/actions/link-github-folder.ts +209 -0
- package/corpus/templates/content/actions/list-comments.ts +3 -1
- package/corpus/templates/content/actions/list-content-database-comments.ts +5 -1
- package/corpus/templates/content/actions/move-document.ts +7 -0
- package/corpus/templates/content/actions/query-content-database-items.ts +11 -2
- package/corpus/templates/content/actions/refresh-content-database-source.ts +41 -12
- package/corpus/templates/content/actions/restore-document-version.ts +3 -0
- package/corpus/templates/content/actions/search-content-database-rows.ts +2 -0
- package/corpus/templates/content/actions/submit-content-database-form.ts +2 -0
- package/corpus/templates/content/actions/sync-github-folder.ts +124 -0
- package/corpus/templates/content/actions/sync-notion-comments.ts +3 -0
- package/corpus/templates/content/actions/update-document.ts +7 -1
- package/corpus/templates/content/app/components/editor/BubbleToolbar.tsx +110 -27
- package/corpus/templates/content/app/components/editor/CommentAiRecipient.tsx +29 -0
- package/corpus/templates/content/app/components/editor/CommentComposer.tsx +6 -8
- package/corpus/templates/content/app/components/editor/CommentsSidebar.tsx +226 -30
- package/corpus/templates/content/app/components/editor/DocumentBlockFields.tsx +91 -17
- package/corpus/templates/content/app/components/editor/DocumentEditor.tsx +143 -71
- package/corpus/templates/content/app/components/editor/VersionHistoryPanel.tsx +1 -0
- package/corpus/templates/content/app/components/editor/VisualEditor.tsx +3 -1
- package/corpus/templates/content/app/components/editor/block-field-comment-threads.ts +188 -0
- package/corpus/templates/content/app/components/editor/block-field-comments.tsx +433 -0
- package/corpus/templates/content/app/components/editor/blockFieldTabs.ts +38 -0
- package/corpus/templates/content/app/components/editor/comment-lane.ts +19 -2
- package/corpus/templates/content/app/components/editor/database/DatabaseView.tsx +33 -12
- package/corpus/templates/content/app/components/editor/database/create-target.ts +15 -2
- package/corpus/templates/content/app/components/editor/database/row-access.ts +6 -1
- package/corpus/templates/content/app/components/editor/database/settings.tsx +12 -2
- package/corpus/templates/content/app/components/editor/document-collaboration.ts +8 -1
- package/corpus/templates/content/app/components/editor/extensions/ImageBlock.tsx +21 -0
- package/corpus/templates/content/app/components/editor/property-comments.tsx +6 -3
- package/corpus/templates/content/app/global.css +13 -0
- package/corpus/templates/content/app/hooks/content-action-refresh.ts +12 -0
- package/corpus/templates/content/app/hooks/use-comments.ts +26 -0
- package/corpus/templates/content/app/i18n-data.ts +15 -0
- package/corpus/templates/content/changelog/2026-10-15-the-comment-menu-lists-each-ai-model-once-instead-of-once-pe.md +6 -0
- package/corpus/templates/content/changelog/2026-10-18-collections-linked-to-a-github-folder-bring-in-pushes-on-their.md +6 -0
- package/corpus/templates/content/changelog/2026-10-18-connected-ai-assistants-can-link-a-new-collection-to-a-github.md +6 -0
- package/corpus/templates/content/changelog/2026-10-19-comment-on-text-in-any-blocks-field-tab.md +6 -0
- package/corpus/templates/content/e2e/helpers.ts +8 -1
- package/corpus/templates/content/parity/matrix.md +42 -42
- package/corpus/templates/content/parity/matrix.ts +3 -0
- package/corpus/templates/content/scripts/_stored-form-census-kinds.ts +931 -0
- package/corpus/templates/content/scripts/_stored-form-census-scan.ts +814 -0
- package/corpus/templates/content/scripts/_stored-form-census.ts +505 -0
- package/corpus/templates/content/server/db/schema.ts +9 -0
- package/corpus/templates/content/server/lib/comment-ai.ts +8 -0
- package/corpus/templates/content/server/lib/comment-blocks-field.ts +81 -0
- package/corpus/templates/content/server/lib/github-source-client.ts +493 -0
- package/corpus/templates/content/server/lib/provider-api.ts +26 -9
- package/corpus/templates/content/server/lib/suggested-edits.ts +1 -1
- package/corpus/templates/content/server/plugins/db.ts +6 -0
- package/corpus/templates/content/server/plugins/github-source-sync.ts +60 -0
- package/corpus/templates/content/shared/api.ts +37 -2
- package/corpus/templates/content/shared/github-source.ts +349 -0
- package/corpus/templates/crm/.deploy-tmp/agent-native-provided-plugins.mjs +10 -0
- package/corpus/templates/design/.deploy-tmp/agent-native-provided-plugins.mjs +10 -0
- package/corpus/templates/design/.generated/bridge/native-builtin-metadata.generated.ts +301 -0
- package/corpus/templates/design/.generated/bridge/native-worker-source.generated.ts +6 -0
- package/corpus/templates/design/actions/update-file.ts +10 -15
- package/corpus/templates/design/changelog/2026-10-20-public-design-previews-no-longer-show-spurious-export-errors.md +6 -0
- package/corpus/templates/design/changelog/2026-10-20-screen-image-uploads-no-longer-overwrite-edits-made-during-t.md +6 -0
- package/corpus/templates/dispatch/.deploy-tmp/agent-native-provided-plugins.mjs +10 -0
- package/corpus/templates/forms/.deploy-tmp/agent-native-provided-plugins.mjs +10 -0
- package/corpus/templates/mail/.deploy-tmp/agent-native-provided-plugins.mjs +10 -0
- package/corpus/templates/mail/actions/list-inbox-threads.ts +249 -70
- package/corpus/templates/mail/actions/resync-inbox.ts +1 -0
- package/corpus/templates/mail/actions/sync-inbox.ts +9 -3
- package/corpus/templates/mail/app/components/email/EmailList.tsx +44 -10
- package/corpus/templates/mail/app/components/email/EmailListItem.tsx +53 -1
- package/corpus/templates/mail/app/components/layout/AppLayout.tsx +5 -2
- package/corpus/templates/mail/app/hooks/use-inbox-threads.ts +63 -3
- package/corpus/templates/mail/app/i18n/en-US.ts +3 -0
- package/corpus/templates/mail/app/lib/thread-cache.ts +3 -0
- package/corpus/templates/mail/app/pages/InboxPage.tsx +6 -0
- package/corpus/templates/mail/app/root.tsx +7 -2
- package/corpus/templates/mail/changelog/2026-10-20-mail-keeps-the-newest-2-000-inbox-threads-per-account-in-its.md +6 -0
- package/corpus/templates/mail/changelog/2026-10-20-mail-s-inbox-loads-faster-opens-threads-sooner-after-you-hov.md +6 -0
- package/corpus/templates/mail/server/db/schema.ts +21 -0
- package/corpus/templates/mail/server/lib/email-state.ts +359 -26
- package/corpus/templates/mail/server/lib/inbox-push-watch.ts +35 -0
- package/corpus/templates/mail/server/lib/inbox-retention.ts +427 -0
- package/corpus/templates/mail/server/lib/inbox-status.ts +155 -0
- package/corpus/templates/mail/server/lib/inbox-store.ts +793 -28
- package/corpus/templates/mail/server/lib/inbox-sync.ts +701 -110
- package/corpus/templates/mail/server/lib/inbox-tab-windows.fake.ts +67 -0
- package/corpus/templates/mail/server/lib/retention-connections.ts +181 -0
- package/corpus/templates/mail/server/plugins/db.ts +53 -0
- package/corpus/templates/mail/server/plugins/mail-jobs.ts +51 -0
- package/corpus/templates/mail/shared/inbox-threads.ts +62 -0
- package/corpus/templates/plan/.deploy-tmp/agent-native-provided-plugins.mjs +10 -0
- package/corpus/templates/slides/.deploy-tmp/agent-native-provided-plugins.mjs +10 -0
- package/corpus/templates/slides/AGENTS.md +1 -1
- package/corpus/templates/slides/actions/view-screen.ts +10 -1
- package/corpus/templates/slides/app/components/editor/FloatingToolbar.tsx +48 -0
- package/corpus/templates/slides/app/components/editor/SlideEditor.tsx +66 -6
- package/corpus/templates/slides/app/components/editor/SpeakerNotesPanel.tsx +61 -57
- package/corpus/templates/slides/app/i18n/en-US.ts +15 -0
- package/corpus/templates/slides/changelog/2026-10-19-speaker-notes-panel-under-the-slide-canvas-with-generate-not.md +6 -0
- package/corpus/templates/slides/scripts/edit-fidelity/authoring-fuzz.ts +16 -3
- package/corpus/templates/slides/scripts/edit-fidelity/run.ts +8 -14
- package/package.json +1 -1
- package/corpus/templates/clips/app/lib/first-run-storage-setup.ts +0 -30
package/corpus/README.md
CHANGED
|
@@ -375,9 +375,11 @@ its owner organization's. Read them with `list-data-notes`, passing
|
|
|
375
375
|
inside the chart, and a hoverable title. Rows sorted by something other than
|
|
376
376
|
date shade each run of the note's rows, never a row between them, under one
|
|
377
377
|
title. Incidents are red; open data problems amber; fixed data problems grey.
|
|
378
|
-
Other charts
|
|
379
|
-
|
|
380
|
-
|
|
378
|
+
Other charts, and a time chart whose x values aren't dates, flag the note by
|
|
379
|
+
the title and write it under the chart when its dates overlap the chart's
|
|
380
|
+
time range: the panel's own range if it overrides the dashboard's. A chart
|
|
381
|
+
whose SQL has no time range, or one the app can't read such as a quarter its
|
|
382
|
+
SQL works out, does so while the note is ongoing or ended in the last 30 days.
|
|
381
383
|
- A dashboard hides a note on one chart with
|
|
382
384
|
`setDashboard({ annotations: { hiddenDataNotes: [{ noteId, panelId }, ...] } })`,
|
|
383
385
|
listing the notes already hidden that stay hidden; `hiddenKeyDateSets` is kept.
|
|
@@ -425,7 +427,7 @@ means the list was cut to fit, so read `list-key-dates` or `list-data-notes`
|
|
|
425
427
|
with `dashboardId` before saying a marker isn't there. `keyDatesHint` means no
|
|
426
428
|
chart on the dashboard draws key dates, so don't cite one there. A note's `panelIds` are the charts it is
|
|
427
429
|
on, but a time chart draws it only over the dates it plots (and, if its x
|
|
428
|
-
values aren't dates, only
|
|
430
|
+
values aren't dates, only when they overlap its time range), so cite it for a change
|
|
429
431
|
only when the change falls within the note's dates. `editable: false` means
|
|
430
432
|
they are the owner organization's, so cite them but don't change them.
|
|
431
433
|
|
|
@@ -651,7 +653,7 @@ Use conditional blocks for optional filters:
|
|
|
651
653
|
|
|
652
654
|
An unwrapped `{{<id>:list}}` with no selection fails the query on purpose. Option values must not contain commas.
|
|
653
655
|
|
|
654
|
-
To offer a named group of values, give the multi-select `presets`, such as `"presets": [{ "label": "Launch apps", "values": ["clips", "slides", "design"] }]`. Each preset shows as a button beside Select all in the dropdown, and picking it replaces only that filter's selection, so the other filters keep their values. Every value must be one of the filter's options. Use a preset rather than a saved view when the user wants a shortcut for one filter: a saved view replaces every filter. In Edit mode, people
|
|
656
|
+
To offer a named group of values, give the multi-select `presets`, such as `"presets": [{ "label": "Launch apps", "values": ["clips", "slides", "design"] }]`. Each preset shows as a button beside Select all in the dropdown, and picking it replaces only that filter's selection, so the other filters keep their values. Every value must be one of the filter's options. Use a preset rather than a saved view when the user wants a shortcut for one filter: a saved view replaces every filter. In Edit mode, people manage presets themselves at the bottom of the dropdown: checking two or more values that no preset matches offers Save as group, which appends the same `presets` entry, and a selection that matches a preset offers Rename group and Delete group for that entry. Treat a preset you did not write as someone's saved choice and keep it unless asked.
|
|
655
657
|
|
|
656
658
|
Filters auto-apply on change — there is no Apply button. Each filter change writes to the URL and re-runs the affected panels. Other filters are preserved (the URL update is functional, not destructive). If you see a filter "reset" itself when another filter changes, look for a duplicate `id` first.
|
|
657
659
|
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// AUTO-GENERATED by @agent-native/core deploy build
|
|
2
|
+
import { markDefaultPluginProvided } from "@agent-native/core/server/edge";
|
|
3
|
+
|
|
4
|
+
const pluginStems = ["agent-chat","analytics-alert-jobs","analytics-rollup-backfill-jobs","auth","collab","config","content-metrics-collection-jobs","core-routes","creative-context","dashboard-report-jobs","db","feature-flags","labs","onboarding","otel","session-replay-retention-jobs","transactional-emails","uptime-monitor-jobs"];
|
|
5
|
+
|
|
6
|
+
export default function markBuildDiscoveredPlugins(nitroApp) {
|
|
7
|
+
for (const stem of pluginStems) {
|
|
8
|
+
markDefaultPluginProvided(nitroApp, stem);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
@@ -23,7 +23,7 @@ export default defineAction({
|
|
|
23
23
|
openWorldHint: false,
|
|
24
24
|
},
|
|
25
25
|
description:
|
|
26
|
-
'Add a data note, or change the given fields of one by id. A data note explains a stretch of data on charts: kind "data" for tracking problems such as an undercount, a gap, or a renamed event, kind "incident" for a product outage. It draws as a shaded band over its dates on time charts (red for incidents, amber for open data problems, grey once fixed) and as a line under
|
|
26
|
+
'Add a data note, or change the given fields of one by id. A data note explains a stretch of data on charts: kind "data" for tracking problems such as an undercount, a gap, or a renamed event, kind "incident" for a product outage. It draws as a shaded band over its dates on time charts (red for incidents, amber for open data problems, grey once fixed) and as a line under a chart without a date axis when its dates overlap the time range the chart shows. It shows on every chart whose SQL filters on one of matchEvents, unless the SQL also filters on one of unlessEvents (the replacement event that covers the gap), and on the charts listed in panels. Leave endDate empty while the problem is ongoing; mark it fixed with status "fixed", endDate, and fix. State facts the data shows; leave out causes nobody has confirmed. Pass dashboardId for the dashboard on screen: then `dashboard.shownOn` in the result lists the charts there the note is on at the default time range of the dashboard (a time chart draws it only over the dates it plots), and `hint` says why when it is on none.',
|
|
27
27
|
schema: z.object({
|
|
28
28
|
id: z
|
|
29
29
|
.string()
|
|
@@ -229,6 +229,7 @@ export default defineAction({
|
|
|
229
229
|
{ scope: { email, orgId }, editable: true },
|
|
230
230
|
nav.dashboardId,
|
|
231
231
|
builtin.config,
|
|
232
|
+
url?.searchParams,
|
|
232
233
|
),
|
|
233
234
|
}),
|
|
234
235
|
SCREEN_DASHBOARD_CHAR_BUDGET,
|
|
@@ -256,6 +257,7 @@ export default defineAction({
|
|
|
256
257
|
}),
|
|
257
258
|
dashboard.id,
|
|
258
259
|
dashboard.config as Record<string, unknown>,
|
|
260
|
+
url?.searchParams,
|
|
259
261
|
)
|
|
260
262
|
: undefined,
|
|
261
263
|
}),
|
|
@@ -9,6 +9,7 @@ import { isValidPanelEvent } from "@shared/panel-events";
|
|
|
9
9
|
import { useEffect, useMemo, useRef, useState } from "react";
|
|
10
10
|
|
|
11
11
|
import { ResolvedAnnotationsProvider } from "@/components/dashboard/dashboard-annotations-context";
|
|
12
|
+
import { DataNoteRangeProvider } from "@/components/dashboard/data-note-bands";
|
|
12
13
|
import { SqlChart } from "@/components/dashboard/SqlChart";
|
|
13
14
|
import Markdown from "@/components/Markdown";
|
|
14
15
|
import type { SqlQueryResult } from "@/lib/sql-query";
|
|
@@ -17,7 +18,10 @@ import {
|
|
|
17
18
|
reviewDashboardFilters,
|
|
18
19
|
reviewDashboardVariables,
|
|
19
20
|
} from "@/pages/adhoc/sql-dashboard/filter-vars";
|
|
20
|
-
import {
|
|
21
|
+
import {
|
|
22
|
+
interpolateDashboardPanelSql,
|
|
23
|
+
panelTimeRange,
|
|
24
|
+
} from "@/pages/adhoc/sql-dashboard/interpolate";
|
|
21
25
|
import { serializePanelSql } from "@/pages/adhoc/sql-dashboard/panel-sql";
|
|
22
26
|
import { timeRangeDays } from "@/pages/adhoc/sql-dashboard/pivot";
|
|
23
27
|
import type {
|
|
@@ -355,15 +359,17 @@ function ReviewDashboardPanel({
|
|
|
355
359
|
{!compact && (
|
|
356
360
|
<h3 className="mb-2 truncate text-sm font-medium">{panel.title}</h3>
|
|
357
361
|
)}
|
|
358
|
-
<
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
362
|
+
<DataNoteRangeProvider value={panelTimeRange(panel, variables)}>
|
|
363
|
+
<SqlChart
|
|
364
|
+
panel={panel}
|
|
365
|
+
resolvedSql={resolvedSql}
|
|
366
|
+
timeRange={timeRangeDays(variables.timeRange)}
|
|
367
|
+
loadData={false}
|
|
368
|
+
resultOverride={result}
|
|
369
|
+
showLoadingWhenDisabled={false}
|
|
370
|
+
dashboardId={artifactId}
|
|
371
|
+
/>
|
|
372
|
+
</DataNoteRangeProvider>
|
|
367
373
|
</div>
|
|
368
374
|
);
|
|
369
375
|
}
|
|
@@ -36,6 +36,7 @@ import {
|
|
|
36
36
|
HoverCardContent,
|
|
37
37
|
HoverCardTrigger,
|
|
38
38
|
} from "@/components/ui/hover-card";
|
|
39
|
+
import type { PanelTimeRange } from "@/pages/adhoc/sql-dashboard/interpolate";
|
|
39
40
|
|
|
40
41
|
import { isPendingAnnotation } from "./annotation-mutations";
|
|
41
42
|
import { useChartHoverCardOpen } from "./chart-hover-card";
|
|
@@ -225,6 +226,13 @@ const UnplacedDataNotesContext = createContext<
|
|
|
225
226
|
/** Hears which notes a time chart writes under its plot, so its card can flag them by the title. */
|
|
226
227
|
export const UnplacedDataNotesListener = UnplacedDataNotesContext.Provider;
|
|
227
228
|
|
|
229
|
+
const DataNoteRangeContext = createContext<PanelTimeRange>({
|
|
230
|
+
kind: "absent",
|
|
231
|
+
});
|
|
232
|
+
|
|
233
|
+
/** The dates a card's query covers, so a chart whose x values aren't dates lists the notes in them. */
|
|
234
|
+
export const DataNoteRangeProvider = DataNoteRangeContext.Provider;
|
|
235
|
+
|
|
228
236
|
/**
|
|
229
237
|
* Where each note falls on a chart's x values: bands over the dates it
|
|
230
238
|
* covers, or a line under the chart when it can't be placed on them.
|
|
@@ -234,12 +242,13 @@ export function useDataNoteLayout(
|
|
|
234
242
|
rows: readonly Record<string, unknown>[],
|
|
235
243
|
xKey: string,
|
|
236
244
|
): { shaded: ShadedDataNote[]; unplaced: DataNote[] } {
|
|
245
|
+
const range = useContext(DataNoteRangeContext);
|
|
237
246
|
const layout = useMemo(() => {
|
|
238
247
|
if (notes.length === 0) return { shaded: [], unplaced: [] };
|
|
239
248
|
const shown = dataNotesOnChart(
|
|
240
249
|
notes,
|
|
241
250
|
rows.map((row) => row[xKey]),
|
|
242
|
-
{ xKey },
|
|
251
|
+
{ xKey, range },
|
|
243
252
|
);
|
|
244
253
|
return {
|
|
245
254
|
shaded: shown.filter(({ bands }) => bands.length > 0),
|
|
@@ -247,7 +256,7 @@ export function useDataNoteLayout(
|
|
|
247
256
|
bands.length > 0 ? [] : [note],
|
|
248
257
|
),
|
|
249
258
|
};
|
|
250
|
-
}, [notes, rows, xKey]);
|
|
259
|
+
}, [notes, rows, xKey, range]);
|
|
251
260
|
const listen = useContext(UnplacedDataNotesContext);
|
|
252
261
|
useEffect(() => {
|
|
253
262
|
if (!listen) return;
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
type PanelEventGroup,
|
|
7
7
|
} from "@shared/panel-events";
|
|
8
8
|
import { useMemo, type ReactNode } from "react";
|
|
9
|
-
import { ReferenceLine } from "recharts";
|
|
9
|
+
import { DefaultZIndexes, ReferenceLine, ZIndexLayer } from "recharts";
|
|
10
10
|
|
|
11
11
|
import {
|
|
12
12
|
HoverCard,
|
|
@@ -19,6 +19,12 @@ import { useChartHoverCardOpen } from "./chart-hover-card";
|
|
|
19
19
|
const DEFAULT_EVENT_COLOR = "hsl(var(--foreground))";
|
|
20
20
|
/** How far a marker's hover target reaches from its x, the widest part of it. */
|
|
21
21
|
const MARKER_REACH = 11;
|
|
22
|
+
/**
|
|
23
|
+
* Above the cursor line and dots Recharts draws on the hovered day. In the
|
|
24
|
+
* reference line's own layer, a dot on the x-axis covered the marker and took
|
|
25
|
+
* its hover.
|
|
26
|
+
*/
|
|
27
|
+
const MARKER_Z_INDEX = DefaultZIndexes.activeDot + 1;
|
|
22
28
|
|
|
23
29
|
interface MarkerViewBox {
|
|
24
30
|
x?: number;
|
|
@@ -45,73 +51,80 @@ function EventMarkerBadge({
|
|
|
45
51
|
const cy = viewBox.y + viewBox.height;
|
|
46
52
|
const headerDate = group.events[0].date;
|
|
47
53
|
return (
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
<
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
54
|
+
<ZIndexLayer zIndex={MARKER_Z_INDEX}>
|
|
55
|
+
{/* The card renders in a portal: drawn inside the SVG it was clipped at
|
|
56
|
+
the chart's edges and painted under series dots. */}
|
|
57
|
+
<HoverCard
|
|
58
|
+
open={open}
|
|
59
|
+
onOpenChange={setOpen}
|
|
60
|
+
openDelay={0}
|
|
61
|
+
closeDelay={80}
|
|
62
|
+
>
|
|
63
|
+
<HoverCardTrigger asChild>
|
|
64
|
+
<g
|
|
65
|
+
data-event-marker=""
|
|
66
|
+
style={{ cursor: "default" }}
|
|
67
|
+
onMouseMove={(e) => e.stopPropagation()}
|
|
68
|
+
>
|
|
69
|
+
<circle cx={cx} cy={cy} r={11} fill="transparent" />
|
|
70
|
+
{group.events.length > 1 && (
|
|
71
|
+
<circle
|
|
72
|
+
cx={cx}
|
|
73
|
+
cy={cy}
|
|
74
|
+
r={9}
|
|
75
|
+
fill="none"
|
|
76
|
+
stroke={color}
|
|
77
|
+
strokeOpacity={0.45}
|
|
78
|
+
strokeWidth={1.5}
|
|
79
|
+
/>
|
|
80
|
+
)}
|
|
59
81
|
<circle
|
|
60
82
|
cx={cx}
|
|
61
83
|
cy={cy}
|
|
62
|
-
r={
|
|
63
|
-
fill=
|
|
64
|
-
stroke=
|
|
65
|
-
|
|
66
|
-
strokeWidth={1.5}
|
|
84
|
+
r={6}
|
|
85
|
+
fill={color}
|
|
86
|
+
stroke="hsl(var(--background))"
|
|
87
|
+
strokeWidth={2}
|
|
67
88
|
/>
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
cy={cy}
|
|
72
|
-
r={6}
|
|
73
|
-
fill={color}
|
|
74
|
-
stroke="hsl(var(--background))"
|
|
75
|
-
strokeWidth={2}
|
|
76
|
-
/>
|
|
77
|
-
</g>
|
|
78
|
-
</HoverCardTrigger>
|
|
79
|
-
{/* Markers sit on the x-axis, so the card opens up over the chart, as a
|
|
89
|
+
</g>
|
|
90
|
+
</HoverCardTrigger>
|
|
91
|
+
{/* Markers sit on the x-axis, so the card opens up over the chart, as a
|
|
80
92
|
data note's opens down from its pill. */}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
</span>
|
|
104
|
-
{when && (
|
|
105
|
-
<span className="ml-auto pl-3 tabular-nums text-muted-foreground">
|
|
106
|
-
{when}
|
|
93
|
+
<HoverCardContent
|
|
94
|
+
side="top"
|
|
95
|
+
collisionPadding={8}
|
|
96
|
+
className="w-auto max-w-72 p-2.5 text-xs"
|
|
97
|
+
>
|
|
98
|
+
<div className="mb-1.5 text-[11px] text-muted-foreground">
|
|
99
|
+
{formatPanelEventDate(headerDate)}
|
|
100
|
+
</div>
|
|
101
|
+
<ul className="space-y-1">
|
|
102
|
+
{group.events.map((event, index) => {
|
|
103
|
+
const when = formatPanelEventWhen(event, headerDate);
|
|
104
|
+
return (
|
|
105
|
+
<li
|
|
106
|
+
key={`${event.date}-${event.time ?? ""}-${index}`}
|
|
107
|
+
className="flex items-center gap-2"
|
|
108
|
+
>
|
|
109
|
+
<span
|
|
110
|
+
className="size-2 shrink-0 rounded-full"
|
|
111
|
+
style={{ background: event.color ?? DEFAULT_EVENT_COLOR }}
|
|
112
|
+
/>
|
|
113
|
+
<span className="font-medium text-popover-foreground">
|
|
114
|
+
{event.label}
|
|
107
115
|
</span>
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
116
|
+
{when && (
|
|
117
|
+
<span className="ml-auto pl-3 tabular-nums text-muted-foreground">
|
|
118
|
+
{when}
|
|
119
|
+
</span>
|
|
120
|
+
)}
|
|
121
|
+
</li>
|
|
122
|
+
);
|
|
123
|
+
})}
|
|
124
|
+
</ul>
|
|
125
|
+
</HoverCardContent>
|
|
126
|
+
</HoverCard>
|
|
127
|
+
</ZIndexLayer>
|
|
115
128
|
);
|
|
116
129
|
}
|
|
117
130
|
|
|
@@ -887,6 +887,8 @@ export default {
|
|
|
887
887
|
groupName: "Group name",
|
|
888
888
|
saveForEveryone: "Save for everyone",
|
|
889
889
|
groupNameTaken: "A group with this name already exists",
|
|
890
|
+
renameGroup: "Rename group…",
|
|
891
|
+
deleteGroup: "Delete group",
|
|
890
892
|
untitledDashboard: "Untitled Dashboard",
|
|
891
893
|
dashboardFallback: "dashboard",
|
|
892
894
|
viewOnly: "You have view-only access to this dashboard.",
|