Skip to content

Make older chat conversations reachable through existing pagination - #855

Open
Maya-Kid wants to merge 4 commits into
deeplethe:devfrom
Maya-Kid:fix/chat-conversation-pagination
Open

Maya-Kid wants to merge 4 commits into
deeplethe:devfrom
Maya-Kid:fix/chat-conversation-pagination

Conversation

@Maya-Kid

@Maya-Kid Maya-Kid commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

Post-merge synchronization (2026-09-22)

Rebased onto dev@7cfeedfeb11c3a1c42d5091c5941a51afaaeb161 after #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, offset and total. 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, fix 9ed91f7:

  • The 65-conversation browser regression fails on the original Chat component because there is no way to request the next page.
  • All 11 real-component browser subtests pass: 65 records; 0/30/31/60 boundaries; failure/retry; stale pages after search or KB changes; duplicate IDs with identical titles; multi-page search; and refetching loaded pages after reordering. These tests use controlled HTTP responses with the real router/query client/Chat component.
  • Frontend 116 module tests and build/typecheck/guard pass.
  • Chrome against the actual Linux server and PostgreSQL browsed 65 synthetic persisted conversations through the real list API and reached all 65.
  • Separately, integration tree f7bcd0878bf490d6efb122b71d6f13d379df4709 with 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.mjs from web; CHAT_PLAYWRIGHT_PATH and CHAT_CHROMIUM_PATH may 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.

@Maya-Kid
Maya-Kid force-pushed the fix/chat-conversation-pagination branch from 9ed91f7 to 607d0af Compare September 21, 2026 09:28
@WaylandYang

Copy link
Copy Markdown
Contributor

Merge-order note for the three Chat view PRs, from trial merges onto 79caca04:

OK        #854
CONFLICT  #855   web/src/pages/Chat.tsx  web/src/i18n/en.ts  web/src/i18n/zh.ts
OK        #856   (clean on top of #854, as its stated dependency implies)

So the order is #854, then #856, then this one, and this is the one that needs the rebase. Nothing surprising — all three edit Chat.tsx and add adjacent i18n keys.

Two notes while I am here:

  • web/tests/ is an existing location (rss-default.test.mjs is already on dev), so the .test.mjs files land where they belong. No concern there.
  • These three change what a person sees, so per the convention in this repository they wait for a maintainer to look at the running interface before merging, separately from CI being green. I have flagged them for that.

@Maya-Kid

Copy link
Copy Markdown
Contributor Author

Completed the requested branch alignment: #854#856#855. Pagination is now replayed on #856 at d01cc796b9ad2e3911fd56cb8133763c2b121b8c, with the import/i18n conflicts resolved. All three contain current dev 474b904; the PR description now states the stacked dependency explicitly.

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.

Signed-off-by: dada-yan <BinjunYann@gmail.com>
Signed-off-by: dada-yan <BinjunYann@gmail.com>
Signed-off-by: dada-yan <BinjunYann@gmail.com>
Signed-off-by: dada-yan <BinjunYann@gmail.com>
@Maya-Kid
Maya-Kid force-pushed the fix/chat-conversation-pagination branch from d01cc79 to a673758 Compare September 22, 2026 03:38
@Maya-Kid

Copy link
Copy Markdown
Contributor Author

Completed the post-merge synchronization of the remaining UI stack onto dev@7cfeedf, preserving the requested #854#856#855 order. Current heads: #854 bd11c1d9ea61f5015d55ed8bc0f656c1bb2e2717, #856 ba964f3aaa94ae514f9e585c04329f642708299d, #855 a6737587017c740a172dd2fba21bf9d55ab5d497. The i18n conflict resolution retains the merged stream-interruption strings together with the history/pagination strings.

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.

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