Search and scrollback export no longer reach the browser #1
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Search and scrollback export no longer reach the browser
What changed under us
Until felis
32775067the search and capture verbs rode theInputfamily, so they neededno channel of their own: the browser sent
{"Search": …}/{"CaptureScrollback": …}downthe same socket as a keystroke, and the answers came back as
GridMsg::SearchMatch,SearchDone,ScrollbackRow,ScrollbackDoneandCaptureRegion.At
105b089979369fd310757375af3df7900ae7e523none of those variants exist. Search is theSearchfamily and capture isRegion, both correlated: a request carries astream_idallocated from the connection's driver, and every reply and stream terminal namesit back. A request with no envelope is not ignored — the daemon ends the connection over it
(reproduced in natsukium/felis#196).
Why the gateway cannot forward them today
serve()andbroker::open_stream()both destructure the connection after the attach:so the reader task and the writer task can run concurrently — and the
driverthat allocatesstream ids, tracks the open ones, and classifies the frames that answer them is dropped on
that line. Nothing is left to allocate from, so neither family is routed in either direction.
The relay is otherwise unaffected: the grid stream, input, resize, theme and the roster verbs
are all uncorrelated or go through
Connection's own helpers.What it costs
<felis-terminal>'s search bar and its scrollback export have no server behind them over agateway connection. Nothing errors — the browser sends a frame that no longer parses as an
InputMsgand the gateway drops it with a stderr line, so the feature is silently inert.What a fix has to face
The driver is one per connection and is
&muton every classify. Splitting a connection intoa reader task and a writer task is what makes it unshareable, so the fix is a shape decision,
not a patch:
select!(therelay task already has that shape — it is the
Connectionsplit that is the problem);grid path;
the ops verbs already work — which costs a dial but keeps the streaming path untouched and
needs no lock.
Region/Searchare admitted to anOpsconnection, andcapturetherereads the session through the reply rather than through an attach burst.
The third is probably the answer, and it also gives the broker a natural request shape
(
{"req": n, "op": {"search": {…}}}) instead of an out-of-band frame on asid.Deferred out of the felis
105b0899follow because it is a feature restoration with a designchoice in it, not part of making the relay build and stream again.