Add streaming support to filter list + counter#1
Merged
Conversation
FilterList now displays a match/total counter below the input. The counter is backed by an internal counterC component that renders via pointer indirection with zero allocations per frame. Filter gains appended() for O(k) incremental updates and refresh() for full re-evaluation, preparing the groundwork for streaming item insertion.
StreamWriter provides a managed write interface for appending items into a FilterList from a goroutine. Each Write triggers an incremental filter update and render signal. A spinner animates next to the counter while the stream is active. Includes tests for write, filtered write, lifecycle, counter updates, and a benchmark across 100–10k items.
themastersheep
force-pushed
the
master
branch
from
February 26, 2026 12:03
f0dd96f to
82992ed
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When using a filter there is no counter to surface how many items there are in the list (in total nor visible/filtered).
It is also not possible, with the filtered list to "stream" results in whilst displaying the UI as soon as possible rather than await a full content fetch.
Solution
FilterListgains aStreamWriterthat lets callers append items from a goroutine. Each write triggers an incremental O(k) filter update and render signal, so the list stays responsive regardless of total size.appended()for incremental index updates andrefresh()for full re-evaluation, backing theStreamWriterworkflow.Changes