Repository navigation
zgx: Activity sidebar, with Waiting and Sleep in the engine - #1262
Merged
Merged
Conversation
The sidebar's "…" gains Activity: one list of every chat, the one that came back last at the top, with pinned above it and three shelves at its foot, folded until opened: Working (a chat while its agent runs, back at the top a moment after it stops), Asleep (chats put to sleep from their menu until a time, woken early by a new question, an approval or a failure) and Archived. Grouping, sorting, sections and the folds that only groups have are out of reach while it's on. Settings → Activity holds the view, the Working shelf, what Sleep does, and archiving chats idle for a number of days (never by default; never pinned, working, asleep or waiting on you). Off, the sidebar is as it was. Sleep and the settings are this device's. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>
…ynced rows Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…wake its agent A runtime that wakes its agent when background work ends (Claude Code, live-verified 2.1.319; Muse) says so. Its background agents are waited on, and a background process once the agent says it waits on it (AwaitBackground, scoped to the caller's own chat). A finished turn with such work parks into a wait: the session reads Waiting and the completion is held back until the wake turn ends it, or the work ends with no wake (15 s grace), or the run goes. The person's StopWaiting releases it. The wake turn is Working from its start, not its first words. A chat's sleep is synced on its row (setChatSleep), and its host wakes it the moment it starts asking or fails. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…l; mobile shows it as working until it draws its own Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…leep through it The zgx host's own copy of the status rule gives way to proto's (display_status_from, taking a chat's seen marks so raw rows needn't be cloned into Chats). What behaves differently: a run that went quiet while working reads idle, not done, as on every other viewport; a terminal's own activity counts. Each chat's row carries what its agent waits on and its sleep, and the host looks again as a sleeper's time comes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…host Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… Stop waiting Sleep is the engine's now (synced, woken early by the chat's host); a chat waiting on background work that will wake it is under way, in Working. Woke wears an alarm until looked at. Sleep's menu gains Custom… (a new ds.DatePicker), and a chat waiting on work its agent marked gains Stop waiting. Sleep times are local wall-clock times (Luau's os.time reads a table as UTC). Activity's one timer ticks a minute and works only while a chat sleeps or auto-archive is on. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ver sleeps one Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
As wide as its dialog, seven even columns; the chosen day the segmented control's selected wash, today a dot of the accent, past days the only dim ones and other months' days left blank (a sixth row only for a month that needs it); the month's arrows on the grid's edge; the time of day on its own row under a hairline. Sleep → Custom… opens on tomorrow at 9 and says when the chat wakes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…when it couldn't Every part starts on the dialog's left edge and ends on its right (the days are boxes spread edge to edge), its parts one gap apart, rows a compact 32. The moment chosen is the dialog's subtitle. A sleep or wake the chat's host refuses says so; an engine from before Sleep (it doesn't know the request) says Zeron there needs an update. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…hey wait - Waiting draws exactly as Working in zgx: the same ring and hue, a strong title, counted in a tab's corner and kept showing in a folded place. - A Claude Code chat run gets a short --append-system-prompt note on when to call wait_on_background (live probes: Sonnet ignored the MCP text alone; Sonnet and Opus both called it with the note). - The old desktop app draws nothing new: it reads Waiting as Working. - Zeron v2's base record re-blessed (it named a stray .orig file). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>
On Codex (and Pi, registry agents) a turn that ends is the agent done, so the tool and its instructions aren't offered there at all: the engine marks Zeron's server with ZERON_WAITS_ON_BACKGROUND=1 only when the harness says it brings its agent back as background work ends (Claude Code, Muse), and Claude's system-prompt note follows the same flag. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>
zeron/zgx's idle fix publishes a chat's live state only when it changed; it now judges that from the sessions as this branch reads them (the shown indicator, waits, subagents, the outcome), so a change in what a chat waits on is shown. Its heartbeat test's rows carry a deviceId, as the engine's do, since a row without one is no session. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>
Merged
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.
This is a beta update that ships together with the stable engine release. It adds a sidebar view called Activity, plus three engine features it depends on: Waiting, synced Sleep, and Woke.
Activity (zgx)
ds.DatePickerin a dialog.status-woke, yellow) until it's opened.ds.DatePicker: a month grid plus a 15-minute time select, keyboard support, days beforemindisabled, cells changed in place. It has a gallery page and 10 tests.Waiting (engine)
A turn that ends while its agent waits on background work that will wake it now reads Waiting, not finished. "Finished" is announced once, when the agent is actually done.
What counts as waiting:
wait_on_background. That call is pinned to the agent's own chat by the agent gate.Harness::wakes_on_background: Claude Code and Muse). On Codex, Pi or a registry agent, a turn that ends means the agent is done, so the tool isn't listed and can't be called.Holding the completion back: the engine withholds the completion marker while the chat waits. That one change fixes the desktop banner, the chimes, the phone push (the edge already keys off the marker) and MCP
wait_for_turn(which also now waits through a wait).Every way a wait ends:
StopWaiting, forwarded to the chat's host)Instructions: wherever the tool is offered, the rule for when to use it is in the tool's own description and the Zeron MCP server's
initializeinstructions. A Claude Code chat run also gets it in its system prompt, as a short--append-system-promptnote. Live probes on 2.1.319 showed that matters: with the MCP text alone, Sonnet never called the tool, and with the note, Sonnet and Opus both did. Muse tracks its background agents itself, so it needs no note.Look: in zgx, Waiting is drawn exactly as Working: the same ring, in the same hue. The row title is strong, the chat counts toward a tab's corner, and a folded place keeps it showing. Its tooltip still reads "Waiting".
Sleep (engine, synced)
Chat.sleep {until, at, wokeAt}is stored field by field on the chat row, so it syncs to every device. It's set byMutate setChatSleep, which agents can't call.One status rule
display_status_from, which takes a chat's seen marks so raw rows aren't cloned).What behaves differently
wait_for_turnreturns at that point too.Tests
waiting.background14, a Claude fake-CLI scenario replaying the live 2.1.319 frame order, and a test that only a chat's run gets the note.zgx lint uireports 0 errors.🤖 Generated with Claude Code