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

@@ -130,6 +130,10 @@ export const jaDict: Dict = {
loadMoreFailed:
"追加の読み込みに失敗しました。接続を確認してやり直してください。",
retry: "再試行",
searchingForPost:
"投稿を検索中…古い投稿を読み込んでいます。しばらくお待ちください。",
postNotFound:
"現在のリストでこの投稿が見つかりません。削除された可能性があります。",
paginationPrev: "前へ",
paginationNext: "次へ",
listRange: "{{from}}{{to}} / 全 {{total}} 件",