Skip to content

[ATLAS-397] Enhancement: input debounce for library and browse - #398

Open
codeon89 wants to merge 2 commits into
towerwatchman:nightlyfrom
codeon89:atlas/397/search-input-performance-enhancement
Open

codeon89 wants to merge 2 commits into
towerwatchman:nightlyfrom
codeon89:atlas/397/search-input-performance-enhancement

Conversation

@codeon89

@codeon89 codeon89 commented Aug 30, 2026

Copy link
Copy Markdown

What this changes

Apply search input debouncing for Library and Browse mode. Typing should stays smooth and responsive instad of lag due to refresh, or re-rendering, while filtering/fetching waits for the user to pause. Clicking clear immediately resets the list without waiting. Remove the existing fetch debounce in browse mode that will cause duplicate delay when this new change come in.

Why

#397

Updating activeFilters.text on every single keystroke was triggering a full filter pass in the Library (and queueing catalog API requests in Browse) for every character typed. On larger libraries, this caused input lag and visible UI stuttering as the catalog re-fetched and cleared grid views. Moving the debounce logic before setActiveFilters via a shared hook fixes the delay without dropping input state.

How it was tested

  • Added tests that cover this change
  • For a fix: the regression test fails against the unfixed code
  • npm run check passes locally
  • New functions and IPC handlers have comments explaining why
  • CHANGELOG.md updated
  • This PR targets nightly, not main

AI assistance

  • No AI was used on this change
  • AI was used on this change

Tool and model: VSCode auto free

What it wrote: src/hooks/useDebouncedSearch.js hook (handles input state and reset signal), search component wiring in SearchBox.jsx and SearchSidebar.jsx, App.jsx signal routing, CHANGELOG.md entries, and the regression tests in tests/search-debounce.test.jsx.

What you verified yourself:
Manually tested search behavior on the client to confirm input responsiveness, verified that clearing resets instantly, and confirmed all regression tests pass.

@codeon89 codeon89 changed the title enhancement: input debounce for library and browse [ATLAS-397] Enhancement: input debounce for library and browse Aug 30, 2026
@codeon89

Copy link
Copy Markdown
Author

Closing this for now as the existing behavior is not behaving too bad with the current database. The new change will add some complexity while it is not required for the current performance. Previous test issue was based in dev mode with console on.

@codeon89 codeon89 closed this Aug 31, 2026
@codeon89 codeon89 reopened this Aug 31, 2026
@codeon89

Copy link
Copy Markdown
Author

Originally close this as when i test original it stopped happening but I noticed the issue surface again after browsing for a while, so re-opening this.

@codeon89
codeon89 marked this pull request as draft August 31, 2026 00:42
@codeon89

Copy link
Copy Markdown
Author

Still couldn't reproduce it, only got by chance, but it feels like I didn't trigger any yet when in packaged app, but does when in dev mode (console close) somehow. Closing this again for now.

@codeon89 codeon89 closed this Aug 31, 2026
@codeon89

codeon89 commented Sep 1, 2026

Copy link
Copy Markdown
Author

This really keeps happening to me, especially when you keep having wishlist / other tag filter. Plus from the logic stand point it makes sense (the downside is extra complexity but if it's what needed I think it's worth) so I am reopening this again 🙆

@codeon89 codeon89 reopened this Sep 1, 2026
@codeon89
codeon89 marked this pull request as ready for review September 1, 2026 21:08
codeon89 added a commit to codeon89/Atlas-Patched that referenced this pull request Sep 1, 2026
@codeon89
codeon89 marked this pull request as draft September 4, 2026 18:21
@codeon89
codeon89 marked this pull request as ready for review September 7, 2026 00:32
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