@sentry/junior-dashboard 0.270.0 → 0.271.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 (32) hide show
  1. package/dist/app.js +2 -2
  2. package/dist/client.js +77 -77
  3. package/dist/index.js +2 -2
  4. package/dist/tailwind.css +1 -1
  5. package/package.json +4 -4
  6. package/src/client/App.tsx +89 -61
  7. package/src/client/components/AGENTS.md +30 -59
  8. package/src/client/components/ProfileMenu.tsx +0 -24
  9. package/src/client/components/UserInputForm.tsx +38 -7
  10. package/src/client/components/layout/PageHeader.tsx +25 -10
  11. package/src/client/conversations/AGENTS.md +12 -33
  12. package/src/client/conversations/ConversationPage.tsx +44 -8
  13. package/src/client/conversations/conversationRoutes.ts +30 -3
  14. package/src/client/pages/automations/AGENTS.md +6 -25
  15. package/src/client/pages/settings/ConnectionsPage.tsx +198 -0
  16. package/src/client/pages/settings/McpSettingsPage.tsx +77 -0
  17. package/src/client/pages/settings/PersonalTokensPage.tsx +198 -0
  18. package/src/client/pages/{SettingsPage.tsx → settings/SettingsPage.tsx} +54 -62
  19. package/src/client/pages/settings/SettingsPageLayout.tsx +45 -0
  20. package/src/client/primaryNav.ts +1 -1
  21. package/src/client/review-desk/ReviewDeskPage.tsx +202 -241
  22. package/src/client/review-desk/ReviewDeskSidebar.tsx +253 -0
  23. package/src/client/review-desk/ReviewItemContext.tsx +108 -0
  24. package/src/client/review-desk/ReviewItemDetails.tsx +153 -0
  25. package/src/client/review-desk/ReviewItemView.tsx +159 -0
  26. package/src/client/review-desk/queries.ts +4 -2
  27. package/src/client/review-desk/reviewItemFormat.ts +54 -0
  28. package/src/client/components/charts/AGENTS.md +0 -15
  29. package/src/client/pages/ConnectionsPage.tsx +0 -207
  30. package/src/client/pages/PersonalTokensPage.tsx +0 -205
  31. package/src/client/pages/system/AGENTS.md +0 -12
  32. package/src/client/review-desk/ReviewItemDetail.tsx +0 -123
@@ -8,17 +8,16 @@ import {
8
8
  import {
9
9
  dashboardIdentitySchema,
10
10
  type DashboardIdentity,
11
- } from "../../api/schema";
12
- import { Button } from "../components/ui/button";
13
- import { Input } from "../components/ui/input";
14
- import { Textarea } from "../components/ui/textarea";
15
- import { Field, FieldDescription, FieldLabel } from "../components/ui/field";
16
- import { InlineError } from "../components/InlineError";
17
- import { Card } from "../components/layout/Card";
18
- import { useDocumentTitle } from "../documentTitle";
19
- import { DashboardApiError, fetchDashboardJson, patch, put } from "../http";
20
- import { dashboardContainerClass } from "../styles";
21
- import type { DashboardCoreData } from "../types";
11
+ } from "../../../api/schema";
12
+ import { Button } from "../../components/ui/button";
13
+ import { Input } from "../../components/ui/input";
14
+ import { Textarea } from "../../components/ui/textarea";
15
+ import { Field, FieldDescription, FieldLabel } from "../../components/ui/field";
16
+ import { InlineError } from "../../components/InlineError";
17
+ import { Card } from "../../components/layout/Card";
18
+ import { DashboardApiError, fetchDashboardJson, patch, put } from "../../http";
19
+ import type { DashboardCoreData } from "../../types";
20
+ import { SettingsPageLayout } from "./SettingsPageLayout";
22
21
 
23
22
  const dashboardCoreQueryKey = ["dashboard", "core"] as const;
24
23
  const userCustomizationQueryKey = ["dashboard", "user-customization"] as const;
@@ -30,7 +29,6 @@ type SettingsPageProps = {
30
29
 
31
30
  /** Let the signed-in user manage their dashboard profile. */
32
31
  export function SettingsPage({ identity }: SettingsPageProps) {
33
- useDocumentTitle("Settings");
34
32
  const queryClient = useQueryClient();
35
33
  const [displayName, setDisplayName] = useState(identity.user.name ?? "");
36
34
  useEffect(() => {
@@ -61,52 +59,48 @@ export function SettingsPage({ identity }: SettingsPageProps) {
61
59
  }
62
60
 
63
61
  return (
64
- <div className={`${dashboardContainerClass} px-4 py-8 md:px-8`}>
65
- <section className="mx-auto w-full max-w-3xl">
66
- <h1 className="m-0 text-2xl font-bold">Settings</h1>
67
- <p className="mt-2 mb-0 max-w-2xl text-sm text-dashboard-text-muted">
68
- Manage your profile and preferences.
69
- </p>
70
-
71
- <form className="mt-6" onSubmit={submit}>
72
- <Card className="mb-0" padding="md" variant="raised">
73
- <h2 className="m-0 text-lg font-bold">Profile</h2>
74
- <Field className="mt-5">
75
- <FieldLabel htmlFor="display-name">Display name</FieldLabel>
76
- <Input
77
- autoComplete="name"
78
- id="display-name"
79
- maxLength={80}
80
- onChange={(event) => {
81
- setDisplayName(event.target.value);
82
- if (updateProfile.isError || updateProfile.isSuccess) {
83
- updateProfile.reset();
84
- }
85
- }}
86
- value={displayName}
87
- />
88
- <FieldDescription id="display-name-help">
89
- Your display name is shown with your conversations and activity.
90
- </FieldDescription>
91
- </Field>
92
- <div className="mt-5 flex items-center gap-3">
93
- <Button disabled={!canSave} type="submit">
94
- {updateProfile.isPending ? "Saving…" : "Save changes"}
95
- </Button>
96
- {updateProfile.isSuccess ? (
97
- <p className="m-0 text-sm text-emerald-300">Changes saved.</p>
98
- ) : null}
99
- {updateProfile.isError ? (
100
- <InlineError>
101
- Could not save your display name. Try again.
102
- </InlineError>
103
- ) : null}
104
- </div>
105
- </Card>
106
- </form>
107
- <CustomizationForm />
108
- </section>
109
- </div>
62
+ <SettingsPageLayout
63
+ description="Manage your profile and preferences."
64
+ title="General"
65
+ >
66
+ <form onSubmit={submit}>
67
+ <Card className="mb-0" padding="md" variant="raised">
68
+ <h2 className="m-0 text-lg font-bold">Profile</h2>
69
+ <Field className="mt-5">
70
+ <FieldLabel htmlFor="display-name">Display name</FieldLabel>
71
+ <Input
72
+ autoComplete="name"
73
+ id="display-name"
74
+ maxLength={80}
75
+ onChange={(event) => {
76
+ setDisplayName(event.target.value);
77
+ if (updateProfile.isError || updateProfile.isSuccess) {
78
+ updateProfile.reset();
79
+ }
80
+ }}
81
+ value={displayName}
82
+ />
83
+ <FieldDescription id="display-name-help">
84
+ Your display name is shown with your conversations and activity.
85
+ </FieldDescription>
86
+ </Field>
87
+ <div className="mt-5 flex items-center gap-3">
88
+ <Button disabled={!canSave} type="submit">
89
+ {updateProfile.isPending ? "Saving…" : "Save changes"}
90
+ </Button>
91
+ {updateProfile.isSuccess ? (
92
+ <p className="m-0 text-sm text-emerald-300">Changes saved.</p>
93
+ ) : null}
94
+ {updateProfile.isError ? (
95
+ <InlineError>
96
+ Could not save your display name. Try again.
97
+ </InlineError>
98
+ ) : null}
99
+ </div>
100
+ </Card>
101
+ </form>
102
+ <CustomizationForm />
103
+ </SettingsPageLayout>
110
104
  );
111
105
  }
112
106
 
@@ -146,9 +140,7 @@ function CustomizationForm() {
146
140
  }
147
141
  if (savedText === undefined) {
148
142
  return customizationQuery.isError ? (
149
- <InlineError className="mt-6">
150
- Could not load your customization.
151
- </InlineError>
143
+ <InlineError>Could not load your customization.</InlineError>
152
144
  ) : null;
153
145
  }
154
146
  const canSave =
@@ -162,7 +154,7 @@ function CustomizationForm() {
162
154
  }
163
155
 
164
156
  return (
165
- <form className="mt-6" onSubmit={submit}>
157
+ <form onSubmit={submit}>
166
158
  <Card className="mb-0" padding="md" variant="raised">
167
159
  <h2 className="m-0 text-lg font-bold">Customization</h2>
168
160
  <Field className="mt-5">
@@ -0,0 +1,45 @@
1
+ import type { ReactNode } from "react";
2
+
3
+ import { PageHeader } from "../../components/layout/PageHeader";
4
+ import { PageLayout } from "../../components/layout/PageLayout";
5
+ import { SectionIntro } from "../../components/layout/SectionIntro";
6
+ import { SegmentedNav } from "../../components/SegmentedNav";
7
+
8
+ const settingsNavigationItems = [
9
+ { end: true, label: "General", to: "/settings" },
10
+ { label: "API Tokens", to: "/settings/api-tokens" },
11
+ { label: "Identities", to: "/settings/connections" },
12
+ { label: "MCP", to: "/settings/mcp" },
13
+ ];
14
+
15
+ /**
16
+ * Place one Settings section under the Settings heading and its page links.
17
+ * Settings opens from the profile menu, not the app navigation, so its page
18
+ * links sit in the page instead of the header chrome.
19
+ */
20
+ export function SettingsPageLayout(props: {
21
+ children: ReactNode;
22
+ description: ReactNode;
23
+ title: string;
24
+ }) {
25
+ return (
26
+ <PageLayout>
27
+ <div className="grid w-full max-w-3xl min-w-0 gap-8">
28
+ <PageHeader
29
+ documentTitle={props.title}
30
+ navigation={
31
+ <SegmentedNav
32
+ ariaLabel="Settings navigation"
33
+ items={settingsNavigationItems}
34
+ />
35
+ }
36
+ title="Settings"
37
+ />
38
+ <section className="grid min-w-0 gap-5">
39
+ <SectionIntro description={props.description} title={props.title} />
40
+ {props.children}
41
+ </section>
42
+ </div>
43
+ </PageLayout>
44
+ );
45
+ }
@@ -51,7 +51,7 @@ export function buildPrimaryNavItems(input: {
51
51
  {
52
52
  count: input.reviewCount,
53
53
  key: "review",
54
- label: "Review desk",
54
+ label: "Inbox",
55
55
  to: "/review",
56
56
  },
57
57
  ]