display log files diffs

[?]
May 8, 2025, 9:34 AM
JE44NYHM4QORCRKOF33QM42EDT7SBCPTULWGT6IVDL3D5LUHQXLAC

Dependencies

  • [2] 6YZAVBWU Initial commit
  • [3] IQDCHWCP load a pijul repo
  • [4] SWWE2R6M display basic repo stuff
  • [5] WT3GA27P add cursor with selection
  • [6] DVKSPF7R track selected file path together with an index
  • [7] EC3TVL4X add untracked files
  • [8] KT5UYXGK fix selection after adding file, add changed file diffs
  • [9] S2NVIFXR allow to enter record msg
  • [10] W7IUT3ZV start recording impl
  • [11] YBJRDOTC make all repo actions async
  • [12] A5YBC77V record!
  • [13] D7A7MSIH allow to defer or abandon record, add buttons
  • [14] 4WO3ZJM2 show untracked files' contents
  • [15] W4LFX7IH group diffs by file name
  • [16] AMPZ2BXK show changed files diffs (only Edit atm)
  • [17] NRCUG4R2 load changed files src when selected
  • [18] Y5ATDI2H convert changed file diffs and load src only if any needs it
  • [19] MJDGPSHG WIP contents diff
  • [20] ZVI4AWER woot contents_diff
  • [21] QMAUTRB6 refactor diff
  • [22] OQ6HSAWH show record log
  • [23] WI2BVQ6J rm client lib crate
  • [24] NWJD6VM6 mv libflowers libflorescence
  • [25] AHWWRC73 navigate log entries
  • [26] UJPRF6DA fix log changes selection
  • [27] TEI5NQ3S add log files selection
  • [28] DCSUCH6R add undecoded diff view, improve decoded view style
  • [29] UUB7SHLR more re-use in diffs
  • [30] PTFDJ567 add untracked files encoding
  • [31] V55EAIWQ add src file LRU cache
  • [32] UCBNZULE make changed files paths optional (no path for root)
  • [33] UB2ITZJS refresh changed files on FS changes

Change contents

  • edit in crates/libflorescence/src/repo.rs at line 138
    [12.546]
    [12.546]
    },
    GetLogFileDiff {
    id: LogFileId,
  • edit in crates/libflorescence/src/repo.rs at line 152
    [11.723]
    [11.723]
    LogFileDiff {
    id: LogFileId,
    diffs: ChangedFile,
    },
  • edit in crates/libflorescence/src/repo.rs at line 169
    [22.252]
    [11.791]
    #[derive(Debug, Clone, Hash, PartialEq, Eq)]
    pub struct LogFileId {
    pub change_hash: pijul::Hash,
    pub path: String,
    }
  • edit in crates/libflorescence/src/repo.rs at line 247
    [11.2973]
    [11.2973]
    })
    .await
    .unwrap();
    }
    MsgIn::GetLogFileDiff { id } => {
    let LogFileId { change_hash, path } = id.clone();
    let diffs: ChangedFile;
    (state, diffs) = spawn_blocking(move || {
    let change =
    state.repo.changes.get_change(&change_hash).unwrap();
    let mut changed_files =
    changed_files(&change, &state.repo.changes);
    let diffs = changed_files.remove(&path).unwrap();
    (state, diffs)
  • edit in crates/libflorescence/src/repo.rs at line 264
    [11.3030]
    [11.3030]
    let _ = msg_out_tx.send(MsgOut::LogFileDiff { id, diffs });
  • replacement in crates/libflorescence/src/repo.rs at line 750
    [22.1132][22.1132:1251]()
    let (_, (h, _mrk)) = pr.unwrap();
    let cid = pijul::GraphTxnT::get_internal(&txn, h).unwrap().unwrap();
    [22.1132]
    [22.1251]
    let (_, (hash, _mrk)) = pr.unwrap();
    let cid = pijul::GraphTxnT::get_internal(&txn, hash).unwrap().unwrap();
  • replacement in crates/libflorescence/src/repo.rs at line 772
    [23.484][22.1955:2025](),[22.1955][22.1955:2025]()
    let entry = mk_log_entry(repo, pijul::Hash::from(h));
    [23.484]
    [22.2025]
    let entry = mk_log_entry(repo, pijul::Hash::from(hash));
  • replacement in crates/libflorescence/src/repo.rs at line 786
    [22.2241][22.2241:2375](),[22.2375][25.286:341]()
    fn mk_log_entry(repo: &pijul::Repository, h: pijul::Hash) -> LogEntry {
    let header = repo.changes.get_header(&h.into()).unwrap();
    let files = repo.changes.get_changes(&h).unwrap();
    [22.2241]
    [25.341]
    fn mk_log_entry(repo: &pijul::Repository, hash: pijul::Hash) -> LogEntry {
    let header = repo.changes.get_header(&hash).unwrap();
    let files = repo.changes.get_changes(&hash).unwrap();
  • replacement in crates/libflorescence/src/repo.rs at line 795
    [22.2390][22.2390:2407]()
    hash: h,
    [22.2390]
    [22.2407]
    hash,
  • edit in crates/inflorescence/src/main.rs at line 208
    [13.163][3.1403:1405](),[9.177][3.1403:1405](),[5.652][3.1403:1405](),[4.5100][3.1403:1405](),[3.1403][3.1403:1405](),[3.1405][2.2980:3039](),[2.2980][2.2980:3039]()
    }
    fn theme(_state: &State) -> Theme {
    Theme::TokyoNight
  • replacement in crates/inflorescence/src/main.rs at line 288
    [25.763][25.763:817]()
    let entry = repo.log.iter().nth(ix).unwrap();
    [25.763]
    [17.755]
    let entry = repo.log.get(ix).unwrap();
  • edit in crates/inflorescence/src/main.rs at line 293
    [25.903]
    [25.903]
    message: entry.message.clone(),
  • replacement in crates/inflorescence/src/main.rs at line 298
    [25.945][27.52:356]()
    let log_file_selection = |log_entry: &repo::LogEntry,
    file_ix: usize,
    log_ix: usize,
    hash: pijul::Hash|
    -> cursor::Selection {
    let path = log_entry.file_paths.iter().nth(file_ix).unwrap().clone();
    [25.945]
    [27.356]
    let log_file_selection =
    |log_entry: &repo::LogEntry,
    file_ix: usize,
    hash: pijul::Hash|
    -> (cursor::LogChangeFileSelection, Task<Message>) {
    let path = log_entry.file_paths.get(file_ix).unwrap().clone();
    // Request to get the diff
    let id = repo::LogFileId {
    change_hash: hash,
    path: path.clone(),
    };
    let task =
    Task::done(Message::ToRepo(repo::MsgIn::GetLogFileDiff { id }));
  • replacement in crates/inflorescence/src/main.rs at line 313
    [27.357][27.357:533]()
    cursor::Selection::LogChange {
    ix: log_ix,
    hash,
    file: Some(cursor::LogChangeFileSelection { ix: file_ix, path }),
    }
    };
    [27.357]
    [27.533]
    (
    cursor::LogChangeFileSelection {
    ix: file_ix,
    path,
    diff: None,
    },
    task,
    )
    };
  • replacement in crates/inflorescence/src/main.rs at line 343
    [11.7096][25.946:1027]()
    state.cursor.selection = match state.cursor.selection.as_ref() {
    [11.7096]
    [25.1027]
    let (selection, task) = match state.cursor.selection.take() {
  • replacement in crates/inflorescence/src/main.rs at line 349
    [25.1210][25.1210:1254]()
    let new_selection =
    [25.1210]
    [25.1254]
    let selection =
  • replacement in crates/inflorescence/src/main.rs at line 351
    [25.1330][25.1330:1369]()
    == *ix
    [25.1330]
    [25.1369]
    == ix
  • replacement in crates/inflorescence/src/main.rs at line 382
    [25.2501][25.2501:2545]()
    Some(new_selection)
    [25.2501]
    [25.2545]
    (Some(selection), Task::none())
  • replacement in crates/inflorescence/src/main.rs at line 389
    [25.2748][25.2748:3552]()
    let new_selection = if repo
    .changed_files
    .len()
    .saturating_sub(1)
    == *ix
    {
    if !repo.log.is_empty() {
    let ix = 0;
    log_selection(repo, ix)
    } else if !repo.untracked_files.is_empty() {
    let ix = 0;
    untracked_file_selection(
    repo,
    ix,
    &mut state.diffs_cache,
    &state.src_file_load_tx,
    )
    [25.2748]
    [25.3552]
    let selection =
    if repo.changed_files.len().saturating_sub(1) == ix
    {
    if !repo.log.is_empty() {
    let ix = 0;
    log_selection(repo, ix)
    } else if !repo.untracked_files.is_empty() {
    let ix = 0;
    untracked_file_selection(
    repo,
    ix,
    &mut state.diffs_cache,
    &state.src_file_load_tx,
    )
    } else {
    let ix = 0;
    changed_file_selection(
    repo,
    ix,
    &mut state.diffs_cache,
    &state.src_file_load_tx,
    )
    }
  • replacement in crates/inflorescence/src/main.rs at line 413
    [25.3589][25.3589:3633]()
    let ix = 0;
    [25.3589]
    [25.3633]
    let ix = ix + 1;
  • replacement in crates/inflorescence/src/main.rs at line 420
    [25.3926][25.3926:4374]()
    }
    } else {
    let ix = ix + 1;
    changed_file_selection(
    repo,
    ix,
    &mut state.diffs_cache,
    &state.src_file_load_tx,
    )
    };
    Some(new_selection)
    [25.3926]
    [25.4374]
    };
    (Some(selection), Task::none())
  • edit in crates/inflorescence/src/main.rs at line 426
    [27.601]
    [25.4513]
    message,
  • replacement in crates/inflorescence/src/main.rs at line 429
    [25.4571][25.4571:4628]()
    let new_selection = match file {
    [25.4571]
    [27.602]
    let (selection, task) = match file {
  • edit in crates/inflorescence/src/main.rs at line 433
    [27.754]
    [27.754]
    diff: _,
  • replacement in crates/inflorescence/src/main.rs at line 435
    [27.790][27.790:913]()
    let log_entry =
    repo.log.iter().nth(*log_ix).unwrap();
    [27.790]
    [27.913]
    let log_entry = repo.log.get(log_ix).unwrap();
  • replacement in crates/inflorescence/src/main.rs at line 441
    [27.1119][27.1119:1167]()
    == *file_ix
    [27.1119]
    [27.1167]
    == file_ix
  • edit in crates/inflorescence/src/main.rs at line 447
    [27.1363]
    [27.1363]
    let (file, task) = log_file_selection(
    log_entry, file_ix, hash,
    );
  • replacement in crates/inflorescence/src/main.rs at line 452
    [27.1364][27.1364:1488]()
    log_file_selection(
    log_entry, file_ix, *log_ix, *hash,
    [27.1364]
    [27.1488]
    (
    cursor::Selection::LogChange {
    ix: log_ix,
    hash,
    message,
    file: Some(file),
    },
    task,
  • replacement in crates/inflorescence/src/main.rs at line 463
    [25.4714][27.1553:1634](),[27.1634][25.4791:4865](),[25.4791][25.4791:4865](),[25.4865][20.6476:6528](),[20.6476][20.6476:6528](),[20.6528][25.4866:4932](),[25.4932][20.6592:6869](),[20.6592][20.6592:6869](),[20.6869][25.4933:5012](),[25.5012][20.6914:6966](),[20.6914][20.6914:6966](),[20.6966][25.5013:5077](),[25.5077][20.7032:7309](),[20.7032][20.7032:7309]()
    if repo.log.len().saturating_sub(1) == *log_ix {
    if !repo.untracked_files.is_empty() {
    let ix = 0;
    untracked_file_selection(
    repo,
    ix,
    &mut state.diffs_cache,
    &state.src_file_load_tx,
    )
    } else if !repo.changed_files.is_empty() {
    let ix = 0;
    changed_file_selection(
    repo,
    ix,
    &mut state.diffs_cache,
    &state.src_file_load_tx,
    )
    [25.4714]
    [25.5078]
    let selection =
    if repo.log.len().saturating_sub(1)
    == log_ix
    {
    if !repo.untracked_files.is_empty() {
    let ix = 0;
    untracked_file_selection(
    repo,
    ix,
    &mut state.diffs_cache,
    &state.src_file_load_tx,
    )
    } else if !repo.changed_files.is_empty()
    {
    let ix = 0;
    changed_file_selection(
    repo,
    ix,
    &mut state.diffs_cache,
    &state.src_file_load_tx,
    )
    } else {
    let ix = 0;
    log_selection(repo, ix)
    }
  • replacement in crates/inflorescence/src/main.rs at line 489
    [25.5123][25.5123:5175]()
    let ix = 0;
    [25.5123]
    [25.5175]
    let ix = log_ix + 1;
  • replacement in crates/inflorescence/src/main.rs at line 491
    [25.5239][20.7309:7347](),[20.7309][20.7309:7347](),[14.3591][11.7632:7673](),[20.7347][11.7632:7673](),[11.7632][11.7632:7673](),[11.7673][27.1635:1692](),[27.1692][25.5240:5300](),[20.7401][25.5240:5300](),[17.1078][11.7790:7824](),[25.5300][11.7790:7824](),[20.8242][11.7790:7824](),[11.7790][11.7790:7824]()
    }
    } else {
    let ix = log_ix + 1;
    log_selection(repo, ix)
    }
    [25.5239]
    [7.5061]
    };
    (selection, Task::none())
  • replacement in crates/inflorescence/src/main.rs at line 495
    [25.5328][25.5328:5372]()
    Some(new_selection)
    [25.5328]
    [25.5372]
    (Some(selection), task)
  • replacement in crates/inflorescence/src/main.rs at line 498
    [25.5424][25.5424:5486]()
    if !repo.untracked_files.is_empty() {
    [25.5424]
    [25.5486]
    let selection = if !repo.untracked_files.is_empty() {
  • replacement in crates/inflorescence/src/main.rs at line 519
    [6.573][5.1547:1573](),[14.4515][5.1547:1573](),[7.5553][5.1547:1573](),[8.5826][5.1547:1573](),[25.6251][5.1547:1573](),[11.8991][5.1547:1573](),[5.1547][5.1547:1573]()
    }
    [25.6251]
    [25.6252]
    };
    (selection, Task::none())
  • edit in crates/inflorescence/src/main.rs at line 523
    [25.6293]
    [11.9011]
    state.cursor.selection = selection;
    task
    } else {
    Task::none()
  • edit in crates/inflorescence/src/main.rs at line 528
    [11.9025][10.1314:1339](),[10.1314][10.1314:1339]()
    Task::none()
  • replacement in crates/inflorescence/src/main.rs at line 531
    [11.9080][11.9080:9161]()
    state.cursor.selection = match state.cursor.selection.as_ref() {
    [11.9080]
    [20.8392]
    let (selection, task) = match state.cursor.selection.take() {
  • replacement in crates/inflorescence/src/main.rs at line 537
    [20.8575][11.9241:9299](),[11.9241][11.9241:9299]()
    let new_selection = if 0 == *ix {
    [20.8575]
    [25.6294]
    let selection = if 0 == ix {
  • replacement in crates/inflorescence/src/main.rs at line 567
    [11.9841][11.9841:9885]()
    Some(new_selection)
    [11.9841]
    [11.9885]
    (Some(selection), Task::none())
  • replacement in crates/inflorescence/src/main.rs at line 574
    [20.8979][11.9985:10043](),[11.9985][11.9985:10043]()
    let new_selection = if 0 == *ix {
    [20.8979]
    [25.6796]
    let selection = if 0 == ix {
  • replacement in crates/inflorescence/src/main.rs at line 604
    [11.10585][11.10585:10629]()
    Some(new_selection)
    [11.10585]
    [22.4730]
    (Some(selection), Task::none())
  • edit in crates/inflorescence/src/main.rs at line 609
    [27.1815]
    [27.1815]
    message,
  • replacement in crates/inflorescence/src/main.rs at line 612
    [27.1873][25.7380:7437](),[25.7380][25.7380:7437]()
    let new_selection = match file {
    [27.1873]
    [27.1874]
    let (selection, task) = match file {
  • edit in crates/inflorescence/src/main.rs at line 616
    [27.2026]
    [27.2026]
    diff: _,
  • replacement in crates/inflorescence/src/main.rs at line 618
    [27.2062][27.2062:2185]()
    let log_entry =
    repo.log.iter().nth(*log_ix).unwrap();
    [27.2062]
    [27.2185]
    let log_entry = repo.log.get(log_ix).unwrap();
  • replacement in crates/inflorescence/src/main.rs at line 620
    [27.2186][27.2186:2251]()
    let file_ix = if 0 == *file_ix {
    [27.2186]
    [27.2251]
    let file_ix = if 0 == file_ix {
  • replacement in crates/inflorescence/src/main.rs at line 626
    [27.2443][27.2443:2567]()
    log_file_selection(
    log_entry, file_ix, *log_ix, *hash,
    [27.2443]
    [27.2567]
    let (file, task) = log_file_selection(
    log_entry, file_ix, hash,
    );
    (
    cursor::Selection::LogChange {
    ix: log_ix,
    hash,
    message,
    file: Some(file),
    },
    task,
  • replacement in crates/inflorescence/src/main.rs at line 640
    [25.7523][27.2632:2682]()
    if 0 == *log_ix {
    [25.7523]
    [25.7569]
    let selection = if 0 == log_ix {
  • replacement in crates/inflorescence/src/main.rs at line 664
    [25.8936][25.8936:8970]()
    }
    [25.8936]
    [25.8970]
    };
    (selection, Task::none())
  • replacement in crates/inflorescence/src/main.rs at line 668
    [25.9027][25.9027:9071]()
    Some(new_selection)
    [25.9027]
    [11.10629]
    (Some(selection), task)
  • replacement in crates/inflorescence/src/main.rs at line 671
    [11.10681][26.191:241]()
    if !repo.log.is_empty() {
    [11.10681]
    [26.241]
    let selection = if !repo.log.is_empty() {
  • replacement in crates/inflorescence/src/main.rs at line 692
    [6.1020][5.2471:2497](),[17.3104][5.2471:2497](),[8.6340][5.2471:2497](),[7.7355][5.2471:2497](),[25.9614][5.2471:2497](),[11.11190][5.2471:2497](),[5.2471][5.2471:2497]()
    }
    [25.9614]
    [5.2497]
    };
    (selection, Task::none())
  • edit in crates/inflorescence/src/main.rs at line 696
    [11.11210]
    [27.2741]
    state.cursor.selection = selection;
    task
    } else {
    Task::none()
  • edit in crates/inflorescence/src/main.rs at line 702
    [27.2755][27.2755:2780]()
    Task::none()
  • replacement in crates/inflorescence/src/main.rs at line 705
    [27.2900][27.2900:3516]()
    // The outter `Option` is for whether the selection should change, the inner is what it should change to if so
    let new_selection: Option<Option<cursor::Selection>> =
    match state.cursor.selection.as_ref() {
    Some(cursor::Selection::LogChange {
    ix,
    hash,
    file,
    }) => Some(Some(if file.is_none() {
    let log_entry = repo.log.iter().nth(*ix).unwrap();
    let file = if let Some(path) =
    [27.2900]
    [27.3516]
    let (selection, task): (
    Option<cursor::Selection>,
    Task<Message>,
    ) = match state.cursor.selection.take() {
    Some(cursor::Selection::LogChange {
    ix,
    hash,
    message,
    file,
    }) => {
    if file.is_none() {
    let log_entry = repo.log.get(ix).unwrap();
    let (file, task) = if let Some(path) =
  • replacement in crates/inflorescence/src/main.rs at line 720
    [27.3607][27.3607:3720]()
    Some(cursor::LogChangeFileSelection {
    ix: 0,
    [27.3607]
    [27.3720]
    // Request to get the diff
    let id = repo::LogFileId {
    change_hash: hash,
  • replacement in crates/inflorescence/src/main.rs at line 724
    [27.3776][27.3776:3811]()
    })
    [27.3776]
    [27.3811]
    };
    let task = Task::done(Message::ToRepo(
    repo::MsgIn::GetLogFileDiff { id },
    ));
    (
    Some(cursor::LogChangeFileSelection {
    ix: 0,
    path: path.clone(),
    diff: None,
    }),
    task,
    )
  • replacement in crates/inflorescence/src/main.rs at line 738
    [27.3848][27.3848:3885]()
    None
    [27.3848]
    [27.3885]
    (None, Task::none())
  • replacement in crates/inflorescence/src/main.rs at line 740
    [27.3916][27.3916:4129]()
    cursor::Selection::LogChange {
    ix: *ix,
    hash: *hash,
    file,
    }
    [27.3916]
    [27.4129]
    (
    Some(cursor::Selection::LogChange {
    ix,
    hash,
    message,
    file,
    }),
    task,
    )
  • replacement in crates/inflorescence/src/main.rs at line 750
    [27.4162][27.4162:4744]()
    cursor::Selection::LogChange {
    ix: *ix,
    hash: *hash,
    file: None,
    }
    })),
    Some(cursor::Selection::UntrackedFile { .. })
    | Some(cursor::Selection::ChangedFile { .. })
    | None => None,
    };
    if let Some(selection) = new_selection {
    state.cursor.selection = selection;
    }
    [27.4162]
    [11.11210]
    (
    Some(cursor::Selection::LogChange {
    ix,
    hash,
    message,
    file: None,
    }),
    Task::none(),
    )
    }
    }
    selection @ (Some(cursor::Selection::UntrackedFile {
    ..
    })
    | Some(cursor::Selection::ChangedFile {
    ..
    })
    | None) => (selection, Task::none()),
    };
    state.cursor.selection = selection;
    task
    } else {
    Task::none()
  • edit in crates/inflorescence/src/main.rs at line 774
    [11.11224][10.1355:1380](),[10.1355][10.1355:1380]()
    Task::none()
  • replacement in crates/inflorescence/src/main.rs at line 776
    [20.9441][20.9441:9484]()
    let selection = match select {
    [20.9441]
    [20.9484]
    let (selection, task) = match select {
  • replacement in crates/inflorescence/src/main.rs at line 786
    [17.3308][27.4745:4805](),[27.4805][20.9822:9880](),[20.9822][20.9822:9880](),[20.9880][21.458:513](),[21.513][27.4806:4829]()
    Some(cursor::Selection::UntrackedFile {
    ix,
    path,
    diffs: diff::State::default(),
    })
    [17.3308]
    [17.3308]
    (
    Some(cursor::Selection::UntrackedFile {
    ix,
    path,
    diffs: diff::State::default(),
    }),
    Task::none(),
    )
  • replacement in crates/inflorescence/src/main.rs at line 812
    [20.10739][27.4830:4888](),[27.4888][20.10792:10850](),[20.10792][20.10792:10850](),[20.10850][21.514:569](),[21.569][27.4889:4912]()
    Some(cursor::Selection::ChangedFile {
    ix,
    path,
    diffs: diff::State::default(),
    })
    [20.10739]
    [14.6157]
    (
    Some(cursor::Selection::ChangedFile {
    ix,
    path,
    diffs: diff::State::default(),
    }),
    Task::none(),
    )
  • replacement in crates/inflorescence/src/main.rs at line 821
    [14.6175][26.424:484]()
    cursor::Select::LogChange { ix, hash } => {
    [14.6175]
    [27.4913]
    cursor::Select::LogChange { ix, hash, message } => (
  • edit in crates/inflorescence/src/main.rs at line 825
    [26.593]
    [26.593]
    message,
  • replacement in crates/inflorescence/src/main.rs at line 827
    [26.629][27.4970:5375]()
    })
    }
    cursor::Select::LogChangeFile { ix, path } => {
    let file = cursor::LogChangeFileSelection { ix, path };
    if let Some(cursor::Selection::LogChange {
    ix,
    hash,
    file: _,
    }) = state.cursor.selection
    {
    [26.629]
    [27.5375]
    }),
    Task::none(),
    ),
    cursor::Select::LogChangeFile { ix: file_ix, path } => {
    match state.cursor.selection.take() {
  • replacement in crates/inflorescence/src/main.rs at line 833
    [27.5435][27.5435:5467]()
    ix,
    [27.5435]
    [27.5467]
    ix: change_ix,
  • replacement in crates/inflorescence/src/main.rs at line 835
    [27.5501][27.5501:5632]()
    file: Some(file),
    })
    } else {
    None
    [27.5501]
    [26.629]
    message,
    file: _,
    }) => {
    // Request to get the diff
    let id = repo::LogFileId {
    change_hash: hash,
    path: path.clone(),
    };
    let task = Task::done(Message::ToRepo(
    repo::MsgIn::GetLogFileDiff { id },
    ));
    let file = cursor::LogChangeFileSelection {
    ix: file_ix,
    path,
    diff: None,
    };
    (
    Some(cursor::Selection::LogChange {
    ix: change_ix,
    hash,
    message,
    file: Some(file),
    }),
    task,
    )
    }
    selection => (selection, Task::none()),
  • replacement in crates/inflorescence/src/main.rs at line 867
    [27.5681][10.1435:1460](),[10.1435][10.1435:1460]()
    Task::none()
    [27.5681]
    [5.2647]
    task
  • replacement in crates/inflorescence/src/main.rs at line 1161
    [11.15291][11.15291:15362]()
    if let Some(selection) = state.cursor.selection.as_ref() {
    [11.15291]
    [11.15362]
    if let Some(selection) = state.cursor.selection.take() {
  • replacement in crates/inflorescence/src/main.rs at line 1164
    [11.15472][11.15472:15531]()
    state.cursor.selection = match selection {
    [11.15472]
    [20.14024]
    let (selection, task) = match selection {
  • replacement in crates/inflorescence/src/main.rs at line 1179
    [14.7649][14.7649:7694]()
    repo.untracked_files
    [14.7649]
    [14.7694]
    let selection = repo
    .untracked_files
  • replacement in crates/inflorescence/src/main.rs at line 1183
    [14.7771][14.7771:7892]()
    .find(|(_ix, file_path)| *file_path == path)
    .map(|(ix, path)| {
    [14.7771]
    [14.7892]
    .find(|(_ix, file_path)| *file_path == &path)
    .map(|(ix, _path)| {
  • replacement in crates/inflorescence/src/main.rs at line 1187
    [14.7999][14.7999:8055]()
    path: path.clone(),
    [14.7999]
    [21.1056]
    path,
  • replacement in crates/inflorescence/src/main.rs at line 1190
    [14.8089][14.8089:8120]()
    })
    [14.8089]
    [14.8120]
    });
    (selection, Task::none())
  • replacement in crates/inflorescence/src/main.rs at line 1198
    [20.14692][20.14692:14768]()
    if let Some(diffs) = repo.changed_files.get(path) {
    [20.14692]
    [20.14768]
    if let Some(diffs) = repo.changed_files.get(&path) {
  • replacement in crates/inflorescence/src/main.rs at line 1211
    [17.3993][17.3993:4036]()
    repo.changed_files
    [17.3993]
    [17.4036]
    let selection = repo
    .changed_files
  • replacement in crates/inflorescence/src/main.rs at line 1216
    [17.4178][17.4178:4229]()
    file_path == &path
    [17.4178]
    [17.4229]
    *file_path == &path
  • replacement in crates/inflorescence/src/main.rs at line 1224
    [17.4523][17.4523:4554]()
    })
    [17.4523]
    [17.4554]
    });
    (selection, Task::none())
  • replacement in crates/inflorescence/src/main.rs at line 1227
    [17.4576][25.9760:10119]()
    cursor::Selection::LogChange { ix: _, hash, file } => repo
    .log
    .iter()
    .enumerate()
    .find(|(_ix, entry)| &entry.hash == hash)
    .map(|(ix, entry)| {
    let file = file.as_ref().and_then(|file| {
    [17.4576]
    [25.10119]
    cursor::Selection::LogChange {
    ix: _,
    hash,
    message,
    file,
    } => {
    let (selection, task) = match repo
    .log
    .iter()
    .enumerate()
    .find(|(_ix, entry)| entry.hash == hash)
    {
    Some((ix, entry)) => {
    let file_and_task = file.and_then(|file| {
  • replacement in crates/inflorescence/src/main.rs at line 1247
    [25.10431][25.10431:10504]()
    cursor::LogChangeFileSelection {
    [25.10431]
    [25.10504]
    // Request to get the diff
    let id = repo::LogFileId {
    change_hash: hash,
    path: path.clone(),
    };
    let task = Task::done(Message::ToRepo(repo::MsgIn::GetLogFileDiff { id }));
    (cursor::LogChangeFileSelection {
  • replacement in crates/inflorescence/src/main.rs at line 1257
    [25.10616][25.10616:10658]()
    }
    [25.10616]
    [25.10658]
    diff: None,
    }, task)
  • replacement in crates/inflorescence/src/main.rs at line 1261
    [25.10729][25.10729:10912]()
    cursor::Selection::LogChange {
    ix,
    hash: entry.hash,
    file,
    [25.10729]
    [25.10912]
    let (file, task) = match file_and_task {
    Some((file, task)) => (Some(file), task),
    None => (None, Task::none()),
    };
    (
    Some(cursor::Selection::LogChange {
    ix,
    hash: entry.hash,
    message,
    file,
    }),
    task,
    )
  • replacement in crates/inflorescence/src/main.rs at line 1275
    [25.10942][25.10942:10970]()
    }),
    [25.10942]
    [11.16407]
    None => (None, Task::none()),
    };
    (selection, task)
    }
  • edit in crates/inflorescence/src/main.rs at line 1281
    [11.16426]
    [11.16426]
    state.cursor.selection = selection;
    task
    } else {
    Task::none()
  • replacement in crates/inflorescence/src/main.rs at line 1287
    [11.16440][11.16440:16441]()
    [11.16440]
    [11.16441]
    }
    repo::MsgOut::LogFileDiff { id, diffs } => {
    if let Some(cursor::Selection::LogChange {
    ix: _,
    hash: selected_hash,
    message: _,
    file:
    Some(cursor::LogChangeFileSelection {
    ix: _,
    path: selected_path,
    diff,
    }),
    }) = state.cursor.selection.as_mut()
    {
    let repo::LogFileId { change_hash, path } = id;
    if *selected_hash == change_hash && *selected_path == path {
    // NOTE: using unknown encoding as we don't yet have the
    // file
    let file = diff::init_file(
    diff::FileContent::UnknownEncoding,
    Some(&diffs),
    );
    *diff = Some((diff::State::default(), file));
    }
    }
  • edit in crates/inflorescence/src/main.rs at line 1410
    [20.16535]
    [18.6096]
    }
    fn theme(_state: &State) -> Theme {
    Theme::TokyoNight
  • replacement in crates/inflorescence/src/main.rs at line 1427
    [5.3531][11.16834:16864](),[11.16864][13.2561:2624]()
    let untracked_files =
    el(column(repo.untracked_files.iter().enumerate().map(
    [5.3531]
    [7.7755]
    let untracked_files = || {
    el(column(repo.untracked_files.iter().enumerate().map(
  • replacement in crates/inflorescence/src/main.rs at line 1441
    [7.8327][7.8327:8340]()
    )));
    [7.8327]
    [7.8340]
    )))
    };
  • replacement in crates/inflorescence/src/main.rs at line 1444
    [7.8341][11.16939:16967](),[11.16967][13.2646:2707]()
    let changed_files =
    el(column(repo.changed_files.iter().enumerate().map(
    [7.8341]
    [15.4521]
    let changed_files = || {
    el(column(repo.changed_files.iter().enumerate().map(
  • replacement in crates/inflorescence/src/main.rs at line 1459
    [5.4155][5.4155:4168]()
    )));
    [5.4155]
    [5.4168]
    )))
    };
  • replacement in crates/inflorescence/src/main.rs at line 1462
    [5.4169][25.11255:11316]()
    let log = el(column(repo.log.iter().enumerate().map(
    [5.4169]
    [25.11316]
    let log = || {
    el(column(repo.log.iter().enumerate().map(
  • replacement in crates/inflorescence/src/main.rs at line 1469
    [25.11451][22.5078:5173](),[22.5078][22.5078:5173]()
    let mut short_hash = hash.to_base32();
    short_hash.truncate(8);
    [25.11451]
    [25.11452]
    let short_hash = display_short_hash(hash);
  • replacement in crates/inflorescence/src/main.rs at line 1476
    [22.5390][26.670:745]()
    cursor::Select::LogChange { ix, hash: *hash },
    [22.5390]
    [22.5458]
    cursor::Select::LogChange { ix, hash: *hash, message: message.clone() },
  • replacement in crates/inflorescence/src/main.rs at line 1483
    [22.5664][22.5664:5677]()
    )));
    [22.5664]
    [11.17203]
    )))
    };
  • replacement in crates/inflorescence/src/main.rs at line 1523
    [20.17682][20.17682:17760]()
    None | Some(FileDiff::Loading) => el(text("loading...")),
    [20.17682]
    [14.9266]
    None | Some(FileDiff::Loading) => {
    el(text("Loading diff..."))
    }
  • replacement in crates/inflorescence/src/main.rs at line 1528
    [20.17789][20.17789:17852]()
    view_diff_header(format!("{path} diff:")),
    [20.17789]
    [20.17852]
    view_diff_header(format!(
    "Untracked file {path} contents:"
    )),
  • replacement in crates/inflorescence/src/main.rs at line 1532
    [20.17895][20.17895:17915]()
    ]))
    [20.17895]
    [14.9339]
    ])
    .spacing(SPACING))
  • replacement in crates/inflorescence/src/main.rs at line 1553
    [19.4845][20.18605:18683]()
    None | Some(FileDiff::Loading) => el(text("loading...")),
    [19.4845]
    [20.18683]
    None | Some(FileDiff::Loading) => {
    el(text("Loading diff..."))
    }
  • replacement in crates/inflorescence/src/main.rs at line 1558
    [20.18730][20.18730:18793]()
    view_diff_header(format!("{path} diff:")),
    [20.18730]
    [20.18793]
    view_diff_header(format!("Changed file {path} diff:")),
  • replacement in crates/inflorescence/src/main.rs at line 1560
    [20.18836][20.18836:18856]()
    ]))
    [20.18836]
    [22.5678]
    ])
    .spacing(SPACING))
  • replacement in crates/inflorescence/src/main.rs at line 1563
    [22.5692][25.11649:11827]()
    Some(cursor::Selection::LogChange { ix, hash, file }) => {
    let entry =
    state.repo.as_ref().unwrap().log.iter().nth(*ix).unwrap();
    [22.5692]
    [25.11827]
    Some(cursor::Selection::LogChange {
    ix,
    hash,
    message,
    file,
    }) => {
    let entry = state.repo.as_ref().unwrap().log.get(*ix).unwrap();
  • replacement in crates/inflorescence/src/main.rs at line 1571
    [25.11828][25.11828:11923]()
    let mut short_hash = hash.to_base32();
    short_hash.truncate(8);
    [25.11828]
    [25.11923]
    let short_hash = display_short_hash(hash);
  • replacement in crates/inflorescence/src/main.rs at line 1574
    [27.6077][25.11989:12134](),[25.11989][25.11989:12134]()
    let is_selected = matches!(file, Some(cursor::LogChangeFileSelection{ix: _, path: selected_path}) if selected_path == path);
    [27.6077]
    [27.6078]
    let is_selected = matches!(file, Some(cursor::LogChangeFileSelection{ path: selected_path, .. }) if selected_path == path);
  • replacement in crates/inflorescence/src/main.rs at line 1580
    [25.12386][25.12386:12466]()
    view_diff_header(format!("{} changed files:", short_hash)),
    [25.12386]
    [25.12466]
    view_diff_header(format!("{short_hash} message:")),
    el(text(message)),
    view_diff_header("Changed files:".to_string()),
  • replacement in crates/inflorescence/src/main.rs at line 1584
    [25.12517][25.12517:12537]()
    ]))
    [25.12517]
    [14.9691]
    ])
    .spacing(SPACING))
  • replacement in crates/inflorescence/src/main.rs at line 1590
    [5.4171][13.3512:3553]()
    el(row([
    el(column([
    [5.4171]
    [13.3553]
    let left_view = match state.cursor.selection.as_ref() {
    Some(cursor::Selection::LogChange {
    ix: _,
    hash,
    message: _,
    file: Some(cursor::LogChangeFileSelection { ix: _, path, diff }),
    }) => el(column([
    view_diff_header(format!(
    "{path} changes in {}:",
    display_short_hash(hash)
    )),
    match diff {
    Some((state, file)) => {
    diff::view(state, file).map(|action| todo!())
    }
    None => el(text("Loading diff..")),
    },
    ])
    .width(Length::FillPortion(1))
    .spacing(SPACING)),
    Some(cursor::Selection::UntrackedFile { .. })
    | Some(cursor::Selection::ChangedFile { .. })
    | Some(cursor::Selection::LogChange { .. })
    | None => el(column([
  • replacement in crates/inflorescence/src/main.rs at line 1615
    [13.3580][16.5331:5481](),[16.5481][22.5775:5839]()
    el(column([el(text("Untracked files:")), untracked_files])),
    el(column([el(text("Changed files:")), changed_files])),
    el(column([el(text("Recent changes:")), log])),
    [13.3580]
    [13.3863]
    el(column([el(text("Untracked files:")), untracked_files()])),
    el(column([el(text("Changed files:")), changed_files()])),
    el(column([el(text("Recent changes:")), log()])),
  • replacement in crates/inflorescence/src/main.rs at line 1621
    [16.5557][14.9739:9850](),[13.3923][14.9739:9850](),[14.9850][16.5558:5596]()
    el(column([record_msg_editor, selection_details])
    .width(Length::FillPortion(1))),
    ])
    .spacing(SPACING))
    [16.5557]
    [9.1940]
    };
    let right_view = el(column([record_msg_editor, selection_details])
    .width(Length::FillPortion(1)));
    el(row([left_view, right_view]).spacing(SPACING))
  • edit in crates/inflorescence/src/main.rs at line 1667
    [13.4129]
    [2.3333]
    }
    fn display_short_hash(hash: &pijul::Hash) -> String {
    let mut short_hash = hash.to_base32();
    short_hash.truncate(8);
    short_hash
  • replacement in crates/inflorescence/src/diff.rs at line 7
    [28.69][28.69:123]()
    use iced::{Background, Color, Element, Font, Length};
    [28.69]
    [24.553]
    use iced::{alignment, Background, Color, Element, Font, Length};
  • replacement in crates/inflorescence/src/diff.rs at line 479
    [28.2553][28.2553:2575]()
    el(column(diffs))
    [28.2553]
    [28.2575]
    el(column(diffs).spacing(10))
  • replacement in crates/inflorescence/src/diff.rs at line 609
    [29.2835][19.13149:13185](),[28.6384][19.13149:13185](),[19.13149][19.13149:13185]()
    text(txt).font(Font::MONOSPACE)
    [29.2835]
    [19.13185]
    text(txt)
    .font(Font::MONOSPACE)
    .wrapping(text::Wrapping::WordOrGlyph)
    .align_y(alignment::Vertical::Top)
  • replacement in crates/inflorescence/src/diff.rs at line 617
    [28.6509][28.6509:6567](),[28.6567][29.2836:2898](),[29.2898][28.6629:6789](),[28.6629][28.6629:6789]()
    let txt = format!("{:width$} ", num, width = digits);
    mono_text(txt).font(Font::MONOSPACE).style(move |theme| {
    let palette = theme.extended_palette();
    text::Style {
    color: Some(palette.background.base.text.scale_alpha(0.61)),
    }
    })
    [28.6509]
    [28.6789]
    let txt = format!("{num:digits$} ");
    mono_text(txt)
    .font(Font::MONOSPACE)
    .style(move |theme| {
    let palette = theme.extended_palette();
    text::Style {
    color: Some(palette.background.base.text.scale_alpha(0.61)),
    }
    })
    .align_y(alignment::Vertical::Top)
  • edit in crates/inflorescence/src/cursor.rs at line 25
    [22.5919]
    [25.12576]
    message: String,
  • edit in crates/inflorescence/src/cursor.rs at line 34
    [25.12720]
    [20.19112]
    /// Loaded async
    pub diff: Option<(diff::State, diff::File)>,
  • replacement in crates/inflorescence/src/cursor.rs at line 40
    [20.19157][7.1599:1646](),[5.158][7.1599:1646](),[7.1646][15.3146:3191](),[15.3191][26.748:796](),[26.796][27.6251:6298]()
    UntrackedFile { ix: usize, path: String },
    ChangedFile { ix: usize, path: String },
    LogChange { ix: usize, hash: pijul::Hash },
    LogChangeFile { ix: usize, path: String },
    [20.19157]
    [5.188]
    UntrackedFile {
    ix: usize,
    path: String,
    },
    ChangedFile {
    ix: usize,
    path: String,
    },
    LogChange {
    ix: usize,
    hash: pijul::Hash,
    message: String,
    },
    LogChangeFile {
    ix: usize,
    path: String,
    },