fix(stream): resolve search deep-links without pagination stall
All checks were successful
Deploy to Frontend Servers / deploy (push) Successful in 37s
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:
@@ -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:
|
||||
"Couldn’t find this post in the current view. It may have been removed.",
|
||||
paginationPrev: "Previous",
|
||||
paginationNext: "Next",
|
||||
listRange: "Showing {{from}}–{{to}} of {{total}}",
|
||||
|
||||
@@ -129,6 +129,10 @@ export const idDict: Dict = {
|
||||
loadMoreFailed:
|
||||
"Gagal memuat lebih banyak. Periksa koneksi Anda dan coba lagi.",
|
||||
retry: "Coba lagi",
|
||||
searchingForPost:
|
||||
"Mencari postingan Anda… memuat postingan lama, mohon tunggu.",
|
||||
postNotFound:
|
||||
"Postingan ini tidak ditemukan di daftar saat ini. Mungkin sudah dihapus.",
|
||||
paginationPrev: "Sebelumnya",
|
||||
paginationNext: "Berikutnya",
|
||||
listRange: "Menampilkan {{from}}–{{to}} dari {{total}}",
|
||||
|
||||
@@ -130,6 +130,10 @@ export const jaDict: Dict = {
|
||||
loadMoreFailed:
|
||||
"追加の読み込みに失敗しました。接続を確認してやり直してください。",
|
||||
retry: "再試行",
|
||||
searchingForPost:
|
||||
"投稿を検索中…古い投稿を読み込んでいます。しばらくお待ちください。",
|
||||
postNotFound:
|
||||
"現在のリストでこの投稿が見つかりません。削除された可能性があります。",
|
||||
paginationPrev: "前へ",
|
||||
paginationNext: "次へ",
|
||||
listRange: "{{from}}–{{to}} / 全 {{total}} 件",
|
||||
|
||||
@@ -128,6 +128,10 @@ export const koDict: Dict = {
|
||||
loading: "로딩 중…",
|
||||
loadMoreFailed: "더 불러오지 못했습니다. 연결을 확인하고 다시 시도하세요.",
|
||||
retry: "다시 시도",
|
||||
searchingForPost:
|
||||
"게시물을 찾는 중… 이전 게시물을 불러오고 있습니다. 잠시만 기다려주세요.",
|
||||
postNotFound:
|
||||
"현재 목록에서 이 게시물을 찾을 수 없습니다. 삭제되었을 수 있습니다.",
|
||||
paginationPrev: "이전",
|
||||
paginationNext: "다음",
|
||||
listRange: "{{from}}–{{to}} / 총 {{total}}건",
|
||||
|
||||
@@ -128,6 +128,9 @@ export const msDict: Dict = {
|
||||
loading: "Memuatkan…",
|
||||
loadMoreFailed: "Gagal memuatkan lagi. Sila semak sambungan dan cuba lagi.",
|
||||
retry: "Cuba lagi",
|
||||
searchingForPost: "Mencari pos anda… memuat pos lama, sila tunggu.",
|
||||
postNotFound:
|
||||
"Pos ini tidak ditemui dalam senarai semasa. Mungkin telah dipadam.",
|
||||
paginationPrev: "Sebelum",
|
||||
paginationNext: "Seterusnya",
|
||||
listRange: "Menunjukkan {{from}}–{{to}} daripada {{total}}",
|
||||
|
||||
@@ -128,6 +128,9 @@ export const viDict: Dict = {
|
||||
loading: "Đang tải…",
|
||||
loadMoreFailed: "Không thể tải thêm bài. Hãy kiểm tra kết nối và thử lại.",
|
||||
retry: "Thử lại",
|
||||
searchingForPost: "Đang tìm bài viết… tải thêm bài cũ, vui lòng đợi.",
|
||||
postNotFound:
|
||||
"Không tìm thấy bài này trong danh sách hiện tại. Bài có thể đã bị xóa.",
|
||||
paginationPrev: "Trước",
|
||||
paginationNext: "Sau",
|
||||
listRange: "Hiển thị {{from}}–{{to}} trên {{total}}",
|
||||
|
||||
@@ -126,6 +126,8 @@ export const zhDict: Dict = {
|
||||
loading: "加载中…",
|
||||
loadMoreFailed: "加载更多资料失败,请检查网络后重试。",
|
||||
retry: "重试",
|
||||
searchingForPost: "正在查找您的帖子,请稍等…",
|
||||
postNotFound: "在当前列表中找不到这个帖子,可能已被移除。",
|
||||
paginationPrev: "上一页",
|
||||
paginationNext: "下一页",
|
||||
listRange: "显示 {{from}}–{{to}},共 {{total}} 条",
|
||||
|
||||
Reference in New Issue
Block a user