feat(maestro): clear AwaitingInput glow once a pane has been focused
A session's rail glows AwaitingInput even after the operator has already looked at it. Clients now report pane focus (POST /:id/focus); the daemon clears the glow to Idle after 5s of continuous focus and keeps it cleared until the session does new work, so a fresh Active cycle is required to glow again.
This commit is contained in:
@@ -91,6 +91,22 @@ export async function killSession(id: Uuid, force = false): Promise<void> {
|
||||
);
|
||||
}
|
||||
|
||||
/** Report whether this client's pane is the one currently showing `id` — not
|
||||
* merely highlighted in a sidebar. The daemon uses this to clear an
|
||||
* `AwaitingInput` glow once the pane has been looked at long enough
|
||||
* (docs/SIDEBAR.md). Best-effort: a failure here only delays the glow
|
||||
* clearing, so callers don't need to surface it. */
|
||||
export async function setSessionFocus(id: Uuid, focused: boolean): Promise<void> {
|
||||
await jsonOrError(
|
||||
await fetch(routes.sessionFocus(id), {
|
||||
method: "POST",
|
||||
credentials: "same-origin",
|
||||
headers: { "content-type": "application/json" },
|
||||
body: JSON.stringify({ focused }),
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
/** List one directory's immediate subdirectories (NAP-329). `path` may be empty,
|
||||
* `~`, relative, or absolute — the daemon resolves it against its home dir. */
|
||||
export async function listDir(path: string): Promise<DirListing> {
|
||||
|
||||
Reference in New Issue
Block a user