Skip to content

feat(cli): show the run's progress with the Quiet Pulse spinner, and add --plain - #340

Merged
goldbarth merged 1 commit into
mainfrom
quiet-pulse-progress
Oct 6, 2026
Merged

goldbarth merged 1 commit into
mainfrom
quiet-pulse-progress

Conversation

@goldbarth

@goldbarth goldbarth commented Oct 6, 2026 •

Copy link
Copy Markdown
Owner

Part of #339, the first of three pull requests for the launch: the terminal profile, the spinner on the run's progress, and --plain. doctor and the run summary follow.

  • Why: the progress lines were plain text that rewrote itself, the same in every terminal. Give the terminal output one calm, consistent form #339 gives the output one calm form; the progress is where motion belongs, because it is the one place a person waits.
  • TerminalProfile (Cli/Terminal) decides once per stream what it may show, conservatively: a redirected stream, CI (which may imitate a terminal), TERM=dumb and --plain get plain lines with no ESC, no CR and nothing beyond ASCII. NO_COLOR keeps the motion and drops the colour, as its convention asks. Truecolor is read from COLORTERM, never assumed from a terminal; TERM with 256color gets the 256 palette, any other terminal the 16 colours. A console whose encoding is not UTF-8 gets ASCII frames and marks, since it would print braille as question marks.
  • QuietPulse: ten braille frames, 100 ms each, and a fade of the glyph alone along the brand ramp (#E0A34B, #B07A2E, #14807A, #2DD4BF), three seconds out and three back, smoothstepped at the turns. Every spinner reads one clock, so the fade continues from step to step. 256 colours get a fixed amber (179) and 16 colours yellow, since a fade there would show its steps.
  • ConsoleRunProgress: the active step is ⠼ <label> <count> <time>; a finished step stays as · done <label> .... "done" says the step ended, not that its result is good. A step shorter than 150 ms never shows a spinner, only its line. Minutes read 1 min 07 s. Without a live terminal nothing changes: one plain line per step as it starts.
  • IRunProgress.Fail(): Complete() in a finally marked the step a run failed in like any other. The pipeline now calls Complete() on success and Fail() when an exception leaves it, so that step shows × fail above the error rather than · done.
  • --plain is an option of every command, documented in the help and in docs/cli.md; for doctor it is accepted now and takes effect with the next pull request.
  • Docs: cli.md ("While a run works" with the table of what each terminal shows, and the option), troubleshooting.md ("A slow run"), architecture.md (where the terminal concerns live).

Verified:

  • The built CLI in a pseudo-terminal (script, COLORTERM=truecolor), against a local GitHub stub and a model stub that answers after two seconds: the rendering step redraws with the braille frames in turn, its colour moving from #D59944 to #26BEAD over the two seconds, and both steps end as · done lines. Reading the pull requests took under 150 ms and showed no spinner.
  • Redirected, as in ProgressOutputTests, the output is unchanged: plain lines, no ESC, no CR.

Tests: TerminalProfileTests (truecolor, 256 and 16 from TERM, NO_COLOR, redirected, --plain, TERM=dumb, CI with its values, a non-UTF-8 console), QuietPulseTests (frame timing, the fade's ends and symmetry, colour per depth, ASCII frames), ConsoleRunProgressTests rewritten for the new lines plus the failed step, the delay and ASCII; ReleasePipelineTests expects fail for a failing step; CommandLineArgumentsTests accept --plain for each command. All tests pass.

@goldbarth
goldbarth force-pushed the quiet-pulse-progress branch from 12d2423 to 0692fc1 Compare October 6, 2026 17:45
@goldbarth
goldbarth merged commit 6caff4a into main Oct 6, 2026
4 checks passed
@goldbarth
goldbarth deleted the quiet-pulse-progress branch October 6, 2026 17:59
goldbarth added a commit that referenced this pull request Oct 6, 2026
…warnings mean for a run (#341)

Part of #339, the second of three pull requests for the launch. Stacked
on #340, which brings the terminal profile and `--plain`; review that
one first, and this one's diff shrinks to its own once #340 is merged.

- **Why:** `doctor` printed one flat list of ten or eleven checks and
ended on "A run would start. The warnings above do not stop it" even
when the warning was a token that may not publish, which stops
`generate` before its first model call. The first command a new user
runs should be the easiest to read, and must not promise a run that
would stop.
- **Three groups** in the order a run meets them: Repository (git,
checkout, tag, repository, config), Model (model, endpoint), GitHub
(read, write, PR titles), under a header `chartula · doctor` and the
checkout's path. The checks themselves, their order and their details
are unchanged.
- **Status as symbol and word:** `✓ ok`, `! warn`, `× fail`, `– skip`,
in `StatusMarks` (`Cli/Terminal`), which the progress lines of #340 now
use for `· done` and `× fail` too. The word carries the meaning; ok is
green, fail red, warn the amber of the brand ramp where the terminal can
show it, done and skip neutral. Plain output (redirected, CI,
`TERM=dumb`, `--plain`) keeps the word alone in the old columns, so a
report pasted into an issue reads as before and existing scripts that
match ` ok git` still do.
- **The verdict counts and qualifies:** "Setup checks passed. A run
would start.", "Setup checks completed with N warnings." followed by
either "A run would start; read them before generate." or, when a
warning is under GitHub write, "preview and generate --no-publish would
start; generate would stop at GitHub write.", and "A run would stop. Fix
the failed checks, then run chartula doctor again." Exit codes are
unchanged: 1 on a failure, 0 otherwise.
- **Profile from stdout:** the report goes to stdout, so stdout's
profile decides; `DoctorCommand.RunAsync` takes it, and a test or a
caller without one gets plain output.
- **Docs:** the three `doctor` samples (`cli.md`, `getting-started.md`,
`troubleshooting.md`) show the new form; `cli.md` gives the symbols,
says what the last line means, and what plain output looks like.

**Verified:**
- The built CLI in a pseudo-terminal (`script`, `COLORTERM=truecolor`)
against local GitHub and model stubs: the header in bold, three bold
group headings, green `✓ ok`, the GitHub write warning in amber
(`38;2;224;163;75`), detail lines aligned under the check's text, and
the verdict naming GitHub write.
- `chartula doctor --plain` in the same checkout: no ESC, the word alone
per status, the groups and the header in plain text.

Tests: `DoctorCommandTests` gain the header and the groups, symbol and
word on a terminal profile with the details aligned, and the verdict for
a warning that does not stop a run; the token test expects the verdict
for a warning under GitHub write. `StatusMarkTests` cover the six-column
form, ASCII symbols and the colour per status and depth. All tests pass.
goldbarth added a commit that referenced this pull request Oct 6, 2026
…n went, and group the help (#342)

Closes #339

The third of three pull requests for the launch, stacked on #341
(doctor) and #340 (progress, `--plain`); review those first. With this
one, every point of the launch cut in #339 is done; the points after the
launch stay listed there.

- **Why:** a run's summary opened on "Generated changelog for v1.3.0"
whether the checks found nothing or flagged half the customer page, and
an audience that failed showed only further down. The first line is the
one a person reads; it should say how the run went.
- **The first line:** `Generated v1.3.0.`, `Generated v1.3.0 with review
flags: 2 in customer.`, `Partially generated v1.3.0: 1 of 3 audiences
failed.` (with `; review flags: ...` when there are some), or `No
audience rendered for v1.3.0.`. "Generated" reports what the run did,
not that the text is verified; `docs/cli.md` says so. The closing "N of
M audiences failed." and the exit codes are unchanged.
- **Audience headings:** each rendering stands under its audience's
name, in bold on a terminal, in place of `--- Technical ---`. The
rendering itself is not indented, so the Markdown copies out as written,
and the flags keep the form #211 gave them.
- **A header per command:** `chartula · generate` or `chartula ·
preview` opens stderr, above the announced defaults and the run header;
plain output writes `chartula generate`. `preview`'s stdout opens on
`Preview of v1.3.0` and `No model calls · no files written · no
publication`.
- **One profile per stream:** `Program` decides stderr's profile
(progress, notices) and stdout's (the summary) separately, so `generate
> report.txt` keeps a live spinner on the terminal and a plain file.
- **Help in groups:** "Which release", "What a run writes", "How it
looks", under a lowercase `chartula` like every other header. Every
option and its text is unchanged.
- **Docs:** the summary and preview samples in `getting-started.md`,
`troubleshooting.md` and `cli.md`; `cli.md` gains a table of the first
line and the header in the `--tag`/`--repo` sample.

**Verified:**
- The built CLI in a pseudo-terminal (`script`, `COLORTERM=truecolor`)
against local GitHub and model stubs: stderr opens on `chartula ·
generate` in bold, the progress follows, and stdout opens on the
headline in bold, with the audience heading below it.
- `chartula preview --plain` in the same checkout: `chartula preview` as
the header, no ESC.

Tests: `ReleaseCommandOutputTests` gain the four first lines and the
audience heading; the tests on a run without renderings, on repeated
failures, and `PreviewOutputTests` expect the new lines;
`ArgumentCheckTests` the help's first line. All tests pass.
goldbarth added a commit that referenced this pull request Oct 7, 2026
… to date (#344)

Follows #335 and #340 to #342, which each added an option to the help;
merging them left the help wrong.

- **Why:** on `main`, `chartula --help` listed `--replace-published`
under "How it looks" and `--audience` twice, once under "What a run
writes" and again after `--plain`. Both pull requests had edited the
same lines of the help text, and the merge kept parts of each.
- **Fix:** `--replace-published` stands under "What a run writes", after
`--no-publish`, and the second `--audience` block is gone. No option's
text changes.
- **A test for the shape:** the help is one string so that a test can
check it; `The_help_lists_each_option_once_under_its_group` now holds
each group's options, in order, and that each option is listed once. It
fails on the help as merged and passes on this one.
- **`docs/cli.md`:** the `doctor` status table and the sentence on the
last line name a published release as a cause of a warning under GitHub
write (#334), next to a token that may not publish.
- **`ROADMAP.md`:** #315, #337 and #339 move from "Left before the
announcement" to done; what is left is the release that ships them.

**Verified:**
- `chartula --help` from the built CLI before and after: three groups,
every option once.
- Nothing else of the merges needed repair: no conflict markers, the
build has no warnings, and the suite passed on `main` before this
change.

Tests: one theory with three cases in `CommandLineArgumentsTests`. All
tests pass.
goldbarth added a commit that referenced this pull request Oct 7, 2026
Follows #344. Step 1 of `docs/development/releasing.md`.

- **Why now:** the launch points are merged, and the binary people
install is still `0.1.0-preview.3`, which has none of them. The
announcement needs a release that holds what the README and the docs on
`main` describe.
- **What ships since preview.3,** 63 commits:
- a first run: `chartula doctor` (#295, grouped in #341), `chartula
--version` (#286), a free `preview` (#292), progress while a run works
(#297, with a spinner and `--plain` in #340), a first tag from the first
commit with a confirmation for a large range (#282);
- what a release contains: commits without a pull request (#291), issue
numbers at every depth (#293), a sentence for a release with nothing for
developers (#307 in #333);
- checks and prompts: pull request text quoted and bounded (#338), no
false flag for a wrapped phrase or a fenced block (#336), flags set
apart from the entries (#331);
- publishing: the token checked before the first model call (#285), a
published release not replaced unless asked (#335);
- the files: `changelog.json` without descriptions and readable as text
(#294, #332).
- **Breaks to state in the notes,** as `docs/versioning.md` asks of a
preview:
- `changelog.json` is schema version 2: a change's `description` is gone
(#294). The run record is schema version 3 and holds the complete facts.
- `generate` stops on a tag whose release is already published;
`--replace-published` restores the old behaviour (#335).
- An option a command does not take stops the run (#301), and
`--whole-history` is gone (#282).
- The terminal output changed form (#340 to #342): the summary's first
line, audience headings in place of `--- Technical ---`, and `doctor`'s
last line. A script that reads those lines needs a look; exit codes and
the files are unchanged.
- The csproj `Version` is the single source; nothing else carries the
number.

**After merge:** tag the merge commit on `main` with `v0.1.0-preview.4`
and push it; `release.yml` builds the draft, `chartula generate --tag
v0.1.0-preview.4` writes the notes into it, and publishing runs
`install.yml`. The pinned `v0.1.0-preview.3` in `docs/ci.md` and
`docs/install.md`, and the template link in the `doctor` samples, move
to the new tag once the release exists, with the changelog pull request
of step 6.

**Verified:** the built CLI prints `chartula 0.1.0-preview.4+<commit>`.

Tests: no test changed. Full suite 1,010 passing, build without
warnings.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant