Skip to content

feat(results): structured filtering & toolbar, extended recommend schema, unified action feedback - #58

Merged
chake111 merged 1 commit into
mainfrom
codex/expand-recommendation-data-fields
Apr 20, 2026
Merged

chake111 merged 1 commit into
mainfrom
codex/expand-recommendation-data-fields

Conversation

@chake111

Copy link
Copy Markdown
Owner

Motivation

  • Provide richer recommendation metadata so the UI can filter, sort and surface targeted guidance (fitReasons, bestFor, limitations, confidenceScore).
  • Replace fragile string includes matching with structured signals to enable reliable filters (pricing/skill/Chinese support) and stable sorting behavior.
  • Make favorite / compare / visit interactions present consistent transient feedback and tracking for better UX and telemetry.

Description

  • Extend the recommendation item shape with fitReasons, bestFor, limitations and confidenceScore and populate them in the API output with reasonable fallbacks and a normalizeConfidence rule (ui/lib/recommend.ts, ui/app/api/recommend/route.ts).
  • Refactor use-search-flow to build a typed DisplayItem (adds pricingType, skillLevel, chineseSupport, confidenceScore, fitReasons, bestFor, limitations), switch filtering from text includes to structured predicates, and add sorting + clearConditions API (ui/hooks/use-search-flow.ts).
  • Add a reusable ResultsToolbar component that exposes filter buttons, a sort select and a clear action, and integrate it into the results list (ui/components/results/results-toolbar.tsx, ui/components/results/results-list.tsx).
  • Update results list and results page to use the new toolbar, wire up sorting/filtering/clearing, and unify card actions so favorite/compare/visit show a short-lived "done" feedback state, toast messages and tracking calls (ui/components/results/results-list.tsx, ui/app/[locale]/results/page.tsx).
  • Add i18n entries for toolbar labels and visited state in both ui/messages/en.json and ui/messages/zh.json.

Testing

  • Ran type checking with cd ui && npm run typecheck, which passed successfully.
  • Ran lint with cd ui && npm run lint, which fails in this environment due to a missing ESLint flat config (this is an existing repo config issue and not introduced by these changes).

Codex Task

@vercel

vercel Bot commented Apr 20, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ai-tool-picker Ready Ready Preview, Comment Apr 20, 2026 0:47am

@chake111
chake111 merged commit 25b3117 into main Apr 20, 2026
2 of 3 checks passed

This branch was successfully deployed

1 active deployment
Preview dea1ea8c Deployed Apr 20, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant