fix compare remote and options nav scrolling

tzemanovic
Apr 2, 2026, 2:33 PM
6ZMVKP2XUY7GHTI77FXQD7IO4DOEGZT7CALQYEJPPMTV7J3QWIWAC

Dependencies

  • [2] 3XRG4BB6 rewritten nav-scrollable!
  • [3] WAOGSCOJ very nice refactor, wip adding channels logs
  • [4] 7WCB5YQJ refactor msgs and modules
  • [5] DNTMUCMO allow to compare local with remote records
  • [6] O46EFE5J add option to select remote for push
  • [7] VQ3THWJJ add option to select remote for pull
  • [8] OEBGSXWU refactor sub-menu option selection
  • [9] 5ZM3J2J3 add opts to select remote and channel for compare remote
  • [10] ZG2CON2V sort compare remote records, improve views
  • [11] JZXYSIYD channel selection!
  • [12] YK3MOJJL chonky refactor, wip other channels logs & diffs
  • [13] 5O4FWCFP add tests to_record selection and improve it
  • [*] 23SFYK4Q big view refactor into a new crate
  • [*] WT3GA27P add cursor with selection
  • [*] 6YZAVBWU Initial commit

Change contents

  • replacement in inflorescence_view/src/view.rs at line 1779
    [5.11340][5.11340:11359]()
    vec![]
    [5.11340]
    [5.11359]
    vec![el(text("Loading..."))]
  • replacement in inflorescence_view/src/view.rs at line 1786
    [5.11491][5.11491:11527]()
    &navigation.status_nav,
    [5.11491]
    [5.11527]
    &navigation.compare_remote_nav,
  • edit in inflorescence/src/selection.rs at line 2806
    [5.42689]
    [5.42689]
    // For scrolling we need to skip indices of the header sections
    let repo::RecordDichotomy {
    local_records,
    remote_records,
    remote_unrecords: _,
    } = record_dichotomy;
    let scroll_section_ix = if ix >= local_records.len() + remote_records.len()
    {
    ix + 3
    } else if ix >= local_records.len() {
    ix + 2
    } else {
    ix + 1
    };
  • replacement in inflorescence/src/selection.rs at line 2826
    [5.42797][5.42797:42813]()
    ix,
    [5.42797]
    [5.42813]
    scroll_section_ix,
  • replacement in inflorescence/src/selection.rs at line 2830
    [5.42934][5.42934:42950]()
    ix,
    [5.42934]
    [5.42950]
    scroll_section_ix,
  • edit in inflorescence/src/main.rs at line 1482
    [4.12886][6.9240:9310](),[6.9310][9.15976:16045](),[9.16045][6.9452:9596](),[6.9452][6.9452:9596](),[6.9596][8.2202:2282](),[8.2282][7.9551:9599](),[7.9551][7.9551:9599](),[7.9599][9.16046:16115](),[9.16115][7.9786:9930](),[7.9786][7.9786:9930](),[7.9930][8.2283:2363](),[8.2363][6.9747:9795](),[6.9747][6.9747:9795](),[6.9795][9.16116:16897](),[7.10207][6.9886:9936](),[9.16897][6.9886:9936](),[6.9886][6.9886:9936](),[6.9936][9.16898:17086](),[9.17086][6.10163:10196](),[6.10163][6.10163:10196]()
    if let Some(sub) = sub_menu {
    match sub {
    model::SubMenu::Push { opt: Some(opt), .. } => {
    if let Some(ReadyState { repo, .. }) =
    model::is_ready_mut(model)
    {
    return sub_menu_push_opt_selection(msg, opt, repo);
    }
    }
    model::SubMenu::Pull { opt: Some(opt), .. } => {
    if let Some(ReadyState { repo, .. }) =
    model::is_ready_mut(model)
    {
    return sub_menu_pull_opt_selection(msg, opt, repo);
    }
    }
    model::SubMenu::CompareRemote {
    opt: Some(opt), ..
    } => {
    if let Some(ReadyState { repo, .. }) =
    model::is_ready_mut(model)
    {
    return sub_menu_compare_remote_opt_selection(
    msg, opt, repo,
    );
    }
    }
    model::SubMenu::Push { opt: _, remote: _ }
    | model::SubMenu::Pull { opt: _, remote: _ }
    | model::SubMenu::CompareRemote {
    opt: _,
    remote: _,
    remote_channel: _,
    }
    | model::SubMenu::ResetChange
    | model::SubMenu::InitRepo { path: _ }
    | model::SubMenu::ImportFromGit { path: _ }
    | model::SubMenu::Add { recursive: _ } => {}
    }
    }
  • edit in inflorescence/src/main.rs at line 1491
    [3.85010]
    [5.46816]
    if let Some(sub) = sub_menu {
    match sub {
    model::SubMenu::Push { opt: Some(opt), .. } => {
    return sub_menu_push_opt_selection(
    msg,
    &mut navigation.status_nav,
    opt,
    repo,
    );
    }
    model::SubMenu::Pull { opt: Some(opt), .. } => {
    return sub_menu_pull_opt_selection(
    msg,
    &mut navigation.status_nav,
    opt,
    repo,
    );
    }
    model::SubMenu::CompareRemote {
    opt: Some(opt),
    ..
    } => {
    return sub_menu_compare_remote_opt_selection(
    msg,
    &mut navigation.status_nav,
    opt,
    repo,
    );
    }
    model::SubMenu::Push { opt: _, remote: _ }
    | model::SubMenu::Pull { opt: _, remote: _ }
    | model::SubMenu::CompareRemote {
    opt: _,
    remote: _,
    remote_channel: _,
    }
    | model::SubMenu::ResetChange
    | model::SubMenu::InitRepo { path: _ }
    | model::SubMenu::ImportFromGit { path: _ }
    | model::SubMenu::Add { recursive: _ } => {}
    }
    }
  • edit in inflorescence/src/main.rs at line 1929
    [6.10477]
    [6.10510]
    nav: &mut nav_scrollable::State,
  • replacement in inflorescence/src/main.rs at line 1937
    [8.3047][7.11195:11251](),[7.11195][7.11195:11251]()
    remote_selection(msg, remote, remote_names)
    [8.3047]
    [7.11251]
    remote_selection(msg, nav, remote, remote_names)
  • edit in inflorescence/src/main.rs at line 1944
    [7.11327]
    [7.11360]
    nav: &mut nav_scrollable::State,
  • replacement in inflorescence/src/main.rs at line 1952
    [8.3107][9.18204:18260]()
    remote_selection(msg, remote, remote_names)
    [8.3107]
    [9.18260]
    remote_selection(msg, nav, remote, remote_names)
  • edit in inflorescence/src/main.rs at line 1959
    [9.18346]
    [9.18346]
    nav: &mut nav_scrollable::State,
  • replacement in inflorescence/src/main.rs at line 1967
    [8.3107][7.11630:11686](),[9.18661][7.11630:11686](),[7.11630][7.11630:11686]()
    remote_selection(msg, remote, remote_names)
    [9.18661]
    [9.18662]
    remote_selection(msg, nav, remote, remote_names)
  • edit in inflorescence/src/main.rs at line 1978
    [7.11751]
    [7.11751]
    nav: &mut nav_scrollable::State,
  • replacement in inflorescence/src/main.rs at line 1992
    [7.12285][7.12285:12366]()
    *remote = remote_names.into_iter().nth(ix + 1).cloned();
    [7.12285]
    [7.12366]
    let ix = ix + 1;
    nav_scrollable::scroll_down_to_section(nav, ix);
    *remote = remote_names.into_iter().nth(ix).cloned();
  • edit in inflorescence/src/main.rs at line 1998
    [6.11536]
    [7.12412]
    nav_scrollable::scroll_up_to_section(nav, 0);
  • replacement in inflorescence/src/main.rs at line 2009
    [7.12840][7.12840:12921]()
    *remote = remote_names.into_iter().nth(ix - 1).cloned();
    [7.12840]
    [7.12921]
    let ix = ix - 1;
    nav_scrollable::scroll_up_to_section(nav, ix);
    *remote = remote_names.into_iter().nth(ix).cloned();
  • edit in inflorescence/src/main.rs at line 2015
    [6.12207]
    [7.12967]
    nav_scrollable::scroll_down_to_section(
    nav,
    remote_names.len().saturating_sub(1),
    );