Repository navigation
Conversation
The plugin form's openSession only polled the mounted DOM for two seconds and then dropped the jump in silence, so 'View result' on a delegation whose post sits outside the loaded window did nothing (#3091). The paging step #3113 added lives in the desktop front end only. The jump now pages the session's older history through the session controller's loadOlder until the row mounts, history runs out, or the twenty-page cap is hit, and reports every failure as a toast instead of dying silently.
|
Review: changes-requested Reviewed head Verified by running
Verified by reading (DSH contract)
P1 — targets in collapsed earlier parts are structurally unreachable, and the failure copy then liesThe issue itself names two causes: rows outside the loaded window and "更早的分段(part)默认折叠,也不会被展开". This PR fixes the first and cannot fix the second by construction:
This is not an exotic edge: parts rotate on context fill, and delegation results age into earlier parts quickly in any busy group. The PR claims P2 — suggestions, non-blocking
Not verified: real plugin-form rendering inside DSH (as the PR itself notes) — in particular whether rounds far back in the session timeline mount their reply rows expanded enough for the |
Review on cfadbe1: the session stream is not the whole conversation — a group's messages continue in collapsed earlier parts the host pages through the 'earlier' endpoint, so a target there made the driver burn the page budget and then wrongly report 'Message not found in history' (#3091's second root cause). The earlier-parts cursor lives inside the EarlierParts surface, so the walk has to run there: the driver now starts it through the ui store when the session stream runs out, EarlierParts pages back while scanning each page for the target line and reports done/error through finishEarlierJump, and the driver keeps polling the DOM meanwhile. The true end of both channels is the only 'exhausted'; the walk capped or timed out reports the honest 'further back' hint instead. Also from review: a failing history page no longer burns the page budget on a retry loop (two strikes resolve as unavailable), a stream lost mid-paging resolves as unavailable after five silent seconds instead of polling forever, and a hard duration cap always terminates the jump.
|
Review: approved Second round, on head Verified by running
Verified by reading
P2 — non-blocking
Round-1 P2 items re-checked: (1) failed pages burning the budget — fixed, now tested. (2) no terminal state mid-paging — fixed by the not-ready rule plus the global duration cap, now tested. (3) cancel/supersede coverage — added. Remaining small truth-in-labeling note: at the Not verified: real plugin-form rendering inside DSH (as the PR itself discloses) — e.g. that a page hit deep in an earlier part renders its posts expanded enough for the anchor to exist, and that nothing else in the shell resets |
Issue
Fixes #3091
Agent
Agent: DS Bot (SWE-2.1)
What changed / 改了什么
In the plugin form (DS Bot running as a DSH plugin), clicking View result on a delegation whose target post is outside the loaded window still did nothing:
openSessiononly polled the mounted DOM for two seconds withjumpToMountedMessageand then dropped the jump in silence — no pagination, no toast.messageJumpStep(the cross-part paging step) is only wired in the desktop front end (app/ui), which PR #3113 already fixed.The target can sit in two separate channels, and both are now walked:
loadOlder(max 20 pages).earlierendpoint. The cursor for that walk lives inside theEarlierPartssurface, so the walk runs there: when the session stream runs out, the driver starts it through the ui store,EarlierPartspages back while scanning each page for the targetline:<seq>anchor (one failure retry), and reports the verdict throughfinishEarlierJump. A hit mounts the row and the DOM driver highlights it.Outcome mapping, always told as a toast (never silent):
found— row mounted and highlighted;exhausted— both channels truly ran out → Message not found in history;limited— page/duration cap hit → Message is further back; scroll up to load more;unavailable— history cannot be loaded → Could not load earlier messages.message-jump.js:jumpToMessageThroughHistorydriver +sessionHistoryPagingadapter; a failing page no longer burns the page budget (two strikes → unavailable), a stream lost mid-paging resolves after five silent seconds, and a hard duration cap always terminates the jump. A cancelled or superseded jump never reports.cells.js:earlierJumpStep/earlierJumpHitpure helpers + the steering effect insideEarlierParts(the one place that owns the earlier-parts cursor).team-core/actions.js:finishEarlierJumpfor the surface-to-driver verdict channel.index.js:openSessionwires the driver to the session binding, starts/clears the earlier-parts continuation for group jumps, and toasts every failure.app/ui); this PR covers the plugin form's independent history path that it explicitly left out. Its behavior is unchanged. The toast strings are the ones fix(desktop): load earlier parts on group message jump #3113 introduced (inds-bot/src/client/localesfor zh/ja/ko/es/fr/de, zh-TW auto-converts).test/message-jump.test.js, 2 steering-helper cases intest/chat-rows.test.js— red before the fix, green after. Includes: cancel/supersede never reports, failing pages stop retrying, stream lost mid-paging resolves, continuation starts when the session stream runs out and the cross-part hit landsfound, exhaustion only once both channels end.Changelog
群详情里「查看结果」跳到较早的委派结果时,会自动加载更早的历史;找不到时会有提示,不再毫无反应。
How I checked it / 怎么验证的
npm test(inds-bot/) — full suite result belownode scripts/build-client.mjs --checknpm run lint— 192 warnings, 0 errors; identical count on the base branchindex.jsorsrc/host/Checklist / 检查
src/client/changed →npm run buildran andclient.jsis committed.Co-authored-by.Co-authored-by(GitHub noreply, unless opted out), or N/A.已验证 / Verified (Mac)
test/message-jump.test.js4 条新用例(修复前 ReferenceError 全红,修复后 11/11 绿)group-delegations/delegation-dedup/delegation-settlement/btw-client/reaction-continuity/tool-cells163/163 全绿(新 head ce4ef6f)npm run test:windows:新 head ce4ef6f:8642 项 pass 8635 / fail 0 / skip 7node scripts/build-client.mjs --check通过、npm run lint192 warnings 0 errors(与 base 持平)、脱敏扫描 must fix: 0未验证 / Not verified