Skip to content

Conversation

@dodaa08
Copy link
Contributor

@dodaa08 dodaa08 commented Feb 4, 2026

Proposed changes (including videos or screenshots)

The search text was already debounced, so debouncing the computed options again introduced an extra delay and made the UI feel slow. This change removes the redundant debounce and improves responsiveness without changing behavior.

Screencast.From.2026-02-04.12-12-06.mp4

Issue(s)

Fixes #38006

Steps to test or reproduce

  1. Open any room with threads
  2. Use the thread search
  3. Ensure results update correctly
  4. Verify no delay or regression in behavior
  5. Confirm thread list loads normally

Further comments

Since the search input is already debounced, debouncing the computed options again was redundant. Using useMemo keeps the object stable without introducing unnecessary delays.

Summary by CodeRabbit

  • Bug Fixes
    • Thread list updates and filtering now apply immediately (removed an artificial delay), so changes to search, thread type, unread status, subscription, or room selection are reflected without waiting—improving responsiveness and making thread navigation and filtering feel snappier.

@dodaa08 dodaa08 requested a review from a team as a code owner February 4, 2026 06:45
@dionisio-bot
Copy link
Contributor

dionisio-bot bot commented Feb 4, 2026

Looks like this PR is not ready to merge, because of the following issues:

  • This PR is missing the 'stat: QA assured' label
  • This PR is missing the required milestone or project

Please fix the issues and try again

If you have any trouble, please check the PR guidelines

@changeset-bot
Copy link

changeset-bot bot commented Feb 4, 2026

⚠️ No Changeset found

Latest commit: 3cb9057

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 4, 2026

Walkthrough

Removed a 300ms debounce wrapper around the memoized options in the Threads sidebar. The options value is now computed immediately via useMemo(...) instead of useDebouncedValue(useMemo(...), 300), so it updates as dependencies change without the extra 300ms delay.

Changes

Cohort / File(s) Summary
Thread Search Debounce Removal
apps/meteor/client/views/room/contextualBar/Threads/ThreadList.tsx
Replaced useDebouncedValue(useMemo(...), 300) with direct useMemo(...), removing the secondary 300ms debounce so the options object updates immediately when dependencies change (rid, subscribed, text, tunread, type, uid).

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Suggested labels

area: ui, stat: ready to merge, stat: QA assured

Suggested reviewers

  • dougfabris

Poem

🐰 I nudge the threads awake with a hop and a wink,
No more waiting for options to blink.
Three hundred milliseconds hopped away,
Search quicker now — hip hop hooray! ✨

🚥 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 accurately describes the main change: removing a redundant debounce in thread search to improve responsiveness.
Linked Issues check ✅ Passed The PR directly addresses the primary objective from issue #38006 by removing the redundant 300ms debounce on options, eliminating the double-debounce delay.
Out of Scope Changes check ✅ Passed The changes are limited to the specific debounce removal in ThreadList.tsx and do not include unrelated modifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 1 file

@codecov
Copy link

codecov bot commented Feb 4, 2026

Codecov Report

❌ Patch coverage is 50.00000% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.36%. Comparing base (3ff4730) to head (3cb9057).

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #38485      +/-   ##
===========================================
- Coverage    70.41%   70.36%   -0.05%     
===========================================
  Files         3161     3161              
  Lines       110653   110650       -3     
  Branches     19827    19905      +78     
===========================================
- Hits         77911    77860      -51     
- Misses       30719    30762      +43     
- Partials      2023     2028       +5     
Flag Coverage Δ
e2e 60.33% <0.00%> (-0.07%) ⬇️
e2e-api 47.80% <ø> (+0.01%) ⬆️
unit 71.35% <50.00%> (-0.07%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dougfabris dougfabris added contrib: valid A valid contribution where maintainers will review based on priority area: ui Touches the code on client side labels Feb 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ui Touches the code on client side contrib: valid A valid contribution where maintainers will review based on priority

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Thread search delay due to double debounce and filter switching causes layout inconsistency

2 participants