CPLAT-9497: replace has-X session badges with lifecycle states#39
Merged
Conversation
Collapse the 12 "has memory / todo / plan / subagent / compaction / skill / MCP / shell / fork / worktree / cron / task" badges into four lifecycle states that describe what the session is actually doing: [BG] background shell, Monitor, or active cron in flight [WAIT] live and idle with unfinished todos/tasks [DONE] had todos/tasks and they are all completed [STUCK] live but JSONL stale >30min with unfinished work [HERE] / [LIVE] / [BUSY] keep their existing meanings. The corresponding has:* search filters stay; new is:bg / is:wait / is:done / is:stuck filters mirror the new badges so users can search by state directly.
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.
JIRA: https://sendbird.atlassian.net/browse/CPLAT-9497
Summary
[M][T][K][P][A][C][S][X][B][F][W]and cron) into 4 lifecycle states:[BG],[WAIT],[DONE],[STUCK].[HERE]/[LIVE]/[BUSY]keep existing meaning.Session.Lifecycle()returning a single mutually-exclusive state computed fromIsResponding,HasShellJobs, active crons, todo/task statuses, and JSONL mtime staleness.is:bg,is:wait,is:done,is:stuck. All existinghas:*andis:*filters preserved.State priority
IsResponding→[BUSY]HasShellJobs && IsLiveor any active cron →[BG]IsLive+ mtime ≥30min + unfinished work →[STUCK]IsLive+ unfinished todo/task →[WAIT]completed→[DONE]Test plan
go build ./...go test ./...— 430 pass (incl. 12 new lifecycle tests + 4 new filter tests)ccxTUI shows new state badges and that legend in?help reflects themis:bg,is:wait,is:done,is:stuckfilter correctlyhas:mem/has:todo/has:plan/etc still work even though their badges are gone