From 22d7bef5680a1d55c28ff6246518d96487e95d5e Mon Sep 17 00:00:00 2001 From: Yifeng He Date: Tue, 28 Apr 2026 03:13:53 -0700 Subject: 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. --- src/app/input/sidebar.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/app/input/sidebar.rs') 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)); -- cgit v1.2.3