Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 5 additions & 18 deletions crates/jcode-desktop2/src/scene.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1311,12 +1311,7 @@ fn draw_transcript(
Affine::scale(scale),
color,
None,
&Rect::new(
x0,
y0,
x1,
y1,
),
&Rect::new(x0, y0, x1, y1),
);
}
if let Some(selection) = model.selection.as_ref()
Expand Down Expand Up @@ -1941,18 +1936,10 @@ mod tests {
for scale in [1.0, 1.25, 1.5, 1.75, 2.0, 2.5] {
let hairline = 1.0 / scale;
let origin = 13.37;
let (_, first_bottom) = diff_band_y(
Rect::new(0.0, 0.0, 100.0, 19.2),
origin,
hairline,
false,
);
let (second_top, _) = diff_band_y(
Rect::new(0.0, 19.2, 100.0, 38.4),
origin,
hairline,
false,
);
let (_, first_bottom) =
diff_band_y(Rect::new(0.0, 0.0, 100.0, 19.2), origin, hairline, false);
let (second_top, _) =
diff_band_y(Rect::new(0.0, 19.2, 100.0, 38.4), origin, hairline, false);
let overlap_px = (first_bottom - second_top) * scale;
assert!(
(overlap_px - 1.0).abs() < 1e-9,
Expand Down
5 changes: 1 addition & 4 deletions crates/jcode-desktop2/src/tests/actions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1590,10 +1590,7 @@ fn a_new_session_preserves_the_old_panel_until_the_new_one_attaches() {
let (updates_tx, updates_rx) = channel();
let (commands_tx, _commands_rx) = channel();
let commands = crate::harness::CommandSender::for_test(commands_tx);
app.harness = Some((
updates_rx,
commands.clone(),
));
app.harness = Some((updates_rx, commands.clone()));

app.new_session();

Expand Down
7 changes: 7 additions & 0 deletions crates/jcode-tui/src/tui/app/tests/todo_card.rs
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,12 @@ impl PinTodosEnvGuard {
crate::config::invalidate_config_cache();
Self
}

fn disable() -> Self {
crate::env::set_var("JCODE_PIN_TODOS", "0");
crate::config::invalidate_config_cache();
Self
}
}

impl Drop for PinTodosEnvGuard {
Expand All @@ -219,6 +225,7 @@ impl Drop for PinTodosEnvGuard {
#[test]
fn pinned_todos_payload_stays_empty_when_config_off() {
let _env_lock = crate::storage::lock_test_env();
let _pin_guard = PinTodosEnvGuard::disable();
let mut app = create_test_app();
let session_id = app.session.id.clone();
crate::todo::save_todos(&session_id, &[pinned_band_todo("t1", "pin me", "pending")]).unwrap();
Expand Down
Loading