Skip to content

feat(ui): remove top-level Changes tab, keep session-level d diff - #257

Merged
senamakel merged 3 commits into
tinyhumansai:mainfrom
senamakel:remove-changes-tab
Aug 10, 2026
Merged

feat(ui): remove top-level Changes tab, keep session-level d diff#257
senamakel merged 3 commits into
tinyhumansai:mainfrom
senamakel:remove-changes-tab

Conversation

@senamakel

@senamakel senamakel commented Aug 9, 2026

Copy link
Copy Markdown
Member

Summary

Removes the top-level Changes tab from the TUI. A Git diff is a property of one session — what it changed since it launched — not a view over the whole fleet, so it now lives only at the session level: press d on a session row in the Sessions tab to swap the harness terminal for that session's launch diff; d/Esc swaps it back.

What changed

Removed (the tab surface):

  • "Changes" from both TABS arrays (workflows build 8→7, slim build 7→6) — src/tui/src/ui/app/types/model.rs
  • the "Changes" => draw_changes render dispatch arm, the Changes hint line, and the "Changes" => "Diff" compact tab label — render/mod.rs
  • the if tab == "Changes" key-dispatch arm and its refresh_changes on tab-enter — keys/mod.rs, state.rs
  • the capital D shortcut from the Sessions rail (it jumped to the now-gone Changes tab) — keys/sessions.rs
  • open_selected_harness_changes (dead with the tab gone) and the dead draw_changes tab wrapper — changes/mod.rs, render/changes.rs

Kept (the session d path — unchanged behavior):

  • toggle_harness_diff_pane and draw_harness_diffdraw_changes_into, the render path the Sessions tab already used
  • the shared GitChangesState, on_changes_key bindings (↑↓ files, j/k line, [/] hunk, b baseline, c/C/e comments, r refresh)
  • the SDK-side git_review model

Both access paths already shared this state, so the session d pane retains the full review surface — only the top-level tab and its D shortcut were removed.

Tests:

  • Removed shift_d_on_a_selected_harness_opens_its_changes_tab (tested the removed D).
  • Removed the two compact_tab_label("Changes", …) assertions.
  • Rewrote the oversized-diff-line wrapping tests to render via draw_harness_diff (the remaining path) instead of the removed tab arm.
  • Reworded the Changes section of the in-app keyboard help to describe d on a session row.

Configuration / API changes

None. No public API, config, or persistence change — purely a TUI surface removal.

Validation

cargo build
cargo clippy --all-targets -- -D warnings
cargo fmt --check
cargo test

All green, zero test failures.

🤖 Generated with Medulla

Summary by CodeRabbit

  • Navigation
    • Removed the standalone Changes tab from the main navigation.
    • Git diffs now open directly from a session row using lowercase d.
  • Diff Viewing
    • Added a two-pane diff view with baseline selection, file and comment details, and improved scrolling for long changes.
    • Press d or Esc to return to the harness terminal.
  • Usability
    • Updated keyboard help and improved focus when entering Hosts.

A Git diff is a property of one session — what it changed since it
launched — not a view over the whole fleet, so it no longer has a
top-level tab. It lives on the Sessions tab as the `d` pane
(`PaneView::Diff`), drawn over the harness terminal for the row under
the cursor; `d`/`Esc` swaps the terminal back.

Removed:
- `"Changes"` from both TABS arrays (workflows 8->7, slim 7->6)
- the Changes render dispatch arm, hint line, and "Diff" compact label
- the Changes key-dispatch arm and its `refresh_changes` on tab-enter
- the capital `D` shortcut (it jumped to the now-gone Changes tab)
- `open_selected_harness_changes` and the dead `draw_changes` wrapper
- the `shift_d_on_a_selected_harness_opens_its_changes_tab` test

Untouched: the shared `GitChangesState`, `on_changes_key` bindings
(file/hunk nav, `b` baseline, `c`/`C`/`e` comments, `r` refresh), and
the SDK-side `git_review` model — both access paths already shared them,
so the session `d` pane keeps the full review surface.

The oversized-diff wrapping tests now render via `draw_harness_diff`
(the remaining path) instead of the removed tab arm.

Validation: cargo build, cargo clippy --all-targets -- -D warnings,
cargo fmt --check, cargo test (all green, 0 failures).

Co-authored-by: Medulla <medulla@tinyhumans.ai>
@coderabbitai

coderabbitai Bot commented Aug 9, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 7b681c45-fc05-46c3-97ba-fceecbb1a56f

📥 Commits

Reviewing files that changed from the base of the PR and between 4ab56c9 and c6b5e57.

📒 Files selected for processing (3)
  • src/tui/src/ui/app/render/tests.rs
  • src/tui/src/ui/app/state.rs
  • src/tui/src/ui/app/types/model.rs
🚧 Files skipped from review as they are similar to previous changes (3)
  • src/tui/src/ui/app/state.rs
  • src/tui/src/ui/app/render/tests.rs
  • src/tui/src/ui/app/types/model.rs

📝 Walkthrough

Walkthrough

The standalone Changes tab was removed from tab lists, key handling, rendering, and state entry logic. Git diff access remains in the Sessions harness pane through draw_harness_diff, with updated help text and tests.

Changes

Session diff navigation

Layer / File(s) Summary
Remove standalone Changes tab
src/tui/src/ui/app/types/model.rs, src/tui/src/ui/app/changes/mod.rs, src/tui/src/ui/app/keys/*, src/tui/src/ui/app/render/mod.rs
The Changes tab, its tab lists, navigation method, key handling, rendering dispatch, and shortcut labels were removed.
Route diff access through sessions
src/tui/src/ui/app/state.rs, src/tui/src/ui/app/changes/mod.rs, src/tui/src/ui/app/render/settings/help.rs
Hosts focus is initialized during tab entry. Harness diff access uses the Sessions pane. Help text describes session-row d navigation and d or Esc for return.
Update diff validation
src/tui/src/ui/app/render/tests.rs, src/tui/src/ui/app/tests/harness_pane.rs
Rendering tests now use the harness diff path. Obsolete standalone Changes-tab assertions were removed.

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

Suggested labels: severity: low

Suggested reviewers: tinysweeper

Poem

I’m a rabbit in Sessions, quick and bright,
I press d to view the diff in sight.
The old Changes tab hopped away,
Harness panes now guide the way.
Back with d or Esc—goodnight!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes removing the top-level Changes tab while retaining session-level diff access with the d key.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
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.

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

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot added priority: p3 Whenever. Cosmetic, a nicety, or a cleanup with no user visible effect. severity: low labels Aug 9, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (2)
src/tui/src/ui/app/render/tests.rs (1)

138-140: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Move these imports to the module import group.

Keep ChangedFile, tab_pos, and PaneView with the file-level imports. Do not declare imports inside app_on_an_oversized_diff_line.

As per coding guidelines, “Keep imports grouped at the top of Rust source files.”

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/tui/src/ui/app/render/tests.rs` around lines 138 - 140, Move the
ChangedFile, tab_pos, and PaneView imports into the file-level import group at
the top of the test module, and remove their local import declarations from
app_on_an_oversized_diff_line.

Source: Coding guidelines

src/tui/src/ui/app/types/model.rs (1)

76-83: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Document the non-workflow TABS constant.

The documentation at Lines 55-61 applies only to the workflow-enabled constant. Add equivalent /// documentation before Line 76.

As per coding guidelines, “Every public Rust item—including functions, types, traits, fields, and variants—must have a /// documentation comment.”

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/tui/src/ui/app/types/model.rs` around lines 76 - 83, Add a `///`
documentation comment immediately before the public non-workflow `TABS`
constant, documenting the tabs it exposes and matching the equivalent
workflow-enabled `TABS` documentation.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@src/tui/src/ui/app/render/tests.rs`:
- Around line 138-140: Move the ChangedFile, tab_pos, and PaneView imports into
the file-level import group at the top of the test module, and remove their
local import declarations from app_on_an_oversized_diff_line.

In `@src/tui/src/ui/app/types/model.rs`:
- Around line 76-83: Add a `///` documentation comment immediately before the
public non-workflow `TABS` constant, documenting the tabs it exposes and
matching the equivalent workflow-enabled `TABS` documentation.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: c4e0c2a8-a681-4d11-8d7e-f4d9467e5212

📥 Commits

Reviewing files that changed from the base of the PR and between 1e8a255 and 4ab56c9.

📒 Files selected for processing (10)
  • src/tui/src/ui/app/changes/mod.rs
  • src/tui/src/ui/app/keys/mod.rs
  • src/tui/src/ui/app/keys/sessions.rs
  • src/tui/src/ui/app/render/changes.rs
  • src/tui/src/ui/app/render/mod.rs
  • src/tui/src/ui/app/render/settings/help.rs
  • src/tui/src/ui/app/render/tests.rs
  • src/tui/src/ui/app/state.rs
  • src/tui/src/ui/app/tests/harness_pane.rs
  • src/tui/src/ui/app/types/model.rs
💤 Files with no reviewable changes (4)
  • src/tui/src/ui/app/keys/sessions.rs
  • src/tui/src/ui/app/keys/mod.rs
  • src/tui/src/ui/app/render/mod.rs
  • src/tui/src/ui/app/render/changes.rs

@tinysweeper tinysweeper Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tinysweeper found nothing blocking. Approving.

             $0.0075 · 148,878 in / 10,997 out · 93,296 cached (63%) · openrouter/openai/text-embedding-3-small, z-ai/glm-5.2 · 560 embedded
critique:    $0.0032 · 65,032 in  / 8,119 out  · 55,697 cached (86%) · z-ai/glm-5.2
security:    $0.0036 · 63,038 in  / 1,338 out  · 19,003 cached (30%) · z-ai/glm-5.2
tests:       $0.0005 · 14,298 in  / 1,180 out  · 12,868 cached (90%) · z-ai/glm-5.2
description: $0.0002 · 6,510 in   / 360 out    · 5,728 cached (88%)  · z-ai/glm-5.2

Comment thread src/tui/src/ui/app/state.rs
@tinysweeper

tinysweeper Bot commented Aug 9, 2026

Copy link
Copy Markdown

What this change touches

10 files, +74 -100 across 7 components. It reaches 6 untouched components (60 graph nodes walked). 12 further components left out to keep the diagram readable.

flowchart LR
  n0["src/tui/src/ui/app/changes<br/>1 file +17 -32"]:::changed
  n1["src/tui/src/ui/app/render<br/>3 files +19 -24"]:::changed
  n2["src/tui/src/ui/app<br/>1 file +21 -16"]:::changed
  n3["src/tui/src/ui/app/types<br/>1 file +14 -4"]:::changed
  n4["src/tui/src/ui/app/tests<br/>1 file +1 -15"]:::changed
  n5["src/tui/src/ui/app/keys<br/>2 files +0 -8"]:::changed
  n6["src/tui/src/ui/app/render/settings<br/>1 file +2 -1"]:::changed
  n7["src/tui/src/ui/app/changes<br/>2 files reached"]:::impacted
  n8["src/link/src<br/>1 file reached"]:::impacted
  n9["src/sdk/src/mcp<br/>1 file reached"]:::impacted
  n10["src/sdk/src/mcp/tools<br/>1 file reached"]:::impacted
  n11["src/sdk/src/ui/git_review<br/>1 file reached"]:::impacted
  n12["src/sdk/tests/support<br/>1 file reached"]:::impacted
  n1 -->|8 refs| n11
  n1 -->|6 refs| n8
  n1 -->|6 refs| n9
  n1 -->|5 refs| n3
  n2 -->|5 refs| n3
  n4 -->|5 refs| n3
  n5 -->|5 refs| n3
  n1 -->|4 refs| n12
  n6 -->|4 refs| n3
  n2 -->|3 refs| n11
  n4 -->|3 refs| n2
  n1 -->|2 refs| n10
  n2 -->|2 refs| n8
  n3 -->|2 refs| n8
  n5 -->|2 refs| n8
  n6 -->|2 refs| n8
  n7 -->|2 refs| n3
  n1 -->|1 ref| n6
  n2 -->|1 ref| n1
  n2 -->|1 ref| n4
  n2 -->|1 ref| n5
  n2 -->|1 ref| n7
  n4 -->|1 ref| n8
  n7 -->|1 ref| n8
  classDef changed fill:#0d4429,stroke:#238636,color:#e6edf3
  classDef impacted fill:#161b22,stroke:#6e7681,color:#c9d1d9
  classDef flagged fill:#5a1e02,stroke:#d93f0b,color:#ffffff
  classDef blocking fill:#67060c,stroke:#f85149,color:#ffffff
Loading

Green: changed. Grey: untouched, reached through an import or a call. Orange: has findings. Red: has a finding that blocks the merge.

Component Files Lines Findings
src/tui/src/ui/app/changes changed 1 +17 -32
src/tui/src/ui/app/render changed 3 +19 -24
src/tui/src/ui/app changed 1 +21 -16
src/tui/src/ui/app/types changed 1 +14 -4
src/tui/src/ui/app/tests changed 1 +1 -15
src/tui/src/ui/app/keys changed 2 +0 -8
src/tui/src/ui/app/render/settings changed 1 +2 -1
src/tui/src/ui/app/changes reached 2
src/link/src reached 1
src/sdk/src/mcp reached 1
src/sdk/src/mcp/tools reached 1
src/sdk/src/ui/git_review reached 1
src/sdk/tests/support reached 1
Changed files

src/tui/src/ui/app/changes

  • src/tui/src/ui/app/changes/mod.rs

src/tui/src/ui/app/render

  • src/tui/src/ui/app/render/changes.rs
  • src/tui/src/ui/app/render/mod.rs
  • src/tui/src/ui/app/render/tests.rs

src/tui/src/ui/app

  • src/tui/src/ui/app/state.rs

src/tui/src/ui/app/types

  • src/tui/src/ui/app/types/model.rs

src/tui/src/ui/app/tests

  • src/tui/src/ui/app/tests/harness_pane.rs

src/tui/src/ui/app/keys

  • src/tui/src/ui/app/keys/mod.rs
  • src/tui/src/ui/app/keys/sessions.rs

src/tui/src/ui/app/render/settings

  • src/tui/src/ui/app/render/settings/help.rs

tinysweeper 0.1.0

@tinysweeper tinysweeper Bot added priority: p2 Soon. Real but survivable — a rough edge, a gap, a thing that will bite later. and removed priority: p3 Whenever. Cosmetic, a nicety, or a cleanup with no user visible effect. labels Aug 9, 2026
@senamakel senamakel self-assigned this Aug 10, 2026
senamakel and others added 2 commits August 10, 2026 08:21
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Co-authored-by: Medulla <medulla@tinyhumans.ai>
@tinysweeper tinysweeper Bot added priority: p3 Whenever. Cosmetic, a nicety, or a cleanup with no user visible effect. and removed priority: p2 Soon. Real but survivable — a rough edge, a gap, a thing that will bite later. labels Aug 10, 2026
@senamakel
senamakel merged commit 10a75ed into tinyhumansai:main Aug 10, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority: p3 Whenever. Cosmetic, a nicety, or a cleanup with no user visible effect. severity: low

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant