feat(app): fold channels idle for 6 hours into an Inactive group #126
- IA
Closes #125.
Channels whose transcript hasn't grown for 6 hours now move out of **Channels**/**Team** into an **Inactive** group, collapsed by default and placed above Archived. They come back as soon as someone posts or an agent works in them again.
- **channel**: `Channel` subscribes to pi commits and calls a new `onActivity(at)` hook when a commit adds a transcript entry. That covers messages, agent replies, and tool results. It publishes at most once every 5 minutes because inactivity is measured in hours. - **host**: the worker saves this as `active` in `channel.json`. The catalog watcher already rebroadcasts on that write, so clients and the directory pick it up. Hosted channels send it to their workspace host as a `{ active }` workspace message. `Listing.active` is optional, so an older host simply omits it. - **app**: rows are grouped by `active || created`, and a one-minute clock moves rows into Inactive without needing a broadcast. `lastActivityAt` now uses the same value.
The new field is optional, so the catalog format version doesn't change. Older builds ignore it. A channel created before this change has no `active` until it next gets an entry, so it is grouped by its creation time until then.
### Testing
I ran a real `ace serve` against a throwaway `ACE_HOME`, used `ace say` on real workers, and viewed the built app in headless Chrome. - `channel.json` gained `active` on the first entry. A second `say` straight after left it unchanged (throttled). The gateway's `Listing` included it. - I backdated `old-one` (active 7h ago) and `legacy` (no `active`, created 9h ago). Both appeared under a collapsed Inactive group; expanding it showed both. `smoke` stayed under Channels. - After `ace say old-one …`, `old-one` moved back to Channels live, with no reload. - `bun types` and `bun run ci` pass.
### Built in Ace
The code, commands, and GitHub work were done by an Ace agent in an Ace channel. Two tools outside Ace were used for the UI check: - **Headless Chrome over CDP** loaded the built app from the test host and captured screenshots. An Ace channel can't load and inspect a web page yet (#50). - **Preview** opened those screenshots so the agent could look at them with `desktop_inspect`, because agents can't read image files by path (#51).
Both apps were closed afterwards.
iamnbutlermerged fb53aba1acc2last month on GitHub
iamnbutlerhead-ref-deletedlast month on GitHub
iamnbutlerreferenced this in chore(desktop): release canary 0.0.14 #130last month on GitHub