Skip to content

fix(filter): refill list after clearing a deep filter - #318

Closed
itsmunzir wants to merge 1 commit into
thisisgm:mainfrom
itsmunzir:fix/filter-clear-window
Closed

itsmunzir wants to merge 1 commit into
thisisgm:mainfrom
itsmunzir:fix/filter-clear-window

Conversation

@itsmunzir

@itsmunzir itsmunzir commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Clearing a filter after scrolling deep into a folder could leave the list blank until another Escape. Filtering had already reset the viewport to the top while window requests were suppressed; clearing the query did not move it again, so no request replaced the deep held window.

Restart the existing coalesced window check when the filter clears. Extend the headless filter-held suite to cover one-Escape recovery from a deep window in List, Columns and Grid, including every expected viewport slot and its row identity. The production change is confined to List; Columns and Grid already pass this case.

Filtering still covers loaded rows only, as documented in Filter.js. Whole-folder filtering is a separate maintainer decision; this fixes the blank-list symptom in #315, not that scope limitation.

Verification:

  • mise exec [email protected] -- cargo build --locked passed.
  • FLEA_FIXTURE_ROOT=/tmp/oss/flea-fixtures bash tests/filter-held.sh passes. With the same regression on base 4c7b27b, all 30 visible List rows lacked data after Escape; with the fix, every viewport slot has the correct row in all three views.
  • With the same FLEA_FIXTURE_ROOT, bash tests/filter-firstkey.sh, bash tests/columnsfilter.sh and bash tests/listnarrow.sh passed.
  • bash tests/js.sh filter passed: 84 checks.
  • tools/flea-file-budget passed.
  • FLEA_FIXTURE_ROOT=/tmp/oss/flea-fixtures mise exec [email protected] -- cargo test --locked passed: 2,954 passed, 2 ignored.
  • FLEA_FIXTURE_ROOT=/tmp/oss/flea-fixtures bash tests/startup-objects.sh fails its existing 605-object ceiling at 722 on both base and this branch. No objects or units are added; the source-byte pins account for the two new List lines.

Refs #315

Summary by CodeRabbit

  • Bug Fixes
    • Clearing a filter while viewing a deep section now refreshes the unfiltered rows without requiring another scroll or Escape.
    • Filtered rows remain visible while narrowing a search, and one Escape restores the full results with current row data. The viewport stays populated with live rows after clearing.
  • Tests
    • Expanded coverage for deep-window filtering and clearing in list, columns, and grid views, including checks that rows remain visible and refresh correctly.

@coderabbitai

coderabbitai Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 32cd441e-8f2a-46f9-9015-35ab48c4f1ad
📥 Commits

Reviewing files that changed from the base of the PR and between 5f80d3f and 99f9fc6.

📒 Files selected for processing: 3
  • AGENTS.md
  • tests/startup-units-off.txt
  • tests/startup-units.txt
🚧 Files skipped from review as they are similar to previous changes: 2
  • tests/startup-units-off.txt
  • tests/startup-units.txt

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review.

📝 Walkthrough

When filterQuery becomes empty, ui/List.qml restarts coalesce. The held-filter test covers deep-window filtering and one-Escape viewport refill in list, columns, and grid.

Changes: Deep-window filter clearing

Layer / File(s) Summary
Restart coalesce on filter clear
ui/List.qml, tools/flea-file-budget, tests/startup-units*.txt, AGENTS.md
Clearing filterQuery now restarts coalesce. The recorded line ceiling, startup byte totals, and behavior documentation are updated.
Test deep-window refill
tests/filter-held.qml, tests/filter-held.sh
The test covers narrowing to a deep row and clearing the filter with one Escape in list, columns, and grid. It checks restored rows and live viewport delegates, and requires three clear results and a successful runner exit.

Priority: ➖ Normal

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

Change: Bug fix

Suggested reviewers: thisisgm

Merge Risk: ⚪ Minimal · up to 99f9f

Clearing a filter after deep scrolling restarts List’s viewport refill, addressing the blank-list symptom. The supplied test coverage spans List, Columns, and Grid, and no concrete merge-blocking concern remains.

Pre-merge checks: Passed 5
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 change: refilling the list after clearing a deep filter.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
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.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1 files. (3 skipped: 3 unsupported.)

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@itsmunzir
itsmunzir force-pushed the fix/filter-clear-window branch from 5f80d3f to 99f9fc6 Compare October 18, 2026 18:21
@thisisgm

thisisgm commented Nov 3, 2026

Copy link
Copy Markdown
Owner

Filtering missed names outside the held rows and clearing a deep filter could leave the list blank. Clearing a deep filter restores the listing (5547c9fe75, v0.4.0). Thanks @itsmunzir! Release.

@thisisgm thisisgm closed this Nov 3, 2026
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