Skip to content

Invalidate prefetched pages after settings updates - #333

Merged
nunomaduro merged 1 commit into
dev-null-sh:productionfrom
robelsust:fix/settings-prefetch-cache
Oct 17, 2026
Merged

nunomaduro merged 1 commit into
dev-null-sh:productionfrom
robelsust:fix/settings-prefetch-cache

Conversation

@robelsust

Copy link
Copy Markdown
Contributor

Changing follow suggestions, saving a color, or syncing a GitHub profile can leave older Inertia prefetch responses cached. Navigating to a previously prefetched page then displays stale settings until a hard reload.

For example, hovering the Profile navigation link, saving a new color, and opening Profile restores the old avatar color.

This change clears the prefetch cache:

  • When the follow-suggestions cookie changes, including sidebar Hide/Undo.
  • After a successful color save.
  • After the GitHub profile sync form succeeds.

It uses the existing router.flushAll() pattern and also prevents outstanding prefetch responses from repopulating the cache with stale data.

Validation:

  • Six browser regressions reproduced the bugs before the fix and passed afterward, covering completed and in-flight prefetches.
  • Three additional browser checks passed for showing suggestions and sidebar Hide/Undo.
  • Existing profile and lane controller tests: 32 passed, 189 assertions.
  • Production build, TypeScript, and changed-file lint and formatting checks passed.

Browser verification used a disposable database and mocked GitHub responses. The local browser harness is not included in this PR.

@nunomaduro
nunomaduro merged commit 13ec8e6 into dev-null-sh:production Oct 17, 2026
4 checks passed
chrismessina added a commit to chrismessina/dev-null.sh that referenced this pull request Oct 23, 2026
#000 and #000000 are black, and #333333 is gray, but they showed as plain
text because a color needed a letter. Issue numbers never start with a
zero and aren't 6 or 8 digits long, so those count as colors now, while
dev-null-sh#123 and dev-null-sh#333 still stay plain. The pattern also spells its zero-width
characters as escapes instead of the invisible characters themselves.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
chrismessina added a commit to chrismessina/dev-null.sh that referenced this pull request Oct 23, 2026
#000 and #000000 are black, and #333333 is gray, but they showed as plain
text because a color needed a letter. Issue numbers never start with a
zero and aren't 6 or 8 digits long, so those count as colors now, while
dev-null-sh#123 and dev-null-sh#333 still stay plain. The pattern also spells its zero-width
characters as escapes instead of the invisible characters themselves.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.

2 participants