Repository navigation
Description
Implementation: FlyBot (ours) — PR follows within 24h. Do not pick up without a pickup-ok comment on this issue.
Written-by: FlyBot Lead
Claimed-by: FlyBot Lead
Claim-Id: ffea36b1f2f749fb8a20473c48dc1efa
Branch: dev/1-palette-part-dedupe
Base: ffe6f3d
At: 2026-11-20T00:13:29Z
Tier: T1 — core/src/client/palette.js plus its test; it is the client-bundle lane (core/client.js + patches/ds-bot/0008), so the PR waits behind #3112 and behind our four in-flight T2 pull requests.
What a user sees
In the ⌘K palette, a hit from an older part of the same chat silently disappears when the current part's outline has a row with the same turn number. With one older-part hit at turn 1 and a current-part outline hit at turn 1, the whole Messages (full text) section vanishes — no row, no Earlier part badge. When the older part's turn is 2, both sections appear and the badge shows. Because turn numbers are per part, two different messages collide.
Where
-
core/src/client/palette.js:124—!outlined.has(${row.chat}:${row.turn})(dedupe key built from chat + turn only). -
:107— themessageskey ischatOf(id):turn;:116buildsoutlined;:129is the first placerow.partis used;:130–134build the full-text row keyat = chat:turnwithkeyCounts;:158–166activate throughrows[active]/row.run().
Reproduction (read-only, base c0061ba0)
Two independent probes agree on two bases (5f6c8321, c0061ba0); the second rebuilt core/src/client/palette.js from real source with esbuild plus a fake React:
- A: older-part row
{chat:'s1', turn:1, part:'s1-old'}vs a current-part outline hit on turn 1 →sections: ["Messages"],rows: ["Messages -> s1:1"]; the full-text section is gone. - B: the same with turn 2 → both sections plus
[Earlier part]. - C: same part, same turn → deduped correctly, so the
chat:turndedupe is right in principle and only too coarse across parts.
Expected
- The dedupe key and the full-text row key both carry the part:
chat:(part ?? chat):turn(room rows fall back tochat; keeps#3114's "part id ≠ Bot id"). keyCountscounts on the same triple, so keys do not collide.- Acceptance asserts
sections()and badge text by section/position, never throughchoose(key); add "same chat + turn, different part → keys do not collide" as its own case. - A naive fix that adds the part to
outlinedonly is not acceptable: both sections then render buts1:1appears twice andchoose('s1:1')returns the outline row while clicking the full-text row opens{part:'s1-old', turn:1}.
Boundaries
- Files:
core/src/client/palette.js, its test,core/client.js+patches/ds-bot/0008(regenerated, never hand-edited),changelog.d/<issue>-palette-part-dedupe.fixed.md. - No
core/src/host/**, no gate files, no.github/**, noplugins/**. - Red first on a clean base; the PR must state the bundle regeneration and the
ds-bot-patches check/canonicalresult.
Activity
fix(client): keep an older part's ⌘K palette hit — key rows chat:part…