Repository navigation
Sonny: every fold has a key, and the clean view stays text - #421
Conversation
The clean view left commands, reads and edits out entirely, so a reply stood with nothing under it to show the edit or the test run. Each stretch of that work is now one row, as Codex's Explored/Ran cells and Claude Code's "Read 3 files" rows say it: "• Ran 2 commands, edited tally.py -1 +1 ▸", ✗ and a count when some failed. A click opens every call as the verbose view draws it; /verbose keeps them all drawn. Rows a click opens had no key. Ctrl+O opens every fold and gathered row in the conversation, or folds them again, as Claude Code's Ctrl+O does; /status takes ↑↓ to pick an agent and Enter to open it, as /commons picks a thread. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGEBHyeyj8q32PemnWK
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGEBHyeyj8q32PemnWK
…keys Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGEBHyeyj8q32PemnWK
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGEBHyeyj8q32PemnWK
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 74c92d2774
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if verb == WORK { | ||
| let (mut spans, failed) = work_row(whats); | ||
| spans.push(Span::raw(if open { " ▾" } else { " ▸" }).dim()); |
There was a problem hiding this comment.
Make single-line work folds expandable
When a stretch contains only one successful read, its verbose rendering is a single header line, but the new summary replaces that header with Read 1 file ▸. transcript::unfolds returns false for a single one-line call, so commit_call attaches no opening link and open_all skips it. The filename is therefore hidden behind an inert disclosure arrow. Work folds need an expandability check that accounts for information lost in the summary, even when the underlying call occupies only one line.
Useful? React with 👍 / 👎.
| if let Some(cluster) = self.clusters.get_mut(&at) | ||
| && cluster.open != open | ||
| { | ||
| cluster.open = open; | ||
| self.draw_cluster(at); |
There was a problem hiding this comment.
Expand relayed messages when opening all folds
When the conversation contains a folded message from another agent, Ctrl+O only changes cluster.open; it never loads or changes Relayed.text, which is what relayed_lines uses to reveal the message and its associated calls. For a single-message cluster, cluster_lines ignores cluster.open entirely, so Ctrl+O visibly does nothing; for a larger cluster, it reveals only more folded headers. Update the individual relayed-message state as well, using the history-loading behavior already implemented by press_row("said/…"), so these rows can actually be opened and closed from the keyboard.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 6a7a0c1 (in #438). Ctrl+O now reads every shut message between agents from the history in one batch, as a click does, opens them with their clusters, and folds them all again on the next press. Tested.
Generated by Claude Code
| *first = Span::raw("›").bold(); | ||
| pane.screen.keep_in_view(row, 2); |
There was a problem hiding this comment.
Scroll to the status selection only when it changes
Once an agent is selected in a /status list taller than the pane, every redraw requests keep_in_view for that agent. Screen::render then overrides scrolling whenever the selected row would leave the viewport, so PageUp, PageDown, Home, End, and mouse scrolling cannot move freely away from the selection. Gate this request on a changed selection, as the /background and /commons rendering immediately above already do, rather than continuously pinning the viewport to the picked agent.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 6a7a0c1 (in #438). /status scrolls to its pick only when the picked row changes, as /background and /commons do.
Generated by Claude Code
| "edit" => ( | ||
| "edited", | ||
| shown(&field("path"), workspace), | ||
| diff(arguments, workspace).counts(), |
There was a problem hiding this comment.
Exclude unsuccessful edits from completed-change totals
When an edit fails because its old text is absent or ambiguous, the file tool returns before writing anything, but work_item still records the requested diff as an accomplished edit. If the agent then retries successfully in the same stretch, the summary counts both attempts' removed and added lines even though only one changed the file; a completely unsuccessful stretch likewise claims that files were edited. The trailing failure count does not distinguish which changes actually happened. Keep failed attempts visible, but exclude their requested changes from the completed-edit totals, consistent with drawn already suppressing diffs for failed file tools.
Useful? React with 👍 / 👎.
| "web_search" | "web_fetch" => ("looked up", String::new(), (0, 0)), | ||
| _ => ("called", name.to_owned(), (0, 0)), | ||
| }; | ||
| format!("{kind}\t{what}\t{removed}\t{added}\t{failed}") |
There was a problem hiding this comment.
Escape work-item fields before using tab delimiters
When a shell command's first line contains a literal tab, work_item embeds it unescaped in the tab-delimited record, shifting every subsequent field consumed by work_row. For example, a failed command consisting of false, a tab, and --flag produces fields where the failure check reads 0 instead of true, so the folded row is green and omits the failure count. Tabs in filenames also corrupt the counts and failure state. Store these values structurally or escape the delimiter so valid tool arguments cannot change how the summary parses its metadata.
Useful? React with 👍 / 👎.
George: agents are people you talk to, so the clean view shows what they say and what reaches you, not their commands, reads and edits. The work rows go; Ctrl+O still opens every fold and ↑↓ Enter still pick an agent in /status. The principle is in FEATURES.md. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGEBHyeyj8q32PemnWK
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b145bcd400
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| let last = bots.len() - 1; | ||
| let pick = watch.pick.map(|pick| pick.min(last)); |
There was a problem hiding this comment.
Reconcile the status selection when hiding resolved agents
If a resolved agent is selected in /status and r hides resolved agents, watch.pick remains outside the visible list. Rendering uses marks.get(pick), so no agent has a selection marker, but this handler silently clamps the stale index and Enter opens the last visible agent instead. Clear or normalize the stored selection when the visible list changes, and use that same selection for rendering and activation, so Enter cannot open an unselected agent.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 6a7a0c1 (in #438). A pick past the visible list is now dropped instead of clamped, so Enter opens only the agent marked ›.
Generated by Claude Code
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGEBHyeyj8q32PemnWK
- A rule is cut at the edge only when its last span is nothing but rule characters, as Worked for draws one; text that ends in them wraps (#432). - Notes fold into the margin at the same width that shows it, gutter included (#427). - A list over the composer shows only as many rows as fit above it, the pick among them (#427). - /status scrolls to a pick once, so the page keys still move, and a pick that hiding resolved agents dropped is no pick (#421). - Ctrl+O opens and folds the messages between agents too, reading them again as a click does (#421). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGEBHyeyj8q32PemnWK
The second PR from the design-system review (Sonny's Design System, recommendation 2).
The clean view stays text
The first version of this PR summed up commands, reads and edits as one row (
• Ran 2 commands, edited calc.py ▸). George reversed that: Sonny is not another Claude Code; the clean view is mostly text. Agents are people you talk to, not minds to peek inside. The clean view shows what they say and what they do that reaches you: an agent to look at, a margin note, a lookout or task update, a question. Commands, reads and edits stay in/verbose. The work rows are gone, and this principle now opens FEATURES.md and the README's clean-view paragraph.Every fold has a key
Folds and gathered rows (
• Messaged calc.add and calc.neg ▸,↳ 3 task updates ▸) opened only with a mouse. Ctrl+O now opens every row that folds, and folds them all again once all are open. This is Claude Code's key for the same thing.Agents in
/statuswere also click-only. Now ↑ ↓ pick one (marked›) and Enter opens it in the pane, as a click does. The card's title names the keys:↑↓ pick · enter open · esc close.Checks
cargo test -p sonny --bins: 512 passed. New tests arectrl_o_opens_every_fold_and_folds_them_againandstatus_picks_an_agent_from_the_keys.cargo clippy -p sonny --all-targetsandcargo fmt --checkare clean.🤖 Generated with Claude Code