Skip to content

perf: defer asset picker search filtering - #254

Open
restorenode wants to merge 2 commits into
mainfrom
perf/asset-picker-search
Open

perf: defer asset picker search filtering#254
restorenode wants to merge 2 commits into
mainfrom
perf/asset-picker-search

Conversation

@restorenode

@restorenode restorenode commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator

Improve asset picker search responsiveness.

  • Defer search filtering so input updates stay responsive
  • Memoize filtered asset results by assets, search keys, and deferred query
  • Keep default search keys referentially stable
  • Simplify search filtering to a single pass without Ramda helpers

Summary by CodeRabbit

  • Bug Fixes
    • Improved asset search filtering with consistent, case-insensitive matching.
    • Preserved reliable handling when searchable fields have missing values.
  • Performance
    • Improved search responsiveness while entering queries.
    • Reduced unnecessary filtering and rendering when search criteria or available assets remain unchanged.
    • Improved efficiency when displaying asset lists.

Improve asset picker search responsiveness.

- Defer search filtering so input updates stay responsive
- Memoize filtered asset results by assets, search keys, and deferred query
- Keep default search keys referentially stable
- Simplify search filtering to a single pass without Ramda helpers
@coderabbitai

coderabbitai Bot commented Aug 14, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 8c03193e-f955-4337-8406-bee3d81b2ffe

📥 Commits

Reviewing files that changed from the base of the PR and between f3101be and 023fd7c.

📒 Files selected for processing (1)
  • packages/interwovenkit-react/src/components/form/AssetOptions.tsx

Walkthrough

Asset search now uses shared defaults, deferred queries, and memoized filtering. The filtering helper uses native case-insensitive matching with nullish-safe field handling. Asset list rendering is delegated to a memoized component.

Changes

Asset search flow

Layer / File(s) Summary
Search matching implementation
packages/interwovenkit-react/src/components/form/search.ts
filterBySearch uses native case-insensitive matching across requested fields and handles nullish values.
Deferred filtering and asset list rendering
packages/interwovenkit-react/src/components/form/AssetOptions.tsx
AssetOptions uses shared defaults, defers and memoizes asset filtering, and delegates selectable asset rendering to AssetList.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 023fd

This localized performance change is merge-ready after normal checks and review; no actionable merge-blocking risk remains.

Suggested reviewers: simcheolhwan

Poem

A rabbit tunes the search today,
Deferred queries clear the way.
Native matches scan each field,
Memoized lists keep results held.
Assets hop from list to list,
With shared defaults neatly fixed.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main performance change: deferring asset picker search filtering.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch perf/asset-picker-search

Comment @coderabbitai help to get the list of available commands.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 14, 2026

Copy link
Copy Markdown

Deploying interwovenkit-testnet with  Cloudflare Pages  Cloudflare Pages

Latest commit: 023fd7c
Status: ✅  Deploy successful!
Preview URL: https://c4226524.interwovenkit-testnet.pages.dev
Branch Preview URL: https://perf-asset-picker-search.interwovenkit-testnet.pages.dev

View logs

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 14, 2026

Copy link
Copy Markdown

Deploying interwovenkit with  Cloudflare Pages  Cloudflare Pages

Latest commit: 023fd7c
Status: ✅  Deploy successful!
Preview URL: https://123065af.interwovenkit.pages.dev
Branch Preview URL: https://perf-asset-picker-search.interwovenkit.pages.dev

View logs

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 14, 2026

Copy link
Copy Markdown

Deploying interwovenkit-staging with  Cloudflare Pages  Cloudflare Pages

Latest commit: 023fd7c
Status: ✅  Deploy successful!
Preview URL: https://40842e1f.interwovenkit-staging.pages.dev
Branch Preview URL: https://perf-asset-picker-search.interwovenkit-staging.pages.dev

View logs

@simcheolhwan simcheolhwan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The deferred value currently skips only the filtering calculation, while the slow result list still renders on the urgent input path. Requesting changes so the list rendering is deferred as intended.

Comment thread packages/interwovenkit-react/src/components/form/AssetOptions.tsx
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.

2 participants