@sentry/junior-dashboard 0.279.0 → 0.281.0
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/dist/app.js +105 -43
- package/dist/client-manifest.json +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +105 -43
- package/dist/public/chunks/AdminPage-M5RBVZFN.js +1 -0
- package/dist/public/chunks/AutomationPage-WALCREDT.js +3 -0
- package/dist/public/chunks/AutomationRunsPage-CV47E4UX.js +1 -0
- package/dist/public/chunks/AutomationsPage-57L3AQVJ.js +1 -0
- package/dist/public/chunks/CodePage-XJUYMFJH.js +1 -0
- package/dist/public/chunks/ConnectionsPage-3QQAGYWF.js +1 -0
- package/dist/public/chunks/DrawerContent-RYYS57ZH.js +1 -0
- package/dist/public/chunks/LocationDetailPage-4IL5HQML.js +1 -0
- package/dist/public/chunks/LocationsPage-D2DUQAHJ.js +1 -0
- package/dist/public/chunks/McpSettingsPage-3RT7JPEK.js +1 -0
- package/dist/public/chunks/PeoplePage-6F5GPQ7C.js +1 -0
- package/dist/public/chunks/PersonProfilePage-SPAYQPTD.js +1 -0
- package/dist/public/chunks/PersonalTokensPage-SHAUJ74M.js +1 -0
- package/dist/public/chunks/PluginUserPage-64FIWD7M.js +1 -0
- package/dist/public/chunks/RepositoryPage-L7IHOXSN.js +1 -0
- package/dist/public/chunks/SettingsPage-U7WG4FHE.js +1 -0
- package/dist/public/chunks/SystemPage-ZBC43OJH.js +1 -0
- package/dist/public/chunks/WorkspaceFormPage-3NVIIZ4P.js +2 -0
- package/dist/public/chunks/WorkspacesPage-G73HPBDD.js +1 -0
- package/dist/public/chunks/chunk-2BCS5AQL.js +1 -0
- package/dist/public/chunks/chunk-2J3LGF5Q.js +1 -0
- package/dist/public/chunks/chunk-2NNKHSZE.js +1 -0
- package/dist/public/chunks/chunk-3Y3ICT6K.js +1 -0
- package/dist/public/chunks/chunk-4AKUZW6R.js +1 -0
- package/dist/public/chunks/chunk-4TQSTCIN.js +13 -0
- package/dist/public/chunks/chunk-4UGZNVJM.js +1 -0
- package/dist/public/chunks/chunk-564V7YHG.js +1 -0
- package/dist/public/chunks/chunk-5ISD3QSC.js +1 -0
- package/dist/public/chunks/chunk-5LNGNJ3P.js +1 -0
- package/dist/public/chunks/chunk-5ZA674OU.js +1 -0
- package/dist/public/chunks/chunk-64GPEGGE.js +1 -0
- package/dist/public/chunks/chunk-6FHY65EQ.js +1 -0
- package/dist/public/chunks/chunk-6FSJ3W2W.js +1 -0
- package/dist/public/chunks/chunk-6PHJZPWD.js +19 -0
- package/dist/public/chunks/chunk-B5ZN3SWQ.js +14 -0
- package/dist/public/chunks/chunk-BKOACADP.js +1 -0
- package/dist/public/chunks/chunk-CQY6BYUB.js +1 -0
- package/dist/public/chunks/chunk-CR2ICLSH.js +1 -0
- package/dist/public/chunks/chunk-DEEO4D4N.js +1 -0
- package/dist/public/chunks/chunk-DZB4LPI6.js +1 -0
- package/dist/public/chunks/chunk-FE522UEA.js +1 -0
- package/dist/public/chunks/chunk-FSGVY7HB.js +1 -0
- package/dist/public/chunks/chunk-FVX42XAD.js +1 -0
- package/dist/public/chunks/chunk-G5NWYJTV.js +1 -0
- package/dist/public/chunks/chunk-GMZIELFU.js +1 -0
- package/dist/public/chunks/chunk-GOTQ4D6W.js +1 -0
- package/dist/public/chunks/chunk-GYRM5ZIV.js +1 -0
- package/dist/public/chunks/chunk-GZBMHYYU.js +1 -0
- package/dist/public/chunks/chunk-H2ZU34CP.js +1 -0
- package/dist/public/chunks/chunk-H76B43OQ.js +1 -0
- package/dist/public/chunks/chunk-HCLRG2EC.js +1 -0
- package/dist/public/chunks/chunk-II4NXLSQ.js +2 -0
- package/dist/public/chunks/chunk-ILH47V7O.js +1 -0
- package/dist/public/chunks/chunk-IZWTFLCC.js +1 -0
- package/dist/public/chunks/chunk-J37MXUED.js +1 -0
- package/dist/public/chunks/chunk-JAZABOBA.js +0 -0
- package/dist/public/chunks/chunk-JPL2NRWK.js +1 -0
- package/dist/public/chunks/chunk-JVJ5UWIK.js +1 -0
- package/dist/public/chunks/chunk-K4TYMAA3.js +63 -0
- package/dist/public/chunks/chunk-KDUTK357.js +1 -0
- package/dist/public/chunks/chunk-L2H3ZWZN.js +1 -0
- package/dist/public/chunks/chunk-LBELRO5P.js +1 -0
- package/dist/public/chunks/chunk-LKW7MULF.js +1 -0
- package/dist/public/chunks/chunk-LZYAHJVQ.js +1 -0
- package/dist/public/chunks/chunk-MEHLQZDG.js +3 -0
- package/dist/public/chunks/chunk-MKKFXRYO.js +1 -0
- package/dist/public/chunks/chunk-MTBUV2GJ.js +1 -0
- package/dist/public/chunks/chunk-NGQRNS3C.js +1 -0
- package/dist/public/chunks/chunk-ONDKE72P.js +1 -0
- package/dist/public/chunks/chunk-PG7M7L24.js +1 -0
- package/dist/public/chunks/chunk-PQPAPPEI.js +1 -0
- package/dist/public/chunks/chunk-PXHLJIOT.js +1 -0
- package/dist/public/chunks/chunk-QOX5RMLM.js +1 -0
- package/dist/public/chunks/chunk-QPBLZSNX.js +1 -0
- package/dist/public/chunks/chunk-QQUFROWT.js +1 -0
- package/dist/public/chunks/chunk-RB5FBDEY.js +1 -0
- package/dist/public/chunks/chunk-RGXXD4DM.js +41 -0
- package/dist/public/chunks/chunk-RHMZNAJX.js +1 -0
- package/dist/public/chunks/chunk-SIOW7OOW.js +1 -0
- package/dist/public/chunks/chunk-SUX4QBVF.js +1 -0
- package/dist/public/chunks/chunk-T4M53QQT.js +1 -0
- package/dist/public/chunks/chunk-TC7TU4GK.js +1 -0
- package/dist/public/chunks/chunk-TFJOEF3Q.js +1 -0
- package/dist/public/chunks/chunk-UJD3MBMB.js +1 -0
- package/dist/public/chunks/chunk-UK2V4UBT.js +1 -0
- package/dist/public/chunks/chunk-UT6HZPGL.js +1 -0
- package/dist/public/chunks/chunk-UZ44J2LH.js +1 -0
- package/dist/public/chunks/chunk-VC6IS564.js +1 -0
- package/dist/public/chunks/chunk-WLIOZO3W.js +1 -0
- package/dist/public/chunks/chunk-WRXMQB7X.js +25 -0
- package/dist/public/chunks/chunk-XDUSY26N.js +55 -0
- package/dist/public/chunks/chunk-XNR4RZEC.js +1 -0
- package/dist/public/chunks/chunk-YPMUHXYT.js +147 -0
- package/dist/public/chunks/chunk-ZIJ6SJDN.js +1 -0
- package/dist/public/chunks/code-highlighter-Q7WC7AEF.js +12 -0
- package/dist/public/client-4OAAOHF4.js +68 -0
- package/dist/tailwind.css +1 -1
- package/package.json +5 -4
- package/src/api/schema.ts +1 -1
- package/src/assets.ts +4 -1
- package/src/client/App.tsx +100 -23
- package/src/client/TracedRoutes.tsx +8 -4
- package/src/client/code-highlighter.ts +26 -0
- package/src/client/code.tsx +2 -22
- package/src/client/components/BottomSheet.tsx +1 -1
- package/src/client/components/DetailsPanel.tsx +2 -1
- package/src/client/components/Drawer.tsx +12 -71
- package/src/client/components/DrawerContent.tsx +76 -0
- package/src/client/components/ProfileMenu.tsx +12 -3
- package/src/client/components/UserInputForm.tsx +28 -5
- package/src/client/conversations/ConversationBrief.tsx +129 -65
- package/src/client/conversations/ConversationCatchUp.tsx +107 -0
- package/src/client/conversations/ConversationContextTags.tsx +110 -0
- package/src/client/conversations/ConversationDetails.tsx +13 -14
- package/src/client/conversations/ConversationEventLog.tsx +135 -70
- package/src/client/conversations/ConversationHeader.tsx +74 -65
- package/src/client/conversations/ConversationHeaderActions.tsx +36 -38
- package/src/client/conversations/ConversationHomeList.tsx +41 -3
- package/src/client/conversations/ConversationLinkedWork.tsx +30 -10
- package/src/client/conversations/ConversationMeta.tsx +21 -27
- package/src/client/conversations/ConversationOverflowMenu.tsx +15 -4
- package/src/client/conversations/ConversationPage.tsx +219 -157
- package/src/client/conversations/ConversationTranscript.tsx +234 -186
- package/src/client/conversations/ConversationUsageBreakdown.tsx +142 -64
- package/src/client/conversations/DetailsList.tsx +7 -1
- package/src/client/conversations/PendingMailboxStack.tsx +88 -44
- package/src/client/conversations/ShareConversationButton.tsx +5 -50
- package/src/client/conversations/SlackMark.tsx +16 -4
- package/src/client/conversations/TranscriptActivityGroup.tsx +7 -14
- package/src/client/conversations/TranscriptEventView.tsx +7 -3
- package/src/client/conversations/TranscriptReasoningView.tsx +4 -2
- package/src/client/conversations/TranscriptRows.tsx +61 -16
- package/src/client/conversations/TranscriptView.tsx +25 -13
- package/src/client/conversations/conversationArchive.ts +22 -0
- package/src/client/conversations/conversationCatchUpState.ts +96 -0
- package/src/client/conversations/conversationMemory.ts +8 -1
- package/src/client/conversations/queries.ts +85 -46
- package/src/client/conversations/{transcriptUnreadHistory.ts → transcriptAroundHistory.ts} +48 -42
- package/src/client/conversations/transcriptBottomPinning.ts +40 -8
- package/src/client/conversations/transcriptListRows.ts +215 -0
- package/src/client/conversations/transcriptReadPosition.ts +24 -2
- package/src/client/conversations/turnContext.ts +1 -1
- package/src/client/conversations/virtualRows.ts +168 -0
- package/src/client/http.ts +6 -5
- package/src/client/pages/admin/AdminPage.tsx +1 -1
- package/src/client/pages/admin/ServiceAccountsSection.tsx +1 -1
- package/src/client/pages/memory/memoryDashboard.ts +1 -1
- package/src/client/pages/memory/memoryRecord.ts +1 -1
- package/src/client/pages/settings/ConnectionsPage.tsx +1 -1
- package/src/client/pages/user/PluginUserPage.tsx +0 -6
- package/src/client/pages/user/pluginUserPageRoutes.ts +5 -0
- package/src/client/primaryNav.ts +1 -1
- package/src/client/review-desk/reviewItemFormat.ts +1 -1
- package/src/client/sentry.ts +53 -3
- package/src/conversation-cache.ts +8 -10
- package/src/mock-reporting/fixtures.ts +43 -8
- package/src/mock-reporting/routes.ts +40 -3
- package/src/public-assets.ts +28 -20
- package/src/shell.ts +12 -2
- package/dist/public/client-ZCZXZBTL.js +0 -460
package/src/public-assets.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { existsSync,
|
|
1
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import { fileURLToPath } from "node:url";
|
|
4
|
-
import
|
|
4
|
+
import * as z from "zod";
|
|
5
|
+
import { dashboardClientManifest, dashboardPublicAssets } from "./assets";
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* URL prefix for the content-hashed dashboard browser files. `juniorNitro()`
|
|
@@ -33,28 +34,35 @@ function publicDir(): string | undefined {
|
|
|
33
34
|
].find((dir) => existsSync(dir));
|
|
34
35
|
}
|
|
35
36
|
|
|
37
|
+
/** File under `dist` where the client build names its entry and imports. */
|
|
38
|
+
export const DASHBOARD_CLIENT_MANIFEST_FILE = "client-manifest.json";
|
|
39
|
+
|
|
40
|
+
/** The client entry and every file it imports statically. */
|
|
41
|
+
export const dashboardClientManifestSchema = z.object({
|
|
42
|
+
entry: z.string().regex(DASHBOARD_CLIENT_ENTRY_NAME),
|
|
43
|
+
imports: z.array(z.string().regex(DASHBOARD_PUBLIC_ASSET_NAME)),
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
/** The dashboard client entry and every file it imports statically. */
|
|
47
|
+
export type DashboardClientManifest = z.infer<
|
|
48
|
+
typeof dashboardClientManifestSchema
|
|
49
|
+
>;
|
|
50
|
+
|
|
36
51
|
/**
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
* file.
|
|
52
|
+
* Read the client manifest. Without embedded assets, read the build output on
|
|
53
|
+
* each call, so a client rebuild never leaves the page on a deleted file.
|
|
40
54
|
*/
|
|
41
|
-
export function
|
|
42
|
-
if (
|
|
55
|
+
export function readDashboardClientManifest(): DashboardClientManifest {
|
|
56
|
+
if (dashboardClientManifest) return dashboardClientManifest;
|
|
43
57
|
const dir = publicDir();
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
.filter((file) => DASHBOARD_CLIENT_ENTRY_NAME.test(file))
|
|
48
|
-
.map((file) => ({
|
|
49
|
-
file,
|
|
50
|
-
mtimeMs: statSync(path.join(dir, file)).mtimeMs,
|
|
51
|
-
}))
|
|
52
|
-
.sort((a, b) => b.mtimeMs - a.mtimeMs)[0]
|
|
53
|
-
: undefined;
|
|
54
|
-
if (!newest) {
|
|
58
|
+
const manifestPath =
|
|
59
|
+
dir && path.join(dir, "..", DASHBOARD_CLIENT_MANIFEST_FILE);
|
|
60
|
+
if (!manifestPath || !existsSync(manifestPath)) {
|
|
55
61
|
throw new Error("Junior dashboard client bundle was not found");
|
|
56
62
|
}
|
|
57
|
-
return
|
|
63
|
+
return dashboardClientManifestSchema.parse(
|
|
64
|
+
JSON.parse(readFileSync(manifestPath, "utf8")),
|
|
65
|
+
);
|
|
58
66
|
}
|
|
59
67
|
|
|
60
68
|
function readPublicAsset(file: string): string | undefined {
|
|
@@ -63,7 +71,7 @@ function readPublicAsset(file: string): string | undefined {
|
|
|
63
71
|
return dashboardPublicAssets[file];
|
|
64
72
|
}
|
|
65
73
|
// An embedded build has every file it can serve.
|
|
66
|
-
if (
|
|
74
|
+
if (dashboardClientManifest) return undefined;
|
|
67
75
|
const dir = publicDir();
|
|
68
76
|
const assetPath = dir ? path.join(dir, file) : undefined;
|
|
69
77
|
return assetPath && existsSync(assetPath)
|
package/src/shell.ts
CHANGED
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
import { dashboardRainbowProgressClass } from "./dashboardLoader";
|
|
12
12
|
import {
|
|
13
13
|
DASHBOARD_ASSETS_PATH,
|
|
14
|
-
|
|
14
|
+
readDashboardClientManifest,
|
|
15
15
|
} from "./public-assets";
|
|
16
16
|
import { DASHBOARD_THEME_COLORS, DASHBOARD_THEME_SCRIPT } from "./theme";
|
|
17
17
|
|
|
@@ -217,6 +217,15 @@ export function renderDashboard(
|
|
|
217
217
|
const bootstrapScript = bootstrap
|
|
218
218
|
? `window.__JUNIOR_DASHBOARD_BOOTSTRAP__ = ${scriptJson(bootstrap)};`
|
|
219
219
|
: "";
|
|
220
|
+
const client = readDashboardClientManifest();
|
|
221
|
+
// Without these hints, the browser finds the chunks only after the entry
|
|
222
|
+
// has downloaded and parsed, one round trip later.
|
|
223
|
+
const clientPreloads = client.imports
|
|
224
|
+
.map(
|
|
225
|
+
(file) =>
|
|
226
|
+
`<link rel="modulepreload" href="${DASHBOARD_ASSETS_PATH}/${file}" />`,
|
|
227
|
+
)
|
|
228
|
+
.join("\n ");
|
|
220
229
|
return new Response(
|
|
221
230
|
`<!DOCTYPE html>
|
|
222
231
|
<html lang="en">
|
|
@@ -231,6 +240,7 @@ export function renderDashboard(
|
|
|
231
240
|
<meta name="apple-mobile-web-app-title" content="${escapeHtml(agentName)}" />
|
|
232
241
|
<link rel="manifest" href="${DASHBOARD_MANIFEST_PATH}" />
|
|
233
242
|
<link rel="apple-touch-icon" href="${DASHBOARD_INSTALL_ICON_PATH}" />
|
|
243
|
+
${clientPreloads}
|
|
234
244
|
<title>${escapeHtml(agentName)}</title>
|
|
235
245
|
${renderSentryHead(sentry)}
|
|
236
246
|
<style>
|
|
@@ -297,7 +307,7 @@ export function renderDashboard(
|
|
|
297
307
|
});
|
|
298
308
|
})();
|
|
299
309
|
</script>
|
|
300
|
-
<script type="module" src="${DASHBOARD_ASSETS_PATH}/${
|
|
310
|
+
<script type="module" src="${DASHBOARD_ASSETS_PATH}/${client.entry}"></script>
|
|
301
311
|
</body>
|
|
302
312
|
</html>`,
|
|
303
313
|
{
|