Repository navigation
Description
Description
On the Shopping page (/dashboard/shopping), the three filter selects in the filter bar — Date range, Platform, and Region — show the raw option value in the closed trigger instead of the option's display label. For example, after picking "Last 30d" the trigger shows "30d"; the date range default shows "all" instead of "All time", and the platform/region selects show "all" instead of "All platforms" / "All regions".
All three are the same bug in one component, hence a single issue.
Steps to reproduce
- Open Shopping (
/dashboard/shopping) for a brand with shopping mode enabled. - Look at the filter bar at the top (Date range / Platform / Region).
- Open the date range select and pick "Last 30d".
- The dropdown items are labeled correctly, but the closed trigger shows the raw value ("30d", "all", …).
Expected behavior
The trigger shows the same label as the selected dropdown item: "Last 30d", "All time", "All platforms", "All regions".
Actual behavior
The trigger shows the raw value: "30d", "all".
Deployment mode
Cloud (ansvisor.com) — reproduces on self-hosted too; it's purely a frontend rendering issue.
Root cause & suggested fix (for contributors)
The shared select component (web/src/components/ui/select.tsx) is built on Base UI (@base-ui/react/select), not Radix. Unlike Radix — where <SelectValue /> echoes the selected item's rendered label — Base UI's <Select.Value /> renders the raw value string when given no children.
The Shopping filter bar (FilterBar in web/src/app/[locale]/(dashboard)/dashboard/shopping/page.tsx, around lines 770–816) uses a bare <SelectValue /> in all three selects, so the trigger displays the value instead of the label.
Suggested approach — give each SelectValue a children function that maps value → label, mirroring the label logic already used for the SelectItems. For example, for the date range select:
<SelectValue>
{(v: string) => (v === 'all' ? 'All time' : `Last ${v}`)}
</SelectValue>and for platform/region:
<SelectValue>{(v: string) => (v === 'all' ? 'All platforms' : v)}</SelectValue>
<SelectValue>{(v: string) => (v === 'all' ? 'All regions' : v)}</SelectValue>(Alternatively, Base UI's items prop on Select.Root can provide the value→label mapping — either approach is fine, just keep it consistent for all three selects.)
How to verify: open /dashboard/shopping, change each of the three filters, and confirm the closed trigger always shows the human-readable label. Consider grepping for other bare <SelectValue /> usages backed by value≠label options — but keep this PR focused on the Shopping filter bar.
Please follow CONTRIBUTING.md for branch naming and Conventional Commits.
Activity
Sam-syntax35 commentedon Jul 10, 2026
Hi @gkhngyk, could you please assign these issues to me? I've already started working on them, and assigning them will help avoid duplicate PRs. Thanks!