@@ -194,17 +194,17 @@ export function AnalyticsPage() {
194194 No addon data for this range.
195195 </ p >
196196 ) : (
197- < div className = "grid lg:grid-cols-[1fr,260px ] gap-6" >
198- < div className = "overflow-x-auto" >
199- < table className = "w-full text-sm" >
197+ < div className = "grid lg:grid-cols-[1fr,240px ] gap-6 items-center " >
198+ < div className = "overflow-x-auto -mx-4 px-4 lg:mx-0 lg:px-0 " >
199+ < table className = "w-full text-sm min-w-[560px] " >
200200 < thead className = "text-[--muted] text-xs uppercase" >
201201 < tr className = "text-left border-b border-[--border]" >
202- < th className = "py-2" > Addon</ th >
203- < th className = "py-2 text-right" > Requests</ th >
204- < th className = "py-2 text-right" > Share</ th >
205- < th className = "py-2 text-right" > Errors</ th >
206- < th className = "py-2 text-right" > Err %</ th >
207- < th className = "py-2 text-right" > Avg ms</ th >
202+ < th className = "py-2 pr-3 " > Addon</ th >
203+ < th className = "py-2 px-3 text-right" > Requests</ th >
204+ < th className = "py-2 px-3 text-right" > Share</ th >
205+ < th className = "py-2 px-3 text-right" > Errors</ th >
206+ < th className = "py-2 px-3 text-right" > Err %</ th >
207+ < th className = "py-2 pl-3 text-right" > Avg ms</ th >
208208 </ tr >
209209 </ thead >
210210 < tbody >
@@ -213,48 +213,53 @@ export function AnalyticsPage() {
213213 key = { a . presetId }
214214 className = "border-b border-[--border]/50"
215215 >
216- < td className = "py-2 font-medium" > { a . presetId } </ td >
217- < td className = "py-2 text-right tabular-nums" >
216+ < td className = "py-2 pr-3 font-medium" >
217+ { a . presetId }
218+ </ td >
219+ < td className = "py-2 px-3 text-right tabular-nums" >
218220 { a . requests . toLocaleString ( ) }
219221 </ td >
220- < td className = "py-2 text-right tabular-nums" >
222+ < td className = "py-2 px-3 text-right tabular-nums" >
221223 { a . share } %
222224 </ td >
223- < td className = "py-2 text-right tabular-nums" >
225+ < td className = "py-2 px-3 text-right tabular-nums" >
224226 { a . errors }
225227 </ td >
226228 < td
227229 className = { cn (
228- 'py-2 text-right tabular-nums' ,
230+ 'py-2 px-3 text-right tabular-nums' ,
229231 a . errorRate > 10 && 'text-red-500'
230232 ) }
231233 >
232234 { a . errorRate } %
233235 </ td >
234- < td className = "py-2 text-right tabular-nums" >
236+ < td className = "py-2 pl-3 text-right tabular-nums" >
235237 { a . avgLatencyMs ?? '—' }
236238 </ td >
237239 </ tr >
238240 ) ) }
239241 </ tbody >
240242 </ table >
241243 </ div >
242- < DonutChart
243- data = { d . addons . slice ( 0 , 6 ) . map ( ( a ) => ( {
244- name : a . presetId ,
245- value : a . requests ,
246- } ) ) }
247- centerLabel = "requests"
248- centerValue = { d . total . toLocaleString ( ) }
249- />
244+ < div className = "mx-auto w-full max-w-[240px] aspect-square" >
245+ < DonutChart
246+ data = { d . addons . slice ( 0 , 6 ) . map ( ( a ) => ( {
247+ name : a . presetId ,
248+ value : a . requests ,
249+ } ) ) }
250+ centerLabel = "requests"
251+ centerValue = { d . total . toLocaleString ( ) }
252+ height = { 240 }
253+ />
254+ </ div >
250255 </ div >
251256 )
252257 }
253258 </ DashboardQueryBoundary >
254259 </ Card >
255260
256261 { /* Feature usage — what users have configured. Counts are distinct
257- users (uuid_hashes) per day per key, summed across the window.
262+ users per day per key, summed across the window.
258263 Drives roadmap decisions: which services/presets actually get used. */ }
259264 < Card className = "p-4" >
260265 < div className = "mb-3 flex items-center justify-between" >
@@ -290,23 +295,25 @@ export function AnalyticsPage() {
290295 ! d . topUsers . length ? (
291296 < p className = "text-sm text-[--muted]" > No data for this range.</ p >
292297 ) : (
293- < table className = "w-full text-sm" >
294- < tbody >
295- { d . topUsers . map ( ( u ) => (
296- < tr
297- key = { u . uuidHash }
298- className = "border-b border-[--border]/50"
299- >
300- < td className = "py-1.5 font-mono text-xs text-[--muted]" >
301- { u . uuidHash . slice ( 0 , 16 ) } …
302- </ td >
303- < td className = "py-1.5 text-right tabular-nums" >
304- { u . requests . toLocaleString ( ) }
305- </ td >
306- </ tr >
307- ) ) }
308- </ tbody >
309- </ table >
298+ < div className = "overflow-x-auto" >
299+ < table className = "w-full text-sm" >
300+ < tbody >
301+ { d . topUsers . map ( ( u ) => (
302+ < tr
303+ key = { u . uuidHash }
304+ className = "border-b border-[--border]/50"
305+ >
306+ < td className = "py-1.5 font-mono text-xs text-[--muted] break-all" >
307+ { u . uuidHash . slice ( 0 , 16 ) }
308+ </ td >
309+ < td className = "py-1.5 pl-3 text-right tabular-nums whitespace-nowrap" >
310+ { u . requests . toLocaleString ( ) }
311+ </ td >
312+ </ tr >
313+ ) ) }
314+ </ tbody >
315+ </ table >
316+ </ div >
310317 )
311318 }
312319 </ DashboardQueryBoundary >
0 commit comments