add change files diffs to-record selection
[?]
Nov 20, 2025, 7:49 PM
2SLTGWP6FTM7C7BMSYEI2EBD4YTVO2XCIVRPHBJH5XHVLLVR76TACDependencies
- [2]
MJDGPSHGWIP contents diff - [3]
ZVI4AWERwoot contents_diff - [4]
QMAUTRB6refactor diff - [5]
GWZGYNIBadd view crate - [6]
23SFYK4Qbig view refactor into a new crate - [7]
OPXFZKEBview tests setup - [8]
XSZZB47Urefactor stuff into lib - [9]
3BK22XE5add a test for hover btn and more refactors - [10]
I2AG42PAnew cols layout - [11]
SASAN2XCuse nav-scrollable - [12]
KWTBNTO3diffs selection and scrolling - [13]
UR4J677Rnav for log changes and refactors - [14]
3XRG4BB6rewritten nav-scrollable! - [15]
WAOGSCOJvery nice refactor, wip adding channels logs - [16]
EJPSD5XOshared allowed actions conditions between update and view - [17]
YK3MOJJLchonky refactor, wip other channels logs & diffs - [18]
CULHFNIVadd error report view - [19]
LFEMJYYDstart of to_record selection - [20]
5O4FWCFPadd tests to_record selection and improve it - [21]
HPSOAD4Rfix moved tracked file view - [22]
UUB7SHLRmore re-use in diffs - [23]
A6Z4O6RCactions menu - [24]
C5P3JIFCrefactor out the nav-scrollable children len arg - [25]
Z752SDILadvanced shaping for file names - [26]
PKJCFSBMtheme improvements - [27]
7SSBM4UQview: refactor repo view - [28]
PTWZYQFRuse nav-scrollable for repo status - [29]
JZXYSIYDchannel selection! - [30]
AZ5D2LQUallow to set record description - [31]
L6KSEFQImove cursor related stuff into its module - [32]
ZD56BUSUadd back +/- bg colors - [33]
7BLZN73Oadd a key to refresh repo - [34]
7WCB5YQJrefactor msgs and modules - [35]
N256FH74improve views - [36]
OJPGHVC3entire log! - [37]
MYGIBRRHwip custom theme - [38]
KEPKF3WOunify diffs handling, simplify view - [*]
6YZAVBWUInitial commit
Change contents
- edit in libflorescence/src/diff.rs at line 1
use crate::{hash_one, repo, AHash}; - replacement in libflorescence/src/diff.rs at line 25
pub diffs_with_contents: Vec<DiffWithContents>,pub diffs_with_contents: Vec<(DiffWithContents, IdHash)>, - edit in libflorescence/src/diff.rs at line 108
diff_id: IdHash, - edit in libflorescence/src/diff.rs at line 118
}#[derive(Debug, Clone, Hash, PartialEq, Eq)]pub struct Id {pub diff: repo::ChangedFileDiff,}#[derive(Debug, Clone, Hash, PartialEq, Eq)]pub struct IdRef<'a> {pub diff: &'a repo::ChangedFileDiff,}#[derive(Debug, Clone, Copy, Hash, PartialEq, Eq)]pub struct IdHash(pub AHash);pub fn id_hash(id: &Id) -> IdHash {IdHash(hash_one(id)) - edit in libflorescence/src/diff.rs at line 136[9.124]
pub fn id_ref_hash(id: &IdRef<'_>) -> IdHash {IdHash(hash_one(id))}pub fn id_parts_hash(diff: &repo::ChangedFileDiff) -> IdHash {id_ref_hash(&IdRef { diff })} - replacement in inflorescence_view/src/view.rs at line 6
use crate::{diff, el, theme, Theme};use crate::{checkbox, diff, el, theme, Theme}; - edit in inflorescence_view/src/view.rs at line 28
const TO_RECORD_LABEL_INCLUDE: &str = "■";const TO_RECORD_LABEL_EXCLUDE: &str = "□";const TO_RECORD_LABEL_PARTIAL: &str = "▤"; - replacement in inflorescence_view/src/view.rs at line 166
let selected = match to_record::determine_file(to_record, file_path, changed_files) {to_record::PickSet::Include => TO_RECORD_LABEL_INCLUDE,to_record::PickSet::Exclude => TO_RECORD_LABEL_EXCLUDE,to_record::PickSet::Partial => TO_RECORD_LABEL_PARTIAL,};let state = to_record::determine_file(to_record, file_path, changed_files);let to_record_toggle =el(checkbox::three_way(state).on_press_with(||Msg::ToRecord(to_record::Msg::ToggleFile{file :file_path.clone()}))); - edit in inflorescence_view/src/view.rs at line 174
let to_record_toggle =el(button(text(selected).size(21).shaping(text::Shaping::Advanced).center().wrapping(text::Wrapping::None)).width(31).height(31).padding(0).on_press_with(||Msg::ToRecord(to_record::Msg::ToggleFile{file :file_path.clone()}))); - replacement in inflorescence_view/src/view.rs at line 252[17.413]→[17.413:462](∅→∅),[17.462]→[20.22:102](∅→∅),[20.102]→[15.6138:6164](∅→∅),[15.6138]→[15.6138:6164](∅→∅)
Some((file, state)) => {diff::view(state, nav, file, *diff_selected, false)}Some((file, state)) => diff::view(state,nav,file,path,*diff_selected,false,to_record,), - replacement in inflorescence_view/src/view.rs at line 281[17.745]→[17.745:794](∅→∅),[17.794]→[20.103:182](∅→∅),[20.182]→[15.7196:7222](∅→∅),[15.7196]→[15.7196:7222](∅→∅)
Some((file, state)) => {diff::view(state, nav, file, *diff_selected, true)}Some((file, state)) => diff::view(state,nav,file,path,*diff_selected,true,to_record,), - replacement in inflorescence_view/src/view.rs at line 399
let selected = match to_record.overall {to_record::PickSet::Include => TO_RECORD_LABEL_INCLUDE,to_record::PickSet::Exclude => TO_RECORD_LABEL_EXCLUDE,to_record::PickSet::Partial => TO_RECORD_LABEL_PARTIAL,};let to_record_toggle = el(button(text(selected).size(21).shaping(text::Shaping::Advanced).center().wrapping(text::Wrapping::None),).width(31).height(31).padding(0).on_press_with(|| Msg::ToRecord(to_record::Msg::ToggleOverall)));let to_record_toggle = el(checkbox::three_way(to_record.overall).on_press_with(|| Msg::ToRecord(to_record::Msg::ToggleOverall))); - replacement in inflorescence_view/src/view.rs at line 502
diff::view(state, nav, file, *diff_selected, false)diff::view(state,nav,file,path,*diff_selected,false,to_record,) - replacement in inflorescence_view/src/view.rs at line 749
diff::view(state, nav, file, *diff_selected, false)diff::view(state,nav,file,path,*diff_selected,false,to_record,) - replacement in inflorescence_view/src/view.rs at line 919
diff::view(state, nav, file, *diff_selected, false)diff::view(state,nav,file,path,*diff_selected,false,to_record,) - edit in inflorescence_view/src/lib.rs at line 1
pub mod checkbox; - replacement in inflorescence_view/src/diff.rs at line 4
DiffWithoutContents, File, FileAndState, Lines, Section, State,DiffWithoutContents, File, FileAndState, IdHash, Lines, Section, State, - edit in inflorescence_view/src/diff.rs at line 7
use inflorescence_model::to_record; - replacement in inflorescence_view/src/diff.rs at line 9
use crate::{el, theme, Theme};use crate::view::Msg;use crate::{checkbox, el, theme, Theme}; - replacement in inflorescence_view/src/diff.rs at line 18
pub fn view<'a, M>(pub fn view<'a>( - edit in inflorescence_view/src/diff.rs at line 22
path: &'a str, - replacement in inflorescence_view/src/diff.rs at line 25
) -> Element<'a, M, Theme>whereM: 'a,{to_record: &to_record::State,) -> Element<'a, Msg, Theme> { - edit in inflorescence_view/src/diff.rs at line 32
path, - edit in inflorescence_view/src/diff.rs at line 35
to_record, - replacement in inflorescence_view/src/diff.rs at line 43
fn view_decoded<'a, M>(fn view_decoded<'a>( - edit in inflorescence_view/src/diff.rs at line 47
path: &'a str, - replacement in inflorescence_view/src/diff.rs at line 50
) -> Element<'a, M, Theme>whereM: 'a,{to_record: &to_record::State,) -> Element<'a, Msg, Theme> { - edit in inflorescence_view/src/diff.rs at line 61
const CHECKBOX_SPACING: u32 = 4; - replacement in inflorescence_view/src/diff.rs at line 74
el(column(res))// Add space to align these with toggle in `Section::Changed`let toggle_space = el(container(text("")).width(checkbox::WIDTH));el(row([toggle_space, el(column(res))]).spacing(CHECKBOX_SPACING)) - replacement in inflorescence_view/src/diff.rs at line 78
Section::Changed { deleted, added } => {Section::Changed {deleted,added,diff_id,} => { - replacement in inflorescence_view/src/diff.rs at line 104
el(column(res))let to_record_pick =to_record::determine_change_pick(path, *diff_id, to_record);let to_record_toggle = el(checkbox::two_way(to_record_pick).on_press_with(|| {Msg::ToRecord(to_record::Msg::ToggleChange {file: path.to_string(),diff_id: *diff_id,})}));el(row([to_record_toggle, el(column(res))]).spacing(CHECKBOX_SPACING)) - replacement in inflorescence_view/src/diff.rs at line 149
fn view_undecodable<'a, M>(fn view_undecodable<'a>( - replacement in inflorescence_view/src/diff.rs at line 154
) -> Element<'a, M, Theme>whereM: 'a,{) -> Element<'a, Msg, Theme> { - replacement in inflorescence_view/src/diff.rs at line 177
fn view_diff_with_contents<'a, M>(diff: &DiffWithContents,) -> Element<'a, M, Theme>whereM: 'a,{fn view_diff_with_contents<'a>((diff, _id): &(DiffWithContents, IdHash),) -> Element<'a, Msg, Theme> { - replacement in inflorescence_view/src/diff.rs at line 267
fn view_diff_without_contents<'a, M>(fn view_diff_without_contents<'a>( - replacement in inflorescence_view/src/diff.rs at line 269
) -> Element<'a, M, Theme>whereM: 'a,{) -> Element<'a, Msg, Theme> { - replacement in inflorescence_view/src/diff.rs at line 361
fn line_view<'a, M>(fn line_view<'a>( - replacement in inflorescence_view/src/diff.rs at line 366
) -> Element<'a, M, Theme>whereM: 'a,{) -> Element<'a, Msg, Theme> { - file addition: checkbox.rs[5.85]
use iced::widget::{button, text, Button};use inflorescence_model::to_record;use crate::Theme;pub const WIDTH: u32 = 31;const TO_RECORD_LABEL_INCLUDE: &str = "■";const TO_RECORD_LABEL_EXCLUDE: &str = "□";const TO_RECORD_LABEL_PARTIAL: &str = "▤";/// A checkbox with three possible statespub fn three_way<'a, M>(state: to_record::PickSet) -> Button<'a, M, Theme>whereM: 'a,{let label = match state {to_record::PickSet::Include => TO_RECORD_LABEL_INCLUDE,to_record::PickSet::Exclude => TO_RECORD_LABEL_EXCLUDE,to_record::PickSet::Partial => TO_RECORD_LABEL_PARTIAL,};checkbox_btn(label)}/// A checkbox with two possible statespub fn two_way<'a, M>(state: to_record::Pick) -> Button<'a, M, Theme>whereM: 'a,{let label = match state {to_record::Pick::Include => TO_RECORD_LABEL_INCLUDE,to_record::Pick::Exclude => TO_RECORD_LABEL_EXCLUDE,};checkbox_btn(label)}fn checkbox_btn<'a, M>(label: &'a str) -> Button<'a, M, Theme>whereM: 'a,{button(text(label).size(21).shaping(text::Shaping::Advanced).center().wrapping(text::Wrapping::None),).width(WIDTH).height(31).padding(0)} - replacement in inflorescence_model/src/to_record.rs at line 7
use libflorescence::repo;use libflorescence::{diff, repo}; - replacement in inflorescence_model/src/to_record.rs at line 14
ToggleFile {file: String,},ToggleChange {file: String,change: repo::ChangedFileDiff,},ToggleFile { file: String },ToggleChange { file: String, diff_id: diff::IdHash }, - replacement in inflorescence_model/src/to_record.rs at line 50
pub changes: HashMap<repo::ChangedFileDiff, Pick>,pub changes: HashMap<diff::IdHash, Pick>, - edit in inflorescence_model/src/to_record.rs at line 73
pub fn determine_change_pick(file: &str,diff_id: diff::IdHash,state: &State,) -> Pick {match state.overall {PickSet::Include => return Pick::Include,PickSet::Exclude => return Pick::Exclude,PickSet::Partial => {}}if let Some(pick) = state.files.get(file) {match pick {PickSet::Include => return Pick::Include,PickSet::Exclude => return Pick::Exclude,PickSet::Partial => {}}}let explicit = state.changes.get(file).and_then(|file| file.changes.get(&diff_id)).copied();dbg!(&explicit);explicit.unwrap_or_else(|| default_pick(state))} - replacement in inflorescence_model/src/to_record.rs at line 125
Msg::ToggleChange { file, change } => {Msg::ToggleChange {file,diff_id: change,} => { - replacement in inflorescence_model/src/to_record.rs at line 158
if !changes.contains_key(change) {changes.insert(change.clone(), unset_pick);}let diff_id = diff::id_parts_hash(change);changes.entry(diff_id).or_insert(unset_pick); - replacement in inflorescence_model/src/to_record.rs at line 238
diff: &repo::ChangedFileDiff,diff_id: diff::IdHash, - replacement in inflorescence_model/src/to_record.rs at line 244
.and_then(|PartialFile { changes }| changes.get(diff)).and_then(|PartialFile { changes }| changes.get(&diff_id)) - replacement in inflorescence_model/src/to_record/test.rs at line 183
change: change.clone(),diff_id: diff::id_parts_hash(change), - edit in inflorescence_model/src/to_record/test.rs at line 191
let diff_id = diff::id_parts_hash(change); - replacement in inflorescence_model/src/to_record/test.rs at line 197
.get(change).get(&diff_id) - replacement in inflorescence_model/src/diff.rs at line 3
contents_to_lines, Combined, DecodedFile, DiffWithContents,DiffWithoutContents, File, FileContent, Lines, Section,UndecodableContents, UndecodableFile,contents_to_lines, id_hash, id_parts_hash, id_ref_hash, Combined,DecodedFile, DiffWithContents, DiffWithoutContents, File, FileContent, Id,IdHash, IdRef, Lines, Section, UndecodableContents, UndecodableFile, - replacement in inflorescence_model/src/action.rs at line 4
use libflorescence::repo;use libflorescence::{diff, repo}; - replacement in inflorescence_model/src/action.rs at line 87
| ToRecord(to_record::Msg::ToggleChange { file: _, change: _ }),| ToRecord(to_record::Msg::ToggleChange {file: _,diff_id: _,}), - replacement in inflorescence_model/src/action.rs at line 96
| ToRecord(to_record::Msg::ToggleChange { file: _, change: _ }),| ToRecord(to_record::Msg::ToggleChange {file: _,diff_id: _,}), - replacement in inflorescence_model/src/action.rs at line 755
selected_diff,diff::id_parts_hash(selected_diff), - replacement in inflorescence/src/main.rs at line 538
.and_then(|diffs| diffs.iter().nth(diff_ix)).cloned();if let Some(change) = selected_diff {.and_then(|diffs| diffs.iter().nth(diff_ix));if let Some(diff) = selected_diff { - replacement in inflorescence/src/main.rs at line 542
change,diff_id: diff::id_parts_hash(diff), - replacement in inflorescence/src/diff.rs at line 5[15.102633]→[17.67463:67543](∅→∅),[17.67543]→[15.102634:102769](∅→∅),[9.1845]→[15.102634:102769](∅→∅)
contents_to_lines, init_diffs_nav, Combined, DecodedFile, DiffWithContents,DiffWithoutContents, File, FileAndState, FileContent, FilesState, Lines,Section, State, UndecodableContents, UndecodableFile,contents_to_lines, id_parts_hash, init_diffs_nav, Combined, DecodedFile,DiffWithContents, DiffWithoutContents, File, FileAndState, FileContent,FilesState, IdHash, Lines, Section, State, UndecodableContents,UndecodableFile, - replacement in inflorescence/src/diff.rs at line 43
) -> (Vec<DiffWithContents>, Vec<DiffWithoutContents>) {) -> (Vec<(DiffWithContents, IdHash)>, Vec<DiffWithoutContents>) { - replacement in inflorescence/src/diff.rs at line 55
with.push(DiffWithContents::Del{ contents });with.push((DiffWithContents::Del{ contents }, id_parts_hash(diff))); - replacement in inflorescence/src/diff.rs at line 58
with.push(DiffWithContents::Undel);with.push((DiffWithContents::Undel, id_parts_hash(diff))); - replacement in inflorescence/src/diff.rs at line 61
with.push(DiffWithContents::Add);with.push((DiffWithContents::Add, id_parts_hash(diff))); - replacement in inflorescence/src/diff.rs at line 71
with.push(DiffWithContents::Edit {with.push((DiffWithContents::Edit { - replacement in inflorescence/src/diff.rs at line 75
});}, id_parts_hash(diff))); - replacement in inflorescence/src/diff.rs at line 94
with.push(DiffWithContents::Replacement {with.push((DiffWithContents::Replacement { - replacement in inflorescence/src/diff.rs at line 98
});}, id_parts_hash(diff))); - replacement in inflorescence/src/diff.rs at line 184
diffs_with_contents: Vec<DiffWithContents>,diffs_with_contents: Vec<(DiffWithContents, IdHash)>, - replacement in inflorescence/src/diff.rs at line 192
for change in diffs_with_contents {for (change, diff_id) in diffs_with_contents { - edit in inflorescence/src/diff.rs at line 201
diff_id, - edit in inflorescence/src/diff.rs at line 217
diff_id, - edit in inflorescence/src/diff.rs at line 245
diff_id, - edit in inflorescence/src/diff.rs at line 256
diff_id, - replacement in inflorescence/src/diff.rs at line 281
sections.push(Section::Changed { deleted, added });sections.push(Section::Changed {deleted,added,diff_id,});