Repository navigation
Don't generate table of contents for stacks with just 1 PR. - #103
Merged
Merged
Conversation
ZolotukhinM
added a commit
that referenced
this pull request
Nov 16, 2025
stack-info: PR: #103, branch: ZolotukhinM/stack/1
ZolotukhinM
force-pushed
the
ZolotukhinM/stack/1
branch
from
November 16, 2025 22:21
7f0cbb9 to
2732b9c
Compare
laszlokindrat
approved these changes
Nov 18, 2025
ZolotukhinM
force-pushed
the
ZolotukhinM/stack/1
branch
from
November 20, 2025 05:48
2732b9c to
a271c07
Compare
ZolotukhinM
added a commit
that referenced
this pull request
Nov 20, 2025
stack-info: PR: #103, branch: ZolotukhinM/stack/1
To unclutter the view. stack-info: PR: #103, branch: ZolotukhinM/stack/1
ZolotukhinM
force-pushed
the
ZolotukhinM/stack/1
branch
from
November 20, 2025 05:49
a271c07 to
ef31a8d
Compare
4 tasks done
micahjsmith
added a commit
to micahjsmith/stack-pr
that referenced
this pull request
Oct 12, 2026
## Summary
Phase 2 of the autoland step-abstraction stack. Each step type now says what it has to show, and `display.py` decides how it looks. Before, `display.py` and `status.py` switched on the step's type to pick its status label, color, subject, detail line, prose description, and JSON fields.
- New `steps/view.py` holds the presentation-neutral contract. `StepView` is a frozen dataclass with these fields: `outcome` (a `StepOutcome`: done / active / pending / failed, moved from display's `_Outcome` with the same values), `status` ("Waiting for checks", "Assumed completed", ...), `tone`, `key` ("modular#103", "deploy.yaml", the condition or "(no condition)"), `description` (the one-line prose used in "Next steps" and in replan warnings), `note` (the PR title), `detail` (a tuple of fragments for the second line), and `data` (the type-specific `--status -o json` fields).
- `tone` is a semantic `StepTone` (muted, success, failure, awaiting review/checks/user/workflow, in queue, plain), not a rich style. The active tones say what the step is waiting on, so no color distinction is lost and no style hint is needed. `display.py` maps tone to style in one `_TONE_STYLES` table.
- `AutolandStep.view(stack, *, is_next, assumed_completed)` is a new abstract method, implemented on `LandStep`, `WorkflowStep`, and `ConfirmStep`. Display computes the two plan-position facts it takes (the pointer, and `is_assumed_completed`), so steps never see the plan or the pointer logic.
- The per-type tables move into the step modules: `STATE_LABELS`/`STATE_STYLES`/`_PR_STATE_OUTCOMES` go to `steps/land.py`, and `_WORKFLOW_STEP_STATUS` goes to `steps/workflow.py`. `_step_status`, `_step_target`, `_step_detail`, `_STEP_KINDS` (now `step.label`), `_land_entry`, and the type branches of `_describe_step` and `status._step_json` are gone. `_describe_step` remains as a one-line wrapper that returns `view().description`.
- `display.py` keeps all presentation: row layout, glyphs and icons, column widths, rich versus plain rendering, styles, markup escaping, joining detail fragments with the glyph separator, the headline, and the next-steps lines. `status.py` builds each step's JSON from generic fields plus `view.data`. Neither one branches on step type anymore, and the `assert isinstance(step, ConfirmStep)` shims from phase 1 are removed.
- `PRState` moves to a new `autoland/pr_state.py`, because `steps/land.py` needs it at runtime and `model.py` imports `steps`. `model` re-exports it, so no imports change.
No user-visible change. Console output, status text, and status JSON are byte-for-byte identical, and the order of JSON keys is unchanged.
## Test plan
- [x] Golden autoland scenarios (`tests/test_autoland_golden.py`) pass unchanged, with no golden files regenerated
- [x] New view tests in `tests/test_autoland_steps.py` pin the `StepView` for each step type: land across every `PRState`, with error/retry detail, untitled, and already landed; workflow across every state, plus its error detail; confirm when pending, awaiting confirmation, confirmed, and assumed completed, plus with no condition
- [x] The registered-step-type coverage now also requires every type to be concrete and to return a `StepView` with a status, key, and description
- [x] Full suite passes with `GH_CONFIG_DIR` empty and `GH_TOKEN` unset
🤖 Generated with [Claude Code](https://claude.com/claude-code)
stack-info: PR: #70, branch: micahjsmith/stack/4
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.
To unclutter the view.