Skip to content

Filter Activity by actor - #871

Merged
mariusvniekerk merged 1 commit into
mainfrom
activity-mine-filter
Aug 13, 2026
Merged

Filter Activity by actor#871
mariusvniekerk merged 1 commit into
mainfrom
activity-mine-filter

Conversation

@wesm

@wesm wesm commented Aug 10, 2026

Copy link
Copy Markdown
Member

Busy Activity feeds make it hard to isolate one person's work. This adds an Actor typeahead that filters by the person shown on each activity event. Candidates stay scoped to the tracked repositories and selected time range, so unrelated feed filters do not make selector choices disappear.

On phones, Activity controls sit behind a compact Filters disclosure. The summary keeps the selected actor visible without adding another permanent control row.

@roborev-ci

roborev-ci Bot commented Aug 10, 2026

Copy link
Copy Markdown

roborev: Combined Review (5bbc30f)

Code changes are generally sound, but two medium-severity frontend state issues should be fixed before merging.

Medium

  • frontend/src/lib/stores/activity.svelte.ts:345 — Changing the repository or time range retains author candidates from the previous scope and caches the new scope before the request succeeds. A failed request therefore exposes stale candidates and prevents ordinary reloads from retrying. Clear candidates on scope changes, and cache the scope only after success or invalidate it on failure. Add coverage for scope change, failure, and recovery.

  • frontend/src/lib/stores/router.svelte.ts:538author is missing from RESTORABLE_ACTIVITY_FILTER_PARAMS, so a partial Activity URL drops the session-selected author despite the filter being URL-backed and session-scoped. Add author and test that partial routes inherit it while explicit URL values take precedence.


Reviewers: 2 done | Synthesis: codex, 10s | Total: 7m56s

@roborev-ci

roborev-ci Bot commented Aug 10, 2026

Copy link
Copy Markdown

roborev: Combined Review (c031bc5)

Medium-severity issue found in the author filter selection handling.

Medium

  • frontend/src/lib/stores/activity.svelte.ts:191 — Case-insensitive candidate matching can suppress the selected spelling. For example, authorFilter="Alice" with candidate "ALICE" gives Typeahead a value absent from its options, causing an inconsistent displayed selection while the feed remains filtered.
    • Fix: Preserve the selected spelling in the matching option, or canonicalize authorFilter and its URL value to the returned candidate.

Reviewers: 2 done | Synthesis: codex, 10s | Total: 9m53s

@roborev-ci

roborev-ci Bot commented Aug 10, 2026

Copy link
Copy Markdown

roborev: Combined Review (29b853c)

The change is generally sound, but mobile author filtering lacks end-to-end coverage.

Medium

  • Missing phone-specific E2E coveragefrontend/tests/e2e-full/mobile-routes.spec.ts:150
    The desktop test exercises the API, but the mobile unit test remounts after selection and cannot catch failures involving filter disclosure, reactive chip rendering, clearing, or mobile overlay geometry. Add a phone-profile Playwright flow that opens Filters, selects an author, verifies the filtered request/results and URL, clears the summary chip, and checks for overflow.

Reviewers: 2 done | Synthesis: codex, 10s | Total: 8m22s

@roborev-ci

roborev-ci Bot commented Aug 10, 2026

Copy link
Copy Markdown

roborev: Combined Review (4f7d121)

One medium-severity issue found: author candidates can become stale after activity refreshes.

Medium

  • frontend/src/lib/stores/activity.svelte.ts:349 — Successful author candidates are cached indefinitely for the same repository/range. data_changed refreshes call reconcileActivityEffect() without forcing candidates to reload, so new feed actors may remain absent from the author picker until a full sync or scope change. Refresh or invalidate candidates during application-owned activity reconciliation, and add a full-stack test covering a new actor introduced by data_changed.

Reviewers: 2 done | Synthesis: codex, 10s | Total: 12m23s

@roborev-ci

roborev-ci Bot commented Aug 10, 2026

Copy link
Copy Markdown

roborev: Combined Review (bf7c073)

Medium-severity issue found in author refresh concurrency handling.

Medium

  • frontend/src/lib/stores/activity.svelte.ts:345 — The author refresh runs inside the fail-fast Effect.all at line 466. If a foreground activity load supersedes reconciliation, reconcileRead fails and interrupts the author request. Because interruption bypasses Effect.catch, authorsLoading remains true and authorScopeKey stays cached, causing subsequent same-scope loads to skip refreshing and leaving the picker stale or loading indefinitely.
    • Fix: Decouple author refresh from fallible reconciliation, or handle interruption by clearing the loading state and scope key and scheduling a retry. Add a concurrency test where a foreground load supersedes reconciliation while the author request is pending.

Reviewers: 2 done | Synthesis: codex, 11s | Total: 6m36s

@roborev-ci

roborev-ci Bot commented Aug 10, 2026

Copy link
Copy Markdown

roborev: Combined Review (9c316bf)

No issues found.


Reviewers: 2 done | Synthesis: codex | Total: 10m31s

@mariusvniekerk

Copy link
Copy Markdown
Collaborator

AFAIK this should not necessarily be needed since author should be just one of the things the filter search bar does already?

@wesm

wesm commented Aug 10, 2026

Copy link
Copy Markdown
Member Author

The filter search box matches more broadly than author, so it currently isn't possible to just see "my PRs"

@wesm

wesm commented Aug 10, 2026

Copy link
Copy Markdown
Member Author

UI/UX here is not good, trying to fix

@roborev-ci

roborev-ci Bot commented Aug 10, 2026

Copy link
Copy Markdown

roborev: Combined Review (ca50c9d)

Code is clean with no findings at Medium severity or above.


Reviewers: 2 done | Synthesis: codex, 8s | Total: 7m49s

@roborev-ci

roborev-ci Bot commented Aug 10, 2026

Copy link
Copy Markdown

roborev: Combined Review (850e5b8)

The change is sound overall, but outdated Playwright selectors will break several full-stack activity tests.

Medium

  • Outdated activity filter selectors in full-stack tests
    Locations: frontend/tests/e2e-full/activity-live-refresh.spec.ts:92; activity-drawer.spec.ts:618,1168; activity-notifications.spec.ts:27; activity-threaded-sticky.spec.ts:9
    Several tests still target the removed FilterDropdown selectors or the former "Author Anyone" trigger. They will time out or interact with an unrelated dropdown. Update them to open .activity-filters__trigger, scope interactions to .activity-filters__panel and .activity-filters__item, and open the nested "Filter authors" control before locating author options.

Reviewers: 2 done | Synthesis: codex, 10s | Total: 6m39s

@roborev-ci

roborev-ci Bot commented Aug 10, 2026

Copy link
Copy Markdown

roborev: Combined Review (0472d90)

Medium-severity issues remain in author filtering and candidate refresh behavior.

Medium

  • internal/db/queries_activity.go:82 — The author predicate filters the event actor rather than the PR/issue author displayed in threaded rows. Alice’s comment on Bob’s PR appears under Alice, while Alice’s PR with only recent activity from Bob disappears, so this cannot reliably provide a “my PRs” view.

    • Fix: Filter item-scoped activity by item_author, derive candidates from item authors associated with in-window activity, and add threaded coverage for older PRs with recent activity.
  • frontend/src/lib/stores/activity.svelte.ts:561 — Polling refreshes and prunes feed items without refreshing author candidates. New actors recovered through polling remain absent from the picker, while authors whose activity ages out remain listed.

    • Fix: Force-refresh candidates when polling adds or replaces items and during periodic full refreshes, with coverage for polling-based candidate reconciliation.

Reviewers: 2 done | Synthesis: codex, 10s | Total: 15m36s

@roborev-ci

roborev-ci Bot commented Aug 10, 2026

Copy link
Copy Markdown

roborev: Combined Review (55b6b7e)

The changes are generally sound, but two medium-severity issues could leave the author picker stuck and allow a false-positive e2e test.

Medium

  • frontend/src/lib/stores/activity.svelte.ts:466 — The fail-fast Effect.all can interrupt the author request when activity reconciliation fails or is superseded. Because interruption bypasses Effect.catch, authorsLoading remains true and authorScopeKey stays cached, causing ordinary retries to skip the request and potentially leaving the author picker stuck loading.

    • Fix: Add an interruption-safe finalizer that clears loading and invalidates the matching request scope, or isolate author refresh from the reconciliation effect’s failure lifecycle. Add a concurrent supersession/failure test.
  • frontend/tests/e2e-full/mobile-routes.spec.ts:325 — The repository-filter matcher also accepts /api/v1/activity/authors, which uses the same repo parameter. Since both requests run concurrently and the test does not verify filtered feed contents, it can pass without observing the activity-feed request.

    • Fix: Parse the URL and require pathname === "/api/v1/activity" with the expected repo value, then assert that the rendered activity belongs to the selected repository.

Reviewers: 2 done | Synthesis: codex, 13s | Total: 6m12s

@roborev-ci

roborev-ci Bot commented Aug 10, 2026

Copy link
Copy Markdown

roborev: Combined Review (56bfd80)

The PR has one medium-severity issue in author-filtered activity scoping.

Medium

  • internal/server/huma_routes.go:1232 — Author-filtered activity is limited to 5,001 rows before untracked repositories are removed. A retained untracked repository with enough recent activity from the selected author can consume the SQL window, hiding valid tracked-repository activity and incorrectly reporting the result as uncapped.
    • Fix: Pass the tracked repository scope into ListActivity and apply it in SQL before ordering and limiting, consistent with ListActivityAuthors.

Reviewers: 2 done | Synthesis: codex, 10s | Total: 10m52s

@roborev-ci

roborev-ci Bot commented Aug 10, 2026

Copy link
Copy Markdown

roborev: Combined Review (db201d2)

The PR is generally sound, but one medium-severity cache invalidation issue should be addressed.

Medium

  • Stale author candidatesfrontend/src/lib/stores/activity.svelte.ts:350
    Author candidates are cached only by repository and range. Returning to Activity after background updates—or receiving changes through polling—reloads the feed without refreshing authors, so newly active authors may be missing and expired authors may remain indefinitely. Invalidate or age the candidate cache, or force-refresh candidates when Activity mounts and when polling detects or refetches activity.

Reviewers: 2 done | Synthesis: codex, 11s | Total: 10m25s

@roborev-ci

roborev-ci Bot commented Aug 10, 2026

Copy link
Copy Markdown

roborev: Combined Review (c9d469a)

Overall verdict: One medium-severity accessibility issue; no security vulnerabilities identified.

Medium

  • frontend/src/lib/components/ActivityFilters.svelte:165 — Filter selection state is communicated only visually, while the checkmark is aria-hidden. Assistive technologies cannot determine the selected view/range or enabled filters. Add aria-pressed to toggles and use radio-group/radio semantics for mutually exclusive options.

Reviewers: 2 done | Synthesis: codex, 10s | Total: 9m26s

@roborev-ci

roborev-ci Bot commented Aug 10, 2026

Copy link
Copy Markdown

roborev: Combined Review (098bed8)

The Activity author filter has one medium-severity semantic bug; no material security issues were found.

Medium

  • internal/db/queries_activity.go:89 — Filter targets event actors instead of parent-item authors. Selecting Alice includes Alice’s activity on other authors’ PRs/issues while excluding other contributors’ activity on Alice’s items, so it does not produce the intended “my PRs” view. Candidate values also include event and commit actors.
    • Fix: Filter PR/issue rows by item_author and derive candidates from parent-item authors, or relabel the feature explicitly as an actor filter.

Reviewers: 2 done | Synthesis: codex, 10s | Total: 8m6s

@wesm wesm changed the title Filter Activity by author Filter Activity by actor Aug 10, 2026
@roborev-ci

roborev-ci Bot commented Aug 10, 2026

Copy link
Copy Markdown

roborev: Combined Review (d7b591c)

Code is clean: no Medium, High, or Critical findings were identified.


Reviewers: 2 done | Synthesis: codex, 6s | Total: 7m15s

@wesm
wesm force-pushed the activity-mine-filter branch from d7b591c to 7a5ca5d Compare August 10, 2026 21:03
@roborev-ci

roborev-ci Bot commented Aug 10, 2026

Copy link
Copy Markdown

roborev: Combined Review (7a5ca5d)

No Medium, High, or Critical issues found.


Reviewers: 2 done | Synthesis: codex, 7s | Total: 8m46s

@roborev-ci

roborev-ci Bot commented Aug 11, 2026

Copy link
Copy Markdown

roborev: Combined Review (61e2ef7)

Verdict: One medium-severity UI issue should be fixed; no security regression was found.

Medium

  • frontend/src/lib/components/ActivityFeed.svelte:997container-type: inline-size makes the feed a containing block for the fixed-position Filters panel, while overflow: hidden clips it. In split or narrow panes, the popover cannot extend beyond the activity rail, and its viewport-based coordinates may be offset.
    • Fix: Portal the panel outside the feed, or move/remove the query container so it is not an ancestor of the fixed overlay.

Reviewers: 2 done | Synthesis: codex, 10s | Total: 9m58s

@wesm
wesm force-pushed the activity-mine-filter branch from 61e2ef7 to 3f9b504 Compare August 11, 2026 03:05
@roborev-ci

roborev-ci Bot commented Aug 11, 2026

Copy link
Copy Markdown

roborev: Combined Review (3f9b504)

No Medium, High, or Critical findings; the reviewed changes are clean at the requested severity threshold.


Reviewers: 2 done | Synthesis: codex, 9s | Total: 11m46s

@wesm
wesm force-pushed the activity-mine-filter branch from 3f9b504 to 21066f7 Compare August 11, 2026 13:27
@roborev-ci

roborev-ci Bot commented Aug 11, 2026

Copy link
Copy Markdown

roborev: Combined Review (21066f7)

Changes requested: one medium-severity pagination bug can drop workspace activity enrichment when filtering by author.

Medium

  • internal/server/huma_routes.go:1291 — Paginated polling fetches the full provider-event set for workspace matching only when search is active. With an author filter and after timestamp, existing matching workspace subjects lose their activity enrichment when no newer event by that actor is returned. Treat either filter as requiring the unpaginated query: (opts.Search != "" || opts.Author != "") && opts.AfterTime != nil, and add a polling/pagination regression test.

Reviewers: 2 done | Synthesis: codex, 10s | Total: 10m30s

@roborev-ci

roborev-ci Bot commented Aug 11, 2026

Copy link
Copy Markdown

roborev: Combined Review (0e9076f)

One medium-severity issue should be addressed before merging.

Medium

  • frontend/src/lib/components/ActivityFeed.svelte:1008container-type: inline-size establishes containment on the overflow-hidden feed, so the descendant fixed-position filter panel cannot reliably escape the activity rail. Its viewport-based coordinates may be offset, clipping or mispositioning the popover in split view.
    • Fix: Portal the panel to document.body through the shared overlay primitive, or remove containment from its ancestor chain.

Reviewers: 2 done | Synthesis: codex, 10s | Total: 11m48s

@wesm
wesm force-pushed the activity-mine-filter branch from 0e9076f to 4bd4645 Compare August 11, 2026 16:56
@roborev-ci

roborev-ci Bot commented Aug 11, 2026

Copy link
Copy Markdown

roborev: Combined Review (4bd4645)

Two medium-severity issues require attention before merge.

Medium

  • frontend/src/lib/stores/activity.svelte.ts:354 — A same-scope foreground load skips author refresh while the matching request is in flight. If reconciliation supersedes it, Effect.all interrupts the request and clears authorScopeKey, leaving stale or empty candidates until a later poll or manual refresh. Give author reads latest-wins/single-flight ownership, or force a replacement author read for foreground full loads.

  • frontend/src/lib/components/ActivityFilters.svelte:88 — Opening the body-portalled popover leaves focus on the trigger, so Tab navigation continues through the underlying page instead of entering the panel. The custom radio groups also lack roving focus and arrow-key behavior. Use an accessible popover/radio-group primitive, or explicitly manage initial focus, containment, restoration, and radio keyboard navigation with browser coverage.


Reviewers: 2 done | Synthesis: codex, 15s | Total: 15m1s

@roborev-ci

roborev-ci Bot commented Aug 12, 2026

Copy link
Copy Markdown

roborev: Combined Review (fadb0ef)

The changes are generally sound, but two medium-severity correctness issues should be addressed.

Medium

  • Popover keyboard navigation closes unexpectedlyfrontend/src/lib/components/ActivityFilters.svelte:194
    Arrow/Home/End navigation calls select(), which honors closeOnSelect. Since the View, Time range, and Grouping radio items enable that flag, the first navigation keystroke closes the popover instead of maintaining roving focus. Keep the popover open during radio navigation, focus the newly selected item after updating, and add coverage with closeOnSelect: true.

  • Repository scoping can race with renamesinternal/server/huma_routes.go:1285
    The monitored-repository SQL scope is captured from mutable owner/path routes before acquiring the repository-reconciliation lock. A concurrent rename can leave AllowedRepoFilters using the old route while the query sees the updated catalog route, temporarily hiding valid Activity rows. /activity/authors uses the same route-based scope without the lock. Scope repository-owned rows by stable internal repository IDs and capture that scope under the same reconciliation fence as the queries.


Reviewers: 2 done | Synthesis: codex, 13s | Total: 6m25s

@roborev-ci

roborev-ci Bot commented Aug 12, 2026

Copy link
Copy Markdown

roborev: Combined Review (f24d746)

Medium-severity issue found in modal interaction handling; no security regressions identified.

Medium

  • frontend/src/lib/components/ActivityFilters.svelte:56 — The focus-trapping popover does not register with the app’s modal stack. Global shortcuts such as Ctrl/Cmd+K can therefore open a competing modal while the filter panel is active, and split-view Escape handling cannot detect the overlay.
    • Fix: Push a modal-stack frame while the panel is open and remove it when it closes. Add a full-app test confirming that the filter panel owns global shortcuts and Escape behavior while active.

Reviewers: 2 done | Synthesis: codex, 8s | Total: 10m49s

@roborev-ci

roborev-ci Bot commented Aug 12, 2026

Copy link
Copy Markdown

roborev: Combined Review (923b644)

Code review passed with no Medium, High, or Critical findings.


Reviewers: 2 done | Synthesis: codex, 9s | Total: 10m26s

@wesm
wesm force-pushed the activity-mine-filter branch from 923b644 to 5608cda Compare August 12, 2026 17:59
@roborev-ci

roborev-ci Bot commented Aug 12, 2026

Copy link
Copy Markdown

roborev: Combined Review (5608cda)

No Medium, High, or Critical findings; the reviewed changes are clean at the requested severity threshold.


Reviewers: 2 done | Synthesis: codex, 9s | Total: 10m35s

@mariusvniekerk mariusvniekerk self-assigned this Aug 12, 2026
@wesm

wesm commented Aug 12, 2026

Copy link
Copy Markdown
Member Author

Tested this out, it works but it does not filter based on the top-level Threaded author like I want

@wesm
wesm force-pushed the activity-mine-filter branch from 5608cda to de50a08 Compare August 12, 2026 22:05
@roborev-ci

roborev-ci Bot commented Aug 12, 2026

Copy link
Copy Markdown

roborev: Combined Review (de50a08)

The author filtering is secure and correctly scoped, but workspace-only authors are missing from suggestions.

Medium

  • internal/server/huma_routes.go:1534 — Author candidates come only from persisted provider activity. Threaded and Mobile Activity can also display eventless workspace subjects with recent workspace activity in the selected range, so those authors never appear in the typeahead and cannot be selected.
    • Fix: Merge authors from the workspace subject snapshot using the same repository and time scopes, deduplicate case-insensitively, and add full-stack coverage for a workspace-only subject.

Reviewers: 2 done | Synthesis: codex, 8s | Total: 15m6s

Busy Activity feeds make it hard to follow one person's work. Match GitHub's author qualifier by filtering on parent pull request and issue authors while preserving their child activity.

- Keep author choices scoped to the current tracked repositories and time range.
- Include workspace-only subjects that Threaded and Mobile Activity can display.
- Preserve URL-backed filter state across desktop, mobile, and workspace polling.
- Keep the filter overlay keyboard accessible and isolated from global shortcuts.
- Exclude child event actors and branch commit authors from author suggestions.

Generated with Codex
Co-authored-by: Codex <noreply@openai.com>
@wesm
wesm force-pushed the activity-mine-filter branch from de50a08 to 5febb9d Compare August 12, 2026 23:20
@roborev-ci

roborev-ci Bot commented Aug 12, 2026

Copy link
Copy Markdown

roborev: Combined Review (5febb9d)

Code review passed: no Medium, High, or Critical findings.


Reviewers: 2 done | Synthesis: codex, 8s | Total: 12m34s

@mariusvniekerk
mariusvniekerk merged commit 62a87b4 into main Aug 13, 2026
17 checks passed
@mariusvniekerk
mariusvniekerk deleted the activity-mine-filter branch August 13, 2026 00:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants