Repository navigation
feat(app): fold channels idle for 6 hours into an Inactive group - #126
Merged
Merged
Conversation
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.
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.
Channelsubscribes to pi commits and calls a newonActivity(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.activeinchannel.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.activeis optional, so an older host simply omits it.active || created, and a one-minute clock moves rows into Inactive without needing a broadcast.lastActivityAtnow 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
activeuntil it next gets an entry, so it is grouped by its creation time until then.Testing
I ran a real
ace serveagainst a throwawayACE_HOME, usedace sayon real workers, and viewed the built app in headless Chrome.channel.jsongainedactiveon the first entry. A secondsaystraight after left it unchanged (throttled). The gateway'sListingincluded it.old-one(active 7h ago) andlegacy(noactive, created 9h ago). Both appeared under a collapsed Inactive group; expanding it showed both.smokestayed under Channels.ace say old-one …,old-onemoved back to Channels live, with no reload.bun typesandbun run cipass.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:
desktop_inspect, because agents can't read image files by path (Let native agents inspect image files by path #51).Both apps were closed afterwards.