Skip to content

Commit 119a8f8

Browse files
Ripwordsclaude
andcommitted
feat(dashboard): mobile-aware detail drawer (hide replay, show device card)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 8c9cf5f commit 119a8f8

2 files changed

Lines changed: 77 additions & 28 deletions

File tree

apps/dashboard/app/components/report-drawer/overview-tab.vue

Lines changed: 60 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,22 @@ const fmtTime = (iso: string) => new Date(iso).toLocaleString()
2929
<span class="text-default truncate">{{ report.reporterEmail ?? "anonymous" }}</span>
3030
</div>
3131
<div class="flex gap-2">
32-
<span class="text-muted w-24 flex-shrink-0">Page</span>
33-
<a
34-
:href="safeHref(report.pageUrl)"
35-
target="_blank"
36-
rel="noopener"
37-
class="text-primary-600 dark:text-primary-400 hover:underline truncate"
38-
>
39-
{{ report.pageUrl }}
40-
</a>
32+
<span class="text-muted w-24 flex-shrink-0">{{
33+
ctx?.source === "expo" ? "Route" : "Page"
34+
}}</span>
35+
<template v-if="ctx?.source === 'expo'">
36+
<span class="text-default truncate">{{ report.pageUrl }}</span>
37+
</template>
38+
<template v-else>
39+
<a
40+
:href="safeHref(report.pageUrl)"
41+
target="_blank"
42+
rel="noopener"
43+
class="text-primary-600 dark:text-primary-400 hover:underline truncate"
44+
>
45+
{{ report.pageUrl }}
46+
</a>
47+
</template>
4148
</div>
4249
<div class="flex gap-2">
4350
<span class="text-muted w-24 flex-shrink-0">Received</span>
@@ -52,16 +59,25 @@ const fmtTime = (iso: string) => new Date(iso).toLocaleString()
5259
</template>
5360
<dl class="text-sm space-y-3">
5461
<div class="flex items-center gap-3">
55-
<dt class="text-muted w-24 flex-shrink-0">Website</dt>
62+
<dt class="text-muted w-24 flex-shrink-0">
63+
{{ ctx?.source === "expo" ? "Route" : "Website" }}
64+
</dt>
5665
<dd class="min-w-0 flex-1">
57-
<a
58-
:href="safeHref(report.pageUrl)"
59-
target="_blank"
60-
rel="noopener"
61-
class="text-primary-600 dark:text-primary-400 hover:underline truncate inline-block max-w-full align-bottom"
62-
>
63-
{{ report.pageUrl }}
64-
</a>
66+
<template v-if="ctx?.source === 'expo'">
67+
<span class="text-default truncate inline-block max-w-full align-bottom">
68+
{{ report.pageUrl }}
69+
</span>
70+
</template>
71+
<template v-else>
72+
<a
73+
:href="safeHref(report.pageUrl)"
74+
target="_blank"
75+
rel="noopener"
76+
class="text-primary-600 dark:text-primary-400 hover:underline truncate inline-block max-w-full align-bottom"
77+
>
78+
{{ report.pageUrl }}
79+
</a>
80+
</template>
6581
</dd>
6682
</div>
6783
<div class="flex items-center gap-3">
@@ -102,6 +118,32 @@ const fmtTime = (iso: string) => new Date(iso).toLocaleString()
102118
</dl>
103119
</UCard>
104120

121+
<UCard v-if="ctx?.source === 'expo' && sys">
122+
<template #header>
123+
<div class="text-sm font-medium text-default">Device</div>
124+
</template>
125+
<dl class="text-sm space-y-3">
126+
<div class="flex items-center gap-3">
127+
<dt class="text-muted w-24 flex-shrink-0">Platform</dt>
128+
<dd class="min-w-0 flex-1 text-default">{{ sys.devicePlatform ?? "—" }}</dd>
129+
</div>
130+
<div class="flex items-center gap-3">
131+
<dt class="text-muted w-24 flex-shrink-0">OS version</dt>
132+
<dd class="min-w-0 flex-1 text-default">{{ sys.osVersion ?? "—" }}</dd>
133+
</div>
134+
<div class="flex items-center gap-3">
135+
<dt class="text-muted w-24 flex-shrink-0">Device</dt>
136+
<dd class="min-w-0 flex-1 text-default">{{ sys.deviceModel ?? "—" }}</dd>
137+
</div>
138+
<div class="flex items-center gap-3">
139+
<dt class="text-muted w-24 flex-shrink-0">App</dt>
140+
<dd class="min-w-0 flex-1 text-default">
141+
{{ sys.appVersion ?? "—" }}<span v-if="sys.appBuild"> ({{ sys.appBuild }})</span>
142+
</dd>
143+
</div>
144+
</dl>
145+
</UCard>
146+
105147
<UCard v-if="sys">
106148
<template #header>
107149
<div class="text-sm font-medium text-default">System info</div>

apps/dashboard/app/pages/projects/[id]/reports/[reportId].vue

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -83,16 +83,23 @@ const consoleHasData = computed(
8383
const networkHasData = computed(() => logs.value !== null && logs.value.network.length > 0)
8484
const cookiesHasData = computed(() => (report.value?.context?.cookies?.length ?? 0) > 0)
8585
86-
const tabs = computed(() => [
87-
{ id: "overview", label: "Overview" },
88-
{ id: "console", label: "Console", hasData: consoleHasData.value },
89-
{ id: "network", label: "Network", hasData: networkHasData.value },
90-
{ id: "replay", label: "Replay", hasData: report.value?.hasReplay ?? false },
91-
{ id: "activity", label: "Activity" },
92-
{ id: "cookies", label: "Cookies", hasData: cookiesHasData.value },
93-
{ id: "system", label: "System" },
94-
{ id: "raw", label: "Raw" },
95-
])
86+
const tabs = computed(() => {
87+
const base: { id: string; label: string; hasData?: boolean }[] = [
88+
{ id: "overview", label: "Overview" },
89+
{ id: "console", label: "Console", hasData: consoleHasData.value },
90+
{ id: "network", label: "Network", hasData: networkHasData.value },
91+
]
92+
if (report.value?.source !== "expo") {
93+
base.push({ id: "replay", label: "Replay", hasData: report.value?.hasReplay ?? false })
94+
}
95+
base.push({ id: "activity", label: "Activity" })
96+
if (report.value?.source !== "expo") {
97+
base.push({ id: "cookies", label: "Cookies", hasData: cookiesHasData.value })
98+
}
99+
base.push({ id: "system", label: "System" })
100+
base.push({ id: "raw", label: "Raw" })
101+
return base
102+
})
96103
97104
// After a triage mutation, re-fetch the report row and refresh the activity
98105
// feed so the timeline reflects the new event immediately.

0 commit comments

Comments
 (0)