feat(stream): add search, date range and account filters to the stream - #2836
Open
karlitschek wants to merge 1 commit into
Open
feat(stream): add search, date range and account filters to the stream#2836karlitschek wants to merge 1 commit into
karlitschek wants to merge 1 commit into
Conversation
Adds three optional restrictions to the activity stream, exposed both on the v2 API and in the app UI: - `search` matches the activity's file path, case insensitively - `from`/`to` bound the stream by an inclusive Unix timestamp range - `actor` restricts it to activities authored by one account Backend: validation and normalisation live in a new immutable SearchCriteria value object, so the query builder only ever sees range checked input. Invalid criteria return 400 rather than running a query that cannot answer them. A date range is served by the existing activity_user_time index and an actor by activity_filter_by, so both stay index-ordered; the substring search stays bounded because every stream query is already anchored to a single affecteduser. The active criteria are carried into the pagination Link header so the next page does not silently widen back to the unfiltered stream. Frontend: a filter bar above the feed with a debounced search field, an account picker built from the accounts seen so far, and date range presets alongside a custom range. The criteria are mirrored into the URL so a filtered view can be bookmarked and shared, and the feed grows a filter specific empty state that can clear them again. Signed-off-by: Frank Karlitschek <karlitschek@users.noreply.github.com> Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
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.
Adds three optional restrictions to the activity stream, exposed both on the v2 API and in the app UI:
searchmatches the activity's file path, case insensitivelyfrom/tobound the stream by an inclusive Unix timestamp rangeactorrestricts it to activities authored by one accountBackend: validation and normalisation live in a new immutable SearchCriteria value object, so the query builder only ever sees range checked input. Invalid criteria return 400 rather than running a query that cannot answer them. A date range is served by the existing activity_user_time index and an actor by activity_filter_by, so both stay index-ordered; the substring search stays bounded because every stream query is already anchored to a single affecteduser. The active criteria are carried into the pagination Link header so the next page does not silently widen back to the unfiltered stream.
Frontend: a filter bar above the feed with a debounced search field, an account picker built from the accounts seen so far, and date range presets alongside a custom range. The criteria are mirrored into the URL so a filtered view can be bookmarked and shared, and the feed grows a filter specific empty state that can clear them again.
🤖 AI (if applicable)