Skip to content

feat(assistant): group a reply's steps into one line - #3615

Merged
Mavrick-F merged 1 commit into
opengeos:mainfrom
Mavrick-F:feat/assistant-step-groups
Dec 2, 2026
Merged

Mavrick-F merged 1 commit into
opengeos:mainfrom
Mavrick-F:feat/assistant-step-groups

Conversation

@Mavrick-F

@Mavrick-F Mavrick-F commented Dec 2, 2026 •

Copy link
Copy Markdown
Member

Summary

Every tool call the assistant makes takes a row of its own, so a longer request fills the conversation with "Looked for a tool: buffer", "Read features of Cities" and so on before the reply.

Calls made in a row now share one line: Worked through 14 actions · 1 failed. While the run goes on it reads 14 actions so far · 1 failed · ✓ Read the user guide: buffer. Opening it shows the same rows as before. Show every step in the settings, which is remembered, gives each call its own row again.

  • Messages, replies, notes (pauses, stops, retries), errors, the approval card, Continue and the tokens line are never inside the line. A note or an error ends it, so a retry partway through starts a second one and the order stays true.
  • What the model says between calls stays visible, above the line.
  • Declined calls are counted apart from failed ones. A call on its own keeps its own row.
  • The line says "actions" because the pause settings already use "step" for one reply of the model's, which may make several calls.
  • There's no count of files written: the kind of a call doesn't say reliably whether it wrote one.

Reach: the desktop and the browser (the same pane) and the phone sheet, which has the same setting. The phone's strip over the lowered sheet already shows only the latest step. The command line still prints each call. Agent windows and MCP clients show their own conversations and aren't changed, and Python has no assistant. No command, project file or dependency changes.

Testing

  • New tests: calls through the agent and the app's frame (the approval card, a decline, the final reply, opening the line, the setting and its saved value), where lines begin and end, and the phone sheet. The three take about 1 to 2 seconds together.
  • The assistant pane, phone assistant and layout reach tests passed locally before rebasing onto current main.
  • Full CI on a fork at this commit.
  • Tried with a scripted local model, not a live provider.

UI evidence

With a scripted local model that makes 14 calls, one of them failing.

Before After
Fourteen calls, each on a row of its own, above the reply One line, Worked through 14 actions, 1 failed, above the reply
Opened While running
The line opened to the same fourteen rows 14 actions so far, 1 failed, and the latest in words, above Thinking

Phone sheet, before, after and opened:

Before After Opened
The phone sheet with fourteen rows The phone sheet with one line The phone sheet with the line opened

Related issue

Part of #3568.

Summary by CodeRabbit

  • New Features
    • Consecutive assistant actions can now appear in expandable, grouped conversation lines, with action and failure counts. Expand a group to view individual actions and their results.
    • Enable Show every step in settings to display each action on its own line. This preference is available in both desktop and touch interfaces.
  • Documentation
    • Added guidance on grouped actions and the Show every step setting.

Calls made in a row share one line saying how many there were and how many
failed or were declined, and while the run goes on, the latest in words. It
opens to the same rows as before, and Show every step in the settings (kept)
gives each call its own line again. The desktop pane, the browser and the
phone sheet do this alike. Messages, notes, errors, approvals, Continue and
the tokens line stay outside it.

Part of opengeos#3568.
@coderabbitai

coderabbitai Bot commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The assistant transcript now groups consecutive tool calls into expandable steps in the desktop and touch interfaces. A persisted setting switches to individual-call display. The change also exposes a shared declined-call result constant and adds user-guide documentation.

Changes: Assistant transcript steps

Layer / File(s) Summary
Declined result and step grouping model
crates/assistant/src/agent.rs, crates/assistant/src/lib.rs, crates/ui-egui/src/assistant.rs
The assistant crate exposes DECLINED. The UI assistant state loads and saves the every-step preference. Transcript lines group tool calls and summarize action, failure, and decline counts.
Desktop and touch rendering
crates/ui-egui/src/assistantpane.rs, crates/ui-touch/src/assistant.rs, docs/user-guide/assistant.md
Both interfaces render grouped calls in expandable rows and provide the every-step setting. Tests cover grouping, expansion, and the setting. The guide describes the grouped and individual-call displays.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant AssistantPane
  participant lines
  participant TouchAssistant
  AssistantPane->>lines: Read transcript and every-step preference
  lines-->>AssistantPane: Return individual entries or grouped steps
  AssistantPane->>AssistantPane: Render entries and expandable grouped rows
  TouchAssistant->>lines: Read transcript and every-step preference
  lines-->>TouchAssistant: Return individual entries or grouped steps
  TouchAssistant->>TouchAssistant: Render entries and expandable grouped rows
Loading

Possibly related issues

Possibly related PRs

  • opengeos/RustGIS#3575 — Changes token display in the same assistant panes; this change keeps the token line outside grouped step rows.

Suggested reviewers: giswqs, jgregoriorincon

Merge Risk: Minimal · up to 536be

This change groups consecutive assistant actions into one expandable line and adds a "Show every step" setting. No concrete defect was found, and the change is UI-only and easy to roll back, so merge risk is minimal.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "feat(assistant): group a reply's steps into one line" names the main change: consecutive assistant tool calls are grouped into one summary line. It matches the raw summary and the PR object…
Description check Passed The description follows the template. It has a Summary that explains what changes and why, a Testing section with the tests run and the local checks, and a UI evidence section with before and after sc…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "feat(assistant): group a reply's steps into one line" names the main change: consecutive assistant tool calls are grouped into one summary line. It matches the raw summary and the PR objectives, and it is concise and specific.

Full details: Description check

Explanation

The description follows the template. It has a Summary that explains what changes and why, a Testing section with the tests run and the local checks, and a UI evidence section with before and after screenshots for the desktop and phone views. It links the work to Part of #3568. The template's Related issue section is filled in, and the UI evidence is provided where the template required it.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

A rabbit sees the call steps fold,
One tidy row, or each untold.
Tap once to see the actions inside,
Set every step to spread them wide.
“DECLINED” marks the paths that tried.

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: cb030f87-7283-409b-adee-e680402758e5
Commits

Reviewing files that changed from the base of the PR and between a9f2714 and 536be22.

Files selected for processing: 6

  • crates/assistant/src/agent.rs
  • crates/assistant/src/lib.rs
  • crates/ui-egui/src/assistant.rs
  • crates/ui-egui/src/assistantpane.rs
  • crates/ui-touch/src/assistant.rs
  • docs/user-guide/assistant.md

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 6 remain after this review.

@github-actions

github-actions Bot commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

Code review

I read the full diff, the AGENTS.md copy, and the surrounding code in assistant.rs, assistantpane.rs, ui-touch/src/assistant.rs, agent.rs and i18n/mod.rs. I could not compile or run the tests here (no shell), so compile and test status is unverified. The prior-review file has no threads, so there were no earlier concerns to leave alone.

Bugs

  • None found. I traced lines() by hand through the cases that matter: calls split by a message, note or error; text between calls; a trailing group while busy; and the test's expected shape ["0", "2", "[1, 3]", "4", "5", "6", "[7, 8]", "9"]. The grouping invariant holds, since said is only non-empty while calls is non-empty. Confidence the logic is right: high.
  • DECLINED compared with result is safe. Real tool results are JSON, and "Not run…" differs, so a collision is effectively impossible.

Security

  • None. The new text is rendered by egui and no data is parsed or sent.

Performance

  • None significant. lines() rebuilds a vector of references each frame, which is O(n) like the existing transcript pass. Bodies of collapsed groups aren't rendered, so the per-call plain_call work only runs when a group is open.

Quality

  • Tooltip wording ("each action of the assistant's"), with a suggested fix inline at assistantpane.rs:139. Confidence: high. Category: quality.
  • The touch shared_steps duplicates the desktop galley setup, and the entry match now exists in both front ends. Inline at ui-touch/src/assistant.rs:453. Confidence: medium. Category: quality.
  • Design question, not a defect (confidence: medium): model text between two calls renders before the whole group, so "Now the rest." appears ahead of call 1 as well as call 2. The doc comment says this is intended. Worth confirming it reads correctly in the screenshots.
  • steps_line counts "Not run: an earlier call turned the AI Assistant off" as failed, although nothing ran. Confidence: medium. Category: quality.

AGENTS.md

  • No breach found. New user-visible strings use tl! or fmt_raw. Non-test code has no unwrap, expect, or unsafe. Nothing is cfg-gated, so the wasm path is unaffected. No command, project file, or schema changes. The reach statement in the PR body is consistent with the diff.
  • Not verified: whether layout_reach needs a new entry for the added settings checkbox. It sits in the assistant pane, which that test already covers.

Twins checked

  • Desktop and phone: both render through assistant::lines and steps_line, both load the new preference via ensure_loaded/assistant::open, and both have the settings toggle. The phone keeps its "… and N more characters" note, which the desktop doesn't have. That gap predates this PR.
  • The overlay, read-route and #[cfg(wasm32)] families don't apply to this change.

Change size

Compared: the whole PR against main (merge base 87d3e50 to PR head 536be22).

Measure Value
Files changed 6 (0 added, 6 modified, 0 removed, 0 renamed)
Size before 390.6 KB
Size after 404.7 KB
Total size change +14.1 KB
Path Before After Change
crates/ui-egui/src/assistantpane.rs 133.3 KB 139.8 KB +6.4 KB
crates/ui-egui/src/assistant.rs 67.9 KB 72.4 KB +4.5 KB
crates/ui-touch/src/assistant.rs 68.5 KB 70.9 KB +2.4 KB
docs/user-guide/assistant.md 39.5 KB 40.0 KB +557 B
crates/assistant/src/agent.rs 79.8 KB 80.0 KB +190 B
crates/assistant/src/lib.rs 1.6 KB 1.6 KB +10 B

@Mavrick-F
Mavrick-F added this pull request to the merge queue Dec 2, 2026
@github-actions

github-actions Bot commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

📖 Docs preview

Item Value
Preview https://preview.rustgis.app/pr-3615/
Web app https://preview.rustgis.app/pr-3615/app/
Commit 536be22

GitHub Pages takes a minute or two to publish a new commit. Newer commits from the fork aren't published until a maintainer adds the preview label (once per commit).

Merged via the queue into opengeos:main with commit 256cd30 Dec 2, 2026
28 checks passed
@Mavrick-F
Mavrick-F deleted the feat/assistant-step-groups branch December 2, 2026 16:48
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