Skip to content

feat: searchable user selector for report per-user page#62

Merged
kennhung merged 2 commits into
mainfrom
feature/searchable-user-selector
Jun 30, 2026
Merged

feat: searchable user selector for report per-user page#62
kennhung merged 2 commits into
mainfrom
feature/searchable-user-selector

Conversation

@kennhung

Copy link
Copy Markdown
Member

Summary

  • Extract a shared UserCombobox component (src/components/UserCombobox.tsx) wrapping Chakra UI's Combobox.Root with useFilter + useListCollection for search-as-you-type filtering
  • Replace the non-searchable Select.Root in /report/user (UserReportContent.tsx) with <UserCombobox> — users can now search by name
  • Replace the inline Combobox.Root in the logs page filter (LogsTable.tsx) with the same shared component — behaviour unchanged

Test plan

  • Visit /report/user — user selector should be a searchable combobox; typing a partial name filters the list
  • Visit /logs — user filter combobox works identically to before
  • TypeScript: npx tsc --noEmit passes with no errors

🤖 Generated with Claude Code

kennhung and others added 2 commits June 30, 2026 23:55
… searchable

Replaces the non-searchable Select.Root in the report/user page with a
shared UserCombobox component (Chakra Combobox.Root + useFilter) that
mirrors the searchable pattern already used on the logs page. Cleans up
the inline combobox in LogsTable.tsx to use the same component.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Memoize users array in LogsTable to prevent useEffect firing set()
  on every render, which was clearing the user's in-progress search text
- Restore minWidth="44" on UserReportContent's UserCombobox to match
  the old Select.Root's minimum width constraint
- Add emptyText prop to UserCombobox so callers can pass translated
  strings; wire LogsPage with next-intl and add zh-TW translation

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@kennhung kennhung merged commit ee5c4c8 into main Jun 30, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant