fix(stream): resolve search deep-links without pagination stall
All checks were successful
Deploy to Frontend Servers / deploy (push) Successful in 37s

Search results can link to older posts that are not present in the first
/browse page. The previous deep-link flow kept paginating the all-assets
stream until the target id appeared, leaving users stuck on the waiting
indicator for very old posts.

Fetch /api/posts/:id directly for ?post= arrivals and inject the resolved
target post at the top of the stream when it is not already in loaded
items. The normal paginated feed still loads below for context. Keep the
explicit finding/not-found status messages as a fallback for slow or
missing direct fetches.

Verified with search result c5eeb17d-3bd0-4d32-9c92-5efa6e4a015c: target
post rendered within 100ms instead of waiting for pagination. Checks:
tsc, format:check, tests, build.
This commit is contained in:
TerryM
2026-06-03 01:40:21 +08:00
parent 0326cb2998
commit 985463b7da
8 changed files with 144 additions and 10 deletions

View File

@@ -129,6 +129,9 @@ export const enDict: Dict = {
loadMoreFailed:
"Couldn't load more posts. Check your connection and try again.",
retry: "Retry",
searchingForPost: "Finding your post… loading older entries, please wait.",
postNotFound:
"Couldnt find this post in the current view. It may have been removed.",
paginationPrev: "Previous",
paginationNext: "Next",
listRange: "Showing {{from}}{{to}} of {{total}}",