Skip to content

feat(tui): group tool trail under a left rail, rule only phases - #283

Merged
github-actions[bot] merged 1 commit into
mainfrom
fix/conversation-rule-hierarchy
Aug 6, 2026
Merged

github-actions[bot] merged 1 commit into
mainfrom
fix/conversation-rule-hierarchy

Conversation

@mohitranka

Copy link
Copy Markdown
Contributor

Summary

Refine conversation rendering so full-width rules only open distinct task phases, not every block.

Previously lines_for_width drew a full-width ─ rule between nearly every block — user turns, progress ticks, tool calls, plans, approvals, and answers each got the same separator, fragmenting the transcript and giving minor events equal weight to major turns.

Changes

  • Rules open phases only: the full-width rule now fires only before the first PlanChecklist of a turn. update_plan re-renders stay rule-less. Removes the obsolete paired_with_answer rule suppression.
  • Tool rail: ActivityGroup and ActiveProgress render on a subtle │ rail (theme::border_muted()), grouped compactly under the turn with no gap lines; subcommands nest deeper (│ └─ cargo test · failed).
  • Major blocks stay flat: user turns keep their message wash (no redundant rule); approvals, error callouts, plans, and the final answer are un-railed and separated by a blank line.
  • Flat mode: panes under 50 columns drop the rail and indent (icons + spacing only).
  • Diff panels untouched (zero-width markers must stay at line-start for the bordered-panel renderer).

Verification

  • New invariants: zero rules in plan-less turns, exactly one rule before the first plan, rail on tool lines / absent on answer+user lines, no rail below 50 cols, rule+rail structure unchanged by expand, and identical structure across all five builtin themes.
  • Visual inspection of rendered output for tool turns, planned turns, approvals, and narrow panes.
  • cargo fmt, cargo clippy --workspace --all-targets -- -D warnings, full forge-tui suite (733 passing).
  • Workspace green except 3 forge-config permission test failures confirmed pre-existing on clean main.

Notes

No new theme tokens; reuses border_muted/muted/accent_soft_bg. Rail + indent glyphs are included in copied transcript text (accepted).

Full-width rules previously walled off every block (user turns, progress,
tool calls, plans, approvals, answers), giving minor events the same
visual weight as major turns.

- Rules now open only distinct task phases: the first plan checklist of a
  turn; plan_update re-renders stay rule-less.
- Tool calls and progress render on a subtle left rail (muted border)
  under the current turn, grouped compactly with no gap lines.
- Subcommands nest deeper on the rail; wrapped content keeps its width.
- User turns keep their message wash (no redundant rule); approvals,
  error callouts, plans, and the final answer stay flat and prominent.
- Pane widths under 50 columns drop the rail and indent (flat mode).
- Removes the obsolete paired_with_answer rule suppression.
- Adds invariants: rule count, rail presence, flat mode, expand
  independence, and identical structure across every builtin theme.
@github-actions
github-actions Bot enabled auto-merge (squash) August 6, 2026 05:37
@github-actions
github-actions Bot merged commit 5b67c9b into main Aug 6, 2026
7 checks passed
mohitranka added a commit that referenced this pull request Aug 21, 2026
Full-width rules previously walled off every block (user turns, progress,
tool calls, plans, approvals, answers), giving minor events the same
visual weight as major turns.

- Rules now open only distinct task phases: the first plan checklist of a
  turn; plan_update re-renders stay rule-less.
- Tool calls and progress render on a subtle left rail (muted border)
  under the current turn, grouped compactly with no gap lines.
- Subcommands nest deeper on the rail; wrapped content keeps its width.
- User turns keep their message wash (no redundant rule); approvals,
  error callouts, plans, and the final answer stay flat and prominent.
- Pane widths under 50 columns drop the rail and indent (flat mode).
- Removes the obsolete paired_with_answer rule suppression.
- Adds invariants: rule count, rail presence, flat mode, expand
  independence, and identical structure across every builtin theme.
mohitranka added a commit that referenced this pull request Sep 11, 2026
Full-width rules previously walled off every block (user turns, progress,
tool calls, plans, approvals, answers), giving minor events the same
visual weight as major turns.

- Rules now open only distinct task phases: the first plan checklist of a
  turn; plan_update re-renders stay rule-less.
- Tool calls and progress render on a subtle left rail (muted border)
  under the current turn, grouped compactly with no gap lines.
- Subcommands nest deeper on the rail; wrapped content keeps its width.
- User turns keep their message wash (no redundant rule); approvals,
  error callouts, plans, and the final answer stay flat and prominent.
- Pane widths under 50 columns drop the rail and indent (flat mode).
- Removes the obsolete paired_with_answer rule suppression.
- Adds invariants: rule count, rail presence, flat mode, expand
  independence, and identical structure across every builtin theme.
mohitranka added a commit that referenced this pull request Sep 11, 2026
Full-width rules previously walled off every block (user turns, progress,
tool calls, plans, approvals, answers), giving minor events the same
visual weight as major turns.

- Rules now open only distinct task phases: the first plan checklist of a
  turn; plan_update re-renders stay rule-less.
- Tool calls and progress render on a subtle left rail (muted border)
  under the current turn, grouped compactly with no gap lines.
- Subcommands nest deeper on the rail; wrapped content keeps its width.
- User turns keep their message wash (no redundant rule); approvals,
  error callouts, plans, and the final answer stay flat and prominent.
- Pane widths under 50 columns drop the rail and indent (flat mode).
- Removes the obsolete paired_with_answer rule suppression.
- Adds invariants: rule count, rail presence, flat mode, expand
  independence, and identical structure across every builtin theme.
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