stacklok / stacklok/mecatl

mecatui ask-args view: richer pretty tiers (heredoc highlight, && / || clause segmentation)

Open
#552 0 comments 0 reactions 1 assignee View on GitHub

@jbeda is already working on this.

Since Aug 15, 2026.

enhancement fit-and-finish tui
Dominant language
Go
Stars
152
Forks
16
Avg merge
14h 48m
Merged PRs (30d)
536

Description

Summary

#488 gave the permission modal/ask-args view two tiers: a verbatim RAW tier (the wire args string, -wrapped) and a PRETTY tier (Bash: decoded {"command":…} text + timeout_ms annotation). The pretty tier is deliberately shallow — no shell-aware reformatting (no mvdan/sh dependency, per ADR 0108).

Bonus ideas (from #488, separable; could be one PR each)

  • Heredoc language detection — a Bash command embedding <<'PY' / <<'EOF' bodies could detect the embedded language (python, bash, …) and syntax-highlight it via the existing glamour/chroma stack.
  • && / || clause segmentation — multi-clause Bash commands could render each clause visually distinct (separator glyphs / alternating styling) so compound commands are scannable at the approval gate.
  • mvdan/sh-based pretty-print — normalize compound commands onto multiple lines. NOTE: ADR 0108 keeps the pretty tier byte-faithful today (no shell-aware reformatting); adopting mvdan means the pretty tier rewrites the command. The verbatim raw tier is the approval-integrity floor, so this is safe, but it is a deliberate decision, not a drive-by.

Invariant

Whatever the pretty tier does, the raw tier stays the constant floor: verbatim, untouched, one keystroke away.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.