@sentry/junior-dashboard 0.267.0 → 0.269.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.
Files changed (59) hide show
  1. package/README.md +7 -105
  2. package/dist/app.js +47 -8
  3. package/dist/client.js +74 -78
  4. package/dist/index.js +47 -8
  5. package/dist/tailwind.css +1 -1
  6. package/package.json +4 -4
  7. package/src/api/schema.ts +2 -1
  8. package/src/app.ts +11 -7
  9. package/src/client/App.tsx +20 -4
  10. package/src/client/api.ts +4 -19
  11. package/src/client/components/AGENTS.md +65 -0
  12. package/src/client/components/ActorAvatar.tsx +1 -1
  13. package/src/client/components/ParticipantAvatarStack.tsx +3 -1
  14. package/src/client/components/ProfileMenu.tsx +88 -29
  15. package/src/client/components/UserInputForm.tsx +283 -0
  16. package/src/client/components/charts/AGENTS.md +15 -0
  17. package/src/client/components/layout/DashboardHeader.tsx +13 -0
  18. package/src/client/components/ui/button.tsx +11 -1
  19. package/src/client/conversations/AGENTS.md +42 -0
  20. package/src/client/conversations/ConversationHomeList.tsx +6 -0
  21. package/src/client/conversations/ConversationListStatusIcon.tsx +15 -1
  22. package/src/client/conversations/ConversationPage.tsx +4 -27
  23. package/src/client/conversations/ConversationSidebar.tsx +6 -0
  24. package/src/client/conversations/ConversationWorkspace.tsx +4 -0
  25. package/src/client/conversations/TranscriptActivityGroup.tsx +5 -0
  26. package/src/client/conversations/TranscriptMessageContextView.tsx +12 -1
  27. package/src/client/conversations/TranscriptMessageView.tsx +3 -0
  28. package/src/client/conversations/TranscriptToolView.tsx +13 -1
  29. package/src/client/conversations/TranscriptTurnContextView.tsx +142 -144
  30. package/src/client/conversations/turnContext.ts +15 -0
  31. package/src/client/format.ts +28 -28
  32. package/src/client/pages/SettingsPage.tsx +103 -3
  33. package/src/client/pages/automations/AGENTS.md +34 -0
  34. package/src/client/pages/automations/AutomationActions.tsx +18 -20
  35. package/src/client/pages/automations/AutomationEditor.tsx +3 -4
  36. package/src/client/pages/automations/AutomationOverview.tsx +3 -3
  37. package/src/client/pages/automations/AutomationStatus.tsx +2 -2
  38. package/src/client/pages/code/RepositorySections.tsx +1 -0
  39. package/src/client/pages/code/RepositoryTabs.tsx +3 -0
  40. package/src/client/pages/system/AGENTS.md +12 -0
  41. package/src/client/primaryNav.ts +15 -2
  42. package/src/client/review-desk/ConversationReviewBar.tsx +68 -0
  43. package/src/client/review-desk/ReviewDeskPage.tsx +297 -0
  44. package/src/client/review-desk/ReviewItemActions.tsx +165 -0
  45. package/src/client/review-desk/ReviewItemCard.tsx +47 -0
  46. package/src/client/review-desk/ReviewItemDetail.tsx +123 -0
  47. package/src/client/review-desk/queries.ts +173 -0
  48. package/src/client/review-desk/reviewItemFormat.ts +61 -0
  49. package/src/mock-reporting/fixtures.ts +10 -0
  50. package/src/mock-reporting/routes.ts +20 -0
  51. package/src/shell.ts +3 -0
  52. package/src/tailwind.css +1 -1
  53. package/src/client/components/README.md +0 -215
  54. package/src/client/components/charts/README.md +0 -38
  55. package/src/client/conversations/README.md +0 -159
  56. package/src/client/conversations/UserInputRequestCard.tsx +0 -244
  57. package/src/client/conversations/userInputRequest.ts +0 -56
  58. package/src/client/pages/automations/README.md +0 -97
  59. package/src/client/pages/system/README.md +0 -23
package/README.md CHANGED
@@ -1,109 +1,11 @@
1
1
  # @sentry/junior-dashboard
2
2
 
3
- The dashboard is an authenticated reporting surface over Junior conversation
4
- read models. It does not participate in agent execution or mutate conversation
5
- state. Signed-in users may update their own profile fields, such as display
6
- name, through dashboard settings.
3
+ Authenticated browser dashboard for Junior conversations, automations, and
4
+ runtime diagnostics. It mounts into the same Nitro deployment as Junior.
7
5
 
8
- ## Boundaries
6
+ ```bash
7
+ pnpm add @sentry/junior @sentry/junior-dashboard
8
+ ```
9
9
 
10
- - `createDashboardApp` mounts the dashboard routes and receives host
11
- configuration through `JuniorDashboardOptions`.
12
- - Core owns the Better Auth session and passes it in as `auth`. Core accepts
13
- only Google Workspace accounts on the allowed domains. Dashboard routes fail
14
- closed when identity or required configuration is missing.
15
- - The installable shell is static only: a public web app manifest, theme color,
16
- and install icon. There is no service worker and no offline app shell cache.
17
- - API schemas under `src/api/` define the client/server boundary.
18
- - Connected accounts (`/settings/connections`) use the core `/api/connections`
19
- contract. It lists plugins with user OAuth, starts OAuth in a new tab, and
20
- disconnects. The page refreshes on window focus after OAuth finishes.
21
- - Plugin user pages use the core `/api/user-pages` contract and render under
22
- `/plugins/:plugin/:page/*`. Plugins choose primary dashboard navigation or the
23
- signed-in user menu. Core-rendered lists own metrics, search query state,
24
- cursor pagination, record inspection, destructive confirmation, and
25
- authenticated plugin REST actions.
26
- - Conversation detail and mailbox use one TanStack Query snapshot. Read the
27
- mailbox first, then history: workers commit input before they acknowledge it.
28
- Publish both in one render so input moves from queue to transcript without a
29
- gap. Poll every 2 seconds while active or waiting for input, and every 10
30
- seconds while idle so other Sources can wake the open Conversation.
31
- - Detail polls use an ETag (a hash of the response, except `generatedAt`).
32
- After checking access, the server returns `304` for unchanged content. The
33
- client reuses its parsed detail but always refreshes the mailbox. Local detail
34
- edits clear the ETag. This saves transfer and parsing, not database reads.
35
- - Local sends stay visible until a server snapshot contains their Message id.
36
- Web ingress and the browser share one Message id function. The browser derives
37
- the id before the first local render and before POST starts. This also
38
- removes duplicates when a poll arrives before the accept response. Only Turn
39
- lifecycle events enable the thinking indicator; queued work is not thinking.
40
- - Earlier event pages use a separate infinite query loaded on demand. The client
41
- derives one ordered transcript from those immutable responses; paginated reads
42
- never write into another resource's cache.
43
- - The server adapts canonical runtime events into privacy-safe reporting events.
44
- The transcript combines tool and subagent updates. The event log keeps each
45
- event in sequence order, with readable details and optional raw JSON.
46
- Search covers loaded pages; earlier events load on demand.
47
- - Private conversation access requires authenticated authorization at the
48
- server boundary. Client-side route hiding is not authorization.
49
- - The package remains stateless apart from normal auth/session infrastructure
50
- and signed-in profile settings. Junior conversation storage is the reporting
51
- authority; canonical user rows own profile fields such as display name.
52
-
53
- Mock reporting data exists for local UI development only and must not be
54
- reachable as a production fallback.
55
-
56
- Browser journeys live in `e2e/`, with one Playwright spec per user-facing page.
57
- Keep these journeys small. Use them for behavior that needs a real browser:
58
- navigation, interaction, accessibility state, request contracts, and realistic
59
- failure recovery. Use visual QA for layout, responsive rendering, styling, and
60
- copy-only changes. Do not add pixel geometry, element size, computed style,
61
- fixed-delay checks, or broad console and page error assertions to browser E2E.
62
- Assert the user-visible outcome or external contract named by the journey.
63
-
64
- Shared browser setup lives in `e2e/test.ts` and `e2e/harness.ts`. Specs import
65
- `test` from `./test` so every page gets the fixed current time and common API
66
- stubs. Keep one Playwright spec per user-facing route. Split by journey when the file
67
- length limit requires it. After the page has loaded,
68
- call `screenshot(page, name)` from `e2e/screenshot.ts` so visual review has a
69
- desktop and mobile image. Browser tests run in the dark theme. Pass
70
- `lightTheme: true` when a page also needs light theme images.
71
- Page behavior does not belong in a cross-page aggregate spec. Tests under
72
- `tests/` cover modules and component integration without standing in for
73
- browser E2E.
74
-
75
- Mock reports and browser tests use one fixed current time: `NOW`
76
- (`2026-08-07T12:00:00.000Z`). History in the mocks is relative to that time, so
77
- labels like "5 minutes ago" stay stable.
78
-
79
- Dashboard E2E writes screenshots to
80
- `.playwright/junior-dashboard/screenshots/`. Frameshift saves this complete set
81
- on the default branch. On a pull request, it compares the new set with the
82
- saved set and links the report from the pull request.
83
-
84
- Frameshift saves each report as a `frameshift-report/*` Git tag. The nightly
85
- `frameshift-cleanup.yml` workflow deletes reports older than 7 days. It keeps
86
- the report for the current head of each open pull request.
87
-
88
- ## Browser assets
89
-
90
- `client/code-languages.ts` lists languages and aliases with explicit imports.
91
- Load these grammars, the engine, and the `github-dark` theme on demand. Do not
92
- import Shiki's full bundle: it includes unused themes.
93
-
94
- The server embeds `client.js` and its chunks. Both dashboard and core routes
95
- must serve them. Cache content-hashed chunks privately; keep the entry uncached.
96
- If highlighting cannot load, show plain text without reloading the page.
97
-
98
- Mount and format tool payloads only when opened or searched.
99
-
100
- ## Type scale
101
-
102
- Font sizes come from the named scale in `src/tailwind.css` (`text-2xs` through
103
- `text-4xl`). Reserve `text-2xs` (12px) for compact badges and chart
104
- annotations; use `text-xs` (13px) or larger for body copy, controls, subtext,
105
- and standalone metadata. Prefer those steps over arbitrary `text-[Nrem]` values.
106
-
107
- User-facing setup lives in
108
- `packages/docs/src/content/docs/operate/dashboard.md`. Follow
109
- `../../policies/data-redaction.md` and `../../policies/frontend-components.md`.
10
+ Install the same version as `@sentry/junior`. Setup, auth, and configuration:
11
+ https://junior.sentry.dev/operate/dashboard/