Skip to content

Fix tab scroll range fitting complexity - #11684

Merged
lawrencecchen merged 2 commits into
mainfrom
feat-tui-tab-scroll-range-fit
Sep 2, 2026
Merged

lawrencecchen merged 2 commits into
mainfrom
feat-tui-tab-scroll-range-fit

Conversation

@lawrencecchen

@lawrencecchen lawrencecchen commented Sep 2, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • add behavior coverage for preserving offsets and fitting active tabs at scale
  • replace repeated range scans with one-pass accumulated width subtraction

The renderer keeps Ratatui's standard model: compute bounded Rects and write widgets into the frame buffer. See https://docs.rs/ratatui/latest/ratatui/struct.Frame.html and https://docs.rs/ratatui/latest/ratatui/layout/struct.Rect.html.

Verification

Two commits are intentional: the first adds the failing behavior tests, the second adds the fix.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.


Summary by cubic

Fixes tab scroll range fitting so large tab sets no longer cause quadratic work. Replaces repeated range scans with a one-pass accumulated width subtraction and adds tests for preserving requested offsets and fitting active tabs at scale.

Written for commit e40f6ca. Summary will update on new commits.

Review in cubic

@vercel

vercel Bot commented Sep 2, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
cmux166 Canceled Canceled Sep 3, 2026 1:05pm UTC
cmux41 Ready Ready Preview Sep 3, 2026 1:05pm UTC

@coderabbitai

coderabbitai Bot commented Sep 2, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 2 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Team

Run ID: 9b89baea-6c48-4da6-a2a0-2329b2f9985c

📥 Commits

Reviewing files that changed from the base of the PR and between 995638d and e40f6ca.

📒 Files selected for processing (1)
  • cmux-tui/crates/cmux-tui/src/ui/pane.rs

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.

@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@lawrencecchen
lawrencecchen force-pushed the feat-tui-tab-scroll-range-fit branch 3 times, most recently from 92b2782 to 28daa6b Compare September 2, 2026 15:19
@lawrencecchen
lawrencecchen force-pushed the feat-tui-tab-scroll-range-fit branch from 28daa6b to e40f6ca Compare September 2, 2026 15:24
@lawrencecchen
lawrencecchen merged commit 0358c30 into main Sep 2, 2026
29 of 31 checks passed
@lawrencecchen
lawrencecchen deleted the feat-tui-tab-scroll-range-fit branch September 2, 2026 15:38
rustybret pushed a commit to rustybret/bmux that referenced this pull request Sep 2, 2026
436fc1f Add unified surface selection context API (manaflow-ai#10022)
d028302 Merge pull request manaflow-ai#11696 from manaflow-ai/audit-tui-graphics-diff-wave202
11af2f2 perf(cmux-tui): index graphics pointer routes
60d06c2 Merge pull request manaflow-ai#11687 from manaflow-ai/feat-config-key-dispatch-complexity
0358c30 Merge pull request manaflow-ai#11684 from manaflow-ai/feat-tui-tab-scroll-range-fit
2c0c8a4 test(cmux-tui): bound graphics diff comparisons
8187531 Merge pull request manaflow-ai#11672 from manaflow-ai/issue-remote-tree-cache-race
f0ff9cf Merge pull request manaflow-ai#11630 from manaflow-ai/feat-journal-group-commit
f1e2d3f perf(tui): cache key dispatch maps
96897a7 test(tui): cover cached key dispatch refresh
e40f6ca fix tab scroll range fitting complexity
275cf7c test tab scroll range fitting at scale
995638d Merge pull request manaflow-ai#11640 from manaflow-ai/feat-tui-worker-cancellation
790b53f perf(tui): avoid pane area frame clone (manaflow-ai#11404)
6a5dd4d fix(tui): reap PTY child on startup failure (manaflow-ai#11414)
2ebb5a5 fix(tui): clear stale agent updates at snapshot boundary
3b91c0c test(tui): prevent stale agent resurrection after omission
789b350 fix(tui): retain agent updates across topology races
85cbff1 test(tui): retain agent updates across topology omission
586a2a6 perf(cmux-tui): resolve resource selectors without the registry lock
7fb5414 fix(cmux-tui): cancel blocked machine worker sends
dd7347e test(cmux-tui): cover cancellable machine completion send

This branch was successfully deployed

2 active deployments
Preview – cmux41 — e40f6cad Deployed Sep 3, 2026 by vercel[bot]
Preview – cmux166 — e40f6cad Deployed Sep 3, 2026 by vercel[bot]
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