@sentry/junior-dashboard 0.274.0 → 0.276.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 +28 -9
- package/dist/client.js +115 -92
- package/dist/index.js +28 -9
- package/dist/tailwind.css +1 -1
- package/package.json +5 -4
- package/src/app.ts +8 -3
- package/src/client/App.tsx +11 -0
- package/src/client/components/Metric.tsx +0 -32
- package/src/client/components/ProfileMenu.tsx +56 -4
- package/src/client/components/layout/DashboardChrome.tsx +3 -3
- package/src/client/components/layout/DashboardHeader.tsx +41 -4
- package/src/client/components/layout/NavRail.tsx +43 -40
- package/src/client/conversations/ConversationComposer.tsx +42 -26
- package/src/client/conversations/ConversationDetails.tsx +149 -166
- package/src/client/conversations/ConversationHeader.tsx +126 -132
- package/src/client/conversations/ConversationHeaderActions.tsx +92 -120
- package/src/client/conversations/ConversationListStatusIcon.tsx +16 -11
- package/src/client/conversations/ConversationMemories.tsx +118 -78
- package/src/client/conversations/ConversationMeta.tsx +94 -84
- package/src/client/conversations/ConversationOverflowMenu.tsx +59 -0
- package/src/client/conversations/ConversationPage.tsx +197 -422
- package/src/client/conversations/ConversationReplyFooter.tsx +342 -0
- package/src/client/conversations/ConversationSidebar.tsx +5 -7
- package/src/client/conversations/ConversationTranscript.tsx +37 -8
- package/src/client/conversations/ConversationWatches.tsx +37 -15
- package/src/client/conversations/PendingMailboxStack.tsx +11 -1
- package/src/client/conversations/QuickQuestion.tsx +476 -0
- package/src/client/conversations/TelemetryMetrics.tsx +2 -15
- package/src/client/conversations/TranscriptActivityGroup.tsx +5 -0
- package/src/client/conversations/TranscriptEventView.tsx +25 -2
- package/src/client/conversations/TranscriptMemoryPopover.tsx +179 -0
- package/src/client/conversations/TranscriptMessageView.tsx +46 -16
- package/src/client/conversations/TranscriptRows.tsx +9 -2
- package/src/client/conversations/TranscriptView.tsx +15 -32
- package/src/client/conversations/UsageCard.tsx +4 -18
- package/src/client/conversations/conversationMemory.ts +138 -0
- package/src/client/conversations/conversationSections.ts +18 -14
- package/src/client/conversations/eventTranscript.ts +8 -0
- package/src/client/review-desk/ConversationReviewItems.tsx +99 -0
- package/src/client/review-desk/ReviewItemActions.tsx +1 -1
- package/src/client/review-desk/ReviewItemChangeRow.tsx +85 -0
- package/src/client/review-desk/ReviewItemContext.tsx +41 -23
- package/src/client/review-desk/reviewItemFormat.ts +16 -0
- package/src/client/sentry.ts +77 -0
- package/src/client/types.ts +6 -0
- package/src/client.tsx +3 -0
- package/src/mock-reporting/watches.ts +2 -0
- package/src/shell.ts +27 -2
- package/src/tailwind.css +12 -19
- package/src/client/components/ActiveIndicator.tsx +0 -14
- package/src/client/conversations/ConversationHeaderMeta.tsx +0 -20
- package/src/client/review-desk/ConversationReviewBar.tsx +0 -85
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import { ChevronRight } from "lucide-react";
|
|
2
|
-
import { useSearchParams } from "react-router";
|
|
3
|
-
|
|
4
|
-
import { Drawer } from "../components/Drawer";
|
|
5
|
-
import { LoadMorePagination } from "../components/Pagination";
|
|
6
|
-
import { ReviewItemCard } from "./ReviewItemCard";
|
|
7
|
-
import { useReviewItemsData } from "./queries";
|
|
8
|
-
import {
|
|
9
|
-
CONVERSATION_REVIEW_OPEN,
|
|
10
|
-
CONVERSATION_REVIEW_PARAM,
|
|
11
|
-
} from "../conversations/conversationRoutes";
|
|
12
|
-
|
|
13
|
-
/** `more` marks a count of the loaded pages only, such as "50+". */
|
|
14
|
-
function itemCountLabel(count: number, more: boolean): string {
|
|
15
|
-
if (more) return `${count}+ open review items`;
|
|
16
|
-
return count === 1 ? "1 open review item" : `${count} open review items`;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Show how many open Review items are linked to a Conversation, above its
|
|
21
|
-
* message box. The bar opens a side panel where the viewer can act on each.
|
|
22
|
-
* The URL owns the panel, so a sidebar link can open it.
|
|
23
|
-
*/
|
|
24
|
-
export function ConversationReviewBar(props: { conversationId: string }) {
|
|
25
|
-
const [searchParams, setSearchParams] = useSearchParams();
|
|
26
|
-
const open =
|
|
27
|
-
searchParams.get(CONVERSATION_REVIEW_PARAM) === CONVERSATION_REVIEW_OPEN;
|
|
28
|
-
const setOpen = (value: boolean) =>
|
|
29
|
-
setSearchParams(
|
|
30
|
-
(current) => {
|
|
31
|
-
const next = new URLSearchParams(current);
|
|
32
|
-
if (value)
|
|
33
|
-
next.set(CONVERSATION_REVIEW_PARAM, CONVERSATION_REVIEW_OPEN);
|
|
34
|
-
else next.delete(CONVERSATION_REVIEW_PARAM);
|
|
35
|
-
return next;
|
|
36
|
-
},
|
|
37
|
-
{ replace: true },
|
|
38
|
-
);
|
|
39
|
-
const { items, query } = useReviewItemsData({
|
|
40
|
-
conversationId: props.conversationId,
|
|
41
|
-
});
|
|
42
|
-
if (items.length === 0) return null;
|
|
43
|
-
const more = Boolean(query.hasNextPage);
|
|
44
|
-
const label = itemCountLabel(items.length, more);
|
|
45
|
-
return (
|
|
46
|
-
<>
|
|
47
|
-
<button
|
|
48
|
-
className="mb-2 flex w-full cursor-pointer items-center justify-between gap-3 rounded-lg border border-violet-300/25 bg-violet-300/[0.06] px-3 py-2 text-left font-sans text-sm text-dashboard-text transition-colors hover:bg-violet-300/[0.1]"
|
|
49
|
-
onClick={() => setOpen(true)}
|
|
50
|
-
type="button"
|
|
51
|
-
>
|
|
52
|
-
<span className="flex items-center gap-2">
|
|
53
|
-
<span
|
|
54
|
-
aria-hidden="true"
|
|
55
|
-
className="size-2 shrink-0 rounded-full bg-violet-300"
|
|
56
|
-
/>
|
|
57
|
-
{label}
|
|
58
|
-
</span>
|
|
59
|
-
<ChevronRight aria-hidden="true" size={16} />
|
|
60
|
-
</button>
|
|
61
|
-
{open ? (
|
|
62
|
-
<Drawer
|
|
63
|
-
closeLabel="Close review items"
|
|
64
|
-
header={
|
|
65
|
-
<h2 className="m-0 font-sans text-base font-semibold">{label}</h2>
|
|
66
|
-
}
|
|
67
|
-
label="Review items"
|
|
68
|
-
onClose={() => setOpen(false)}
|
|
69
|
-
openKey={props.conversationId}
|
|
70
|
-
>
|
|
71
|
-
<div className="grid gap-3">
|
|
72
|
-
{items.map((item) => (
|
|
73
|
-
<ReviewItemCard item={item} key={item.id} />
|
|
74
|
-
))}
|
|
75
|
-
<LoadMorePagination
|
|
76
|
-
hasMore={more}
|
|
77
|
-
loading={query.isFetchingNextPage}
|
|
78
|
-
onLoadMore={() => void query.fetchNextPage()}
|
|
79
|
-
/>
|
|
80
|
-
</div>
|
|
81
|
-
</Drawer>
|
|
82
|
-
) : null}
|
|
83
|
-
</>
|
|
84
|
-
);
|
|
85
|
-
}
|