Skip to content

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

Open
karlitschek wants to merge 1 commit into
masterfrom
feat/stream-search-and-filters
Open

feat(stream): add search, date range and account filters to the stream#2836
karlitschek wants to merge 1 commit 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

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>
@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!

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.

1 participant