Expand description
IDE-protocol I3: the write-request payload + per-item handler.
Writes mutate the editor, which must happen on the editor (actor) thread.
The WS task hands an EditorWriteRequest to the editor thread over
the generic inbound bus ([lattice_mode::inbound], via
SubsystemBoot::inbound) and awaits
a oneshot reply.
BC.3b: the bespoke ClaudeCodeInboundBus + per-tick make_drain were
replaced by the generic InboundBus<EditorWriteRequest> primitive,
whose send wakes the actor off-keystroke (the wake is baked into the
sender — structurally impossible to forget, paramount #4) and whose per-tick
drain runs each request through make_handler. This module now owns only
the write payload + mapping logic; the channel + drain + wake are
the shared primitive.
make_handler validates + maps each request to an EXISTING Effect and
resolves its oneshot — optimistic-ack: ok=true on a valid map, ok=false
on an unknown / non-active target (option C, design §2: per-buffer save/close
targeting lands with the diff/tab work).
Structs§
- Editor
Write Request - One write request: payload + the oneshot the drain resolves. Mirrors LSP’s
InboundShowDocument. - Inbound
Reply - The drain’s reply to the WS task. Optimistic-ack:
okreflects whether the request mapped to a valid Effect, not the eventual apply result.
Enums§
- Inbound
Kind - A write request’s payload.
Functions§
- make_
handler - Build the per-item handler for the generic inbound primitive
(
SubsystemBoot::inbound). Maps one request to itsEffect(or none, onok=false), resolves the oneshot, and returns the effect(s) for the host to apply. The generic bus owns the channel, the per-ticktry_recvloop, and the off-keystroke wake.