Repository navigation
fix(client): keep the Session header seats, without taking the corner seat (#803) - #820
Conversation
…inkFlowLab#803) The follow-up that moved the pill's page effects out of the pill put them in `conversation.session.header.corner`. That seat cannot take them: it is `single`, and `ui-sidebar-right` already registers its right-sidebar button there with no `priority` (0). `SlotCore.register` throws on a second registration in the same cell — single slot "conversation.session.header.corner" already has a registration at priority 0 — register at a different priority to shadow it — and `SlotRegistry.inject` rethrows it out of the caller's effect, so FlyBot's whole client plugin fails from `apply` and the pill never mounts. `id` and `order` do not help: they are list-kind fields, and on a single seat the only ranking field is `priority`. Pushing it aside with `priority: -10` would hide the shell's own button, which is the failure this issue is about. The effects no longer need a seat at all. `installHeaderEffects` (`core/src/client/header-effects.js`) is installed once from `apply` and follows the main-view Session through the sessions list and the roster. - `core/src/client/header.js`: drops `HeaderSeats`; `--bt-first-sep` stays in `HeaderPill`, since it needs a turn and so always has a header to be drawn in. - `core/src/client/index.js`: installs the effects, registers nothing at `.corner`. - `core/src/client/header-effects.js`, `core/test/header-effects.test.js`: new; each effect keeps its own dependency key, because the sessions list answers before the roster and `blank` flips on the same Session when the first message arrives, while `beginVisit` must stay keyed by the Session alone. - `core/test/header-slot.test.js`: pins that nothing registers at `.corner`, with the reason, and that no page effect runs in the pill. - `docs/subsystems/core-client.md`, changelog: say the seat is taken. Fixes ThinkFlowLab#803
|
Triaged on Repo side confirmed: So acceptance starts with the reproduction, and the implementation only happens if it reproduces:
Two notes for the pull request: use Since this report includes the full patch plan, a pull request from the reporter's fork is the shortest path; if that is not possible, a Bot implements it under this issue. |
|
Correction from Triage: #820 is a pull request, not an issue — I set an issue label on it at 07:36Z by mistake.
The evidence in my earlier comment still stands as review scope: on
|
|
Reproduction, as asked. Run against DSH's own import { SlotCore } from '.../packages/client/ui-slots/lib/index.js'
const core = new SlotCore()
// ui-conversation declares the seats (apply.ts:395-407)
core.register({ name: 'root', children: { 'conversation.session.header': { kind: 'single', scope: 'session' } } }, AppFrame)
core.register({ name: 'conversation.session.header', children: {
'conversation.session.header.actions': { kind: 'list', scope: 'session' },
'conversation.session.header.utilities': { kind: 'list', scope: 'session' },
'conversation.session.header.corner': { kind: 'single', scope: 'session' },
} }, ConversationSessionHeader)
// ui-sidebar-right takes .corner (index.ts:238), ui-subagent takes .actions
core.register({ name: 'conversation.session.header.corner' }, ExpandButton)
core.register({ name: 'conversation.session.header.actions', id: 'subagent-catalog', order: -30 }, SubagentCatalogAction)
// FlyBot on f20cfa37: index.js:885 then :888
core.register({ name: 'conversation.session.header.utilities', id: 'bot-pill', order: 100 }, HeaderPill)
core.register({ name: 'conversation.session.header.corner', id: 'bot-header-seats', order: 100 }, HeaderSeats)Output: The throw does not stay inside the registration — it fails
So on a host built from One caveat I will state plainly rather than overclaim: I could not run a host build of Everything else in the review scope is already in the branch at
|
|
Verdict: PASS at c2f3c39 Ran:
What I checked:
Notes (non-blocking, not merge-gate items):
|
Fixes #803
Reproduce
On
main(6f9b60c), open FlyBot.core/src/client/index.js:888registersHeaderSeatsintoconversation.session.header.corner:That seat is
single(ui-conversation/src/client/apply.ts:407), andui-sidebar-rightalready registers its right-sidebar button there with nopriority, i.e. 0 (ui-sidebar-right/src/client/index.ts:238).SlotCore.registerthrows on a second registration in the same cell (ui-slots/src/index.ts:1216-1219):SlotRegistry.injectrethrows it out of the caller's effect (ui-renderer/src/client/registry.ts:266-270), so FlyBot's whole client plugin fails fromapplyand the pill does not mount either.id/orderdo not change the rank — they are list-kind fields; on asingleseat onlypriorityranks. Registering atpriority: -10would push the shell's button out instead, which is the original bug with the roles swapped.Ran against DSH's own
SlotCore(not a reimplementation):What changed
The effects do not need a seat.
installHeaderEffects(core/src/client/header-effects.js) is installed once fromapplyand follows the main-view Session through the sessions list and the roster.core/src/client/header.js:HeaderSeatsis gone.HeaderPillkeeps its own UI;--bt-first-sepstays with it, because it needs a turn and so always has a header to be drawn in.core/src/client/index.js: installs the effects; nothing registers at.corner. The pill stays in.utilities(unchanged, and still beside.actions, so the subagent catalog keeps rendering).core/src/client/header-effects.js: new, carries no React. Each effect keeps its own dependency key, because the sessions list answers before the roster does andblankflips on the same Session when the first message arrives — a single "did the Session change" guard drops a friend's flags on the first pass;beginVisit/endVisitkeyed on more than the Session would open a second visit for a chat that was only just opened.core/test/header-effects.test.js: new, jsdom. Drives roster-arrives-late,blankflipping, the view moving to another Session, and one visit per Session.core/test/header-slot.test.js: pins that nothing registers at.corner, with the reason, and that no page effect runs in the pill. Fails if the.cornerline comes back.docs/subsystems/core-client.md,changelog.d/803-…: say the seat is taken and why.What I ran
At
c2f3c39:core npm test— 1292 tests, 1292 pass, 0 fail (DSH_HARNESSan installed harness).node --test test/header-slot.test.js test/header-effects.test.js— 5/5. Re-adding the.cornerregistration turnsheader-slotred; removing the per-effect keys turnsheader-effectsred.node scripts/build-client.mjs --check— exit 0.node scripts/ds-bot-patches.mjs check— all three green.core lint— 43 warnings / 0 errors (the baseline count),arch-docs: OK (15 changed file(s)).SlotCorewith.cornerowned by the shell: no throw,cornerkeeps 1 occupant,actionskeeps the subagent catalog.Note
This is the same change as Birfy#28 (
48624e0), with that PR's blocking review finding fixed and this collision fixed. Commented the collision evidence on #28 before it merged.