summaryrefslogtreecommitdiff
path: root/src/app/input/sidebar.rs
diff options
context:
space:
mode:
authorYifeng He <yfhe.prsn@gmail.com>2026-04-28 03:13:53 -0700
committerGitHub <noreply@github.com>2026-04-28 13:13:53 +0300
commit22d7bef5680a1d55c28ff6246518d96487e95d5e (patch)
tree7e793059880f7f5c2aba9afc45cfdf578c4c16e9 /src/app/input/sidebar.rs
parentb6308ef3bec7ebd46ac830b3d36910171e94edf2 (diff)
fix: resize w claude code no flicker (#61)
* fix: mouse resize panel failed with claude-code no flicker * test: run pane mouse reporting drag tests inside tokio runtime Switch the new horizontal/vertical drag tests to `#[tokio::test]` so `PaneRuntime::test_with_screen_bytes` has a reactor when it calls `tokio::spawn`. CI was panicking with "there is no reactor running". * test: refresh git state in workspace drop slot test Workspace::test_new caches the parent repo's git branch at construction time. On master CI the herdr checkout has ref: refs/heads/master in HEAD, so the cache is populated and workspace_row_height returns 2. On PR CI actions/checkout uses a detached merge ref, git_branch returns None, row height becomes 1, and the drop-slot tie-break flips workspace_drop_index_at_row(2) from Some(0) to Some(1). Refresh git state after pointing identity_cwd at the per-test temp repo so the cache reflects the temp repo's HEAD.
Diffstat (limited to 'src/app/input/sidebar.rs')
-rw-r--r--src/app/input/sidebar.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/app/input/sidebar.rs b/src/app/input/sidebar.rs
index b806271e..f3ae2b06 100644
--- a/src/app/input/sidebar.rs
+++ b/src/app/input/sidebar.rs
@@ -1121,6 +1121,7 @@ mod tests {
first.tabs[0]
.pane_cwds
.insert(first_root, first_repo.clone());
+ first.refresh_git_ahead_behind();
let mut second = Workspace::test_new("b");
let second_root = second.tabs[0].root_pane;
@@ -1128,6 +1129,7 @@ mod tests {
second.tabs[0]
.pane_cwds
.insert(second_root, second_repo.clone());
+ second.refresh_git_ahead_behind();
app.state.workspaces = vec![first, second];
crate::ui::compute_view(&mut app.state, Rect::new(0, 0, 106, 20));