Skip to content

fix(stream): recover from filter changes, unknown filters and stray polls - #2909

Open
solracsf wants to merge 1 commit into
masterfrom
fix/stream-feed-recovery
Open

fix(stream): recover from filter changes, unknown filters and stray polls#2909
solracsf wants to merge 1 commit into
masterfrom
fix/stream-feed-recovery

Conversation

@solracsf

@solracsf solracsf commented Sep 7, 2026

Copy link
Copy Markdown
Member

Three faults in the feed, all reachable from normal use.

Filter change mid-load wedges the stream. Two guards cancel each other out. The watcher aborts the in-flight request and calls loadActivities() synchronously, but loading is still true at that point, so the reload hits the re-entrancy guard and returns. The aborted request's finally then deliberately skips clearing the flag, assuming the replacement call already set it. Neither happens, and the view sits on "Loading activities" forever.

Unknown filter kills the view. navigationList.find(...).name had no guard, so any filter not in the navigation list threw out of a computed. Unknown filters now fall back to all, matching what Data::validateFilter() already does server-side.

Duplicate polling chains. stopPolling() can't cancel a request already in flight. Hiding and re-showing the tab during one leaves the returning request rescheduling itself alongside its replacement — two requests per interval, compounding with each repeat.

The polling test measures the request count rather than asserting on timers, so it fails on the current code rather than passing vacuously.

…olls

Three faults in the feed, all reachable from normal use:

- Changing filter while the first page was still loading left the stream
  wedged on its loading placeholder. The watcher aborts the in-flight
  request and reloads, but `loading` was still set, so the reload hit the
  re-entrancy guard and returned, while the aborted request's finally
  deliberately skips clearing the flag. Neither side ever cleared it.
- An unknown filter in the URL threw out of the `headingTitle` computed and
  took the whole view down. Unknown filters now fall back to `all`, which is
  what `Data::validateFilter()` already does server-side.
- Hiding and re-showing the tab while a poll was in flight started a second
  polling chain, because the returning request rescheduled itself even
  though `stopPolling()` had run. Chains now carry a generation token and a
  superseded one stops instead of running alongside its replacement.

Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
@codecov

codecov Bot commented Sep 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 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