Skip to content

feat(ui): [AGENTS] left-panel box + single-source slash commands - #553

Merged
yogthos merged 5 commits into
dirge-code:mainfrom
laurrence1921:main
Jun 30, 2026
Merged

feat(ui): [AGENTS] left-panel box + single-source slash commands#553
yogthos merged 5 commits into
dirge-code:mainfrom
laurrence1921:main

Conversation

@laurrence1921

Copy link
Copy Markdown
Contributor

Summary

Two UI improvements bundled on this branch. Both build clean, pass cargo clippy --all-targets (incl. the #540 gate), and pass the full suite (3201 tests, 0 failures) against current main.

1. [AGENTS] box in the left panel

Adds a fourth left-panel box below [GIT] listing running subagents, with the profile name threaded through the whole data flow:

  • SubagentChatEvent::Spawn gains agent: Option<String>, populated from args.agent at both spawn sites (task.rs).
  • agent_io.rs forwards agent into the panel-row store.
  • state.rs: subagent_panel_rows simplifies from id -> (state, prompt, files) to id -> Option<String> (agent name).
  • panel_data.rs: SubagentStatusRow collapses to { id_short, agent }; the old prompt/files fields and the path-extraction helper are dropped.
  • panels.rs: the split ── agents ── region (height reservation/capping, paint_subagent_list) is removed. LeftPanel::render is now a single paint_idle_card call that renders [AGENTS] inline below [GIT].
  • text.rs: removes tail() and extract_file_paths_from_prompt() (only the deleted renderer used them).

Empty state renders · (none).

2. Single source of truth for slash command names + descriptions

Merges the parallel name-only and (name, description) lists into one slash_commands() -> Vec<(name, desc)>. slash_command_names() (tab completion, is_known_slash_command) and slash_command_descriptions() (the /help render) both derive from it, so adding a command is now one list entry plus one handle_slash match arm instead of three synchronized edits across two lists.

Name↔description drift is now structurally impossible; the old bidirectional drift test is replaced by a no-duplicate-names guard (the only residual copy-paste hazard). /help renders name description.

Test plan

  • cargo build
  • cargo clippy --all-targets
  • cargo test — 3201 passed, 0 failed

Merge the parallel name-only and (name, description) lists into one
slash_commands() -> Vec<(name, desc)>. slash_command_names() (tab
completion, is_known_slash_command) and slash_command_descriptions()
(the /help render) both derive from it, so adding a command is now one
list entry plus one handle_slash match arm instead of three
synchronized edits across two lists.

name<->description drift is now structurally impossible; the old
bidirectional drift test is replaced by a no-duplicate-names guard,
the only residual copy-paste hazard. /help renders "name  description".
Renders a fourth left-panel box listing running agents (hardcoded
placeholder names for now). Reserves its height in the ACTIVITY
sizing calc so it isn't crowded out on short panels, mirroring the
existing git_reserve logic. Agent-status data will be plumbed
through LeftPanelInfo in a follow-up.
Follow-up to abcab0f, which added a placeholder [AGENTS] box with
hardcoded names. Thread the actual subagent profile name through the
data flow and collapse the separate subagent region into the vitals
card.

- task.rs: SubagentChatEvent::Spawn gains `agent: Option<String>`,
  populated from args.agent at both spawn sites.
- agent_io.rs: forward `agent` into the panel-row store.
- state.rs: subagent_panel_rows simplifies from id -> (state, prompt,
  files) to id -> Option<String> (agent name).
- panel_data.rs: SubagentStatusRow collapses to { id_short, agent };
  drop the prompt/files fields and the path-extraction helper.
- panels.rs: remove the split layout (── agents ── region, height
  reservation/capping, paint_subagent_list). LeftPanel::render is now a
  single paint_idle_card call that renders [AGENTS] inline below [GIT].
- text.rs: remove tail() and extract_file_paths_from_prompt() (only the
  deleted renderer used them).
- mod_tests.rs: idle test asserts the · (none) empty-state placeholder
  instead of the old hardcoded names.

Net -291/+118. Build clean, 560 ui tests pass.
@yogthos

yogthos commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

thanks, if you could fix that rustfmt I can merge it in after

Fixes the rustfmt CI failure on PR dirge-code#553. Pure formatting, no behavior
change: expands the over-long tuple/struct-literal lines that rustfmt
wanted on multiple rows, and collapses the short slash_command_names
iterator chain to one line.
@laurrence1921

Copy link
Copy Markdown
Contributor Author

@yogthos pushed the latest changes, fixed the rustfmt :)

@yogthos
yogthos merged commit e97d80c into dirge-code:main Jun 30, 2026
13 checks passed
yogthos pushed a commit that referenced this pull request Jun 30, 2026
[AGENTS] left-panel box listing running subagents (id_short disambiguates
same-profile rows), slash commands unified to a single source of truth,
critic scoped/disabled for read-only and design prompts, and the 0.14.0
(#547) duplicate-output regression fixed by gating stream-chunk retry on
!committed again. Plus a README note on building with newer libclang.
(#548, #549, #552, #553, #554)
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