* feat(usage): restructure the usage page layout
- Header: one sync button that shows when it last synced, next to a settings
button; the settings sheet now holds data sources, display and pricing.
- Scope bar: date first, app chips, and one cascading provider / model menu.
- Overview: a selectable metric strip drives the trend chart and heatmap; the
four token parts fold into an expandable second row. Hit-rate axis starts
near the lowest value; hourly labels are short; new terracotta chart color.
- Detail panel: tabs with counts; tables scroll sideways at natural column
widths, pin the time / app columns, group columns with wider gaps, and
animate rows that arrive on refresh.
- Request detail drawer: no per-row dividers, no duplicate session rows.
- Empty values show an em dash; dark-mode surfaces use one token per role.
* feat(usage): let people pick how many request logs fit on a page
The pagination bar gets a rows-per-page menu (10 / 20 / 50, default 20),
remembered on this device. It stays visible on a single page as long as
there are more rows than the smallest size, so a larger choice can still be
undone. Changing the size keeps the first visible row on screen, and the
rows it adds are not animated as newly arrived requests.
* fix(usage): polish details found in review
- New-row highlight keeps a pinned column's edge shadow instead of replacing it.
- Pinned cells only follow row hover on rows that can be clicked.
- Update a stale comment about the metric strip spacing.
* fix(usage): fix issues found in branch review
- Heatmap in hit-rate mode: a day with traffic but a 0% hit rate is now
shaded instead of looking idle, and the tooltip shows the hit rate.
The heatmap reuses the trend chart's hitRateOf instead of its own copy.
- Turkish: add the request log column labels and the columns menu title.
- Sync button: when auto scan is off, the tooltip says so.
- Columns menu: concurrent saves no longer drop later toggles; a failed
save reverts only once the last save returns.
- Tab counts query only the open tab; other tabs show their cached count.
- UsageDashboard uses the shared useElementWidth instead of its own copy.
- Note the two-column limit of the pinned-column offset.
* fix(usage): keep heatmap tooltip rows on one line
The added hit-rate row made the label column wider, so the card near
the right edge wrapped values like "7640.5 万" and the label itself.
* fix(usage): shorten the auto-scan-off sync tooltip to one line
The longer sentence wrapped inside the pill-shaped tooltip and broke
mid-word.
* fix(usage): open pricing as a sub-page so its editor can be used
Pricing lived in a modal Dialog, but the add/edit pricing editor is a
FullScreenPanel portaled into #content-area. The dialog's overlay sat
above it and Radix set pointer-events: none on body while the dialog was
open, so the editor's fields and save button could not be used. Pricing
is now a FullScreenPanel too, the same pattern as other nested panels.
* fix(usage): show exact metric values in the app tooltip
The metric strip used native title attributes for the exact numbers.
Use HoverTip instead, anchored to the number and opening to the right,
so it does not cover the expanded token row. No tip while the cell
shows a placeholder.
Chinese and Japanese compact notation keeps 万/亿 up to four digits
(5000万, 2000亿), which made the token axis much wider than in English.
Write those ranges as 5千万 / 2千亿 instead, and let the Y axis in both the
usage dashboard and the tray panel size itself to its widest tick rather
than a fixed 44px, so short labels no longer leave a gap and long money
ticks are no longer clipped.
The trend chart used the localized MM/DD label as the Recharts category key, so a range spanning multiple years made the same MM/DD collapse into one category and the active dot snapped to the earlier year's point while the tooltip followed the cursor.
Use the backend RFC3339 bucket timestamp as the category key, resolve tick text by that key, and read the tooltip heading from the point payload. Axis ticks gain a 2-digit year only for multi-year ranges.
Fixes#6302