Repository navigation
fix(graph): size the graph column to the lanes on screen, with a cap - #93
Conversation
The graph column was as wide as the busiest row anywhere in the loaded history. One wide stretch far down a big repository left every row with hundreds of pixels of empty gutter and squeezed the message column, and loading more commits only ever made it wider. The column now fits the lanes the rows on screen draw. It grows as soon as wider rows scroll into view and shrinks once scrolling settles, so the columns to its right don't shift back and forth mid-scroll. It never grows past a cap (twelve lanes by default) that can be dragged from the Graph header and is saved in settings, and it gives way so the message column keeps at least 200px. Lanes beyond the edge are clipped and fade out, and a commit whose lane is cut off is pinned to the edge with a chevron. A pending-changes worktree row that needs a side lane now takes the first lane past its own row rather than past the whole graph, so it no longer sits far off to the right in a wide history. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01F1GjMp82mLDdAv3LEhyEB8
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: aa76ab395b
ℹ️ 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".
| f32::from(self.container_bounds.size.width), | ||
| show_author_column.then_some(author_width), | ||
| show_date_column.then_some(date_col_width), | ||
| show_subject_column, |
There was a problem hiding this comment.
Reserve message space for worktree rows
When the subject column is disabled and a dirty-worktree row is present, passing show_subject_column here removes the 200px message allowance even though render_working_tree_row still unconditionally renders its worktree name, status, and change badges in a flex_1 message column. On panels where the graph can approach its cap, the graph therefore consumes that space and collapses the pending-changes summary; either retain the allowance for these rows or hide their message consistently.
Useful? React with 👍 / 👎.
| color.a *= clipped_lane_alpha( | ||
| f32::from(from_x.min(to_x)), | ||
| graph_width, |
There was a problem hiding this comment.
Fade edges that cross the clipping boundary
For a merge or outgoing edge connecting a visible lane to an off-screen lane, taking min(from_x, to_x) evaluates the alpha at the visible endpoint, normally producing full opacity. Because the whole path then uses that single color, it reaches the content mask at full opacity and is abruptly cut off instead of fading over the final 40px, defeating the clipped-lane cue for these common diagonal edges.
Useful? React with 👍 / 👎.
- An edge from a visible lane to one past the column's edge took its opacity from the visible end, so it reached the mask at full strength and was cut off. Taking it from the far end would dim the whole line instead. A path has one background, so a line that reaches the fade now paints with a horizontal gradient stopped at the fade zone. The shaders resolve path gradients over the path's clipped bounds on the DirectX, Metal and wgpu renderers, so the stops are computed over the part of the line inside the column. Lines short of the fade stay solid. - Merge edges set their alpha to a fixed 0.85, which threw away the fade altogether. It now scales the lane colour instead. - A worktree row's connector to its parent never faded, so a parent lane past the edge had the same hard cut. It uses the same background. - Hiding the Message column gave its 200px to the graph, but worktree rows render their summary in a message column regardless, so the graph could collapse it. The allowance now stays while a worktree row is in the list. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01F1GjMpzaaTdqoW5vq5c8Sy
- A pinned avatar is drawn at 70% opacity, so the node dot painted beneath it showed through as a smaller, darker circle. An avatar always covers the dot, so the dot is now painted only when avatars are off. - Edges wholly past the column's right edge were cloned and tessellated every frame and then masked away. They are now dropped before any of that, which in a wide history is most of a row's edges. - Straight stretches of lane are painted as quads, skipping tessellation and the multisampled path pass. This covers the commit rows and the worktree row's pass-through lanes. Benchmarked with rgitui_perf's scroll-storm on a perf-profile build, on a 60-way octopus repo and the medium corpus, against main and 9b4feba. There are no regressions, but the gains are within run-to-run noise: draw p95 on the wide repo matches main at 5.77ms, and dropped frames range from 15 to 69 across runs of one build. The flagged working-set increase on the medium corpus is noise as well: main itself ranges from 133 to 162 MB, and private bytes do not move. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01F1GjMpzaaTdqoW5vq5c8Sy
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0071bb8869
ℹ️ 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 x > last_x { | ||
| (last_x, true) |
There was a problem hiding this comment.
Normalize gradient stops to the full path span
When an edge runs from a visible lane to an off-screen lane—for example, x=30 to x=500 with the column ending at x=270—clamping right to 270 normalizes the fade over only 240px, but GPUI applies the content mask separately from the original path geometry. The resulting fade-start stop is about 0.83 along the full 470px path (x≈422), so the mask clips it at x=270 before the gradient begins. The fresh gradient implementation therefore still leaves cross-boundary edges fully opaque; normalize stops against the full path span or clip the path geometry first.
Useful? React with 👍 / 👎.
Changelog entry for everything since 0.5.0: #57, #89-#92 (already drafted under [Unreleased]), plus new entries for #93, #95 and #98. The version is bumped across the workspace, and the AppStream metainfo lists 0.5.1, which the Linux metadata test requires. The performance numbers are the ones measured in #95 and #98 with the rgitui_perf scenarios on --profile perf builds. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Problem
On large repositories the graph column was sized to the busiest row anywhere in the loaded history (
global_max_lane), with no upper limit. A wide stretch far down the history (dozens of long-livedupstream/*branch lines) made every row reserve that width. Linear sections showed hundreds of pixels of empty gutter, the message column got squeezed to a few words, and "Load more commits" could only make it wider.What changes
graph_column_max_width(default 270px, about 12 lanes). Drag the right edge of the Graph header to change it; it's saved like the author and date widths.›marker and a dimmed avatar.show_absolute_datesfield (and its#[allow(dead_code)]) fromWorkingTreeRowParams, and replaced the repeated lane-position arithmetic withlane_center_x.New string:
graph.resize_hint, the handle's tooltip (English and zh-CN).Testing
cargo fmt --all -- --check,cargo clippy --workspace --all-targets -- -D warnings,cargo test --workspace: all pass.Review fixes
From the Codex review of
aa76ab3, fixed in9b4feba:Pinned avatars and drawing cost
Measured with
scroll-stormon a--profile perfbuild, taking turns between builds. Medians over 3 runs per build from one session:main9b4febaThere are no regressions, and these differences are within run-to-run noise: on the wide repo, dropped frames for this PR ranged from 15 to 69 across runs.
compareflagged peak working set on the medium corpus, but that is noise too, sincemainalone ranges from 133 to 162 MB and private bytes do not move. Frame p95 is higher on the wide repo than on the medium corpus onmainas well, so this PR does not cause that gap.🤖 Generated with Claude Code
https://claude.ai/code/session_01F1GjMp82mLDdAv3LEhyEB8