@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.
- package/dist/app.js +2 -2
- package/dist/client.js +77 -77
- package/dist/index.js +2 -2
- package/dist/tailwind.css +1 -1
- package/package.json +4 -4
- package/src/client/App.tsx +89 -61
- package/src/client/components/AGENTS.md +30 -59
- package/src/client/components/ProfileMenu.tsx +0 -24
- package/src/client/components/UserInputForm.tsx +38 -7
- package/src/client/components/layout/PageHeader.tsx +25 -10
- package/src/client/conversations/AGENTS.md +12 -33
- package/src/client/conversations/ConversationPage.tsx +44 -8
- package/src/client/conversations/conversationRoutes.ts +30 -3
- package/src/client/pages/automations/AGENTS.md +6 -25
- package/src/client/pages/settings/ConnectionsPage.tsx +198 -0
- package/src/client/pages/settings/McpSettingsPage.tsx +77 -0
- package/src/client/pages/settings/PersonalTokensPage.tsx +198 -0
- package/src/client/pages/{SettingsPage.tsx → settings/SettingsPage.tsx} +54 -62
- package/src/client/pages/settings/SettingsPageLayout.tsx +45 -0
- package/src/client/primaryNav.ts +1 -1
- package/src/client/review-desk/ReviewDeskPage.tsx +202 -241
- package/src/client/review-desk/ReviewDeskSidebar.tsx +253 -0
- package/src/client/review-desk/ReviewItemContext.tsx +108 -0
- package/src/client/review-desk/ReviewItemDetails.tsx +153 -0
- package/src/client/review-desk/ReviewItemView.tsx +159 -0
- package/src/client/review-desk/queries.ts +4 -2
- package/src/client/review-desk/reviewItemFormat.ts +54 -0
- package/src/client/components/charts/AGENTS.md +0 -15
- package/src/client/pages/ConnectionsPage.tsx +0 -207
- package/src/client/pages/PersonalTokensPage.tsx +0 -205
- package/src/client/pages/system/AGENTS.md +0 -12
- 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 "
|
|
12
|
-
import { Button } from "
|
|
13
|
-
import { Input } from "
|
|
14
|
-
import { Textarea } from "
|
|
15
|
-
import { Field, FieldDescription, FieldLabel } from "
|
|
16
|
-
import { InlineError } from "
|
|
17
|
-
import { Card } from "
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
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
|
-
<
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
<
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
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
|
|
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
|
|
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
|
+
}
|