finish other channels logs selection

[?]
Aug 13, 2025, 5:23 PM
TQEZQJV4G4OXAYDLTMJW3NCRQV6W7I3MUBOKNCSOSXCSVLABW4QQC

Dependencies

  • [2] XSZZB47U refactor stuff into lib
  • [3] KWTBNTO3 diffs selection and scrolling
  • [4] 3TLPJ57B alt scroll via context and couple fixes
  • [5] NZD56PVB fix mouse selection
  • [6] OJPGHVC3 entire log!
  • [7] WAOGSCOJ very nice refactor, wip adding channels logs
  • [8] YK3MOJJL chonky refactor, wip other channels logs & diffs
  • [9] 3XRG4BB6 rewritten nav-scrollable!
  • [10] AI3IMKC3 refactor stairs
  • [11] JZXYSIYD channel selection!
  • [12] UR4J677R nav for log changes and refactors
  • [13] WH57EHNM update tests
  • [*] 23SFYK4Q big view refactor into a new crate
  • [*] WT3GA27P add cursor with selection

Change contents

  • replacement in inflorescence_view/src/app.rs at line 510
    [8.5344][8.5344:5405]()
    .on_press(Msg::Action(action::Msg::Confirm))
    [8.5344]
    [8.5405]
    .on_press(Msg::Action(action::Msg::Selection(selection::Msg::Select(selection::Select::Channel { ix, name: channel.clone() }))))
  • replacement in inflorescence_view/src/app.rs at line 567
    [8.7436][8.7436:7507]()
    el(nav_scrollable(&navigation.entire_log_nav, entries)
    [8.7436]
    [8.7507]
    el(nav_scrollable(&navigation.other_channel_log_nav, entries)
  • edit in inflorescence_model/src/selection.rs at line 102
    [2.4435]
    [2.4435]
    },
    Channel {
    ix: usize,
    name: String,
  • edit in inflorescence_model/src/lib.rs at line 84
    [7.33559]
    [8.18010]
    /// Other channel log change selection's nav
    pub other_channel_log_nav: nav_scrollable::State,
    /// Selected channel's name
  • edit in inflorescence_model/src/lib.rs at line 120
    [8.18202]
    [8.18202]
    navigation.other_channel_log_nav = nav_scrollable::State::default();
  • replacement in inflorescence/src/selection.rs at line 315
    [7.44479][8.30682:30748]()
    let ix = if ix == ctx.repo.other_channels.len() - 1 {
    [7.44479]
    [7.44536]
    let ix = if ix == ctx.repo.other_channels.len().saturating_sub(1) {
  • replacement in inflorescence/src/selection.rs at line 363
    [8.32011][8.32011:32087]()
    &mut ctx.navigation.entire_logs_navs.diffs_nav,
    [8.32011]
    [8.32087]
    &mut ctx
    .navigation
    .other_channel_logs_navs
    .diffs_nav,
  • replacement in inflorescence/src/selection.rs at line 372
    [6.24227][8.32151:32221]()
    let log_entry = log.get(channel_ix).unwrap();
    [6.24227]
    [6.24293]
    let log_entry = log.get(change_ix).unwrap();
  • edit in inflorescence/src/selection.rs at line 412
    [8.33132]
    [8.33132]
  • replacement in inflorescence/src/selection.rs at line 523
    [7.46447][7.46447:46499]()
    Primary::Channel => select_up_channel(ctx),
    [7.46447]
    [7.46499]
    Primary::Channel => select_up_channel(ctx, delta),
  • replacement in inflorescence/src/selection.rs at line 709
    [4.4174][7.50490:50598]()
    fn select_up_channel(ctx: &mut Ctx<'_>) -> Task<crate::Msg> {
    let ix = match ctx.state.channel.take() {
    [4.4174]
    [7.50598]
    fn select_up_channel(
    ctx: &mut Ctx<'_>,
    delta: Option<Duration>,
    ) -> Task<crate::Msg> {
    let (selection, task) = match ctx.state.channel.take() {
  • replacement in inflorescence/src/selection.rs at line 717
    [7.50658][7.50658:50678]()
    log: _,
    [7.50658]
    [7.50678]
    log: None,
  • replacement in inflorescence/src/selection.rs at line 719
    [7.50694][7.50694:50769]()
    if ix == 0 {
    ctx.repo.other_channels.len() - 1
    [7.50694]
    [7.50769]
    let ix = if ix == 0 {
    ctx.repo.other_channels.len().saturating_sub(1)
  • edit in inflorescence/src/selection.rs at line 723
    [7.50813]
    [7.50813]
    };
    channel_selection(ix, VDir::Up, ctx)
    }
    None => {
    let ix = ctx.repo.other_channels.len().saturating_sub(1);
    channel_selection(ix, VDir::Up, ctx)
    }
    Some(Channel {
    ix: channel_ix,
    name,
    log:
    Some(LogChange {
    ix: change_ix,
    hash,
    message,
    file,
    }),
    }) => {
    if let Some(Log::Loaded { log }) =
    ctx.logs.other_channels_logs.get(&name)
    {
    if let Some(LogChangeFileSelection {
    ix: file_ix,
    path,
    diff_selected,
    }) = file
    {
    if diff_selected {
    let selection = Channel {
    ix: channel_ix,
    name,
    log: Some(LogChange {
    ix: change_ix,
    hash,
    message,
    file: Some(LogChangeFileSelection {
    ix: file_ix,
    path,
    diff_selected,
    }),
    }),
    };
    nav_scrollable::scroll_up(
    &mut ctx
    .navigation
    .other_channel_logs_navs
    .diffs_nav,
    delta,
    );
    (selection, Task::none())
    } else {
    let log_entry = log.get(change_ix).unwrap();
    let file_ix = if 0 == file_ix {
    log_entry.file_paths.len().saturating_sub(1)
    } else {
    file_ix - 1
    };
    let (file, selection_task) = channel_log_file_selection(
    file_ix,
    hash,
    VDir::Up,
    ctx.navigation,
    log_entry,
    );
    let selection = Channel {
    ix: channel_ix,
    name,
    log: Some(LogChange {
    ix: change_ix,
    hash,
    message,
    file: Some(file),
    }),
    };
    (selection, selection_task)
    }
    } else {
    let (selection, task) = if 0 == change_ix {
    let ix = log.len().saturating_sub(1);
    channel_log_selection(ix, VDir::Down, ctx, log)
    } else {
    let ix = change_ix - 1;
    channel_log_selection(ix, VDir::Up, ctx, log)
    };
    let selection = Channel {
    ix: channel_ix,
    name,
    log: Some(selection),
    };
    (selection, task)
    }
    } else {
    let selection = Channel {
    ix: channel_ix,
    name,
    log: Some(LogChange {
    ix: change_ix,
    hash,
    message,
    file,
    }),
    };
    (selection, Task::none())
  • edit in inflorescence/src/selection.rs at line 834
    [7.50837][7.50837:50888]()
    None => ctx.repo.other_channels.len() - 1,
  • edit in inflorescence/src/selection.rs at line 835
    [7.50895][7.50895:50961]()
    let (selection, task) = channel_selection(ix, VDir::Up, ctx);
  • edit in inflorescence/src/selection.rs at line 1674
    [7.72796]
    [3.46480]
    Select::Channel { .. } => unreachable!(),
  • replacement in inflorescence/src/selection.rs at line 1680
    [7.72895][7.72895:72915]()
    // TODO
    [7.72895]
    [5.926]
    let (selection, task) = match select {
    Select::Channel { ix, name: _ } => {
    let (selection, task) =
    channel_selection(ix, VDir::Down, ctx);
    (Some(selection), task)
    }
    Select::LogChange {
    ix,
    hash: _,
    message: _,
    } => match ctx.state.channel.take() {
    Some(Channel {
    ix: channel_ix,
    name,
    log,
    }) => {
    if let Some(Log::Loaded { log }) =
    ctx.logs.other_channels_logs.get(&name)
    {
    let (selection, task) =
    channel_log_selection(ix, VDir::Down, ctx, log);
    (
    Some(Channel {
    ix: channel_ix,
    name,
    log: Some(selection),
    }),
    task,
    )
    } else {
    (
    Some(Channel {
    ix: channel_ix,
    name,
    log,
    }),
    Task::none(),
    )
    }
    }
    selection => (selection, Task::none()),
    },
    Select::LogChangeFile { ix, path: _ } => {
    match ctx.state.channel.take() {
    Some(Channel {
    ix: channel_ix,
    name,
    log:
    Some(LogChange {
    ix: change_ix,
    hash,
    message,
    file,
    }),
    }) => {
    if let Some(Log::Loaded { log }) =
    ctx.logs.other_channels_logs.get(&name)
    && let Some(log_entry) = log.get(change_ix)
    {
    let (selection, task) =
    channel_log_file_selection(
    ix,
    hash,
    VDir::Down,
    ctx.navigation,
    log_entry,
    );
    (
    Some(Channel {
    ix: channel_ix,
    name,
    log: Some(LogChange {
    ix: change_ix,
    hash,
    message,
    file: Some(selection),
    }),
    }),
    task,
    )
    } else {
    (
    Some(Channel {
    ix: channel_ix,
    name,
    log: Some(LogChange {
    ix: change_ix,
    hash,
    message,
    file,
    }),
    }),
    Task::none(),
    )
    }
    }
    selection => (selection, Task::none()),
    }
    }
    Select::UntrackedFile { .. } | Select::ChangedFile { .. } => {
    unreachable!()
    }
    };
    ctx.state.channel = selection;
    return task;
  • replacement in inflorescence/src/selection.rs at line 1829
    [7.74727][7.74727:74815]()
    _ => {
    unreachable!()
    }
    [7.74727]
    [7.74815]
    Select::UntrackedFile { .. }
    | Select::ChangedFile { .. }
    | Select::Channel { .. } => unreachable!(),
  • replacement in inflorescence/src/selection.rs at line 2140
    [7.77227][8.56920:56968]()
    &mut navigation.other_channels_nav,
    [7.77227]
    [8.56968]
    &mut navigation.other_channel_log_nav,
  • replacement in inflorescence/src/selection.rs at line 2144
    [7.77330][8.56985:57033]()
    &mut navigation.other_channels_nav,
    [7.77330]
    [8.57033]
    &mut navigation.other_channel_log_nav,