Skip to content

feat(stream): add search, date range and account filters to the stream - #2836

Merged
CarlSchwan merged 2 commits into
masterfrom
feat/stream-search-and-filters
Aug 10, 2026
Merged

feat(stream): add search, date range and account filters to the stream#2836
CarlSchwan merged 2 commits into
masterfrom
feat/stream-search-and-filters

Conversation

@karlitschek

Copy link
Copy Markdown
Member

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.

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI

@karlitschek
karlitschek requested a review from miaulalala August 1, 2026 15:03
@codecov

codecov Bot commented Aug 1, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.78673% with 11 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/components/ActivityFilterBar.vue 91.57% 7 Missing and 1 partial ⚠️
src/models/ActivityModel.ts 60.00% 1 Missing and 1 partial ⚠️
src/views/ActivityAppFeed.vue 98.50% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@CarlSchwan
CarlSchwan force-pushed the feat/stream-search-and-filters branch from ef2519a to 2db1f60 Compare August 10, 2026 12:26
karlitschek and others added 2 commits August 10, 2026 15:42
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>
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
@CarlSchwan
CarlSchwan force-pushed the feat/stream-search-and-filters branch from 2db1f60 to 4288cd7 Compare August 10, 2026 13:42
@CarlSchwan
CarlSchwan merged commit c5bcac1 into master Aug 10, 2026
56 checks passed
@CarlSchwan
CarlSchwan deleted the feat/stream-search-and-filters branch August 10, 2026 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants