Repository navigation
feat: status line segment (bin/ytstack-status) with STATE progress block - #32
Conversation
…slices, S01-T01 plan Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
… progress block Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…tstack project Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…02-T01 Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…lock current Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…EADME, concept, codex, CHANGELOG) Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…ate) Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: 9464a800-b9df-4eca-8e37-7e8661e4c81a) |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e6264b4f92
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
… pointer (PR #32 review) Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: 41ef3fc4-b042-4855-872b-52c8619db906) |
…t branch (PR #32 review) The slice checkbox count now follows the same source rule as the progress block; the checkout's copy is counted only when the slice plan does not exist on the default branch yet. Replaces the local-only reading pinned in the previous fix commit. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: 661de598-dbce-4c89-b126-5346a7af1f74) |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8dd603e504
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| REF=$(git -C "$YT_TOPLEVEL" for-each-ref --sort=-committerdate --count=1 --format='%(refname)' \ | ||
| "refs/heads/$DEF" "refs/remotes/origin/$DEF" 2>/dev/null) |
There was a problem hiding this comment.
Resolve equal-timestamp default refs explicitly
When the fetched origin/<default> has advanced beyond the local default branch but both tip commits have the same second-level committer timestamp, this sort ties and selects refs/heads/<default> first; I reproduced that ordering locally, causing feature branches and worktrees to display stale progress. Git documents that committerdate is a numeric sort key and that --count=1 stops after the first ref (git-for-each-ref documentation), so use ancestry or an explicit tie-break that favors the unequal remote ref rather than treating the timestamp as a total ordering.
Useful? React with 👍 / 👎.
| ```bash | ||
| input=$(cat) | ||
| yt=$(ls -d ~/.claude/plugins/cache/*/ytstack/*/bin/ytstack-status 2>/dev/null | sort -V | tail -1) | ||
| seg=$([ -n "$yt" ] && printf '%s' "$input" | "$yt") |
There was a problem hiding this comment.
Guard the optional segment in
set -e scripts
When a user's status-line script enables set -e, running this documented snippet outside a ytstack project, with a malformed progress block, or before the plugin is installed terminates the entire status-line script at this assignment because the substitution returns 1. Bash gives an assignment-only command the status of its command substitution (Bash reference), so handle the expected nonzero status here (for example with || true) before printing the rest of the status line.
Useful? React with 👍 / 👎.
…#33) * fix: pick the default ref by ancestry and guard the status line snippet under set -e (PR #32 review follow-up) Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> * chore: STATE reflects the merge of PR #32 Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> * chore: release 0.5.0 (status line segment); manifests, README badge, CHANGELOG, STATE Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
Closes #31.
What
A status line script can now append one compact ytstack segment for the directory it runs in.
bin/ytstack-status: readscwdfrom the status line JSON on stdin (else$PWD), prints the segment and exits 0, or prints nothing and exits 1 (no.ytstack/, nothing to show, malformed block).NO_COLOR/--no-colorfor plain text. Local refs only, no network, nogh.progressblock in theSTATE.mdfrontmatter (label,done,total,waiting_on). Without it the segment falls back to the task checkboxes of the active slice plan.origin/<default>and<default>when the checkout is on another branch (a linked worktree carries a stale copy); the task pointer always comes from the checkout.yt_progress_parseinhooks/lib/git-ctx.shis the only parser;yt_state_lintreports a malformed block as W7, so the segment and the lint cannot disagree.summarize-taskandquick-taskupdate the block when they advance STATE.docs/statusline.md: block reference, output forms, integration snippet, limits. Pointers in README,docs/concept.md,docs/codex.md, CHANGELOG[Unreleased].Decisions
done/total. Several named tracks and adone/openpair are not built (DECISIONS 2026-11-11).statusLinecommand, so the documented snippet globs the plugin cache and picks the highest installed version. A SessionStart-maintained link was dropped because that hook is read-only by contract.STATE.mdand appends toDECISIONS.md, so expect a textual conflict there when both lines meet.Verification
bash tests/run-all.sh: 13 suites pass on macOS (bash 3.2), including the newtests/ytstack-status.test.sh(31 cases: outside a project, slice fallback, block, malformed block, input fallbacks, colour switch, linked worktree, detached HEAD, clone with a newerorigin/main) and 16 new parser/lint cases intests/git-ctx.test.sh.bin/ytstack-check: no failures, 27 warnings, the same count asmain.python3 -m unittest discover -s tests -p 'codex*_test.py': 13 tests OK.claude plugin validate .: passed.tests/run-all.sh --linux(no Docker daemon). The ubuntu CI job on this PR is the Linux evidence.Known limits
waiting_onis cut by characters of the current locale; underLC_ALL=Ca multi-byte character at the cut can be split (markedshortcut:in the script).🤖 Generated with Claude Code
Note
Low Risk
Additive CLI and frontmatter parsing with broad shell tests; shared
git-ctx.shchange is limited to optional progress linting and does not alter hook write paths.Overview
Adds a status line segment so any host can append one line of ytstack context: optional release-style
progressfrontmatter inSTATE.md(label,done,total,waiting_on), or fallback to the active slice’s task checkbox counts plus the localM###/S##/T##pointer.bin/ytstack-statusreadscwdfrom status-line JSON (else$PWD), resolves the project via the existing git-ctx helpers, and prints a single formatted line (colour optional). On non-default branches and linked worktrees, plan progress comes from the newer of local/origindefault-branchSTATE.mdviagit show; the task pointer always comes from the checkout. Malformed blocks produce no output;yt_progress_parseinhooks/lib/git-ctx.shis the sole parser, withyt_state_lintW7 so lint and the segment cannot disagree.summarize-taskandquick-task(0.1.1) document keeping the block in sync when STATE advances.docs/statusline.mdcovers the block, behaviour, and a plugin-cache glob snippet for Claude Code; README, CHANGELOG,concept.md, andcodex.mdpoint at it. Milestone M021 closes in.ytstack/artifacts and DECISIONS.Reviewed by Cursor Bugbot for commit 8dd603e. Bugbot is set up for automated code reviews on this repo. Configure here.