Repository navigation
feat(remote): log pages and text-page controls on remote sessions, page rows on agterm-server - #978
Merged
Merged
Conversation
Deploying agterm with
|
| Latest commit: |
ccfc8f7
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://badec7ac.agterm.pages.dev |
| Branch Preview URL: | https://remote-log-follow.agterm.pages.dev |
umputun
force-pushed
the
remote-log-follow
branch
from
November 12, 2026 20:56
26344a1 to
7e8e3d7
Compare
…ne's direct approval for any exception
…ext pages Add the page.text presentation kind, the follow/search/wrap/changes page actions with their toggle, query and step fields, the pageResult answer, and the text state carried by page state, a re-offer seed and a log request on the page frame. TextLog, TextLogReport and TextChanges become Codable and ControlToggleMode gets its wire spellings. Both presenter-frame receivers route pageResult; the presenter refuses the text actions until they are implemented.
…e result a text action answers with a correlated pageResult, so a refusal on the presenter sends one with ok false and leaves appliedSeq alone; the query cap comment describes the truncation it performs.
a log page's channel answers log.tail with the raw tail bytes, its stamp and offset, or log.unchanged when the stamp still matches; the presenter builds the snapshot with the same LogRead a local page uses, so truncation, rotation and binary tails read alike. RemotePageChannel.logTail is the client.
the cancel goes out after the head and first chunk arrive, so the test fails if the loop stops honoring it; two comments that restated the code are gone.
the reader may suspend, as a replica page's will on its channel; the default reader detaches the file read itself. A pause or stop while a read is suspended drops it, as it does for a blocking one.
a text page shown for another Mac searches, wraps, steps its changes and follows its log like a local one: the store's text paths accept it, its bridge reads text over the page channel and a log through log.tail, so a log past the text cap opens, and every change reaches the origin in the page state. A re-offered page opens with the following, query and wrap it had.
the wire state cut only the query, so an over-limit query could report counts the presenter found for a longer one. the model now stores the cut query and the page field holds the same limit.
also lowercases the query limit comment in text.js.
follow, search, wrap and diff change steps on a page shown on the presenting Mac now go there as page commands and wait for its result, at most five seconds. the presenter runs each origin action as the local command, in order per page, and answers with the page's text state, which the origin mirrors before replying. a presenter without live text pages is sent nothing and keeps the existing refusals; a log page now opens on one that has them.
a log clicked on a presented pane opens as a log page on a presenting Mac that lists live text pages, and as the plain text page on an older one.
removing the page's message handlers leaves the native commit as the only way a step's counts, pause or change reach the model. also restores the step lines' indentation and trims comments the review flagged.
the server probes a log through its tail, holds a log page for the next Mac, and refuses one only while a Mac without live text pages is connected. a clicked log becomes a log page for a presenter that can follow it. follow, search, wrap and changes are served through the shared store path, answered by the presenting Mac.
…t the viewer is gone
agterm-server's catalog carries page rows, with their page and the endpoint a Mac reaches them through. A Mac that declares page rows in its hello mirrors them as page rows; an older viewer gets the catalog without them, with skip deltas keeping its revisions contiguous and a page root's companions shown top-level. A page row claims a view of its server page through page-attach and shows it over a page channel. Each claim is tied to the row instance the window holds, so a row detached, removed or replaced during the ssh wait is never shown and a replaced one is claimed again. A lost channel or an unreachable server shows the row's failed page and claims again while the catalog lists the row. session.page and session.companion.page in a remote window are created by the server under an operation id, through session overlay open --page|--companion, which now takes --op-id and --epoch.
…elease their lease A page row's page-attach and its page channel each wait for the pooled ssh connection before they run, so a slot being started is never joined by a second connection; an unreachable one shows the row's failed page and the claim retries. The channel starts after the claim ends, so a channel that fails to start claims again. A replica page keeps the pool its channel leased from: a closed or detached row is gone from its store before its page is released, which left the lease held. A page row's binding follows a catalog change of its endpoint, and its failed page reads back as failed with its reason before any view renders it.
The skill, the command reference, the user guide and the control rules state that log pages and follow, search, wrap and changes work on a presenting Mac with live text pages, the replies an older presenter gives, page sessions on agterm-server and the page rows a Mac's remote window shows, and page rows a remote window creates through its server under an operation id.
A page a remote window created keeps its outcome on agterm-server, so the Mac remembers which host holds each such page for the app's lifetime and sends `session overlay result --page` there; `--block` from a remote window no longer polls an id only the server knows. The read runs off the accept thread like every other forwarded request. `session overlay close` on a server page row closes the row on its server, as its page's own close does, instead of removing it on the Mac alone. agterm-server refuses `ask open` on a page row because no presentation stream can show the ask.
A text page posted a diff's first changes count and a seeded search's first match count before it reported ready. A caller that waited for those counts in the model, a script polling `tree` for `text.changes` included, could step while the bridge still held the document as pending and get `page not loaded`. The page now holds the counts it reports during setup and sends them right after ready; later reports go out at once. A remote page test counted state frames before its restricted-port URL had finished failing to load, so the load's own reports landed in the count on a slow runner. It now waits for the failed load before its baseline. Both causes are recorded in docs/ci-flakes.md.
…network The refused-text-action test waited for its restricted-port URL to report a failed load before taking its baseline, and on the CI runner that load never reported failed within 10 s. The test now shows an HTML file page through the fixture's channel and waits for the loaded report carrying the hide's sequence; the frame count assertion is unchanged.
GUI asks and picks on server page rows had no presentation stream to reach a Mac. Open that stream alongside the page view for headless origins.
umputun
force-pushed
the
remote-log-follow
branch
from
November 12, 2026 21:27
b9f5906 to
ccfc8f7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A text page shown for a remote session was a static copy: a session attached from another Mac or served by an agterm-server Linux host got no log page, and following, searching, wrapping and stepping a diff's changes were unavailable through the control API. A remote text page now behaves like a local one, for a Mac origin and a Linux origin. agterm-server also gets page sessions, shown in a Mac's remote window.
Remote text pages
--tail,--follow-file, a clicked.log) opens on the presenting Mac and follows the file over the page channelsession overlay follow,search,wrapandchangeswork on the origin and on the presenting Mac, from the page's own bar and from the control API, and read back on bothpage.textkind in its hello. With an older presenter, an explicit log open is refused withthe Mac presenting this session cannot show a log page, a clicked log opens as the plain static page, andsearch,wrapandchangesanswerremote page: ... on the Mac that shows itpage.textuntil it implements log reads and rendering, the controls and the mirrored text statePage rows on agterm-server
session overlay open --page|--companion --html FILE|--url URLmakes a page session or page companion on the host; the catalog lists it, and a remote window shows it as a page row, each Mac claiming its own view over ssh (session overlay page-attach)--blockandoverlay result --pageread the page's outcome from the server, after the window closed toosession overlay closeon a server page row closes it on the server--urlpage row is refused on agterm-server, as a Mac's loopback page row already is when another Mac attaches it: page rows have no loopback forwarding path