Skip to content

fix: honor space row gaps across machines - #3740

Open
akbash-bot wants to merge 2 commits into
herdrdev:masterfrom
akbash-bot:akbash/3738-machine-space-row-gap
Open

fix: honor space row gaps across machines#3740
akbash-bot wants to merge 2 commits into
herdrdev:masterfrom
akbash-bot:akbash/3738-machine-space-row-gap

Conversation

@akbash-bot

@akbash-bot akbash-bot commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator

Issue

A user sets a Space row gap while viewing Local and SSH machines. Spaces inside each expanded machine stay packed together.

Problem

The combined machine sidebar assigned zero gap to every row. The configured Space gap never reached scrolling or rendered positions.

How did we fix it?

Herdr now applies the configured gap between Spaces in the same machine. Machine boundaries and indented worktree children remain packed. Scrolling and rendering use the same calculated gaps.

Verification

The compose-path test failed before with the second Space at row 5 instead of row 6, then passed after the change. It also covers bottom scrolling and gap hitboxes. All 28 endpoint tests, local Windows lint, docs checks, maintenance tests, and the render-scale benchmark passed. PR checks passed on Ubuntu, macOS, and ConPTY; Windows hit an unrelated metadata timing-test failure.

refs #3738

@coderabbitai

coderabbitai Bot commented Sep 8, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Team

Run ID: 9e88fae7-d1dd-432e-a613-82b1283f1ca9

📥 Commits

Reviewing files that changed from the base of the PR and between 9e01168 and 35a3bb7.

📒 Files selected for processing (2)
  • src/client/shell/endpoint_sidebar.rs
  • src/client/shell/tests/endpoints.rs

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

The expanded sidebar calculates row gaps between consecutive workspaces within the same endpoint. Scroll metrics and row rendering apply these gaps to endpoint and workspace placement. A test verifies spacing for local and remote machines with multiple workspace and worktree configurations.

Suggested reviewers: ogulcancelik

Merge Risk: ⚪ Minimal · up to 35a3b

The expanded sidebar now applies configured gaps between Spaces on the same machine while retaining packed machine boundaries and worktree children. Current coverage validates the intended layout behavior, with no remaining merge-blocking risk identified.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 75.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
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.
Title check ✅ Passed The title clearly and concisely describes the main change: applying configured row gaps across machines.
Description check ✅ Passed The description directly explains the sidebar row-gap issue, the fix, and the verification results. It is related to the changeset.
  • Fix all pre-merge checks with AI

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.

@kangal-bot

Copy link
Copy Markdown
Collaborator

@coderabbitai review
@greptileai

@coderabbitai

coderabbitai Bot commented Sep 8, 2026

Copy link
Copy Markdown

@kangal-bot I will review pull request #3740.

✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@greptile-apps

greptile-apps Bot commented Sep 8, 2026

Copy link
Copy Markdown

Greptile Summary

This PR propagates configured Space row gaps into the expanded multi-machine sidebar while preserving packed machine and worktree-group boundaries.

  • Computes per-row gaps for consecutive top-level Spaces within the same machine.
  • Uses the same gap values for scroll calculations and rendered positions.
  • Adds regression coverage for unscrolled Local, SSH, and linked-worktree layouts.

Confidence Score: 4/5

The implementation appears safe to merge, with a non-blocking opportunity to cover nonzero-gap scrolling in the regression test.

The row grouping and gap application match existing sidebar behavior, and scroll metrics consume the same gaps as rendering; the only accepted concern is missing regression coverage for the overflowing, scrolled case.

Files Needing Attention: src/client/shell/tests/endpoints.rs

Important Files Changed

Filename Overview
src/client/shell/endpoint_sidebar.rs Computes machine-aware Space gaps and consistently applies them to scrolling and vertical rendering.
src/client/shell/tests/endpoints.rs Covers static gap placement and packed boundaries, but not the changed nonzero-gap scrolling behavior.

Reviews (1): Last reviewed commit: "fix: honor space row gaps across machine..." | Re-trigger Greptile

remote.workspaces.push(third);
state.set_endpoint_snapshot(&remote_id, Box::new(remote));

state.compose(100, 40).expect("combined endpoint frame");

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Scrolling Case Lacks Coverage

This regression test uses a 100×40 frame that fits all five workspace rows, so it only verifies unscrolled placement even though the change also affects gap-aware scroll limits and rendering after scrolling. Add a constrained-viewport case with a nonzero row gap that scrolls the expanded machine list and verifies the final scroll position and visible row coordinates; otherwise those calculations could diverge without detection.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

agreed, fixed in 08b32e3

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