The only tool you need to know what is happening and how to fix it.
Go alertingexception-trackerissue-trackinglogsmetricsmonitoringobservability-platformopen-telemetryotelsession-replaytelemetrytraces
progress
ddux77d12c2a668b
diff --git a/frontend/package-lock.json b/frontend/package-lock.jsonindex 317468eb..f69977de 100644--- a/frontend/package-lock.json+++ b/frontend/package-lock.json@@ -10,7 +10,8 @@"dependencies": {"lucide-svelte": "^0.562.0","luxon": "^3.7.2",- "svelte-highlight": "^7.9.0"+ "svelte-highlight": "^7.9.0",+ "svelte-sonner": "^1.0.7"},"devDependencies": {"@eslint/compat": "^1.4.0",@@ -4482,6 +4483,34 @@"highlight.js": "11.11.1"}},+ "node_modules/svelte-sonner": {+ "version": "1.0.7",+ "resolved": "https://registry.npmjs.org/svelte-sonner/-/svelte-sonner-1.0.7.tgz",+ "integrity": "sha512-1EUFYmd7q/xfs2qCHwJzGPh9n5VJ3X6QjBN10fof2vxgy8fYE7kVfZ7uGnd7i6fQaWIr5KvXcwYXE/cmTEjk5A==",+ "license": "MIT",+ "dependencies": {+ "runed": "^0.28.0"+ },+ "peerDependencies": {+ "svelte": "^5.0.0"+ }+ },+ "node_modules/svelte-sonner/node_modules/runed": {+ "version": "0.28.0",+ "resolved": "https://registry.npmjs.org/runed/-/runed-0.28.0.tgz",+ "integrity": "sha512-k2xx7RuO9hWcdd9f+8JoBeqWtYrm5CALfgpkg2YDB80ds/QE4w0qqu34A7fqiAwiBBSBQOid7TLxwxVC27ymWQ==",+ "funding": [+ "https://github.com/sponsors/huntabyte",+ "https://github.com/sponsors/tglide"+ ],+ "license": "MIT",+ "dependencies": {+ "esm-env": "^1.0.0"+ },+ "peerDependencies": {+ "svelte": "^5.7.0"+ }+ },"node_modules/svelte-toolbelt": {"version": "0.10.6","resolved": "https://registry.npmjs.org/svelte-toolbelt/-/svelte-toolbelt-0.10.6.tgz",diff --git a/frontend/package.json b/frontend/package.jsonindex 68e0adfe..73944f3e 100644--- a/frontend/package.json+++ b/frontend/package.json@@ -55,6 +55,7 @@"dependencies": {"lucide-svelte": "^0.562.0","luxon": "^3.7.2",- "svelte-highlight": "^7.9.0"+ "svelte-highlight": "^7.9.0",+ "svelte-sonner": "^1.0.7"}}diff --git a/frontend/src/lib/components/archive-confirmation-dialog.svelte b/frontend/src/lib/components/archive-confirmation-dialog.sveltenew file mode 100644index 00000000..0dd909ca--- /dev/null+++ b/frontend/src/lib/components/archive-confirmation-dialog.svelte@@ -0,0 +1,53 @@+<script lang="ts">+ import * as AlertDialog from "$lib/components/ui/alert-dialog";+ import { Button } from "$lib/components/ui/button";+ import { Archive } from "lucide-svelte";++ interface Props {+ open: boolean;+ onOpenChange: (open: boolean) => void;+ count: number;+ onConfirm: () => Promise<void>;+ }++ let { open, onOpenChange, count, onConfirm }: Props = $props();+ let loading = $state(false);++ async function handleConfirm() {+ loading = true;+ try {+ await onConfirm();+ onOpenChange(false);+ } catch (e) {+ // Error handling done in parent, just reset loading+ } finally {+ loading = false;+ }+ }++ function handleCancel() {+ if (!loading) {+ onOpenChange(false);+ }+ }+</script>++<AlertDialog.Root {open} {onOpenChange}>+ <AlertDialog.Content>+ <AlertDialog.Header>+ <AlertDialog.Title>Archive Issue{count > 1 ? 's' : ''}</AlertDialog.Title>+ <AlertDialog.Description>+ Are you sure you want to archive {count} issue{count > 1 ? 's' : ''}?+ Archived issues will be hidden from the main issues list.+ </AlertDialog.Description>+ </AlertDialog.Header>+ <AlertDialog.Footer>+ <Button variant="outline" onclick={handleCancel} disabled={loading}>+ Cancel+ </Button>+ <Button variant="destructiveOutline" onclick={handleConfirm} disabled={loading}>+ <Archive class="h-4 w-4" /> {loading ? 'Archiving...' : 'Archive'}+ </Button>+ </AlertDialog.Footer>+ </AlertDialog.Content>+</AlertDialog.Root>diff --git a/frontend/src/lib/components/issues/page-header.svelte b/frontend/src/lib/components/issues/page-header.svelteindex 4dc54c34..828a144f 100644--- a/frontend/src/lib/components/issues/page-header.svelte+++ b/frontend/src/lib/components/issues/page-header.svelte@@ -5,21 +5,25 @@interface Props {title: string;- subtitle: string;- backHref: string;+ subtitle?: string;+ onBack?: (e: MouseEvent) => void;}- let { title, subtitle, backHref }: Props = $props();+ let { title, subtitle, onBack }: Props = $props();</script>-<div class="flex items-center gap-4">- <Button variant="ghost" size="sm" onclick={() => goto(backHref)} class="h-8 w-8 p-0">- <ArrowLeft class="h-4 w-4" />- </Button>+<div class="flex items-start gap-4">+ {#if onBack}+ <Button variant="ghost" size="sm" onclick={onBack} class="h-8 w-8 p-0">+ <ArrowLeft class="h-4 w-4" />+ </Button>+ {/if}<div><h2 class="font-mono text-2xl font-bold tracking-tight break-all">{title}</h2>- <p class="text-muted-foreground text-sm">{subtitle}</p>+ {#if subtitle}+ <p class="text-muted-foreground text-sm">{subtitle}</p>+ {/if}</div></div>diff --git a/frontend/src/lib/components/issues/stack-trace-card.svelte b/frontend/src/lib/components/issues/stack-trace-card.svelteindex 28333953..abc3f32c 100644--- a/frontend/src/lib/components/issues/stack-trace-card.svelte+++ b/frontend/src/lib/components/issues/stack-trace-card.svelte@@ -2,6 +2,8 @@import * as Card from "$lib/components/ui/card";import { formatDateTime } from '$lib/utils/formatters';import { getTimezone } from '$lib/state/timezone.svelte';+ import Button from "../ui/button/button.svelte";+ import { Archive } from "lucide-svelte";interface Props {stackTrace: string;@@ -10,9 +12,11 @@lastSeen?: string;totalCount?: number;timezone?: string;+ showArchiveDialog: boolean;+ archiving: boolean}- let { stackTrace, isMessage = false, firstSeen, lastSeen, totalCount, timezone }: Props = $props();+ let { stackTrace, isMessage = false, firstSeen, lastSeen, totalCount, timezone, archiving = $bindable(), showArchiveDialog = $bindable() }: Props = $props();const tz = $derived(timezone ?? getTimezone());const showStats = $derived(firstSeen && lastSeen && totalCount !== undefined);@@ -20,13 +24,27 @@<Card.Root><Card.Header>- <div class="flex items-center gap-2">- <Card.Title>Stack Trace</Card.Title>- {#if isMessage}- <span class="inline-flex items-center rounded-md bg-blue-50 dark:bg-blue-900/30 px-2 py-1 text-xs font-medium text-blue-700 dark:text-blue-300 ring-1 ring-inset ring-blue-700/10 dark:ring-blue-400/30">- Message- </span>- {/if}+ <div class="flex justify-between">+ <div class="flex items-center gap-2">+ <Card.Title>+ Stack Trace+ </Card.Title>+ {#if isMessage}+ <span class="inline-flex items-center rounded-md bg-blue-50 dark:bg-blue-900/30 px-2 py-1 text-xs font-medium text-blue-700 dark:text-blue-300 ring-1 ring-inset ring-blue-700/10 dark:ring-blue-400/30">+ Message+ </span>+ {/if}+ </div>+ <Button+ variant="outline"+ size="sm"+ onclick={() => showArchiveDialog = true}+ disabled={archiving}+ class="gap-1.5 shrink-0"+ >+ <Archive class="h-4 w-4" />+ Archive+ </Button></div>{#if showStats}<Card.Description>diff --git a/frontend/src/lib/components/ui/alert-dialog/alert-dialog-action.svelte b/frontend/src/lib/components/ui/alert-dialog/alert-dialog-action.sveltenew file mode 100644index 00000000..5bed1ea6--- /dev/null+++ b/frontend/src/lib/components/ui/alert-dialog/alert-dialog-action.svelte@@ -0,0 +1,17 @@+<script lang="ts">+ import { AlertDialog as AlertDialogPrimitive } from "bits-ui";+ import { buttonVariants } from "$lib/components/ui/button/index.js";+ import { cn } from "$lib/utils.js";++ let {+ ref = $bindable(null),+ class: className,+ ...restProps+ }: AlertDialogPrimitive.ActionProps = $props();+</script>++<AlertDialogPrimitive.Action+ bind:ref+ class={cn(buttonVariants(), className)}+ {...restProps}+/>diff --git a/frontend/src/lib/components/ui/alert-dialog/alert-dialog-cancel.svelte b/frontend/src/lib/components/ui/alert-dialog/alert-dialog-cancel.sveltenew file mode 100644index 00000000..42667796--- /dev/null+++ b/frontend/src/lib/components/ui/alert-dialog/alert-dialog-cancel.svelte@@ -0,0 +1,17 @@+<script lang="ts">+ import { AlertDialog as AlertDialogPrimitive } from "bits-ui";+ import { buttonVariants } from "$lib/components/ui/button/index.js";+ import { cn } from "$lib/utils.js";++ let {+ ref = $bindable(null),+ class: className,+ ...restProps+ }: AlertDialogPrimitive.CancelProps = $props();+</script>++<AlertDialogPrimitive.Cancel+ bind:ref+ class={cn(buttonVariants({ variant: "outline" }), className)}+ {...restProps}+/>diff --git a/frontend/src/lib/components/ui/alert-dialog/alert-dialog-content.svelte b/frontend/src/lib/components/ui/alert-dialog/alert-dialog-content.sveltenew file mode 100644index 00000000..b6f80167--- /dev/null+++ b/frontend/src/lib/components/ui/alert-dialog/alert-dialog-content.svelte@@ -0,0 +1,34 @@+<script lang="ts">+ import { AlertDialog as AlertDialogPrimitive } from "bits-ui";+ import type { Snippet } from "svelte";+ import AlertDialogPortal from "./alert-dialog-portal.svelte";+ import AlertDialogOverlay from "./alert-dialog-overlay.svelte";+ import { cn, type WithoutChildrenOrChild } from "$lib/utils.js";+ import type { ComponentProps } from "svelte";++ let {+ ref = $bindable(null),+ class: className,+ portalProps,+ children,+ ...restProps+ }: WithoutChildrenOrChild<AlertDialogPrimitive.ContentProps> & {+ portalProps?: WithoutChildrenOrChild<ComponentProps<typeof AlertDialogPortal>>;+ children: Snippet;+ } = $props();+</script>++<AlertDialogPortal {...portalProps}>+ <AlertDialogOverlay />+ <AlertDialogPrimitive.Content+ bind:ref+ data-slot="alert-dialog-content"+ class={cn(+ "bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed left-1/2 top-1/2 z-50 grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 border p-6 shadow-lg duration-200 sm:rounded-lg",+ className+ )}+ {...restProps}+ >+ {@render children?.()}+ </AlertDialogPrimitive.Content>+</AlertDialogPortal>diff --git a/frontend/src/lib/components/ui/alert-dialog/alert-dialog-description.svelte b/frontend/src/lib/components/ui/alert-dialog/alert-dialog-description.sveltenew file mode 100644index 00000000..2ec67dc2--- /dev/null+++ b/frontend/src/lib/components/ui/alert-dialog/alert-dialog-description.svelte@@ -0,0 +1,17 @@+<script lang="ts">+ import { AlertDialog as AlertDialogPrimitive } from "bits-ui";+ import { cn } from "$lib/utils.js";++ let {+ ref = $bindable(null),+ class: className,+ ...restProps+ }: AlertDialogPrimitive.DescriptionProps = $props();+</script>++<AlertDialogPrimitive.Description+ bind:ref+ data-slot="alert-dialog-description"+ class={cn("text-muted-foreground text-sm", className)}+ {...restProps}+/>diff --git a/frontend/src/lib/components/ui/alert-dialog/alert-dialog-footer.svelte b/frontend/src/lib/components/ui/alert-dialog/alert-dialog-footer.sveltenew file mode 100644index 00000000..f78b97ab--- /dev/null+++ b/frontend/src/lib/components/ui/alert-dialog/alert-dialog-footer.svelte@@ -0,0 +1,20 @@+<script lang="ts">+ import { cn, type WithElementRef } from "$lib/utils.js";+ import type { HTMLAttributes } from "svelte/elements";++ let {+ ref = $bindable(null),+ class: className,+ children,+ ...restProps+ }: WithElementRef<HTMLAttributes<HTMLDivElement>> = $props();+</script>++<div+ bind:this={ref}+ data-slot="alert-dialog-footer"+ class={cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className)}+ {...restProps}+>+ {@render children?.()}+</div>diff --git a/frontend/src/lib/components/ui/alert-dialog/alert-dialog-header.svelte b/frontend/src/lib/components/ui/alert-dialog/alert-dialog-header.sveltenew file mode 100644index 00000000..c8fa7625--- /dev/null+++ b/frontend/src/lib/components/ui/alert-dialog/alert-dialog-header.svelte@@ -0,0 +1,20 @@+<script lang="ts">+ import type { HTMLAttributes } from "svelte/elements";+ import { cn, type WithElementRef } from "$lib/utils.js";++ let {+ ref = $bindable(null),+ class: className,+ children,+ ...restProps+ }: WithElementRef<HTMLAttributes<HTMLDivElement>> = $props();+</script>++<div+ bind:this={ref}+ data-slot="alert-dialog-header"+ class={cn("flex flex-col gap-2 text-center sm:text-left", className)}+ {...restProps}+>+ {@render children?.()}+</div>diff --git a/frontend/src/lib/components/ui/alert-dialog/alert-dialog-overlay.svelte b/frontend/src/lib/components/ui/alert-dialog/alert-dialog-overlay.sveltenew file mode 100644index 00000000..a64ee768--- /dev/null+++ b/frontend/src/lib/components/ui/alert-dialog/alert-dialog-overlay.svelte@@ -0,0 +1,20 @@+<script lang="ts">+ import { AlertDialog as AlertDialogPrimitive } from "bits-ui";+ import { cn } from "$lib/utils.js";++ let {+ ref = $bindable(null),+ class: className,+ ...restProps+ }: AlertDialogPrimitive.OverlayProps = $props();+</script>++<AlertDialogPrimitive.Overlay+ bind:ref+ data-slot="alert-dialog-overlay"+ class={cn(+ "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",+ className+ )}+ {...restProps}+/>diff --git a/frontend/src/lib/components/ui/alert-dialog/alert-dialog-portal.svelte b/frontend/src/lib/components/ui/alert-dialog/alert-dialog-portal.sveltenew file mode 100644index 00000000..f0a19a8c--- /dev/null+++ b/frontend/src/lib/components/ui/alert-dialog/alert-dialog-portal.svelte@@ -0,0 +1,7 @@+<script lang="ts">+ import { AlertDialog as AlertDialogPrimitive } from "bits-ui";++ let { ...restProps }: AlertDialogPrimitive.PortalProps = $props();+</script>++<AlertDialogPrimitive.Portal {...restProps} />diff --git a/frontend/src/lib/components/ui/alert-dialog/alert-dialog-title.svelte b/frontend/src/lib/components/ui/alert-dialog/alert-dialog-title.sveltenew file mode 100644index 00000000..7ef2b5fb--- /dev/null+++ b/frontend/src/lib/components/ui/alert-dialog/alert-dialog-title.svelte@@ -0,0 +1,17 @@+<script lang="ts">+ import { AlertDialog as AlertDialogPrimitive } from "bits-ui";+ import { cn } from "$lib/utils.js";++ let {+ ref = $bindable(null),+ class: className,+ ...restProps+ }: AlertDialogPrimitive.TitleProps = $props();+</script>++<AlertDialogPrimitive.Title+ bind:ref+ data-slot="alert-dialog-title"+ class={cn("text-lg font-semibold", className)}+ {...restProps}+/>diff --git a/frontend/src/lib/components/ui/alert-dialog/alert-dialog-trigger.svelte b/frontend/src/lib/components/ui/alert-dialog/alert-dialog-trigger.sveltenew file mode 100644index 00000000..a798f1c2--- /dev/null+++ b/frontend/src/lib/components/ui/alert-dialog/alert-dialog-trigger.svelte@@ -0,0 +1,10 @@+<script lang="ts">+ import { AlertDialog as AlertDialogPrimitive } from "bits-ui";++ let {+ ref = $bindable(null),+ ...restProps+ }: AlertDialogPrimitive.TriggerProps = $props();+</script>++<AlertDialogPrimitive.Trigger bind:ref {...restProps} />diff --git a/frontend/src/lib/components/ui/alert-dialog/alert-dialog.svelte b/frontend/src/lib/components/ui/alert-dialog/alert-dialog.sveltenew file mode 100644index 00000000..7ea78bb4--- /dev/null+++ b/frontend/src/lib/components/ui/alert-dialog/alert-dialog.svelte@@ -0,0 +1,7 @@+<script lang="ts">+ import { AlertDialog as AlertDialogPrimitive } from "bits-ui";++ let { open = $bindable(false), ...restProps }: AlertDialogPrimitive.RootProps = $props();+</script>++<AlertDialogPrimitive.Root bind:open {...restProps} />diff --git a/frontend/src/lib/components/ui/alert-dialog/index.ts b/frontend/src/lib/components/ui/alert-dialog/index.tsnew file mode 100644index 00000000..56622511--- /dev/null+++ b/frontend/src/lib/components/ui/alert-dialog/index.ts@@ -0,0 +1,37 @@+import Root from "./alert-dialog.svelte";+import Portal from "./alert-dialog-portal.svelte";+import Trigger from "./alert-dialog-trigger.svelte";+import Overlay from "./alert-dialog-overlay.svelte";+import Content from "./alert-dialog-content.svelte";+import Header from "./alert-dialog-header.svelte";+import Footer from "./alert-dialog-footer.svelte";+import Title from "./alert-dialog-title.svelte";+import Description from "./alert-dialog-description.svelte";+import Action from "./alert-dialog-action.svelte";+import Cancel from "./alert-dialog-cancel.svelte";++export {+ Root,+ Trigger,+ Portal,+ Overlay,+ Content,+ Header,+ Footer,+ Title,+ Description,+ Action,+ Cancel,+ //+ Root as AlertDialog,+ Trigger as AlertDialogTrigger,+ Portal as AlertDialogPortal,+ Overlay as AlertDialogOverlay,+ Content as AlertDialogContent,+ Header as AlertDialogHeader,+ Footer as AlertDialogFooter,+ Title as AlertDialogTitle,+ Description as AlertDialogDescription,+ Action as AlertDialogAction,+ Cancel as AlertDialogCancel,+};diff --git a/frontend/src/lib/components/ui/button/button.svelte b/frontend/src/lib/components/ui/button/button.svelteindex 5c50ff5b..a473a77a 100644--- a/frontend/src/lib/components/ui/button/button.svelte+++ b/frontend/src/lib/components/ui/button/button.svelte@@ -10,6 +10,8 @@default: "bg-primary text-primary-foreground hover:bg-primary/90 shadow-xs",destructive:"bg-destructive hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60 text-white shadow-xs",+ destructiveOutline:+ "border border-destructive text-destructive hover:bg-destructive/10 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:border-destructive/60 dark:text-destructive/90 dark:hover:bg-destructive/20 shadow-xs",outline:"bg-background hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 border shadow-xs",secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80 shadow-xs",diff --git a/frontend/src/lib/components/ui/error-display/error-display.svelte b/frontend/src/lib/components/ui/error-display/error-display.svelteindex d8a41dc6..6b810a64 100644--- a/frontend/src/lib/components/ui/error-display/error-display.svelte+++ b/frontend/src/lib/components/ui/error-display/error-display.svelte@@ -6,7 +6,7 @@status?: 404 | 400 | 422 | number;title?: string;description?: string;- backHref?: string;+ onBack?: (e: MouseEvent) => void;backLabel?: string;onRetry?: () => void;identifier?: string;@@ -16,7 +16,7 @@status = 404,title,description,- backHref,+ onBack,backLabel = 'Go Back',onRetry,identifier@@ -40,9 +40,9 @@const displayTitle = $derived(title || defaults[status]?.title || 'Error');const displayDescription = $derived(description || defaults[status]?.description || 'Something went wrong.');- function handleBack() {- if (backHref) {- goto(backHref);+ function handleBack(e: MouseEvent) {+ if (onBack) {+ onBack(e);} else {history.back();}diff --git a/frontend/src/lib/components/ui/time-range-picker/time-range-picker.svelte b/frontend/src/lib/components/ui/time-range-picker/time-range-picker.svelteindex 945b98a6..18801427 100644--- a/frontend/src/lib/components/ui/time-range-picker/time-range-picker.svelte+++ b/frontend/src/lib/components/ui/time-range-picker/time-range-picker.svelte@@ -342,8 +342,8 @@</script><Popover.Root bind:open={isOpen} onOpenChange={handleOpenChange}>- <Popover.Trigger>- <Button variant="outline" class="h-9 justify-between gap-2 font-normal">+ <Popover.Trigger class="w-full">+ <Button variant="outline" class="h-9 justify-between gap-2 font-normal w-full"><span class="flex items-center gap-2"><Clock class="h-4 w-4 text-muted-foreground" /><span class="truncate">{displayLabel()}</span>diff --git a/frontend/src/routes/+error.svelte b/frontend/src/routes/+error.svelteindex 1b6c4534..3d68fbfa 100644--- a/frontend/src/routes/+error.svelte+++ b/frontend/src/routes/+error.svelte@@ -1,6 +1,8 @@<script lang="ts">+ import { resolve } from '$app/paths';import { page } from '$app/state';import { ErrorDisplay } from '$lib/components/ui/error-display';+ import { createRowClickHandler } from '$lib/utils/navigation';const status = $derived(page.status);const errorMessage = $derived(page.error?.message);@@ -12,6 +14,6 @@description={errorMessage || (status === 404? "The page you're looking for doesn't exist or may have been moved.": 'An unexpected error occurred. Please try again.')}- backHref="/"+ onBack={createRowClickHandler(resolve('/'))}backLabel="Go to Dashboard"/>diff --git a/frontend/src/routes/+layout.svelte b/frontend/src/routes/+layout.svelteindex 64b0cfbf..2b8cfe1a 100644--- a/frontend/src/routes/+layout.svelte+++ b/frontend/src/routes/+layout.svelte@@ -14,6 +14,7 @@import { onMount } from "svelte";import * as DropdownMenu from "$lib/components/ui/dropdown-menu/index.js";import { ChevronDown } from 'lucide-svelte';+ import { Toaster } from 'svelte-sonner';let { children } = $props();let showAddProjectModal = $state(false);@@ -122,6 +123,8 @@onOpenChange={(open) => showAddProjectModal = open}onProjectCreated={handleProjectCreated}/>++ <Toaster richColors position="bottom-right" />{:else}<main class="h-screen w-screen">{@render children()}diff --git a/frontend/src/routes/issues/+page.svelte b/frontend/src/routes/issues/+page.svelteindex fe0b4d2f..d219ed1e 100644--- a/frontend/src/routes/issues/+page.svelte+++ b/frontend/src/routes/issues/+page.svelte@@ -12,6 +12,8 @@import { getTimezone } from '$lib/state/timezone.svelte';import IssueTrendChart from '$lib/components/issue-trend-chart.svelte';import Archive from '@lucide/svelte/icons/archive';+ import { toast } from 'svelte-sonner';+ import ArchiveConfirmationDialog from '$lib/components/archive-confirmation-dialog.svelte';import { TracewayTableHeader } from '$lib/components/ui/traceway-table-header';import { TableEmptyState } from '$lib/components/ui/table-empty-state';import { PaginationFooter } from '$lib/components/ui/pagination-footer';@@ -37,6 +39,7 @@let loading = $state(true);let error = $state('');let archiving = $state(false);+ let showArchiveDialog = $state(false);// Pagination Statelet page = $state(1);@@ -177,11 +180,13 @@{ projectId: projectsState.currentProjectId ?? undefined });+ toast.success('Successfully archived the Issue' + (selectedHashes.size > 1 ? 's' : ''));selectedHashes = new Set();await loadData();} catch (e: any) {console.error('Archive failed:', e);error = e.message || 'Failed to archive issues';+ throw e;} finally {archiving = false;}@@ -236,12 +241,12 @@<Buttonvariant="outline"size="sm"- onclick={archiveSelected}+ onclick={() => showArchiveDialog = true}disabled={archiving}class="gap-1.5"><Archive class="h-4 w-4" />- {archiving ? 'Archiving...' : 'Archive'}+ Archive</Button><Button variant="ghost" size="sm" onclick={() => (selectedHashes = new Set())}>Clear selection@@ -359,3 +364,10 @@itemLabel="issue"/></div>++<ArchiveConfirmationDialog+ open={showArchiveDialog}+ onOpenChange={(open) => showArchiveDialog = open}+ count={selectedCount}+ onConfirm={archiveSelected}+/>diff --git a/frontend/src/routes/issues/[exceptionHash]/+page.svelte b/frontend/src/routes/issues/[exceptionHash]/+page.svelteindex dde604e1..24e37846 100644--- a/frontend/src/routes/issues/[exceptionHash]/+page.svelte+++ b/frontend/src/routes/issues/[exceptionHash]/+page.svelte@@ -1,12 +1,19 @@<script lang="ts">import { onMount } from 'svelte';import { page } from '$app/state';+ import { goto } from '$app/navigation';import { api } from '$lib/api';+ import { Button } from "$lib/components/ui/button";import { LoadingCircle } from "$lib/components/ui/loading-circle";import { ErrorDisplay } from "$lib/components/ui/error-display";import { projectsState } from '$lib/state/projects.svelte';import { StackTraceCard, EventCard, EventsTable, PageHeader } from '$lib/components/issues';+ import { toast } from 'svelte-sonner';+ import ArchiveConfirmationDialog from '$lib/components/archive-confirmation-dialog.svelte';+ import Archive from '@lucide/svelte/icons/archive';import type { ExceptionGroup, ExceptionOccurrence, LinkedTransaction } from '$lib/types/exceptions';+ import { createRowClickHandler } from '$lib/utils/navigation';+ import { resolve } from '$app/paths';let group = $state<ExceptionGroup | null>(null);let occurrences = $state<ExceptionOccurrence[]>([]);@@ -15,6 +22,8 @@let notFound = $state(false);let total = $state(0);let linkedTransaction = $state<LinkedTransaction | null>(null);+ let showArchiveDialog = $state(false);+ let archiving = $state(false);const exceptionHash = $derived(page.params.exceptionHash ?? '');const latestOccurrence = $derived(occurrences[0]);@@ -75,17 +84,37 @@}}+ async function archiveIssue() {+ archiving = true;+ try {+ await api.post(+ '/exception-stack-traces/archive',+ { hashes: [exceptionHash] },+ { projectId: projectsState.currentProjectId ?? undefined }+ );+ toast.success('Successfully archived the Issue');+ goto('/issues');+ } catch (e: any) {+ console.error('Archive failed:', e);+ throw e;+ } finally {+ archiving = false;+ }+ }+onMount(() => {loadData();});</script><div class="space-y-6">- <PageHeader- title={firstLineOfStackTrace}- subtitle="Exception Hash: {exceptionHash}"- backHref="/issues"- />+ <div class="flex items-start justify-between gap-4">+ <PageHeader+ title={firstLineOfStackTrace}+ subtitle="Exception Hash: {exceptionHash}"+ onBack={createRowClickHandler(resolve("/issues"))}+ />+ </div>{#if loading && !group}<div class="flex items-center justify-center py-20">@@ -96,7 +125,7 @@status={404}title="Exception Not Found"description="The exception you're looking for doesn't exist or may have been removed. It's possible the data has expired or the link is incorrect."- backHref="/issues"+ onBack={createRowClickHandler(resolve('/issues'), 'presets', 'from', 'to')}backLabel="Back to Issues"onRetry={() => loadData()}identifier={exceptionHash}@@ -106,7 +135,7 @@status={400}title="Something Went Wrong"description={error}- backHref="/issues"+ onBack={createRowClickHandler(resolve('/issues'), 'presets', 'from', 'to')}backLabel="Back to Issues"onRetry={() => loadData()}/>@@ -117,6 +146,8 @@firstSeen={group.firstSeen}lastSeen={group.lastSeen}totalCount={group.count}+ bind:showArchiveDialog={showArchiveDialog}+ bind:archiving={archiving}/>{#if latestOccurrence}@@ -137,3 +168,10 @@/>{/if}</div>++<ArchiveConfirmationDialog+ open={showArchiveDialog}+ onOpenChange={(open) => showArchiveDialog = open}+ count={1}+ onConfirm={archiveIssue}+/>diff --git a/frontend/src/routes/issues/[exceptionHash]/[recordedAt]/+page.svelte b/frontend/src/routes/issues/[exceptionHash]/[recordedAt]/+page.svelteindex 439e1306..db3479ce 100644--- a/frontend/src/routes/issues/[exceptionHash]/[recordedAt]/+page.svelte+++ b/frontend/src/routes/issues/[exceptionHash]/[recordedAt]/+page.svelte@@ -8,6 +8,11 @@import { formatDateTime } from '$lib/utils/formatters';import { StackTraceCard, EventCard, EventsTable, PageHeader } from '$lib/components/issues';import type { ExceptionGroup, ExceptionOccurrence, LinkedTransaction } from '$lib/types/exceptions';+ import { createRowClickHandler } from '$lib/utils/navigation';+ import { resolve } from '$app/paths';+ import ArchiveConfirmationDialog from '$lib/components/archive-confirmation-dialog.svelte';+ import { goto } from '$app/navigation';+ import { toast } from 'svelte-sonner';let { data } = $props();@@ -21,6 +26,9 @@let notFound = $state(false);let total = $state(0);let linkedTransaction = $state<LinkedTransaction | null>(null);+ let showArchiveDialog = $state(false);+ let archiving = $state(false);+const isMessage = $derived(occurrence?.isMessage ?? false);const firstLineOfStackTrace = $derived(group?.stackTrace.split('\n')[0] || 'Exception');@@ -86,6 +94,24 @@}}+ async function archiveIssue() {+ archiving = true;+ try {+ await api.post(+ '/exception-stack-traces/archive',+ { hashes: [data.exceptionHash] },+ { projectId: projectsState.currentProjectId ?? undefined }+ );+ toast.success('Successfully archived the Issue');+ goto(resolve("/issues"));+ } catch (e: any) {+ console.error('Archive failed:', e);+ throw e;+ } finally {+ archiving = false;+ }+ }+onMount(() => {loadData();});@@ -95,7 +121,7 @@<PageHeadertitle={firstLineOfStackTrace}subtitle="Event from {formatDateTime(data.recordedAt, { timezone })}"- backHref="/issues/{data.exceptionHash}"+ onBack={createRowClickHandler(resolve("/issues/[exceptionHash]", {exceptionHash: data.exceptionHash}))}/>{#if loading && !group}@@ -107,7 +133,7 @@status={404}title="Event Not Found"description="The specific event you're looking for doesn't exist or may have been removed."- backHref="/issues/{data.exceptionHash}"+ onBack={createRowClickHandler(resolve('/issues/[exceptionHash]', {exceptionHash: data.exceptionHash}), 'presets', 'from', 'to')}backLabel="Back to Exception"onRetry={() => loadData()}/>@@ -116,7 +142,7 @@status={400}title="Something Went Wrong"description={error}- backHref="/issues/{data.exceptionHash}"+ onBack={createRowClickHandler(resolve('/issues/[exceptionHash]', {exceptionHash: data.exceptionHash}), 'presets', 'from', 'to')}backLabel="Back to Exception"onRetry={() => loadData()}/>@@ -124,6 +150,8 @@<StackTraceCardstackTrace={group.stackTrace}{isMessage}+ bind:showArchiveDialog={showArchiveDialog}+ bind:archiving={archiving}/><EventCard@@ -143,3 +171,11 @@/>{/if}</div>+++<ArchiveConfirmationDialog+ open={showArchiveDialog}+ onOpenChange={(open) => showArchiveDialog = open}+ count={1}+ onConfirm={archiveIssue}+/>diff --git a/frontend/src/routes/issues/[exceptionHash]/events/+page.svelte b/frontend/src/routes/issues/[exceptionHash]/events/+page.svelteindex 8a9cab23..f02e7e3a 100644--- a/frontend/src/routes/issues/[exceptionHash]/events/+page.svelte+++ b/frontend/src/routes/issues/[exceptionHash]/events/+page.svelte@@ -16,6 +16,10 @@import { TracewayTableHeader } from "$lib/components/ui/traceway-table-header";import { TableEmptyState } from "$lib/components/ui/table-empty-state";import { PaginationFooter } from "$lib/components/ui/pagination-footer";+ import { toast } from 'svelte-sonner';+ import ArchiveConfirmationDialog from '$lib/components/archive-confirmation-dialog.svelte';+ import Archive from '@lucide/svelte/icons/archive';+ import { resolve } from '$app/paths';const timezone = $derived(getTimezone());@@ -42,6 +46,8 @@let loading = $state(true);let error = $state('');let notFound = $state(false);+ let showArchiveDialog = $state(false);+ let archiving = $state(false);// Pagination statelet currentPage = $state(1);@@ -102,6 +108,24 @@loadData();}+ async function archiveIssue() {+ archiving = true;+ try {+ await api.post(+ '/exception-stack-traces/archive',+ { hashes: [page.params.exceptionHash] },+ { projectId: projectsState.currentProjectId ?? undefined }+ );+ toast.success('Successfully archived the Issue');+ goto('/issues');+ } catch (e: any) {+ console.error('Archive failed:', e);+ throw e;+ } finally {+ archiving = false;+ }+ }+onMount(() => {loadData();});@@ -109,13 +133,25 @@<div class="space-y-6"><!-- Header -->- <div class="flex items-center gap-4">+ <div class="flex items-center justify-between"><Button variant="outline" size="sm" onclick={() => goto(`/issues/${page.params.exceptionHash}`)}><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="mr-2"><path d="m12 19-7-7 7-7"/><path d="M19 12H5"/></svg>Back to Issue</Button>+ {#if group}+ <Button+ variant="outline"+ size="sm"+ onclick={() => showArchiveDialog = true}+ disabled={archiving}+ class="gap-1.5"+ >+ <Archive class="h-4 w-4" />+ Archive+ </Button>+ {/if}</div>{#if loading && !group}@@ -127,7 +163,7 @@status={404}title="Exception Not Found"description="The exception you're looking for doesn't exist or may have been removed."- backHref="/issues"+ onBack={createRowClickHandler(resolve('/issues'), 'presets', 'from', 'to')}backLabel="Back to Issues"onRetry={() => loadData()}identifier={page.params.exceptionHash}@@ -137,7 +173,7 @@status={400}title="Something Went Wrong"description={error}- backHref="/issues"+ onBack={createRowClickHandler(resolve('/issues'), 'presets', 'from', 'to')}backLabel="Back to Issues"onRetry={() => loadData()}/>@@ -218,3 +254,10 @@/>{/if}</div>++<ArchiveConfirmationDialog+ open={showArchiveDialog}+ onOpenChange={(open) => showArchiveDialog = open}+ count={1}+ onConfirm={archiveIssue}+/>diff --git a/frontend/src/routes/transactions/+page.svelte b/frontend/src/routes/transactions/+page.svelteindex 7d66450d..a8c53b18 100644--- a/frontend/src/routes/transactions/+page.svelte+++ b/frontend/src/routes/transactions/+page.svelte@@ -18,6 +18,7 @@import { projectsState } from '$lib/state/projects.svelte';import { createRowClickHandler } from '$lib/utils/navigation';import { resolve } from '$app/paths';+ import PageHeader from '$lib/components/issues/page-header.svelte';const timezone = $derived(getTimezone());@@ -288,16 +289,20 @@<div class="space-y-4"><!-- Header with Title and Time Range Filter -->- <div class="flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between">- <h2 class="text-2xl font-bold tracking-tight">Transactions</h2>- <TimeRangePicker- bind:fromDate- bind:toDate- bind:fromTime- bind:toTime- bind:preset={selectedPreset}- onApply={handleTimeRangeChange}- />+ <div class="flex flex-col gap-4 sm:flex-row sm:justify-between">++ <PageHeader title="Transactions" />++ <div class="flex flex-col">+ <TimeRangePicker+ bind:fromDate+ bind:toDate+ bind:fromTime+ bind:toTime+ bind:preset={selectedPreset}+ onApply={handleTimeRangeChange}+ />+ </div></div><!-- Endpoints Table -->diff --git a/frontend/src/routes/transactions/[endpoint]/+page.svelte b/frontend/src/routes/transactions/[endpoint]/+page.svelteindex 857a560c..d4cc9085 100644--- a/frontend/src/routes/transactions/[endpoint]/+page.svelte+++ b/frontend/src/routes/transactions/[endpoint]/+page.svelte@@ -17,6 +17,8 @@import ScopeDisplay from '$lib/components/scope-display.svelte';import { createRowClickHandler } from '$lib/utils/navigation';import PaginationFooter from '$lib/components/ui/pagination-footer/pagination-footer.svelte';+ import PageHeader from '$lib/components/issues/page-header.svelte';+ import { resolve } from '$app/paths';const timezone = $derived(getTimezone());@@ -244,17 +246,6 @@loadData(false);}- function goBack() {- const params = new URLSearchParams();- if (selectedPreset) {- params.set('preset', selectedPreset);- } else {- params.set('from', getFromDateTimeUTC());- params.set('to', getToDateTimeUTC());- }- goto(`/transactions?${params.toString()}`);- }-// Build URL for transaction detail with current time rangefunction getTransactionDetailUrl(transactionId: string): string {const params = new URLSearchParams();@@ -278,7 +269,7 @@status={404}title="Endpoint Not Found"description="The endpoint you're looking for doesn't exist or has no recorded transactions."- backHref="/transactions"+ onBack={createRowClickHandler(resolve('/transactions'), 'presets', 'from', 'to')}backLabel="Back to Transactions"onRetry={() => loadData(false)}identifier={decodeURIComponent(data.endpoint)}@@ -288,30 +279,30 @@status={errorStatus === 400 ? 400 : errorStatus === 422 ? 422 : 400}title="Failed to Load Transactions"description={error}- backHref="/transactions"+ onBack={createRowClickHandler(resolve('/transactions'), 'presets', 'from', 'to')}backLabel="Back to Transactions"onRetry={() => loadData(false)}/>{:else}<!-- Header with Title and Time Range Filter -->- <div class="flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between">- <div class="flex items-center gap-4">- <Button variant="ghost" size="sm" onclick={goBack} class="h-8 w-8 p-0">- <ArrowLeft class="h-4 w-4" />- </Button>- <div>- <h2 class="text-2xl font-bold tracking-tight font-mono break-all">{decodeURIComponent(data.endpoint)}</h2>- <p class="text-sm text-muted-foreground">Transaction instances for this endpoint</p>- </div>- </div>- <TimeRangePicker- bind:fromDate- bind:toDate- bind:fromTime- bind:toTime- bind:preset={selectedPreset}- onApply={handleTimeRangeChange}+ <div class="flex flex-col gap-4 sm:flex-row sm:justify-between">++ <PageHeader+ title={decodeURIComponent(data.endpoint)}+ subtitle="Transaction instances for this endpoint"+ onBack={createRowClickHandler(resolve("/transactions"), "presets", "from", "to")}/>++ <div class="flex flex-col">+ <TimeRangePicker+ bind:fromDate+ bind:toDate+ bind:fromTime+ bind:toTime+ bind:preset={selectedPreset}+ onApply={handleTimeRangeChange}+ />+ </div></div><!-- Endpoint Stats -->diff --git a/frontend/src/routes/transactions/[endpoint]/[transactionId]/+page.svelte b/frontend/src/routes/transactions/[endpoint]/[transactionId]/+page.svelteindex 90cba706..5b7a16c9 100644--- a/frontend/src/routes/transactions/[endpoint]/[transactionId]/+page.svelte+++ b/frontend/src/routes/transactions/[endpoint]/[transactionId]/+page.svelte@@ -15,6 +15,9 @@import SegmentWaterfall from '$lib/components/segments/segment-waterfall.svelte';import SegmentEmptyState from '$lib/components/segments/segment-empty-state.svelte';import type { TransactionDetailResponse } from '$lib/types/segments';+ import PageHeader from '$lib/components/issues/page-header.svelte';+ import { createRowClickHandler } from '$lib/utils/navigation';+ import { resolve } from '$app/paths';let { data } = $props();@@ -60,42 +63,16 @@}}- function getBackUrl(): string {- const params = new URLSearchParams();- if (data.preset) {- params.set('preset', data.preset);- } else if (data.from && data.to) {- params.set('from', data.from);- params.set('to', data.to);- }- const queryString = params.toString();- return `/transactions/${encodeURIComponent(data.endpoint)}${queryString ? '?' + queryString : ''}`;- }-- function goBack() {- goto(getBackUrl());- }-- const backHref = $derived(getBackUrl());-onMount(() => {loadData();});</script><div class="space-y-6">- <!-- Header -->- <div class="flex items-center gap-4">- <Button variant="ghost" size="sm" onclick={goBack} class="h-8 w-8 p-0">- <ArrowLeft class="h-4 w-4" />- </Button>- <div>- <h2 class="font-mono text-2xl font-bold tracking-tight break-all">- {decodeURIComponent(data.endpoint)}- </h2>- <p class="text-sm text-muted-foreground">Transaction ID: {data.transactionId}</p>- </div>- </div>+ <PageHeader+ title={decodeURIComponent(data.endpoint)} subtitle={`Transaction ID: ${data.transactionId}`}+ onBack={createRowClickHandler(resolve('/transactions/[endpoint]', {endpoint: encodeURIComponent(data.endpoint)}))} />+{#if loading}<div class="flex items-center justify-center py-20">@@ -106,7 +83,7 @@status={404}title="Transaction Not Found"description="The transaction you're looking for doesn't exist or may have expired."- {backHref}+ onBack={createRowClickHandler(resolve('/transactions/[endpoint]', {endpoint: encodeURIComponent(data.endpoint)}))}backLabel="Back to Endpoint"onRetry={loadData}identifier={data.transactionId}@@ -116,7 +93,7 @@status={400}title="Failed to Load Transaction"description={error}- {backHref}+ onBack={createRowClickHandler(resolve('/transactions/[endpoint]', {endpoint: encodeURIComponent(data.endpoint)}))}backLabel="Back to Endpoint"onRetry={loadData}/>