Make older chat conversations reachable through existing pagination - #855
Conversation
9ed91f7 to
607d0af
Compare
|
Merge-order note for the three Chat view PRs, from trial merges onto So the order is #854, then #856, then this one, and this is the one that needs the rebase. Nothing surprising — all three edit Two notes while I am here:
|
607d0af to
d01cc79
Compare
|
Completed the requested branch alignment: #854 → #856 → #855. Pagination is now replayed on #856 at The stack passes 116 frontend module tests, 27 browser subtests and build/typecheck/guard. The combined tree also passes the actual Linux/PostgreSQL 65-conversation pagination scenario and the other four backend/browser scenarios. This does not replace your requested visual review. Full verification and historical evidence are in the updated descriptions. |
d01cc79 to
a673758
Compare
|
Completed the post-merge synchronization of the remaining UI stack onto The complete UI tree is identical to the previously validated integration tree. Revalidation passes 129 frontend module tests, 27 browser subtests (29 including parent tests), typecheck/guard/build. Updated all three descriptions; maintainer visual review remains separate and outstanding. |
a673758 to
08728f5
Compare
WaylandYang
left a comment
There was a problem hiding this comment.
Reviewed as the top of the stack, so only the +564 on top of #856: the sidebar moves
to useInfiniteQuery over the existing limit/offset list endpoint (the server
already returns total; api.ts already typed it), dedupes by id, and adds a "load
earlier" control with an error/retry state. The query key gains convSearch and is
gated on kb?.id === kbId like the rest of the page after #854, and invalidateList's
prefix key still matches, so a rename or delete refetches the loaded page range
rather than appending a stale offset.
One property worth writing down where the dedupe comment is: offset pagination can
skip as well as duplicate. If a conversation moves to the top between two page
fetches (a new message in an old thread), everything below it shifts by one and the
item at the old boundary is never fetched. Dedupe handles the duplicate; only the
invalidation-driven refetch heals the skip, and only after something invalidates. For
a sidebar that is acceptable, and the fix (keyset on updated_at, id) is a server
change, not this PR's, but the comment currently reads as if dedupe covers both.
Three new i18n keys in both packs. The 530 test lines are on-demand browser probes,
not CI, as with the rest of the stack. LGTM; merge after #856.
Signed-off-by: dada-yan <BinjunYann@gmail.com>
|
Rebased onto |
08728f5 to
e0e2f01
Compare
Review follow-up (2026-09-23)
Current head:
08728f53fe469292a6dfb78fabd974cd755df272. Comment-only follow-up to #854 review: document the new-conversation route/ownership/live-entry handoff, correct the old early-return comment, and provide a complete optional Playwright installation and browser-test invocation at the top ofchat-view.test.mjs. These browser probes are explicitly separate from Vitest and CI; no new CI scope is introduced. The changes are carried through the #854 → #856 → #855 stack.The documented command passed on #854 (11 subtests, 12 including the parent); the final stack passed all 27 browser subtests (29 including parents). Runtime code and assertions are unchanged. Prior validation below refers to its stated historical heads.
Post-merge synchronization (2026-09-22)
Rebased onto
dev@7cfeedfeb11c3a1c42d5091c5941a51afaaeb161after #848, #851, #849, #850 and #852 merged. Current head:a6737587017c740a172dd2fba21bf9d55ab5d497.The UI dependency order remains #854 → #856 → #855. Retained upstream stream-interruption strings alongside the history/pagination keys when resolving i18n conflicts. The complete UI tree is byte-for-byte identical to the previous validated integration tree. Maintainer visual review remains outstanding.
Validation on combined tree
d06f4ad0199a382635a6bbf94210b9421cbeba66(675 tracked Linux inputs hash-matched):Earlier evidence below refers to its stated historical heads.
The conversation rail only requests the first 30 records even though the existing list endpoint already provides
limit,offsetandtotal. Older conversations remain available by URL or search, but cannot be reached by browsing the rail.Use the existing infinite-query support to load bounded 30-record pages, scoped by knowledge base and search term. Keep loaded rows on next-page failure and retry the same offset. Deduplicate by conversation ID, and let list invalidation refetch the loaded page range when updated conversations change the ordering. No API, database schema or dependency changes are introduced.
Validation on
dev@ea0557b, fix9ed91f7:f7bcd0878bf490d6efb122b71d6f13d379df4709with Hand off exhausted tool runs to an evidence-only final answer #845 and the other scoped Chat fixes passes Rust fmt, strict workspace Clippy, 1,013 tests (one pre-existing external-HTTPS RSS test ignored), workspace build, 129 frontend module tests, 27 browser subtests and frontend build.The browser test uses optional Playwright/Chromium, matching the existing browser-test pattern. Run
node --test tests/chat-pagination.test.mjsfromweb;CHAT_PLAYWRIGHT_PATHandCHAT_CHROMIUM_PATHmay specify local installations.Offset pagination still does not provide a snapshot across concurrent updates. Deduplication prevents repeated rows; a later invalidation refreshes the loaded range. This patch does not claim stable traversal under arbitrary concurrent writes.