Skip to content

cli: fold per-font warnings into one entry; watch clears the terminal between rebuilds (stacked on #303) - #310

Closed
d-q222 wants to merge 2 commits into
agent/daniel-parent/cli-rich-diagnosticsfrom
agent/daniel-parent/cli-terminal-ux
Closed

d-q222 wants to merge 2 commits into
agent/daniel-parent/cli-rich-diagnosticsfrom
agent/daniel-parent/cli-terminal-ux

Conversation

@d-q222

@d-q222 d-q222 commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Lane daniel-parent (Max 20x, mac-m5pro-dq222; not daniel-vpclaude), claim GH-CLI-OUTPUT-NOISE, announced on #2 before starting. Stacked on #303. The base is that branch, so this diff shows only the new commit; retarget to main once #303 merges.

Change (terminal presentation only)

  • --diagnostics=full: positionless diagnostics that differ only in a leading name: fold into one entry that lists every name, even when the message repeats the name. On HW1 that is 4 of its 6 diagnostics.
  • watch on a terminal: clears the screen before each rebuild, so only the latest run is visible.
  • Unchanged: summary counts (6 warnings), --diagnostics=short, piped output, --json, the worker protocol, the compiler and the pipeline. No warning is hidden or reclassified.

HW1, --diagnostics=full (tail)

Before:

warning[math_resource_profile]: lmex10: glyphs drawn from latinmodern-math (one 10pt design); ... not the reference's lmex10 design
 --> HW1.tex

warning[math_resource_profile]: lmmi10: ... (×4 entries in total)

After:


warning[math_resource_profile]: lmex10, lmmi10, lmmi8, lmsy10: glyphs drawn from latinmodern-math (one 10pt design); no optical-size OpenType outline resource exists for this family, so the outlines are not the reference's lmex10, lmmi10, lmmi8, lmsy10 design
 --> HW1.tex

flashtex: HW1.tex: recovered, 3 pages, 0 errors, 6 warnings

The piped short output still has all 4 math_resource_profile lines.

Tests

…n watch rebuilds

`--diagnostics=full` printed one entry per math font for the same
`math_resource_profile` warning (4 of HW1's 6 diagnostics). Positionless
diagnostics that differ only in a leading `name:`, wherever else the message
repeats that name, now print as one entry listing every name:

  warning[math_resource_profile]: lmex10, lmmi10, lmmi8, lmsy10: glyphs drawn from latinmodern-math ...

The summary counts, `--diagnostics=short`, piped output and `--json` are
unchanged; nothing is hidden or reclassified. `watch` clears a terminal
before each rebuild so the latest run is the only one on screen (piped
stderr is untouched).

Tests: 2 new unit tests (fold in place with the name repeated in the
message; located, single and multi-word-name diagnostics never rewritten).
flashtex-cli: 15 unit, 12/13 integration; the one failure is the fixture
drift fixed separately in #308.

Implementation-Agent: daniel-parent (mac-m5pro-dq222)
Commit-Executor: git, direct
Co-authored-by: d-q222 <[email protected]>
@GoKubar
GoKubar deleted the branch agent/daniel-parent/cli-rich-diagnostics September 14, 2026 14:43
@GoKubar GoKubar closed this Sep 14, 2026
@d-q222

d-q222 commented Sep 14, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #387: same branch, retargeted onto main after #303 merged (GitHub closed this PR when its base branch was deleted).

GoKubar pushed a commit that referenced this pull request Sep 14, 2026
… (re-opened #310 onto main after #303 merged) (#387)

* cli: rustc-style diagnostics with a source excerpt and carets (#277 part 2)

`flashtex check`/`build`/`watch` print each diagnostic as a header, a
`--> file:line:col` pointer, the source line(s) under a line-number
gutter, carets under the byte span and a wrapped `= recovery:` line.

- `--diagnostics=full|short|json`: full is the new form; short is the
  unchanged one-line `line_text`; json is `--json`. The default is full
  when stderr is a terminal and short otherwise, so piped output and
  scripts see exactly what they did before.
- `--color=auto|always|never`; auto is on for a terminal unless NO_COLOR.
- Uses only the fields a diagnostic already has (code, message, span,
  recovery). Structured labels/help from #277 part (1) can be added to
  the renderer without changing this path.
- Spans: tabs expanded so carets line up, multi-byte text, empty spans
  and spans past the end of the text get one caret, spans longer than
  four lines show the first two and the last.

Tests: 7 renderer unit tests, one end-to-end test for the flags. The
pre-existing multi_file_project_resolves_inputs_from_the_project_root
failure reproduces on unmodified main 9bd4b02 and is not touched here.

Implementation-Agent: daniel-parent (mac-m5pro-dq222)
Commit-Executor: git, direct
Co-authored-by: d-q222 <[email protected]>

* cli: fold per-font warnings into one entry, clear the terminal between watch rebuilds

`--diagnostics=full` printed one entry per math font for the same
`math_resource_profile` warning (4 of HW1's 6 diagnostics). Positionless
diagnostics that differ only in a leading `name:`, wherever else the message
repeats that name, now print as one entry listing every name:

  warning[math_resource_profile]: lmex10, lmmi10, lmmi8, lmsy10: glyphs drawn from latinmodern-math ...

The summary counts, `--diagnostics=short`, piped output and `--json` are
unchanged; nothing is hidden or reclassified. `watch` clears a terminal
before each rebuild so the latest run is the only one on screen (piped
stderr is untouched).

Tests: 2 new unit tests (fold in place with the name repeated in the
message; located, single and multi-word-name diagnostics never rewritten).
flashtex-cli: 15 unit, 12/13 integration; the one failure is the fixture
drift fixed separately in #308.

Implementation-Agent: daniel-parent (mac-m5pro-dq222)
Commit-Executor: git, direct
Co-authored-by: d-q222 <[email protected]>
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.

2 participants