Repository navigation
Render /sessions output from the model's judgment JSON - #263
Merged
Merged
Conversation
haacked
marked this pull request as ready for review
October 28, 2026 20:11
`claude-sessions --render` prints a count line, list sections for Needs you, Claude can continue, and Waiting on something outside, and one-line sections for Held, Working, Done, and Stale. A list item shows the step, the session, a repo-qualified PR link with approvers and commenters, and idle time. A session stays in its own bucket with a "waits on" note naming its parent, and the sessions that more sessions wait on come first. Lone sessions that share a step collapse to one item. judge() in claude-sessions.jq returns each session's bucket, step, and parent, and render() formats them.
`claude-sessions --plan` sets the sidebar tint to #8E8E93 for each Supacode worktree whose session's PR merged, and clears that gray from the worktree of a session whose PR is open. A tint the user chose stays. A session's Supacode worktree counts only when its git worktree is the tab's worktree. A tint that fails does not fail the plan.
haacked
force-pushed
the
haacked/sessions-output-redesign
branch
from
October 28, 2026 21:40
faa4885 to
8c08e4e
Compare
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.
The
/sessionsoutput was hard to scan. The model laid out one markdown table by hand from rules in SKILL.md. Group headers were rows with no counts, the wide PR cell wrapped before the next step did, and eight near-identical review rows buried the real decisions. The PR cell also dropped the repo, idle age didn't show, and a working session moved into "Claude can continue" because its child belonged there.Now the model only writes its judgment as JSON, one
{name, bucket, step, parent, inferred, item}object per session.claude-sessions --render <facts> <judgment> [offline count]combines that with the saved--jsonfacts and prints the markdown, so the layout no longer depends on the model following rules. The output starts with a count line. Buckets that need action list each session with its step first, then name, a repo-qualified PR link with approvers and commenters, and idle age. Held, Working, Done, and Stale shrink to one line each. Sessions in a bucket with the same step print as one line. Each session stays in its own bucket and shows the session it waits on, instead of moving into its parent's group. The renderer rejects an unknown bucket, a name missing from the facts, or a repeated name, and the skill tells the model to fix the judgment and run it again.Test plan
bin/lib/test-claude-sessions.shpasses, including render tests that compare the full markdown outputclaude-sessions --jsonoutput with a hand-written judgment covering a chain, an inferred edge, a collapsed group, an approved PR with commenters, and an empty group/sessionsand check the output in the terminalhttps://claude.ai/code/session_01WXojGF5XryMvBSWW1dGnK1