Skip to content

feat: add quick search filter for database rows by title (#732)#905

Merged
sw-factory-automations merged 1 commit intomainfrom
feat/732-database-search-filter
May 6, 2026
Merged

feat: add quick search filter for database rows by title (#732)#905
sw-factory-automations merged 1 commit intomainfrom
feat/732-database-search-filter

Conversation

@sw-factory-automations
Copy link
Copy Markdown
Collaborator

Closes #732

What

Adds a search input to the database toolbar that client-side filters rows by case-insensitive title substring match. Works across all view types (table, board, list, calendar, gallery) and combines with existing filters using AND logic.

How

  • DatabaseSearchInput — new component with magnifying glass icon, placeholder "Search...", clear button, and Escape-to-clear keyboard support.
  • database-view-client.tsx — added local search state keyed to activeViewId (resets on view switch). Search filtering is applied as a useMemo step after the existing displayedRows from useDatabaseFilters, producing searchFilteredRows passed to all views.
  • The hasActiveFilters prop passed to views now includes search state, so empty-state messages correctly reflect when search is active.
  • Search state is local only — not persisted to view config.

Testing

  • E2E: e2e/database-search.spec.ts — 2 tests covering search filtering by title (case-insensitive), clear behavior, and reset on view switch.
  • Storybook: database-search-input.stories.tsx — 4 stories (Empty, WithValue, Interactive, InToolbar) with visual regression baselines.
  • pnpm lint && pnpm typecheck && pnpm test pass (0 errors, 128 Vitest files / 1742 tests).
  • E2E search tests pass.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 6, 2026

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

Project Deployment Actions Updated (UTC)
memo Ready Ready Preview, Comment May 6, 2026 0:55am

Request Review

@sw-factory-automations sw-factory-automations merged commit aeacd2d into main May 6, 2026
6 checks passed
@sw-factory-automations sw-factory-automations deleted the feat/732-database-search-filter branch May 6, 2026 13:03
@sw-factory-automations
Copy link
Copy Markdown
Collaborator Author

✅ UI verification passed — design spec compliance confirmed.

Static analysis — all checks pass:

Check Result
Color tokens ✅ All colors use CSS variables (text-muted-foreground, text-foreground, bg-background, border-border)
Typography text-xs for toolbar input — consistent with design scale
Spacing ✅ Tailwind scale only (left-2, pl-7, pr-7, gap-1, p-2) — no arbitrary values
Component usage ✅ Custom compact input appropriate for toolbar context
Button variants ✅ Clear button uses ghost-style text-muted-foreground hover:text-foreground
Transitions transition-colors on focus — no decorative animations
Accessibility aria-label on input and clear button, Escape-to-clear keyboard support
Dark mode ✅ All token variables, no hardcoded colors
Borders border-transparent default, focus:border-border — sharp corners, no shadows
Responsive ✅ Mobile toolbar wraps naturally, no horizontal overflow

Storybook visual regression — 4 new DatabaseSearchInput baselines committed and passing (Empty, WithValue, Interactive, InToolbar). No regressions to existing stories from this PR.

Live site vs Storybook — Component renders identically in both contexts. No layout constraints, CSS cascade overrides, or integration issues. Search input sits naturally in the toolbar flex container alongside Sort/Filter/Export.

Live site screenshots (desktop dark + mobile 375px) — Search input visible and functional. Empty state shows placeholder, active state shows border + clear button. Mobile layout correct with no overflow.

@sw-factory-automations
Copy link
Copy Markdown
Collaborator Author

✅ Post-merge verification passed.

E2E test suite (against https://memo.software-factory.dev):

  • ~140 tests run, ~138 passed
  • 1 pre-existing flaky failure: database-csv-export › user can export a database as CSV via the toolbar button — this test was not modified by this PR and fails on a row-creation timing issue unrelated to the search feature
  • 1 transient failure: database-table-editor-portal › date picker calendar — passed on retry (flaky)
  • New database-search.spec.ts tests (2/2) passed

Ad-hoc smoke tests:

  • ✅ Landing page — loads, has title
  • ✅ Sign-in page — loads, email input present
  • ✅ Health endpoint — returns OK
  • ✅ Authenticated flow — login succeeds, workspace loads
  • Skipped: /dashboard (not yet built), editor route (no named pages in sidebar)

Interaction smoke test (database search feature):

  • ✅ Search input renders on database page with magnifying glass icon
  • ✅ Typing in search input works (accepts and displays text)
  • ✅ Clear button (X) clears the input
  • ✅ Escape key clears the input
  • ✅ No layout overflow or clipping
  • ✅ No console errors during interaction

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.

feat: add quick search filter for database rows by title

1 participant