replacement in inflorescence_view/src/view.rs at line 7
− use inflorescence_iced_widget::{nav_scrollable, report};
+ use inflorescence_iced_widget::{dir_picker, nav_scrollable, report};
replacement in inflorescence_view/src/view.rs at line 9
[77.3418]→[77.3418:3479](∅→∅) − IndexSet, Job, Log, ReadyState, RecordChanges, SubState,
+ IndexSet, Job, Log, ManagingRepoSubState, ReadyState, RecordChanges,
edit in inflorescence_view/src/view.rs at line 17
edit in inflorescence_view/src/view.rs at line 35
+ PickingRepo(dir_picker::Msg),
edit in inflorescence_view/src/view.rs at line 55
[75.140]→[48.2212:2231](∅→∅),
[48.2212]→[48.2212:2231](∅→∅) edit in inflorescence_view/src/view.rs at line 60
+
+ match sub {
+ model::SubState::PickingRepoDir(state) => {
+ picking_repo(state, *window_size, allowed_actions, report)
+ }
+ model::SubState::ManagingRepo(state) => managing_repo(
+ state,
+ get_diff,
+ *window_size,
+ allowed_actions,
+ report,
+ ),
+ }
+ }
+
+ fn picking_repo<'a>(
+ state: &'a model::PickingRepoDir,
+ window_size: iced::Size,
+ allowed_actions: &'a [action::Binding],
+ report: &'a report::Container,
+ ) -> Element<'a, Msg, Theme> {
+ let model::PickingRepoDir { picker } = state;
+ let main = el(column([
+ el(text("Select project directory:")),
+ dir_picker::view(picker, theme::Container::Bordered)
+ .map(Msg::PickingRepo),
+ ])
+ .spacing(SPACING)
+ .width(Length::Fill)
+ .height(Length::Fill));
+
+ add_actions_and_report(None, main, window_size, allowed_actions, report)
+ }
+
+ fn managing_repo<'a, F>(
+ state: &'a model::ManagingRepo,
+ get_diff: F,
+ window_size: iced::Size,
+ allowed_actions: &'a [action::Binding],
+ report: &'a report::Container,
+ ) -> Element<'a, Msg, Theme>
+ where
+ F: Fn(file::IdHash) -> Option<&'a diff::File>,
+ {
+ let model::ManagingRepo { repo_path, sub } = state;
replacement in inflorescence_view/src/view.rs at line 108
[57.3970]→[67.1368:1406](∅→∅) − SubState::Loading { .. } => {
+ ManagingRepoSubState::Loading { .. } => {
replacement in inflorescence_view/src/view.rs at line 113
[67.1540]→[67.1540:2035](∅→∅) − let actions_inner = column([]).spacing(4);
− let actions_inner =
− actions_inner.push(view_actions(allowed_actions));
− let actions = el(container(actions_inner)
− .class(theme::Container::ActionsBg)
− .width(Length::Fill)
− .height(Length::Shrink)
− .padding(Padding::from([2, 5])));
−
− let main = overlay_report(main, report, window_size);
−
− el(column([main, actions]))
+ add_actions_and_report(
+ None,
+ main,
+ window_size,
+ allowed_actions,
+ report,
+ )
replacement in inflorescence_view/src/view.rs at line 121
[67.2045]→[57.4030:4062](∅→∅),
[57.4030]→[57.4030:4062](∅→∅) − SubState::SelectingId {
+ ManagingRepoSubState::SelectingId {
replacement in inflorescence_view/src/view.rs at line 127
[57.4199]→[59.488:560](∅→∅) − SubState::Ready(state) => view_ready(
− *window_size,
+ ManagingRepoSubState::Ready(state) => view_ready(
+ window_size,
edit in inflorescence_view/src/view.rs at line 144
+ fn add_actions_and_report<'a>(
+ above_actions: Option<Column<'a, Msg, Theme>>,
+ main: Element<'a, Msg, Theme>,
+ window_size: iced::Size,
+ allowed_actions: &'a [action::Binding],
+ report: &'a report::Container,
+ ) -> Element<'a, Msg, Theme> {
+ let actions_inner = above_actions.unwrap_or_else(|| column([]).spacing(4));
+ let actions_inner = actions_inner.push(view_actions(allowed_actions));
+ let actions = el(container(actions_inner)
+ .class(theme::Container::ActionsBg)
+ .width(Length::Fill)
+ .height(Length::Shrink)
+ .padding(Padding::from([2, 5])));
+
+ let main = overlay_report(main, report, &window_size);
+
+ el(column([main, actions]).spacing(SPACING))
+ }
+
replacement in inflorescence_view/src/view.rs at line 169
[57.4380]→[59.665:706](∅→∅) − allowed_actions: &[action::Binding],
+ allowed_actions: &'a [action::Binding],
replacement in inflorescence_view/src/view.rs at line 1265
[77.3669]→[59.2605:2680](∅→∅),
[51.3621]→[59.2605:2680](∅→∅),
[59.2680]→[49.2048:2199](∅→∅),
[51.3701]→[49.2048:2199](∅→∅),
[50.7459]→[49.2048:2199](∅→∅),
[57.20172]→[49.2048:2199](∅→∅),
[49.2048]→[49.2048:2199](∅→∅),
[49.2199]→[50.7460:7502](∅→∅),
[50.7502]→[65.284:327](∅→∅),
[65.327]→[67.2046:2106](∅→∅),
[67.2106]→[72.796:845](∅→∅) − let actions_inner = actions_inner.push(view_actions(allowed_actions));
− let actions = el(container(actions_inner)
− .class(theme::Container::ActionsBg)
− .width(Length::Fill)
− .height(Length::Shrink)
− .padding(Padding::from([2, 5])));
−
− // Overlay the main view with reports
− let main = overlay_report(main, report, &window_size);
−
− el(column([main, actions]).spacing(SPACING))
+ add_actions_and_report(
+ Some(actions_inner),
+ main,
+ window_size,
+ allowed_actions,
+ report,
+ )
replacement in inflorescence_view/src/view/test.rs at line 5
[88.123]→[82.530051:530123](∅→∅),
[65.2347]→[82.530051:530123](∅→∅) − use inflorescence_model::model::{ReadyState, State, SubMenu, SubState};
+ use inflorescence_model::model::{
+ ManagingRepo, ManagingRepoSubState, ReadyState, State, SubMenu, SubState,
+ };
replacement in inflorescence_view/src/view/test.rs at line 48
[24.4726]→[81.72:106](∅→∅) − let sub = SubState::Loading {
+ let sub = ManagingRepoSubState::Loading {
edit in inflorescence_view/src/view/test.rs at line 53
[81.206]→[82.530124:530193](∅→∅) − let allowed_actions = action::get_allowed(&sub, &None, &report);
replacement in inflorescence_view/src/view/test.rs at line 54
[24.4954]→[24.4954:4978](∅→∅) + let state = ManagingRepo {
+ repo_path: repo_path.clone(),
+ sub,
+ };
+ let sub = SubState::ManagingRepo(state);
+ let mut state = State {
+ sub,
replacement in inflorescence_view/src/view/test.rs at line 63
[75.437]→[58.684:722](∅→∅),
[39.4216]→[58.684:722](∅→∅),
[58.722]→[81.269:307](∅→∅) − repo_path: repo_path.clone(),
− sub,
− allowed_actions,
+ allowed_actions: vec![],
edit in inflorescence_view/src/view/test.rs at line 67
+ action::update_allowed_actions(&mut state);
replacement in inflorescence_view/src/view/test.rs at line 94
[46.2379]→[81.324:368](∅→∅) − let sub = SubState::Ready(ready_state);
+ let sub = ManagingRepoSubState::Ready(ready_state);
replacement in inflorescence_view/src/view/test.rs at line 96
[81.415]→[82.530219:530288](∅→∅),
[81.477]→[25.104:128](∅→∅),
[82.530288]→[25.104:128](∅→∅),
[25.104]→[25.104:128](∅→∅),
[25.128]→[39.4217:4251](∅→∅),
[39.4251]→[75.438:474](∅→∅) − let allowed_actions = action::get_allowed(&sub, &None, &report);
− let state = State {
− window_size: WINDOW_SIZE,
− window_scale: WINDOW_SCALE,
+ let state = ManagingRepo {
replacement in inflorescence_view/src/view/test.rs at line 99
[81.491]→[81.491:516](∅→∅) + };
+ let sub = SubState::ManagingRepo(state);
+ let mut state = State {
+ sub,
+ window_size: WINDOW_SIZE,
+ window_scale: WINDOW_SCALE,
+ allowed_actions: vec![],
edit in inflorescence_view/src/view/test.rs at line 109
+ action::update_allowed_actions(&mut state);
replacement in inflorescence_view/src/view/test.rs at line 151
[58.1673]→[81.533:577](∅→∅) − let sub = SubState::Ready(ready_state);
+ let sub = ManagingRepoSubState::Ready(ready_state);
replacement in inflorescence_view/src/view/test.rs at line 153
[81.624]→[82.530314:530383](∅→∅),
[81.686]→[26.8275:8299](∅→∅),
[58.1673]→[26.8275:8299](∅→∅),
[82.530383]→[26.8275:8299](∅→∅),
[24.5637]→[26.8275:8299](∅→∅),
[26.8299]→[39.4252:4286](∅→∅),
[39.4286]→[75.475:511](∅→∅) − let allowed_actions = action::get_allowed(&sub, &None, &report);
− let state = State {
− window_size: WINDOW_SIZE,
− window_scale: WINDOW_SCALE,
+ let state = ManagingRepo {
replacement in inflorescence_view/src/view/test.rs at line 156
[81.700]→[81.700:725](∅→∅) + };
+ let sub = SubState::ManagingRepo(state);
+ let mut state = State {
+ sub,
+ window_size: WINDOW_SIZE,
+ window_scale: WINDOW_SCALE,
+ allowed_actions: vec![],
edit in inflorescence_view/src/view/test.rs at line 166
+ action::update_allowed_actions(&mut state);
replacement in inflorescence_view/src/view/test.rs at line 202
[58.2484]→[81.742:786](∅→∅) − let sub = SubState::Ready(ready_state);
+ let sub = ManagingRepoSubState::Ready(ready_state);
replacement in inflorescence_view/src/view/test.rs at line 204
[81.833]→[82.530409:530478](∅→∅),
[81.895]→[24.5637:5661](∅→∅),
[58.2484]→[24.5637:5661](∅→∅),
[26.8902]→[24.5637:5661](∅→∅),
[49.10246]→[24.5637:5661](∅→∅),
[82.530478]→[24.5637:5661](∅→∅),
[24.5637]→[24.5637:5661](∅→∅) − let allowed_actions = action::get_allowed(&sub, &None, &report);
− let state = State {
+ let state = ManagingRepo {
+ repo_path: repo_path.clone(),
+ sub,
+ };
+ let sub = SubState::ManagingRepo(state);
+ let mut state = State {
+ sub,
replacement in inflorescence_view/src/view/test.rs at line 213
[75.653]→[58.2485:2523](∅→∅),
[39.4356]→[58.2485:2523](∅→∅),
[58.2523]→[81.896:934](∅→∅) − repo_path: repo_path.clone(),
− sub,
− allowed_actions,
+ allowed_actions: vec![],
edit in inflorescence_view/src/view/test.rs at line 217
+ action::update_allowed_actions(&mut state);
replacement in inflorescence_view/src/view/test.rs at line 244
[65.3627]→[81.951:995](∅→∅) − let sub = SubState::Ready(ready_state);
+ let sub = ManagingRepoSubState::Ready(ready_state);
replacement in inflorescence_view/src/view/test.rs at line 274
[81.1063]→[82.530504:530667](∅→∅) − let allowed_actions = action::get_allowed(&sub, &None, &report);
− let state = State {
− window_size: WINDOW_SIZE,
− window_scale: WINDOW_SCALE,
+ let state = ManagingRepo {
edit in inflorescence_view/src/view/test.rs at line 276
+ sub,
+ };
+ let sub = SubState::ManagingRepo(state);
+ let mut state = State {
replacement in inflorescence_view/src/view/test.rs at line 281
[82.530718]→[82.530718:530743](∅→∅) + window_size: WINDOW_SIZE,
+ window_scale: WINDOW_SCALE,
+ allowed_actions: vec![],
edit in inflorescence_view/src/view/test.rs at line 287
+ action::update_allowed_actions(&mut state);
replacement in inflorescence_view/src/view/test.rs at line 315
[82.531601]→[82.531601:531645](∅→∅) − let sub = SubState::Ready(ready_state);
+ let sub = ManagingRepoSubState::Ready(ready_state);
replacement in inflorescence_view/src/view/test.rs at line 318
[82.531732]→[82.531732:531805](∅→∅),
[82.531805]→[81.1125:1149](∅→∅),
[81.1125]→[81.1125:1149](∅→∅) − let allowed_actions = action::get_allowed(&sub, &sub_menu, &report);
− let state = State {
+ let state = ManagingRepo {
+ repo_path: repo_path.clone(),
+ sub,
+ };
+ let sub = SubState::ManagingRepo(state);
+ let mut state = State {
+ sub,
replacement in inflorescence_view/src/view/test.rs at line 327
[81.1219]→[81.1219:1295](∅→∅) − repo_path: repo_path.clone(),
− sub,
− allowed_actions,
+ allowed_actions: vec![],
edit in inflorescence_view/src/view/test.rs at line 331
+ action::update_allowed_actions(&mut state);
edit in inflorescence_view/src/theme.rs at line 102
edit in inflorescence_view/src/theme.rs at line 265
+ Container::Bordered => container::Style {
+ border: Border {
+ color: Color { a: 0.3, ..TURQOISE },
+ width: 2.0,
+ ..default()
+ },
+ ..default()
+ },
replacement in inflorescence_view/src/element.rs at line 7
− pub fn el<'a, E, M>(e: E) -> Element<'a, M, Theme>
+ pub fn el<'a, E, M, Renderer>(e: E) -> Element<'a, M, Theme, Renderer>
replacement in inflorescence_view/src/element.rs at line 9
[23.147]→[26.89:125](∅→∅) − E: Into<Element<'a, M, Theme>>,
+ E: Into<Element<'a, M, Theme, Renderer>>,
replacement in inflorescence_view/src/element.rs at line 11
[23.178]→[26.126:165](∅→∅) − Into::<Element<M, Theme>>::into(e)
+ Into::<Element<M, Theme, Renderer>>::into(e)
replacement in inflorescence_view/screenshots/sub_menu_push-wgpu.png at line 3
[82.10]→[84.1401:70286](∅→∅) replacement in inflorescence_view/screenshots/sub_menu_push-wgpu.png at line 116
[84.70287]→[84.70287:137746](∅→∅) replacement in inflorescence_view/screenshots/sub_menu_push-wgpu.png at line 253
[82.138363]→[84.137747:190178](∅→∅),
[84.190178]→[82.190802:192062](∅→∅),
[82.190802]→[82.190802:192062](∅→∅),
[82.192062]→[84.190179:272874](∅→∅) replacement in inflorescence_view/screenshots/sub_menu_push-wgpu.png at line 471
[84.274011]→[84.274011:334169](∅→∅) replacement in inflorescence_view/screenshots/sub_menu_push-wgpu.png at line 547
[84.334318]→[84.334318:491738](∅→∅),
[84.491738]→[82.349537:349538](∅→∅),
[82.349537]→[82.349537:349538](∅→∅),
[82.349538]→[84.491739:528009](∅→∅) replacement in inflorescence_view/screenshots/loading_repo-wgpu.png at line 3
[80.35]→[80.35:79952](∅→∅) replacement in inflorescence_view/screenshots/loading_repo-wgpu.png at line 197
[80.119243]→[80.119243:199566](∅→∅) replacement in inflorescence_view/screenshots/loading_repo-wgpu.png at line 404
[80.239028]→[80.239028:320234](∅→∅) replacement in inflorescence_view/screenshots/loading_repo-wgpu.png at line 618
[80.358980]→[80.358980:442088](∅→∅) replacement in inflorescence_view/screenshots/loading_repo-wgpu.png at line 800
[80.476893]→[80.476893:497099](∅→∅) replacement in inflorescence_view/screenshots/loaded_shown_reports-wgpu.png at line 3
[80.497163]→[84.528012:596897](∅→∅) replacement in inflorescence_view/screenshots/loaded_shown_reports-wgpu.png at line 115
[84.596898]→[84.596898:664357](∅→∅) replacement in inflorescence_view/screenshots/loaded_shown_reports-wgpu.png at line 252
[80.635516]→[84.664358:716789](∅→∅),
[84.716789]→[80.687955:689215](∅→∅),
[80.687955]→[80.687955:689215](∅→∅),
[80.689215]→[84.716790:799485](∅→∅) replacement in inflorescence_view/screenshots/loaded_shown_reports-wgpu.png at line 470
[84.800622]→[84.800622:913656](∅→∅),
[84.913656]→[81.106991:107035](∅→∅),
[81.106991]→[81.106991:107035](∅→∅),
[81.107035]→[84.913657:963227](∅→∅) replacement in inflorescence_view/screenshots/loaded_shown_reports-wgpu.png at line 778
[84.963352]→[84.963352:964635](∅→∅) replacement in inflorescence_view/screenshots/loaded_shown_reports-wgpu.png at line 782
[84.965008]→[84.965008:965572](∅→∅) replacement in inflorescence_view/screenshots/loaded_shown_reports-wgpu.png at line 786
[84.965601]→[84.965601:966072](∅→∅) replacement in inflorescence_view/screenshots/loaded_shown_reports-wgpu.png at line 790
[84.966083]→[84.966083:969365](∅→∅) replacement in inflorescence_view/screenshots/loaded_shown_reports-wgpu.png at line 799
[84.969433]→[84.969433:969775](∅→∅) replacement in inflorescence_view/screenshots/loaded_shown_reports-wgpu.png at line 802
[84.969809]→[84.969809:978508](∅→∅) edit in inflorescence_view/screenshots/loaded_shown_reports-wgpu.png at line 865
[80.939359]→[84.978509:985469](∅→∅) edit in inflorescence_view/screenshots/loaded_shown_reports-wgpu.png at line 866
[81.247162]→[84.985470:990942](∅→∅) replacement in inflorescence_view/screenshots/loaded_shown_reports-wgpu.png at line 867
[81.268316]→[84.990943:1075739](∅→∅) replacement in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 3
[80.1036001]→[81.269202:270292](∅→∅),
[81.270292]→[80.1037091:1191870](∅→∅),
[80.1037091]→[80.1037091:1191870](∅→∅) edit in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 529
replacement in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 535
[80.1191897]→[80.1191897:1192228](∅→∅) edit in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 589
edit in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 607
[80.1192257]→[80.1192257:1192524](∅→∅) edit in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 619
edit in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 635
[80.1192551]→[80.1192551:1193161](∅→∅) replacement in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 637
[80.1193163]→[80.1193163:1221376](∅→∅) replacement in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 741
[80.1221383]→[80.1221383:1221657](∅→∅) replacement in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 747
[80.1221664]→[80.1221664:1222275](∅→∅) replacement in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 754
[80.1222296]→[80.1222296:1222333](∅→∅) replacement in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 757
[80.1222340]→[80.1222340:1222381](∅→∅) edit in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 760
edit in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 762
[80.1222395]→[80.1222395:1222404](∅→∅) edit in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 764
edit in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 766
[80.1222425]→[80.1222425:1222433](∅→∅) edit in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 768
edit in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 770
[80.1222454]→[80.1222454:1222465](∅→∅) edit in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 771
edit in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 774
[80.1222486]→[80.1222486:1222496](∅→∅) edit in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 775
replacement in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 779
[80.1222517]→[80.1222517:1222570](∅→∅) replacement in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 783
[80.1222584]→[80.1222584:1222631](∅→∅) replacement in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 786
[80.1222645]→[80.1222645:1222671](∅→∅) edit in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 789
[80.1222685]→[80.1222685:1222700](∅→∅) edit in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 790
replacement in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 793
[80.1222721]→[80.1222721:1222731](∅→∅) edit in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 796
edit in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 798
[80.1222752]→[80.1222752:1222762](∅→∅) edit in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 800
edit in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 802
[80.1222783]→[80.1222783:1222793](∅→∅) edit in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 804
edit in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 806
[80.1222814]→[80.1222814:1222824](∅→∅) edit in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 808
edit in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 810
[80.1222845]→[80.1222845:1222855](∅→∅) edit in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 812
edit in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 814
[80.1222876]→[80.1222876:1222886](∅→∅) edit in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 816
edit in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 818
[80.1222907]→[80.1222907:1222917](∅→∅) edit in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 820
edit in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 822
[80.1222938]→[80.1222938:1222948](∅→∅) edit in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 823
replacement in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 826
[80.1222969]→[80.1222969:1222979](∅→∅) replacement in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 830
[80.1223000]→[80.1223000:1223010](∅→∅) replacement in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 834
[80.1223031]→[80.1223031:1223041](∅→∅) edit in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 837
edit in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 839
[80.1223062]→[80.1223062:1223185](∅→∅) edit in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 840
edit in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 842
[80.1223199]→[80.1223199:1223308](∅→∅) replacement in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 844
[80.1223322]→[80.1223322:1223396](∅→∅) replacement in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 847
[80.1223410]→[80.1223410:1223451](∅→∅) edit in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 850
edit in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 883
[80.1223472]→[80.1223472:1223510](∅→∅) edit in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 884
edit in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 886
[80.1223524]→[80.1223524:1223569](∅→∅) edit in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 887
edit in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 889
[80.1223583]→[80.1223583:1249299](∅→∅) edit in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 891
edit in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 893
[80.1249320]→[80.1249320:1249330](∅→∅) edit in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 895
edit in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 897
[80.1249351]→[80.1249351:1249361](∅→∅) edit in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 899
edit in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 901
[80.1249382]→[80.1249382:1249392](∅→∅) edit in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 903
edit in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 905
[80.1249413]→[80.1249413:1249423](∅→∅) edit in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 907
edit in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 909
[80.1249444]→[80.1249444:1249454](∅→∅) edit in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 911
edit in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 913
[80.1249475]→[80.1249475:1249485](∅→∅) edit in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 914
replacement in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 917
[80.1249506]→[80.1249506:1249516](∅→∅) replacement in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 921
[80.1249537]→[80.1249537:1249547](∅→∅) replacement in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 925
[80.1249568]→[80.1249568:1249578](∅→∅) replacement in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 929
[80.1249599]→[80.1249599:1249609](∅→∅) replacement in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 933
[80.1249630]→[80.1249630:1249640](∅→∅) replacement in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 937
[80.1249661]→[80.1249661:1249671](∅→∅) replacement in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 941
[80.1249692]→[80.1249692:1249702](∅→∅) edit in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 944
edit in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 946
[80.1249723]→[80.1249723:1249733](∅→∅) edit in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 947
edit in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 950
[80.1249754]→[80.1249754:1249764](∅→∅) edit in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 951
edit in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 954
[80.1249785]→[80.1249785:1249833](∅→∅) replacement in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 955
[80.1249840]→[80.1249840:1249933](∅→∅) edit in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 957
[80.1249940]→[80.1249940:1249950](∅→∅) edit in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 959
edit in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 961
[80.1249971]→[80.1249971:1249981](∅→∅) edit in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 963
edit in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 965
[80.1250002]→[80.1250002:1250012](∅→∅) edit in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 967
edit in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 969
[80.1250033]→[80.1250033:1250043](∅→∅) edit in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 971
edit in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 973
[80.1250064]→[80.1250064:1250074](∅→∅) edit in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 974
replacement in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 977
[80.1250095]→[80.1250095:1303273](∅→∅) replacement in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 1139
[80.1342058]→[80.1342058:1369265](∅→∅) replacement in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 1192
[80.1373279]→[80.1373279:1489077](∅→∅) replacement in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 1418
[80.1497513]→[80.1497513:1498539](∅→∅) replacement in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 1423
[80.1500957]→[80.1500957:1501563](∅→∅) replacement in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 1425
[80.1501588]→[80.1501588:1529397](∅→∅) replacement in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 1468
[80.1529678]→[80.1529678:1531676](∅→∅) replacement in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 1476
[80.1532468]→[80.1532468:1555204](∅→∅) replacement in inflorescence_view/screenshots/loaded_selected_untracked-wgpu.png at line 1533
[80.1555231]→[80.1555231:1580156](∅→∅),
[80.1580156]→[81.270293:293877](∅→∅) replacement in inflorescence_view/screenshots/loaded_point_at_untracked-wgpu.png at line 3
[80.1583539]→[81.293879:295930](∅→∅),
[81.295930]→[80.1585590:1616516](∅→∅),
[80.1585590]→[80.1585590:1616516](∅→∅) replacement in inflorescence_view/screenshots/loaded_point_at_untracked-wgpu.png at line 61
[80.1616654]→[80.1616654:1617472](∅→∅) replacement in inflorescence_view/screenshots/loaded_point_at_untracked-wgpu.png at line 64
[80.1617528]→[80.1617528:1621021](∅→∅) replacement in inflorescence_view/screenshots/loaded_point_at_untracked-wgpu.png at line 74
[80.1621131]→[80.1621131:1751367](∅→∅) replacement in inflorescence_view/screenshots/loaded_point_at_untracked-wgpu.png at line 306
[80.1751382]→[80.1751382:1760930](∅→∅) replacement in inflorescence_view/screenshots/loaded_point_at_untracked-wgpu.png at line 322
[80.1760937]→[80.1760937:1761209](∅→∅) replacement in inflorescence_view/screenshots/loaded_point_at_untracked-wgpu.png at line 325
[80.1761216]→[80.1761216:1761644](∅→∅) replacement in inflorescence_view/screenshots/loaded_point_at_untracked-wgpu.png at line 328
[80.1761651]→[80.1761651:1761833](∅→∅) edit in inflorescence_view/screenshots/loaded_point_at_untracked-wgpu.png at line 332
edit in inflorescence_view/screenshots/loaded_point_at_untracked-wgpu.png at line 335
[80.1761854]→[80.1761854:1761891](∅→∅) replacement in inflorescence_view/screenshots/loaded_point_at_untracked-wgpu.png at line 336
[80.1761898]→[80.1761898:1761943](∅→∅) replacement in inflorescence_view/screenshots/loaded_point_at_untracked-wgpu.png at line 339
[80.1761950]→[80.1761950:1761964](∅→∅) replacement in inflorescence_view/screenshots/loaded_point_at_untracked-wgpu.png at line 343
[80.1761985]→[80.1761985:1761993](∅→∅) replacement in inflorescence_view/screenshots/loaded_point_at_untracked-wgpu.png at line 347
[80.1762014]→[80.1762014:1762026](∅→∅) replacement in inflorescence_view/screenshots/loaded_point_at_untracked-wgpu.png at line 351
[80.1762047]→[80.1762047:1762058](∅→∅) replacement in inflorescence_view/screenshots/loaded_point_at_untracked-wgpu.png at line 355
[80.1762079]→[80.1762079:1762129](∅→∅) replacement in inflorescence_view/screenshots/loaded_point_at_untracked-wgpu.png at line 358
[80.1762143]→[80.1762143:1762191](∅→∅) replacement in inflorescence_view/screenshots/loaded_point_at_untracked-wgpu.png at line 362
[80.1762205]→[80.1762205:1762232](∅→∅) replacement in inflorescence_view/screenshots/loaded_point_at_untracked-wgpu.png at line 411
[80.1762621]→[80.1762621:1762744](∅→∅) replacement in inflorescence_view/screenshots/loaded_point_at_untracked-wgpu.png at line 415
[80.1762765]→[80.1762765:1762869](∅→∅) replacement in inflorescence_view/screenshots/loaded_point_at_untracked-wgpu.png at line 420
[80.1762890]→[80.1762890:1762959](∅→∅) replacement in inflorescence_view/screenshots/loaded_point_at_untracked-wgpu.png at line 423
[80.1762973]→[80.1762973:1763015](∅→∅) edit in inflorescence_view/screenshots/loaded_point_at_untracked-wgpu.png at line 427
edit in inflorescence_view/screenshots/loaded_point_at_untracked-wgpu.png at line 429
[80.1763036]→[80.1763036:1763069](∅→∅) edit in inflorescence_view/screenshots/loaded_point_at_untracked-wgpu.png at line 430
replacement in inflorescence_view/screenshots/loaded_point_at_untracked-wgpu.png at line 433
[80.1763090]→[80.1763090:1763133](∅→∅) replacement in inflorescence_view/screenshots/loaded_point_at_untracked-wgpu.png at line 476
[80.1763147]→[80.1763147:1788866](∅→∅) replacement in inflorescence_view/screenshots/loaded_point_at_untracked-wgpu.png at line 571
[80.1789634]→[80.1789634:1789645](∅→∅) replacement in inflorescence_view/screenshots/loaded_point_at_untracked-wgpu.png at line 1112
[80.1789666]→[80.1789666:2085390](∅→∅),
[80.2085390]→[81.295931:333412](∅→∅) edit in inflorescence_view/screenshots/loaded_point_at_untracked-wgpu.png at line 1115
edit in inflorescence_view/screenshots/loaded_point_at_untracked-wgpu.png at line 1117
[81.333433]→[81.333433:333443](∅→∅) edit in inflorescence_view/screenshots/loaded_point_at_untracked-wgpu.png at line 1119
edit in inflorescence_view/screenshots/loaded_point_at_untracked-wgpu.png at line 1121
[81.333464]→[81.333464:333476](∅→∅) edit in inflorescence_view/screenshots/loaded_point_at_untracked-wgpu.png at line 1123
edit in inflorescence_view/screenshots/loaded_point_at_untracked-wgpu.png at line 1125
[81.333497]→[81.333497:333509](∅→∅) replacement in inflorescence_view/screenshots/loaded_point_at_untracked-wgpu.png at line 1127
[81.333523]→[81.333523:333535](∅→∅) edit in inflorescence_view/screenshots/loaded_point_at_untracked-wgpu.png at line 1130
edit in inflorescence_view/screenshots/loaded_point_at_untracked-wgpu.png at line 1132
[81.333556]→[81.333556:333568](∅→∅) edit in inflorescence_view/screenshots/loaded_point_at_untracked-wgpu.png at line 1134
edit in inflorescence_view/screenshots/loaded_point_at_untracked-wgpu.png at line 1136
[81.333589]→[81.333589:333601](∅→∅) edit in inflorescence_view/screenshots/loaded_point_at_untracked-wgpu.png at line 1138
edit in inflorescence_view/screenshots/loaded_point_at_untracked-wgpu.png at line 1140
[81.333622]→[81.333622:333634](∅→∅) replacement in inflorescence_view/screenshots/loaded_point_at_untracked-wgpu.png at line 1142
[81.333648]→[81.333648:333663](∅→∅) replacement in inflorescence_view/screenshots/loaded_point_at_untracked-wgpu.png at line 1146
[81.333684]→[81.333684:333701](∅→∅) replacement in inflorescence_view/screenshots/loaded_point_at_untracked-wgpu.png at line 1150
[81.333722]→[81.333722:333734](∅→∅) edit in inflorescence_view/screenshots/loaded_point_at_untracked-wgpu.png at line 1153
[81.333748]→[81.333748:333760](∅→∅) edit in inflorescence_view/screenshots/loaded_point_at_untracked-wgpu.png at line 1154
replacement in inflorescence_view/screenshots/loaded_point_at_untracked-wgpu.png at line 1157
[81.333781]→[81.333781:333793](∅→∅) replacement in inflorescence_view/screenshots/loaded_point_at_untracked-wgpu.png at line 1161
[81.333814]→[81.333814:333826](∅→∅) replacement in inflorescence_view/screenshots/loaded_point_at_untracked-wgpu.png at line 1171
[81.333847]→[81.333847:334083](∅→∅) replacement in inflorescence_view/screenshots/loaded_point_at_untracked-wgpu.png at line 1175
[81.334104]→[81.334104:334114](∅→∅) replacement in inflorescence_view/screenshots/loaded_point_at_untracked-wgpu.png at line 1179
[81.334135]→[81.334135:334147](∅→∅) edit in inflorescence_view/screenshots/loaded_point_at_untracked-wgpu.png at line 1182
[81.334161]→[81.334161:334173](∅→∅) edit in inflorescence_view/screenshots/loaded_point_at_untracked-wgpu.png at line 1183
replacement in inflorescence_view/screenshots/loaded_point_at_untracked-wgpu.png at line 1186
[81.334194]→[81.334194:334206](∅→∅) replacement in inflorescence_view/screenshots/loaded_point_at_untracked-wgpu.png at line 1190
[81.334227]→[81.334227:334239](∅→∅) replacement in inflorescence_view/screenshots/loaded_point_at_untracked-wgpu.png at line 1194
[81.334260]→[81.334260:334272](∅→∅) edit in inflorescence_view/screenshots/loaded_point_at_untracked-wgpu.png at line 1197
[81.334286]→[81.334286:334298](∅→∅) edit in inflorescence_view/screenshots/loaded_point_at_untracked-wgpu.png at line 1198
replacement in inflorescence_view/screenshots/loaded_point_at_untracked-wgpu.png at line 1201
[81.334319]→[81.334319:334331](∅→∅) replacement in inflorescence_view/screenshots/loaded_point_at_untracked-wgpu.png at line 1205
[81.334352]→[81.334352:334364](∅→∅) replacement in inflorescence_view/screenshots/loaded_point_at_untracked-wgpu.png at line 1209
[81.334385]→[81.334385:334397](∅→∅) edit in inflorescence_view/screenshots/loaded_point_at_untracked-wgpu.png at line 1212
[81.334411]→[81.334411:334423](∅→∅) edit in inflorescence_view/screenshots/loaded_point_at_untracked-wgpu.png at line 1213
edit in inflorescence_view/screenshots/loaded_point_at_untracked-wgpu.png at line 1215
replacement in inflorescence_view/screenshots/loaded_point_at_untracked-wgpu.png at line 1217
[81.334444]→[81.334444:354088](∅→∅) replacement in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 3
[80.2124925]→[81.354090:356141](∅→∅),
[81.356141]→[80.2126976:2157902](∅→∅),
[80.2126976]→[80.2126976:2157902](∅→∅) replacement in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 61
[80.2158040]→[80.2158040:2158858](∅→∅) replacement in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 64
[80.2158914]→[80.2158914:2162407](∅→∅) replacement in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 74
[80.2162517]→[80.2162517:2239077](∅→∅) edit in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 311
replacement in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 313
[80.2239091]→[80.2239091:2239103](∅→∅) edit in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 317
edit in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 321
[80.2239124]→[80.2239124:2239136](∅→∅) edit in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 322
edit in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 325
replacement in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 328
[80.2239157]→[80.2239157:2239169](∅→∅) replacement in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 332
[80.2239190]→[80.2239190:2301584](∅→∅) edit in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 334
[80.2301591]→[80.2301591:2303150](∅→∅) edit in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 336
edit in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 338
[80.2303171]→[80.2303171:2303208](∅→∅) edit in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 339
[80.2303215]→[80.2303215:2303253](∅→∅) edit in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 340
edit in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 342
[80.2303267]→[80.2303267:2303281](∅→∅) replacement in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 344
[80.2303295]→[80.2303295:2303310](∅→∅) replacement in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 348
[80.2303331]→[80.2303331:2303343](∅→∅) replacement in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 351
[80.2303357]→[80.2303357:2303375](∅→∅) replacement in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 354
[80.2303389]→[80.2303389:2303446](∅→∅) replacement in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 357
[80.2303460]→[80.2303460:2303501](∅→∅) edit in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 360
edit in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 362
[80.2303522]→[80.2303522:2303549](∅→∅) replacement in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 364
[80.2303563]→[80.2303563:2303572](∅→∅) replacement in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 368
[80.2303593]→[80.2303593:2303604](∅→∅) replacement in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 402
[80.2303874]→[80.2303874:2303885](∅→∅) replacement in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 406
[80.2303906]→[80.2303906:2303917](∅→∅) edit in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 410
edit in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 413
[80.2303938]→[80.2303938:2304061](∅→∅) edit in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 414
edit in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 416
[80.2304075]→[80.2304075:2304186](∅→∅) edit in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 417
edit in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 419
[80.2304200]→[80.2304200:2304269](∅→∅) edit in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 420
edit in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 458
[80.2304290]→[80.2304290:2304332](∅→∅) edit in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 459
edit in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 461
[80.2304346]→[80.2304346:2304386](∅→∅) replacement in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 463
[80.2304400]→[80.2304400:2304443](∅→∅) replacement in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 467
[80.2304464]→[80.2304464:2330183](∅→∅) edit in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 550
[80.2330834]→[80.2330834:2330898](∅→∅) replacement in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 553
[80.2330919]→[80.2330919:2394539](∅→∅) replacement in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 653
[80.2394541]→[80.2394541:2455738](∅→∅) replacement in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 746
[80.2455741]→[80.2455741:2628093](∅→∅),
[80.2628093]→[81.356142:392234](∅→∅) replacement in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 1057
[81.392255]→[81.392255:392265](∅→∅) edit in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 1060
edit in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 1062
[81.392286]→[81.392286:392298](∅→∅) edit in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 1064
edit in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 1066
[81.392319]→[81.392319:392331](∅→∅) edit in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 1068
edit in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 1070
[81.392352]→[81.392352:392364](∅→∅) replacement in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 1072
[81.392378]→[81.392378:392390](∅→∅) edit in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 1075
edit in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 1077
[81.392411]→[81.392411:392423](∅→∅) edit in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 1079
edit in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 1081
[81.392444]→[81.392444:392456](∅→∅) edit in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 1083
edit in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 1085
[81.392477]→[81.392477:392485](∅→∅) edit in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 1087
edit in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 1089
[81.392506]→[81.392506:392523](∅→∅) edit in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 1091
edit in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 1093
[81.392544]→[81.392544:392556](∅→∅) edit in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 1095
edit in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 1097
[81.392577]→[81.392577:392589](∅→∅) replacement in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 1099
[81.392603]→[81.392603:392615](∅→∅) edit in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 1102
edit in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 1104
[81.392636]→[81.392636:392648](∅→∅) edit in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 1106
edit in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 1113
[81.392669]→[81.392669:392905](∅→∅) edit in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 1115
edit in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 1117
[81.392926]→[81.392926:392936](∅→∅) edit in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 1119
edit in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 1121
[81.392957]→[81.392957:392969](∅→∅) edit in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 1123
edit in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 1125
[81.392990]→[81.392990:393002](∅→∅) replacement in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 1127
[81.393016]→[81.393016:393028](∅→∅) edit in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 1130
edit in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 1132
[81.393049]→[81.393049:393061](∅→∅) edit in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 1134
edit in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 1136
[81.393082]→[81.393082:393094](∅→∅) edit in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 1138
edit in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 1140
[81.393115]→[81.393115:393127](∅→∅) replacement in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 1142
[81.393141]→[81.393141:393153](∅→∅) edit in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 1145
edit in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 1147
[81.393174]→[81.393174:393186](∅→∅) edit in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 1149
edit in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 1151
[81.393207]→[81.393207:393219](∅→∅) edit in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 1153
edit in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 1155
[81.393240]→[81.393240:393252](∅→∅) replacement in inflorescence_view/screenshots/loaded_non_empty_repo-wgpu.png at line 1157
[81.393266]→[81.393266:412909](∅→∅) replacement in inflorescence_view/screenshots/loaded_empty_repo-wgpu.png at line 3
[80.2666237]→[84.1075744:1144629](∅→∅) replacement in inflorescence_view/screenshots/loaded_empty_repo-wgpu.png at line 115
[84.1144630]→[84.1144630:1212089](∅→∅) replacement in inflorescence_view/screenshots/loaded_empty_repo-wgpu.png at line 252
[80.2804590]→[84.1212090:1264521](∅→∅),
[84.1264521]→[80.2857029:2858289](∅→∅),
[80.2857029]→[80.2857029:2858289](∅→∅),
[80.2858289]→[84.1264522:1347217](∅→∅) replacement in inflorescence_view/screenshots/loaded_empty_repo-wgpu.png at line 470
[84.1348354]→[84.1348354:1408512](∅→∅) replacement in inflorescence_view/screenshots/loaded_empty_repo-wgpu.png at line 546
[84.1408661]→[84.1408661:1609245](∅→∅) replacement in inflorescence_model/src/model.rs at line 5
[62.3595]→[88.331:388](∅→∅) − use inflorescence_iced_widget::{nav_scrollable, report};
+ use inflorescence_iced_widget::{dir_picker, nav_scrollable, report};
replacement in inflorescence_model/src/model.rs at line 14
[62.3782]→[62.3782:3887](∅→∅) − pub fn is_ready(state: &State) -> Option<&ReadyState> {
− if let SubState::Ready(state) = &state.sub {
+ pub fn is_ready(state: &ManagingRepo) -> Option<&ReadyState> {
+ if let ManagingRepoSubState::Ready(state) = &state.sub {
replacement in inflorescence_model/src/model.rs at line 21
[62.3933]→[62.3933:4054](∅→∅) − pub fn is_ready_mut(state: &mut State) -> Option<&mut ReadyState> {
− if let SubState::Ready(state) = &mut state.sub {
+ pub fn is_ready_mut(state: &mut ManagingRepo) -> Option<&mut ReadyState> {
+ if let ManagingRepoSubState::Ready(state) = &mut state.sub {
edit in inflorescence_model/src/model.rs at line 30
edit in inflorescence_model/src/model.rs at line 33
[75.1170]→[62.4169:4220](∅→∅),
[62.4169]→[62.4169:4220](∅→∅) − pub repo_path: PathBuf,
− pub sub: SubState,
edit in inflorescence_model/src/model.rs at line 39
+ #[allow(clippy::large_enum_variant)]
+ #[derive(Debug)]
+ pub enum SubState {
+ PickingRepoDir(PickingRepoDir),
+ ManagingRepo(ManagingRepo),
+ }
+
+ #[derive(Debug)]
+ pub struct PickingRepoDir {
+ pub picker: dir_picker::State,
+ }
+
+ #[derive(Debug)]
+ pub struct ManagingRepo {
+ pub repo_path: PathBuf,
+ pub sub: ManagingRepoSubState,
+ }
+
replacement in inflorescence_model/src/model.rs at line 69
[62.4527]→[62.4527:4547](∅→∅) + pub enum ManagingRepoSubState {
replacement in inflorescence_model/src/action.rs at line 3
[70.12963]→[88.489:546](∅→∅) − use inflorescence_iced_widget::{nav_scrollable, report};
+ use inflorescence_iced_widget::nav_scrollable;
replacement in inflorescence_model/src/action.rs at line 127
[59.5596]→[65.6835:6884](∅→∅),
[65.6884]→[82.532120:532159](∅→∅),
[82.532159]→[65.6884:6936](∅→∅),
[65.6884]→[65.6884:6936](∅→∅),
[65.6936]→[82.532160:532218](∅→∅) − pub fn get_allowed(
− state: &model::SubState,
− sub_menu: &Option<model::SubMenu>,
− report: &report::Container,
− ) -> Vec<Binding> {
− let mut bindings = if let Some(sub_menu) = sub_menu {
+ pub fn update_allowed_actions(state: &mut model::State) {
+ let mut bindings = if let Some(sub_menu) = state.sub_menu {
replacement in inflorescence_model/src/action.rs at line 143
[82.532554]→[82.532554:532791](∅→∅) − match state {
− model::SubState::Loading { .. } => vec![],
− model::SubState::SelectingId { .. } => todo!(),
− model::SubState::Ready(ready_state) => {
− get_ready_allowed(ready_state)
+ match &state.sub {
+ model::SubState::PickingRepoDir(sub) => {
+ get_allowed_in_picking_repo(sub)
+ }
+ model::SubState::ManagingRepo(sub) => {
+ get_allowed_in_managing_repo(&sub.sub)
replacement in inflorescence_model/src/action.rs at line 153
[65.6982]→[65.6982:7058](∅→∅) − if !report.entries.is_empty() {
− let label = if !report.hidden {
+ if !state.report.entries.is_empty() {
+ let label = if !state.report.hidden {
replacement in inflorescence_model/src/action.rs at line 165
[66.250]→[66.250:278](∅→∅) + if !state.report.hidden {
edit in inflorescence_model/src/action.rs at line 173
+
+ state.allowed_actions = bindings;
+ }
replacement in inflorescence_model/src/action.rs at line 177
[65.7283]→[65.7283:7296](∅→∅) + fn get_allowed_in_picking_repo(_state: &model::PickingRepoDir) -> Vec<Binding> {
+ vec![down(), up()]
+ }
+
+ fn get_allowed_in_managing_repo(
+ state: &model::ManagingRepoSubState,
+ ) -> Vec<Binding> {
+ match state {
+ model::ManagingRepoSubState::Loading { .. } => vec![],
+ model::ManagingRepoSubState::SelectingId { .. } => todo!(),
+ model::ManagingRepoSubState::Ready(ready_state) => {
+ get_ready_allowed(ready_state)
+ }
+ }
edit in inflorescence_model/src/action.rs at line 203
[59.6179]→[59.6179:6269](∅→∅),
[59.6269]→[62.7587:7654](∅→∅),
[62.7654]→[59.6328:6450](∅→∅),
[59.6328]→[59.6328:6450](∅→∅),
[59.6450]→[62.7655:7754](∅→∅) − ))),
− };
− let down = || Binding {
− key: "↓| j",
− label: "",
− msg: Some(FilteredMsg::Selection(selection::Msg::PressDir(
− selection::Dir::Down,
− ))),
− };
− let up = || Binding {
− key: "↑| k",
− label: "",
− msg: Some(FilteredMsg::Selection(selection::Msg::PressDir(
− selection::Dir::Up,
edit in inflorescence_model/src/action.rs at line 981
+ fn down() -> Binding {
+ Binding {
+ key: "↓| j",
+ label: "",
+ msg: Some(FilteredMsg::Selection(selection::Msg::PressDir(
+ selection::Dir::Down,
+ ))),
+ }
+ }
+
+ fn up() -> Binding {
+ Binding {
+ key: "↑| k",
+ label: "",
+ msg: Some(FilteredMsg::Selection(selection::Msg::PressDir(
+ selection::Dir::Up,
+ ))),
+ }
+ }
+
edit in inflorescence_iced_widget/src/lib.rs at line 1
file addition: dir_picker.rs (----------)
+ //! A file-system directory picker
+
+ use async_stream::try_stream;
+ use iced::widget::{button, column, container, row, text, text_input};
+ use iced::{Element, Font, Length, Padding, Pixels};
+ use iced_utils::{task, Task};
+ use normpath::{BasePathBuf, PathExt};
+ use nucleo_matcher::pattern::{Atom, AtomKind, CaseMatching, Normalization};
+ use nucleo_matcher::Matcher;
+ use tokio::fs;
+
+ use std::borrow::Cow;
+ use std::cmp;
+ use std::collections::VecDeque;
+ use std::path::{self, Path, PathBuf};
+
+ use crate::nav_scrollable;
+
+ const PIJUL_DIR: &str = ".pijul";
+ const GIT_DIR: &str = ".git";
+
+ #[derive(Debug)]
+ pub struct State {
+ left_nav: nav_scrollable::State,
+ right_nav: nav_scrollable::State,
+ input: String,
+ current_dir: BasePathBuf,
+ child_dirs: Vec<PathBuf>,
+ matched_child_dirs: Vec<String>,
+ found_repos_dirs_pijul: Vec<PathBuf>,
+ found_repos_dirs_git: Vec<PathBuf>,
+ find_child_dirs_handle: Option<task::Handle>,
+ find_repos_handle: Option<task::Handle>,
+ /// Fuzzy matcher state that avoid allocations during matching
+ matcher: Matcher,
+ }
+
+ #[derive(Debug, Clone, Copy)]
+ pub enum RepoKind {
+ Pijul,
+ Git,
+ }
+
+ #[derive(Debug, Clone)]
+ pub enum Msg {
+ Input(String),
+ SubmitInput,
+ SelectChildDir(PathBuf),
+ EditSegment { ix: usize },
+ FindChildDirsSuccess(Vec<PathBuf>),
+ FindChildDirsFailed(String),
+ FindReposDirsSuccess((PathBuf, RepoKind)),
+ FindReposDirsFailed(String),
+ SelectRepo(PathBuf),
+ }
+
+ pub fn init(start_path: impl Into<PathBuf>) -> (State, Task<Msg>) {
+ let mut start_path = start_path.into();
+ let current_dir = loop {
+ match PathExt::normalize(start_path.as_path()) {
+ Ok(path) => break path,
+ Err(_) => {
+ if let Some(path) = start_path.parent() {
+ start_path = path.to_path_buf();
+ } else {
+ break BasePathBuf::new(PathBuf::from_iter([
+ path::Component::RootDir,
+ ]))
+ .expect("Must be able to construct root dir");
+ }
+ }
+ }
+ };
+ let (find_child_dirs_task, find_child_dirs_handle) =
+ find_child_dirs(current_dir.as_path());
+ let find_child_dirs_handle = Some(find_child_dirs_handle);
+
+ let (find_repos_task, find_repos_handle) =
+ find_repos_dirs(current_dir.as_path());
+ let find_repos_handle = Some(find_repos_handle);
+
+ (
+ State {
+ left_nav: nav_scrollable::State::default(),
+ right_nav: nav_scrollable::State::default(),
+ input: String::default(),
+ current_dir,
+ child_dirs: vec![],
+ matched_child_dirs: vec![],
+ found_repos_dirs_pijul: vec![],
+ found_repos_dirs_git: vec![],
+ find_child_dirs_handle,
+ find_repos_handle,
+ matcher: Matcher::default(),
+ },
+ Task::batch([
+ find_child_dirs_task,
+ find_repos_task,
+ // Focus the input
+ task::widget_focus_next(),
+ ]),
+ )
+ }
+
+ #[derive(Debug)]
+ pub enum Action {
+ Picked(PathBuf),
+ }
+
+ //
+ pub fn update(state: &mut State, msg: Msg) -> (Task<Msg>, Option<Action>) {
+ let mut action = None;
+ let task = match msg {
+ Msg::Input(input) => {
+ if input.is_empty() && state.input.is_empty() {
+ // When there's an empty input and nothing is typed in (i.e.
+ // indempotent delete), go up a dir
+ if let Ok(Some(parent)) = state.current_dir.parent() {
+ change_dir(state, parent.to_owned())
+ } else {
+ Task::none()
+ }
+ } else {
+ if input.is_empty() {
+ state.matched_child_dirs = vec![];
+ state.input = input;
+ Task::none()
+ } else {
+ let mut matches = if input.ends_with(PATH_SEP) {
+ // If the path ends with separator accept it only if
+ // there's an exact match
+ let (exact, _) = input.split_at(input.len() - 1);
+ if state.child_dirs.iter().any(|dir| {
+ dir.file_name().map(|name| name.to_string_lossy())
+ == Some(Cow::Borrowed(exact))
+ }) {
+ vec![input.to_string()]
+ } else {
+ vec![]
+ }
+ } else {
+ match_child_dirs(state, &input)
+ };
+ // Change dir if there is only one match
+ if matches.len() == 1 {
+ let matched =
+ state.current_dir.join(matches.pop().unwrap());
+ state.input = String::default();
+ change_dir(state, matched)
+ } else {
+ state.matched_child_dirs = matches;
+ state.input = input;
+ Task::none()
+ }
+ }
+ }
+ }
+ Msg::SubmitInput => {
+ if state.input.is_empty() {
+ action = Some(Action::Picked(
+ state.current_dir.as_path().to_path_buf(),
+ ));
+ Task::none()
+ } else {
+ // Accept input only if there's an exact match
+ let mut matches = if state.child_dirs.iter().any(|dir| {
+ dir.file_name().map(|name| name.to_string_lossy())
+ == Some(Cow::Borrowed(&state.input))
+ }) {
+ vec![state.input.clone()]
+ } else {
+ vec![]
+ };
+ // Change dir if there is only one match
+ if matches.len() == 1 {
+ let matched =
+ state.current_dir.join(matches.pop().unwrap());
+ state.input = String::default();
+ change_dir(state, matched)
+ } else {
+ Task::none()
+ }
+ }
+ }
+ Msg::SelectChildDir(dir) => {
+ state.input = String::default();
+ let path = PathExt::normalize(dir.as_path()).unwrap();
+ change_dir(state, path)
+ }
+ Msg::EditSegment { ix } => {
+ let ix = cmp::max(ix, 1);
+ let path: PathBuf =
+ state.current_dir.as_path().iter().take(ix).collect();
+ let path = PathExt::normalize(path.as_path()).unwrap();
+ change_dir(state, path)
+ }
+ Msg::FindChildDirsSuccess(dirs) => {
+ state.find_child_dirs_handle = None;
+ state.child_dirs = dirs;
+
+ // If the last char isn't path separator, update matches.
+ // This is needed when `Msg::DeleteChar` deletes a path separator to
+ // go up a dir
+ if state.input.len() > 1 {
+ let (_, last_char) =
+ state.input.split_at(state.input.len() - 1);
+ if last_char != PATH_SEP_STR {
+ let input = PathBuf::from(&state.input);
+ let needle = input.file_name().unwrap().to_string_lossy();
+ let matches = match_child_dirs(state, &needle);
+ state.matched_child_dirs = matches;
+ }
+ }
+
+ Task::none()
+ }
+ Msg::FindChildDirsFailed(_err) => {
+ // TODO report error
+ Task::none()
+ }
+ Msg::FindReposDirsSuccess((dir, kind)) => {
+ match kind {
+ RepoKind::Pijul => state.found_repos_dirs_pijul.push(dir),
+ RepoKind::Git => state.found_repos_dirs_git.push(dir),
+ }
+ Task::none()
+ }
+ Msg::FindReposDirsFailed(_err) => {
+ // TODO report error
+ Task::none()
+ }
+ Msg::SelectRepo(dir) => {
+ action = Some(Action::Picked(dir));
+ Task::none()
+ }
+ };
+
+ (task, action)
+ }
+
+ pub fn view<'a, Theme, Renderer>(
+ state: &'a State,
+ bordered_container_class: <Theme as container::Catalog>::Class<'a>,
+ ) -> Element<'a, Msg, Theme, Renderer>
+ where
+ Theme: 'a
+ + button::Catalog
+ + container::Catalog
+ + nav_scrollable::Catalog
+ + text::Catalog
+ + text_input::Catalog,
+ Renderer: 'a + iced::advanced::Renderer + iced::advanced::text::Renderer,
+ <Renderer as iced_core::text::Renderer>::Font: From<iced::Font>,
+ {
+ let State {
+ left_nav,
+ right_nav,
+ input,
+ current_dir,
+ child_dirs,
+ matched_child_dirs,
+ found_repos_dirs_pijul,
+ found_repos_dirs_git,
+ find_child_dirs_handle: _,
+ find_repos_handle,
+ matcher: _,
+ } = state;
+
+ const CORNER: &str = "├─";
+ const LAST_CORNER: &str = "└─";
+ const CORNER_SIZE: Pixels = Pixels(24.0);
+
+ let mut left_children =
+ Vec::with_capacity(if state.find_child_dirs_handle.is_some() {
+ 1
+ } else {
+ if !matched_child_dirs.is_empty() {
+ matched_child_dirs.len()
+ } else {
+ child_dirs.len()
+ }
+ });
+
+ // Display path in segments so that changing level forces element tree
+ // updates to avoid the annoying Iced state cache that prevents text_input
+ // from updating
+ let left_header = Element::new(
+ container(row([
+ Element::new(row(itertools::intersperse_with(
+ current_dir.as_path().iter().enumerate().map(|(ix, comp)| {
+ Element::new(
+ button(text(comp.to_string_lossy()))
+ .on_press(Msg::EditSegment { ix }),
+ )
+ }),
+ || {
+ Element::new(
+ container(text(PATH_SEP_STR)).padding(
+ text_input::DEFAULT_PADDING.left(0).right(0),
+ ),
+ )
+ },
+ ))),
+ Element::new(
+ container(text(PATH_SEP_STR))
+ .padding(text_input::DEFAULT_PADDING.left(0).right(0)),
+ ),
+ Element::new(
+ text_input("", input)
+ .on_input(Msg::Input)
+ .on_submit(Msg::SubmitInput),
+ ),
+ ]))
+ .class(bordered_container_class)
+ .padding(button::DEFAULT_PADDING),
+ );
+
+ const CHILDREN_PADDING: Padding = Padding {
+ left: 20.0,
+ ..Padding::ZERO
+ };
+ if state.find_child_dirs_handle.is_some() {
+ left_children.push(Element::new(text("Loading child directories...")));
+ } else if !matched_child_dirs.is_empty() {
+ let last_matched_child_ix = matched_child_dirs.len().saturating_sub(1);
+ left_children.extend(matched_child_dirs.iter().enumerate().map(
+ |(ix, dir)| {
+ Element::new(
+ row([
+ Element::new(
+ text(if ix == last_matched_child_ix {
+ LAST_CORNER
+ } else {
+ CORNER
+ })
+ .size(CORNER_SIZE)
+ .font(Font::MONOSPACE)
+ .shaping(text::Shaping::Advanced),
+ ),
+ Element::new(button(text(dir)).on_press_with(
+ move || {
+ Msg::SelectChildDir(
+ current_dir.as_path().join(dir),
+ )
+ },
+ )),
+ ])
+ .padding(CHILDREN_PADDING),
+ )
+ },
+ ));
+ } else {
+ let last_child_ix = child_dirs.len().saturating_sub(1);
+ left_children.extend(child_dirs.iter().enumerate().map(|(ix, dir)| {
+ let dir_str = dir.file_name().unwrap().to_string_lossy();
+ Element::new(
+ row([
+ Element::new(
+ text(if ix == last_child_ix {
+ LAST_CORNER
+ } else {
+ CORNER
+ })
+ .size(CORNER_SIZE)
+ .shaping(text::Shaping::Advanced),
+ ),
+ Element::new(
+ button(text(dir_str))
+ .on_press_with(|| Msg::SelectChildDir(dir.clone())),
+ ),
+ ])
+ .padding(CHILDREN_PADDING),
+ )
+ }));
+ }
+
+ let right_header = Element::new(text(
+ if !found_repos_dirs_pijul.is_empty()
+ || !found_repos_dirs_git.is_empty()
+ {
+ "Found repositories:"
+ } else if find_repos_handle.is_none() {
+ "No repositories found"
+ } else {
+ "Searching for repositories"
+ },
+ ));
+
+ let right_children = found_repos_dirs_pijul
+ .iter()
+ .map(|dir| {
+ Element::new(
+ button(text(dir.to_string_lossy()))
+ .on_press_with(|| Msg::SelectRepo(dir.clone())),
+ )
+ })
+ .chain(found_repos_dirs_git.iter().map(|dir| {
+ Element::new(
+ button(text(format!("{} (git)", dir.to_string_lossy())))
+ .on_press_with(|| Msg::SelectRepo(dir.clone())),
+ )
+ }))
+ .collect::<Vec<_>>();
+
+ // TODO make both scrollable
+ let left = Element::new(
+ container(column([
+ left_header,
+ Element::new(
+ nav_scrollable(left_nav, left_children)
+ .height(Length::Fill)
+ .width(Length::Fill),
+ ),
+ ]))
+ .height(Length::Fill)
+ .width(Length::FillPortion(1)),
+ );
+ let right = Element::new(
+ container(column([
+ right_header,
+ Element::new(
+ nav_scrollable(right_nav, right_children)
+ .height(Length::Fill)
+ .width(Length::Fill),
+ ),
+ ]))
+ .height(Length::Fill)
+ .width(Length::FillPortion(1)),
+ );
+
+ Element::new(
+ row([left, right])
+ .spacing(SPACING)
+ .width(Length::Fill)
+ .height(Length::Fill),
+ )
+ }
+
+ const SPACING: u32 = 10;
+
+ fn change_dir(state: &mut State, path: BasePathBuf) -> Task<Msg> {
+ state.current_dir = path;
+ state.found_repos_dirs_pijul = vec![];
+ state.found_repos_dirs_git = vec![];
+ state.matched_child_dirs = vec![];
+
+ state.child_dirs = vec![];
+ let (find_child_dirs_task, find_child_dirs_handle) =
+ find_child_dirs(state.current_dir.as_path());
+ state.find_child_dirs_handle = Some(find_child_dirs_handle);
+
+ let (find_repos_dirs_task, find_repos_dirs_handle) =
+ find_repos_dirs(state.current_dir.as_path());
+ state.find_repos_handle = Some(find_repos_dirs_handle);
+
+ Task::batch([find_child_dirs_task, find_repos_dirs_task])
+ }
+
+ fn find_child_dirs(dir: &Path) -> (Task<Msg>, task::Handle) {
+ let current_dir = dir.to_owned();
+ let (task, handle) = Task::perform(
+ async move {
+ let mut read_dir = fs::read_dir(¤t_dir).await?;
+ let mut child_dirs = vec![];
+ while let Some(entry) = read_dir.next_entry().await? {
+ let path = entry.path();
+ let metadata = fs::metadata(&path).await?;
+ if metadata.is_dir() && path.file_name().is_some() {
+ child_dirs.push(path);
+ }
+ }
+ Ok(child_dirs)
+ },
+ |result: std::io::Result<_>| match result {
+ Ok(dirs) => Msg::FindChildDirsSuccess(dirs),
+ Err(error) => Msg::FindChildDirsFailed(error.to_string()),
+ },
+ )
+ .abortable();
+ let handle = handle.abort_on_drop();
+ (task, handle)
+ }
+
+ fn find_repos_dirs(dir: &Path) -> (Task<Msg>, task::Handle) {
+ // Breadth-first search for pijul repos
+ let dir = dir.to_path_buf();
+ let stream = try_stream! {
+ let mut to_try = VecDeque::from([dir.to_path_buf()]);
+
+ while let Some(path) = to_try.pop_front() {
+ let mut reader = fs::read_dir(&path).await.map_err(|err| format!("Cannot read dir {} ({err})", path.to_string_lossy()
+
+ ))?;
+ // Ignore errors in accessing entries
+ while let Ok(Some(entry)) = reader.next_entry().await {
+ let metadata = fs::metadata(entry.path()).await;
+ if metadata.map(|meta| meta.is_dir()).unwrap_or(false) {
+ let path = entry.path();
+ if let Ok(true) = fs::try_exists(path.join(PIJUL_DIR)).await {
+ yield (path, RepoKind::Pijul);
+ }
+ else if let Ok(true) = fs::try_exists(path.join(GIT_DIR)).await {
+ yield (path, RepoKind::Git);
+ } else {
+ to_try.push_back(path);
+ }
+ }
+ }
+ }
+ };
+
+ let (task, handle) =
+ Task::run(stream, |result: Result<_, String>| match result {
+ Ok((dir, kind)) => Msg::FindReposDirsSuccess((dir, kind)),
+ Err(error) => Msg::FindReposDirsFailed(error.to_string()),
+ })
+ .abortable();
+ let handle = handle.abort_on_drop();
+ (task, handle)
+ }
+
+ fn match_child_dirs(state: &mut State, needle: &str) -> Vec<String> {
+ let atom = Atom::new(
+ needle,
+ CaseMatching::Ignore,
+ Normalization::Never,
+ AtomKind::Fuzzy,
+ false,
+ );
+ itertools::Itertools::sorted_by(
+ atom.match_list(
+ state.child_dirs.iter().filter_map(|dir| {
+ dir.file_name().map(|name| name.to_string_lossy())
+ }),
+ &mut state.matcher,
+ )
+ .into_iter(),
+ // Sort by score descending
+ |(_, left), (_, right)| Ord::cmp(right, left),
+ )
+ .map(|(dir, _score)| dir.to_string())
+ .collect()
+ }
+
+ const PATH_SEP: char = path::MAIN_SEPARATOR;
+ const PATH_SEP_STR: &str = path::MAIN_SEPARATOR_STR;
edit in inflorescence_iced_widget/Cargo.toml at line 15
+ [dependencies.async-stream]
+ workspace = true
edit in inflorescence_iced_widget/Cargo.toml at line 23
+ [dependencies.itertools]
+ workspace = true
edit in inflorescence_iced_widget/Cargo.toml at line 26
+ workspace = true
+ [dependencies.normpath]
edit in inflorescence_iced_widget/Cargo.toml at line 29
+ [dependencies.nucleo-matcher]
+ workspace = true
+ [dependencies.tokio]
+ workspace = true
replacement in inflorescence/src/test.rs at line 3
[71.3082]→[71.3082:3117](∅→∅) − selection, update, Msg, State,
+ selection, update, ManagingRepoMsg, Msg, State,
+ };
+ use inflorescence_model::model::{
+ ManagingRepoSubState, ReadyState, RecordChanges, SubState,
replacement in inflorescence/src/test.rs at line 8
[38.140]→[62.8620:8653](∅→∅),
[62.8653]→[63.4378:4449](∅→∅) − use inflorescence_model::action;
− use inflorescence_model::model::{ReadyState, RecordChanges, SubState};
+ use inflorescence_model::{action, model};
replacement in inflorescence/src/test.rs at line 33
[29.2787]→[29.2787:2847](∅→∅) − let (state, mut tasks) = init(repo_path.to_path_buf());
+ let (state, mut tasks) = init(Some(repo_path.to_path_buf()));
replacement in inflorescence/src/test.rs at line 35
[29.2848]→[63.4450:4500](∅→∅) − assert_eq!(state.model.repo_path, repo_path);
+ assert_matches!(state.model.sub, model::SubState::ManagingRepo(_));
+ if let model::SubState::ManagingRepo(sub) = state.model.sub {
+ assert_eq!(sub.repo_path, repo_path);
+ }
replacement in inflorescence/src/test.rs at line 57
[29.3486]→[29.3486:3545](∅→∅) − if !loaded_id && matches!(msg, Msg::LoadedId(_)) {
+ if !loaded_id
+ && matches!(msg, Msg::ManagingRepo(ManagingRepoMsg::LoadedId(_)))
+ {
replacement in inflorescence/src/test.rs at line 63
[29.3607]→[29.3607:3688](∅→∅) − if !inited_repo && matches!(msg, Msg::FromRepo(repo::MsgOut::Init(_))) {
+ if !inited_repo
+ && matches!(
+ msg,
+ Msg::ManagingRepo(ManagingRepoMsg::FromRepo(
+ repo::MsgOut::Init(_)
+ ))
+ )
+ {
replacement in inflorescence/src/test.rs at line 116
[33.2601]→[60.26516:26582](∅→∅) − Msg::ToRepo(repo::MsgIn::RefreshChangedAndUntrackedFiles)
+ Msg::ManagingRepo(ManagingRepoMsg::ToRepo(
+ repo::MsgIn::RefreshChangedAndUntrackedFiles
+ ))
replacement in inflorescence/src/test.rs at line 126
[58.3163]→[58.3163:3211](∅→∅) − Msg::FromRepo(repo::MsgOut::Refreshed {
+ Msg::ManagingRepo(ManagingRepoMsg::FromRepo(repo::MsgOut::Refreshed {
replacement in inflorescence/src/test.rs at line 129
[58.3261]→[58.3261:3272](∅→∅) replacement in inflorescence/src/test.rs at line 159
[33.3362]→[68.11570:11671](∅→∅) − Msg::FromRepo(repo::MsgOut::AddedUntrackedFile { result:_, path }) if path == file_to_record
+ Msg::ManagingRepo(ManagingRepoMsg::FromRepo(repo::MsgOut::AddedUntrackedFile { result:_, path })) if path == file_to_record
replacement in inflorescence/src/test.rs at line 201
[58.3826]→[58.3826:3874](∅→∅) − Msg::FromRepo(repo::MsgOut::Refreshed {
+ Msg::ManagingRepo(ManagingRepoMsg::FromRepo(repo::MsgOut::Refreshed {
replacement in inflorescence/src/test.rs at line 204
[58.3924]→[58.3924:3935](∅→∅) replacement in inflorescence/src/test.rs at line 226
[34.484]→[60.27079:27145](∅→∅) − Msg::ToRepo(repo::MsgIn::RefreshChangedAndUntrackedFiles)
+ Msg::ManagingRepo(ManagingRepoMsg::ToRepo(
+ repo::MsgIn::RefreshChangedAndUntrackedFiles
+ ))
replacement in inflorescence/src/test.rs at line 234
[34.770]→[58.4082:4156](∅→∅) − assert_matches!(&msg, Msg::FromRepo(repo::MsgOut::Refreshed { .. }));
+ assert_matches!(
+ &msg,
+ Msg::ManagingRepo(ManagingRepoMsg::FromRepo(
+ repo::MsgOut::Refreshed { .. }
+ ))
+ );
replacement in inflorescence/src/test.rs at line 263
[60.27663]→[60.27663:27736](∅→∅) − Msg::File(crate::file::Msg::LoadedSrcFile { id: loaded_id, .. })
+ Msg::ManagingRepo(ManagingRepoMsg::File(crate::file::Msg::LoadedSrcFile { id: loaded_id, .. }))
replacement in inflorescence/src/test.rs at line 277
[34.1245]→[68.11672:11772](∅→∅) − Msg::FromRepo(repo::MsgOut::AddedUntrackedFile {result:_, path }) if path == file_to_record
+ Msg::ManagingRepo(ManagingRepoMsg::FromRepo(repo::MsgOut::AddedUntrackedFile {result:_, path })) if path == file_to_record
replacement in inflorescence/src/test.rs at line 527
[35.865]→[60.28590:28656](∅→∅) − Msg::ToRepo(repo::MsgIn::RefreshChangedAndUntrackedFiles)
+ Msg::ManagingRepo(ManagingRepoMsg::ToRepo(
+ repo::MsgIn::RefreshChangedAndUntrackedFiles
+ ))
replacement in inflorescence/src/test.rs at line 537
[58.6395]→[58.6395:6443](∅→∅) − Msg::FromRepo(repo::MsgOut::Refreshed {
+ Msg::ManagingRepo(ManagingRepoMsg::FromRepo(repo::MsgOut::Refreshed {
replacement in inflorescence/src/test.rs at line 540
[58.6493]→[58.6493:6504](∅→∅) replacement in inflorescence/src/test.rs at line 575
[60.29010]→[60.29010:29083](∅→∅) − Msg::File(crate::file::Msg::LoadedSrcFile { id: loaded_id, .. })
+ Msg::ManagingRepo(ManagingRepoMsg::File(crate::file::Msg::LoadedSrcFile { id: loaded_id, .. }))
replacement in inflorescence/src/test.rs at line 589
[35.2098]→[68.11773:11848](∅→∅) − Msg::FromRepo(repo::MsgOut::AddedUntrackedFile { result:_, path })
+ Msg::ManagingRepo(ManagingRepoMsg::FromRepo(repo::MsgOut::AddedUntrackedFile { result:_, path }))
replacement in inflorescence/src/test.rs at line 629
[60.29640]→[60.29640:29713](∅→∅) − Msg::File(crate::file::Msg::LoadedSrcFile { id: loaded_id, .. })
+ Msg::ManagingRepo(ManagingRepoMsg::File(crate::file::Msg::LoadedSrcFile { id: loaded_id, .. }))
replacement in inflorescence/src/test.rs at line 643
[36.630]→[68.11849:11919](∅→∅) − Msg::FromRepo(repo::MsgOut::RmedAddedFile { result:_, path })
+ Msg::ManagingRepo(ManagingRepoMsg::FromRepo(repo::MsgOut::RmedAddedFile { result:_, path }))
replacement in inflorescence/src/test.rs at line 679
[37.1063]→[63.9103:9224](∅→∅) − let SubState::Ready(ready_state) = &mut state.model.sub else {
− panic!("Unexpected state: {:?}", state.model)
+ let SubState::ManagingRepo(sub) = &mut state.model.sub else {
+ panic!("Unexpected state: {:?}", state.model.sub)
+ };
+ let ManagingRepoSubState::Ready(ready_state) = &mut sub.sub else {
+ panic!("Unexpected state: {:?}", sub.sub)
replacement in inflorescence/src/test.rs at line 699
[58.7042]→[37.1452:1478](∅→∅),
[50.11026]→[37.1452:1478](∅→∅),
[37.1452]→[37.1452:1478](∅→∅) + &mut state.managing_repo.as_mut().unwrap().files,
replacement in inflorescence/src/test.rs at line 704
[58.7124]→[37.1594:1649](∅→∅),
[50.11079]→[37.1594:1649](∅→∅),
[49.11253]→[37.1594:1649](∅→∅),
[37.1594]→[37.1594:1649](∅→∅) − assert!(state.files.diffs_cache.inner.is_empty());
+ assert!(state
+ .managing_repo
+ .as_ref()
+ .unwrap()
+ .files
+ .diffs_cache
+ .inner
+ .is_empty());
replacement in inflorescence/src/test.rs at line 732
[58.7326]→[37.2210:2236](∅→∅),
[50.11188]→[37.2210:2236](∅→∅),
[37.2210]→[37.2210:2236](∅→∅) + &mut state.managing_repo.as_mut().unwrap().files,
replacement in inflorescence/src/test.rs at line 744
[37.2583]→[37.2583:2639](∅→∅) − assert_eq!(state.files.diffs_cache.inner.len(), 1);
+ assert_eq!(
+ state
+ .managing_repo
+ .as_ref()
+ .unwrap()
+ .files
+ .diffs_cache
+ .inner
+ .len(),
+ 1
+ );
replacement in inflorescence/src/test.rs at line 756
[37.2660]→[42.7657:7722](∅→∅),
[42.7722]→[74.12607:12647](∅→∅),
[74.12647]→[42.7752:7798](∅→∅),
[42.7752]→[42.7752:7798](∅→∅) − state.files.diffs_cache.inner.peek(&file::id_parts_hash(
− &to_path("untracked_1.rs"),
− file::Kind::Untracked
− )),
+ state
+ .managing_repo
+ .as_ref()
+ .unwrap()
+ .files
+ .diffs_cache
+ .inner
+ .peek(&file::id_parts_hash(
+ &to_path("untracked_1.rs"),
+ file::Kind::Untracked
+ )),
replacement in inflorescence/src/test.rs at line 770
[37.2903]→[37.2903:2946](∅→∅) − state.files.diffs_cache.inner.clear();
+ state
+ .managing_repo
+ .as_mut()
+ .unwrap()
+ .files
+ .diffs_cache
+ .inner
+ .clear();
replacement in inflorescence/src/test.rs at line 790
[58.7605]→[37.3293:3319](∅→∅),
[50.11475]→[37.3293:3319](∅→∅),
[37.3293]→[37.3293:3319](∅→∅) + &mut state.managing_repo.as_mut().unwrap().files,
replacement in inflorescence/src/test.rs at line 797
[37.3466]→[37.3466:3521](∅→∅) − assert!(state.files.diffs_cache.inner.is_empty());
+ assert!(state
+ .managing_repo
+ .as_ref()
+ .unwrap()
+ .files
+ .diffs_cache
+ .inner
+ .is_empty());
replacement in inflorescence/src/test.rs at line 827
[58.7895]→[37.4211:4237](∅→∅),
[50.11635]→[37.4211:4237](∅→∅),
[37.4211]→[37.4211:4237](∅→∅) + &mut state.managing_repo.as_mut().unwrap().files,
replacement in inflorescence/src/test.rs at line 839
[37.4581]→[37.4581:4637](∅→∅) − assert_eq!(state.files.diffs_cache.inner.len(), 1);
+ assert_eq!(
+ state
+ .managing_repo
+ .as_ref()
+ .unwrap()
+ .files
+ .diffs_cache
+ .inner
+ .len(),
+ 1
+ );
replacement in inflorescence/src/test.rs at line 851
[37.4658]→[74.12949:13096](∅→∅) − state.files.diffs_cache.inner.peek(&file::id_parts_hash(
− &to_path("changed_0.rs"),
− file::Kind::Changed
− )),
+ state
+ .managing_repo
+ .as_ref()
+ .unwrap()
+ .files
+ .diffs_cache
+ .inner
+ .peek(&file::id_parts_hash(
+ &to_path("changed_0.rs"),
+ file::Kind::Changed
+ )),
replacement in inflorescence/src/test.rs at line 865
[37.4897]→[37.4897:4940](∅→∅) − state.files.diffs_cache.inner.clear();
+ state
+ .managing_repo
+ .as_mut()
+ .unwrap()
+ .files
+ .diffs_cache
+ .inner
+ .clear();
replacement in inflorescence/src/test.rs at line 898
[58.8172]→[37.5337:5363](∅→∅),
[50.11918]→[37.5337:5363](∅→∅),
[37.5337]→[37.5337:5363](∅→∅) + &mut state.managing_repo.as_mut().unwrap().files,
replacement in inflorescence/src/test.rs at line 913
[71.3683]→[71.3683:3746](∅→∅) − crate::Msg::File(file::Msg::SrcFileDoesntExist { .. })
+ crate::ManagingRepoMsg::File(file::Msg::SrcFileDoesntExist { .. })
replacement in inflorescence/src/test.rs at line 917
[71.3822]→[74.13271:13418](∅→∅) − state.files.diffs_cache.inner.peek(&file::id_parts_hash(
− &to_path("changed_1.rs"),
− file::Kind::Changed
− )),
+ state
+ .managing_repo
+ .as_ref()
+ .unwrap()
+ .files
+ .diffs_cache
+ .inner
+ .peek(&file::id_parts_hash(
+ &to_path("changed_1.rs"),
+ file::Kind::Changed
+ )),
replacement in inflorescence/src/test.rs at line 931
[71.4062]→[71.4062:4105](∅→∅) − state.files.diffs_cache.inner.clear();
+ state
+ .managing_repo
+ .as_mut()
+ .unwrap()
+ .files
+ .diffs_cache
+ .inner
+ .clear();
replacement in inflorescence/src/test.rs at line 951
[58.8449]→[37.6103:6129](∅→∅),
[50.12201]→[37.6103:6129](∅→∅),
[37.6103]→[37.6103:6129](∅→∅) + &mut state.managing_repo.as_mut().unwrap().files,
replacement in inflorescence/src/test.rs at line 958
[37.6277]→[37.6277:6332](∅→∅) − assert!(state.files.diffs_cache.inner.is_empty());
+ assert!(state
+ .managing_repo
+ .as_ref()
+ .unwrap()
+ .files
+ .diffs_cache
+ .inner
+ .is_empty());
replacement in inflorescence/src/test.rs at line 1004
[58.8671]→[37.7448:7474](∅→∅),
[50.12359]→[37.7448:7474](∅→∅),
[37.7448]→[37.7448:7474](∅→∅) + &mut state.managing_repo.as_mut().unwrap().files,
replacement in inflorescence/src/test.rs at line 1016
[37.7821]→[37.7821:7876](∅→∅) − assert!(state.files.diffs_cache.inner.is_empty());
+ assert!(state
+ .managing_repo
+ .as_ref()
+ .unwrap()
+ .files
+ .diffs_cache
+ .inner
+ .is_empty());
replacement in inflorescence/src/test.rs at line 1036
[58.8950]→[37.8206:8232](∅→∅),
[50.12631]→[37.8206:8232](∅→∅),
[37.8206]→[37.8206:8232](∅→∅) + &mut state.managing_repo.as_mut().unwrap().files,
replacement in inflorescence/src/test.rs at line 1043
[37.8381]→[37.8381:8436](∅→∅) − assert!(state.files.diffs_cache.inner.is_empty());
+ assert!(state
+ .managing_repo
+ .as_ref()
+ .unwrap()
+ .files
+ .diffs_cache
+ .inner
+ .is_empty());
replacement in inflorescence/src/test.rs at line 1076
[38.788]→[38.788:860](∅→∅) − let task = repo_got_change_diffs(&mut state, change_hash_0, diffs);
+ let task = {
+ let model::SubState::ManagingRepo(model) = &mut state.model.sub else {
+ panic!("Unexpected state {:?}", state.model.sub)
+ };
+ repo_got_change_diffs(model, change_hash_0, diffs)
+ };
replacement in inflorescence/src/test.rs at line 1102
[38.1285]→[38.1285:1357](∅→∅) − let task = repo_got_change_diffs(&mut state, change_hash_1, diffs);
+ let task = {
+ let model::SubState::ManagingRepo(model) = &mut state.model.sub else {
+ panic!("Unexpected state {:?}", state.model.sub)
+ };
+ repo_got_change_diffs(model, change_hash_1, diffs)
+ };
replacement in inflorescence/src/test.rs at line 1128
[38.1924]→[38.1924:1996](∅→∅) − let task = repo_got_change_diffs(&mut state, change_hash_1, diffs);
+ let task = {
+ let model::SubState::ManagingRepo(model) = &mut state.model.sub else {
+ panic!("Unexpected state {:?}", state.model.sub)
+ };
+ repo_got_change_diffs(model, change_hash_1, diffs)
+ };
replacement in inflorescence/src/test.rs at line 1146
[33.4889]→[33.4889:4953](∅→∅) − let (mut state, mut tasks) = init(repo_path.to_path_buf());
+ let (mut state, mut tasks) = init(Some(repo_path.to_path_buf()));
replacement in inflorescence/src/test.rs at line 1154
[33.5211]→[67.2569:2709](∅→∅) − let is_init = matches!(&msg, Msg::FromRepo(repo::MsgOut::Init(_))); // Upate state with the msg received from task to init the repo
+ let is_init = matches!(
+ &msg,
+ Msg::ManagingRepo(ManagingRepoMsg::FromRepo(repo::MsgOut::Init(_)))
+ ); // Upate state with the msg received from task to init the repo
replacement in inflorescence/src/test.rs at line 1200
[58.10329]→[63.9225:9288](∅→∅) − let SubState::Ready(ready_state) = &state.model.sub else {
+ let SubState::ManagingRepo(state) = &state.model.sub else {
edit in inflorescence/src/test.rs at line 1203
+ let ManagingRepoSubState::Ready(ready_state) = &state.sub else {
+ panic!("Unexpected state: {:?}", state.sub)
+ };
replacement in inflorescence/src/test.rs at line 1212
[63.9401]→[63.9401:9468](∅→∅) − let SubState::Ready(ready_state) = &mut state.model.sub else {
+ let SubState::ManagingRepo(state) = &mut state.model.sub else {
+ panic!("Unexpected state: {state_dbg}")
+ };
+ let state_dbg = format!("{:?}", state.sub);
+ let ManagingRepoSubState::Ready(ready_state) = &mut state.sub else {
replacement in inflorescence/src/selection.rs at line 34
[57.40044]→[48.20797:20821](∅→∅),
[47.142]→[48.20797:20821](∅→∅) − ) -> Task<crate::Msg> {
+ ) -> Task<crate::ManagingRepoMsg> {
replacement in inflorescence/src/selection.rs at line 119
[62.11261]→[62.11261:11285](∅→∅) − ) -> Task<crate::Msg> {
+ ) -> Task<crate::ManagingRepoMsg> {
replacement in inflorescence/src/selection.rs at line 135
[53.19441]→[57.40826:40907](∅→∅) − fn select_down(ctx: &mut Ctx<'_>, delta: Option<Duration>) -> Task<crate::Msg> {
+ fn select_down(
+ ctx: &mut Ctx<'_>,
+ delta: Option<Duration>,
+ ) -> Task<crate::ManagingRepoMsg> {
replacement in inflorescence/src/selection.rs at line 149
[57.41195]→[57.41195:41219](∅→∅) − ) -> Task<crate::Msg> {
+ ) -> Task<crate::ManagingRepoMsg> {
replacement in inflorescence/src/selection.rs at line 333
[60.30572]→[60.30572:30596](∅→∅) − ) -> Task<crate::Msg> {
+ ) -> Task<crate::ManagingRepoMsg> {
replacement in inflorescence/src/selection.rs at line 467
[60.33903]→[60.33903:33927](∅→∅) − ) -> Task<crate::Msg> {
+ ) -> Task<crate::ManagingRepoMsg> {
replacement in inflorescence/src/selection.rs at line 545
[53.26576]→[57.46281:46360](∅→∅) − fn select_up(ctx: &mut Ctx<'_>, delta: Option<Duration>) -> Task<crate::Msg> {
+ fn select_up(
+ ctx: &mut Ctx<'_>,
+ delta: Option<Duration>,
+ ) -> Task<crate::ManagingRepoMsg> {
replacement in inflorescence/src/selection.rs at line 559
[57.46645]→[57.46645:46669](∅→∅) − ) -> Task<crate::Msg> {
+ ) -> Task<crate::ManagingRepoMsg> {
replacement in inflorescence/src/selection.rs at line 740
[61.1012]→[61.1012:1036](∅→∅) − ) -> Task<crate::Msg> {
+ ) -> Task<crate::ManagingRepoMsg> {
replacement in inflorescence/src/selection.rs at line 870
[44.4328]→[57.51071:51095](∅→∅) − ) -> Task<crate::Msg> {
+ ) -> Task<crate::ManagingRepoMsg> {
replacement in inflorescence/src/selection.rs at line 1037
[42.38748]→[57.55525:55581](∅→∅) − fn select_left(ctx: &mut Ctx<'_>) -> Task<crate::Msg> {
+ fn select_left(ctx: &mut Ctx<'_>) -> Task<crate::ManagingRepoMsg> {
replacement in inflorescence/src/selection.rs at line 1040
[57.55640]→[57.55640:55994](∅→∅),
[57.55994]→[48.35589:35672](∅→∅),
[48.35589]→[48.35589:35672](∅→∅),
[48.35672]→[57.55995:56042](∅→∅),
[57.56042]→[48.35726:35758](∅→∅),
[48.35726]→[48.35726:35758](∅→∅),
[48.35758]→[57.56043:56832](∅→∅) − let (selection, task): (Option<Status>, Task<crate::Msg>) =
− match ctx.state.status.take() {
− Some(Status::LogChange(LogChange {
− ix,
− hash,
− message,
− file:
− Some(LogChangeFileSelection {
− ix: file_ix,
− path,
− diff_selected,
− }),
− })) => {
− if diff_selected {
− (
− Some(Status::LogChange(LogChange {
− ix,
− hash,
− message,
− file: Some(LogChangeFileSelection {
− ix: file_ix,
− path,
− diff_selected: false,
− }),
− })),
− Task::none(),
− )
− } else {
− let selection = Status::LogChange(LogChange {
+ let (selection, task): (
+ Option<Status>,
+ Task<crate::ManagingRepoMsg>,
+ ) = match ctx.state.status.take() {
+ Some(Status::LogChange(LogChange {
+ ix,
+ hash,
+ message,
+ file:
+ Some(LogChangeFileSelection {
+ ix: file_ix,
+ path,
+ diff_selected,
+ }),
+ })) => {
+ if diff_selected {
+ (
+ Some(Status::LogChange(LogChange {
replacement in inflorescence/src/selection.rs at line 1061
[57.56947]→[57.56947:57109](∅→∅) − file: None,
− });
− (Some(selection), Task::none())
− }
+ file: Some(LogChangeFileSelection {
+ ix: file_ix,
+ path,
+ diff_selected: false,
+ }),
+ })),
+ Task::none(),
+ )
+ } else {
+ let selection = Status::LogChange(LogChange {
+ ix,
+ hash,
+ message,
+ file: None,
+ });
+ (Some(selection), Task::none())
edit in inflorescence/src/selection.rs at line 1078
+ }
+ Some(Status::UntrackedFile {
+ ix,
+ path,
+ diff_selected: true,
+ }) => (
replacement in inflorescence/src/selection.rs at line 1087
[57.57238]→[57.57238:57480](∅→∅),
[57.57480]→[48.35758:35824](∅→∅),
[48.35758]→[48.35758:35824](∅→∅),
[48.35824]→[57.57481:57504](∅→∅) − diff_selected: true,
− }) => (
− Some(Status::UntrackedFile {
− ix,
− path,
− diff_selected: false,
− }),
− Task::none(),
− ),
+ diff_selected: false,
+ }),
+ Task::none(),
+ ),
+ Some(Status::ChangedFile {
+ ix,
+ path,
+ diff_selected: true,
+ }) => (
replacement in inflorescence/src/selection.rs at line 1099
[53.28934]→[57.57552:57676](∅→∅),
[57.57676]→[53.29134:29166](∅→∅),
[53.29134]→[53.29134:29166](∅→∅),
[53.29166]→[57.57677:57789](∅→∅),
[57.57789]→[53.29499:29537](∅→∅),
[53.29499]→[53.29499:29537](∅→∅),
[53.29537]→[57.57790:57993](∅→∅),
[57.57993]→[53.29741:29777](∅→∅),
[53.29741]→[53.29741:29777](∅→∅),
[53.29777]→[57.57994:58122](∅→∅) − diff_selected: true,
− }) => (
− Some(Status::ChangedFile {
− ix,
− path,
− diff_selected: false,
− }),
− Task::none(),
− ),
− selection @ (Some(Status::UntrackedFile { .. })
− | Some(Status::ChangedFile { .. })
− | Some(Status::LogChange(LogChange {
− file: None,
− ..
− }))
− | None) => (selection, Task::none()),
− };
+ diff_selected: false,
+ }),
+ Task::none(),
+ ),
+ selection @ (Some(Status::UntrackedFile { .. })
+ | Some(Status::ChangedFile { .. })
+ | Some(Status::LogChange(LogChange {
+ file: None,
+ ..
+ }))
+ | None) => (selection, Task::none()),
+ };
replacement in inflorescence/src/selection.rs at line 1228
[53.34139]→[57.59733:59790](∅→∅) − fn select_right(ctx: &mut Ctx<'_>) -> Task<crate::Msg> {
+ fn select_right(ctx: &mut Ctx<'_>) -> Task<crate::ManagingRepoMsg> {
replacement in inflorescence/src/selection.rs at line 1236
[60.42344]→[60.42344:43103](∅→∅),
[60.43103]→[74.13502:13605](∅→∅),
[74.13605]→[60.43213:44030](∅→∅),
[60.43213]→[60.43213:44030](∅→∅) − fn select_right_status(ctx: &mut Ctx<'_>) -> Task<crate::Msg> {
− let (selection, task): (Option<Status>, Task<crate::Msg>) = match ctx
− .state
− .status
− .take()
− {
− Some(Status::UntrackedFile {
− ix,
− path,
− diff_selected: false,
− }) => {
− let diff_selected =
− diff::file_diff_needs_scrolling(&ctx.navigation.files_diffs);
− (
− Some(Status::UntrackedFile {
− ix,
− path,
− diff_selected,
− }),
− Task::none(),
− )
− }
− Some(Status::ChangedFile {
− ix,
− path,
− diff_selected: false,
− }) => {
− // Always allow right move for `to_record` selection
− let diff_selected = true;
− (
− Some(Status::ChangedFile {
− ix,
− path,
− diff_selected,
− }),
− Task::none(),
− )
− }
− Some(Status::LogChange(LogChange {
− ix,
− hash,
− message,
− file: None,
− })) => {
− let log_entry = ctx.repo.short_log.get(ix).unwrap();
− let (file, task) = if let Some(path) = log_entry.file_paths.first()
− {
− let file_id = file::log_id_parts_hash(log_entry.hash, path);
− // If the log is not loaded yet, the nav will be initialized
− // once it's loaded (`repo::MsgOut::GotChangeDiffs`)
− if let Some(log) = ctx.navigation.log_diffs.diffs.get(&file_id)
+ fn select_right_status(ctx: &mut Ctx<'_>) -> Task<crate::ManagingRepoMsg> {
+ let (selection, task): (Option<Status>, Task<crate::ManagingRepoMsg>) =
+ match ctx.state.status.take() {
+ Some(Status::UntrackedFile {
+ ix,
+ path,
+ diff_selected: false,
+ }) => {
+ let diff_selected = diff::file_diff_needs_scrolling(
+ &ctx.navigation.files_diffs,
+ );
+ (
+ Some(Status::UntrackedFile {
+ ix,
+ path,
+ diff_selected,
+ }),
+ Task::none(),
+ )
+ }
+ Some(Status::ChangedFile {
+ ix,
+ path,
+ diff_selected: false,
+ }) => {
+ // Always allow right move for `to_record` selection
+ let diff_selected = true;
+ (
+ Some(Status::ChangedFile {
+ ix,
+ path,
+ diff_selected,
+ }),
+ Task::none(),
+ )
+ }
+ Some(Status::LogChange(LogChange {
+ ix,
+ hash,
+ message,
+ file: None,
+ })) => {
+ let log_entry = ctx.repo.short_log.get(ix).unwrap();
+ let (file, task) = if let Some(path) =
+ log_entry.file_paths.first()
replacement in inflorescence/src/selection.rs at line 1282
[60.44048]→[60.44048:44433](∅→∅) − // Init log diffs nav
− let unchanged_sections =
− diff::unchanged_sections(&log.file);
− log::init_diffs_nav(
− &mut ctx.navigation.status_logs_navs,
− file_id,
− )
− .set_skip_sections(unchanged_sections);
− };
+ let file_id = file::log_id_parts_hash(log_entry.hash, path);
+ // If the log is not loaded yet, the nav will be initialized
+ // once it's loaded (`repo::MsgOut::GotChangeDiffs`)
+ if let Some(log) =
+ ctx.navigation.log_diffs.diffs.get(&file_id)
+ {
+ // Init log diffs nav
+ let unchanged_sections =
+ diff::unchanged_sections(&log.file);
+ log::init_diffs_nav(
+ &mut ctx.navigation.status_logs_navs,
+ file_id,
+ )
+ .set_skip_sections(unchanged_sections);
+ };
replacement in inflorescence/src/selection.rs at line 1298
[60.44434]→[60.44434:45632](∅→∅) − let (selection, task) = status_log_file_selection(
− 0,
− hash,
− VDir::Down,
− ctx.navigation,
− log_entry,
− );
− (Some(selection), task)
− } else {
− (None, Task::none())
− };
− (
− Some(Status::LogChange(LogChange {
− ix,
− hash,
− message,
− file,
− })),
− task,
− )
− }
− Some(Status::LogChange(LogChange {
− ix,
− hash,
− message,
− file:
− Some(LogChangeFileSelection {
− ix: file_ix,
− path,
− diff_selected: false,
− }),
− })) => {
− let is_diff_scrollable =
− log::diff_needs_scrolling(&ctx.navigation.status_logs_navs);
− (
− Some(Status::LogChange(LogChange {
− ix,
− hash,
− message,
− file: Some(LogChangeFileSelection {
+ let (selection, task) = status_log_file_selection(
+ 0,
+ hash,
+ VDir::Down,
+ ctx.navigation,
+ log_entry,
+ );
+ (Some(selection), task)
+ } else {
+ (None, Task::none())
+ };
+ (
+ Some(Status::LogChange(LogChange {
+ ix,
+ hash,
+ message,
+ file,
+ })),
+ task,
+ )
+ }
+ Some(Status::LogChange(LogChange {
+ ix,
+ hash,
+ message,
+ file:
+ Some(LogChangeFileSelection {
replacement in inflorescence/src/selection.rs at line 1327
[56.11441]→[60.45670:45729](∅→∅) − diff_selected: is_diff_scrollable,
replacement in inflorescence/src/selection.rs at line 1329
[60.45753]→[60.45753:45883](∅→∅) − })),
− Task::none(),
− )
− }
− selection => (selection, Task::none()),
− };
+ })) => {
+ let is_diff_scrollable =
+ log::diff_needs_scrolling(&ctx.navigation.status_logs_navs);
+ (
+ Some(Status::LogChange(LogChange {
+ ix,
+ hash,
+ message,
+ file: Some(LogChangeFileSelection {
+ ix: file_ix,
+ path,
+ diff_selected: is_diff_scrollable,
+ }),
+ })),
+ Task::none(),
+ )
+ }
+ selection => (selection, Task::none()),
+ };
replacement in inflorescence/src/selection.rs at line 1352
[60.45929]→[60.45929:45994](∅→∅) − fn select_right_channel(ctx: &mut Ctx<'_>) -> Task<crate::Msg> {
+ fn select_right_channel(ctx: &mut Ctx<'_>) -> Task<crate::ManagingRepoMsg> {
replacement in inflorescence/src/selection.rs at line 1502
[60.50450]→[60.50450:50518](∅→∅) − fn select_right_entire_log(ctx: &mut Ctx<'_>) -> Task<crate::Msg> {
+ fn select_right_entire_log(ctx: &mut Ctx<'_>) -> Task<crate::ManagingRepoMsg> {
replacement in inflorescence/src/selection.rs at line 1637
[53.35427]→[57.70095:70168](∅→∅) − fn select_exact(select: Select, ctx: &mut Ctx<'_>) -> Task<crate::Msg> {
+ fn select_exact(
+ select: Select,
+ ctx: &mut Ctx<'_>,
+ ) -> Task<crate::ManagingRepoMsg> {
replacement in inflorescence/src/selection.rs at line 1667
[71.4513]→[71.4513:4568](∅→∅) + .map(crate::ManagingRepoMsg::File)
replacement in inflorescence/src/selection.rs at line 1914
[57.75004]→[50.17524:17558](∅→∅),
[48.44282]→[50.17524:17558](∅→∅) − ) -> (Status, Task<crate::Msg>) {
+ ) -> (Status, Task<crate::ManagingRepoMsg>) {
replacement in inflorescence/src/selection.rs at line 1971
[57.75427]→[50.17604:17638](∅→∅),
[48.46242]→[50.17604:17638](∅→∅) − ) -> (Status, Task<crate::Msg>) {
+ ) -> (Status, Task<crate::ManagingRepoMsg>) {
replacement in inflorescence/src/selection.rs at line 2006
[71.5015]→[71.5015:5058](∅→∅) + .map(crate::ManagingRepoMsg::File)
replacement in inflorescence/src/selection.rs at line 2035
[60.54540]→[60.54540:54574](∅→∅) − ) -> (Status, Task<crate::Msg>) {
+ ) -> (Status, Task<crate::ManagingRepoMsg>) {
replacement in inflorescence/src/selection.rs at line 2051
[60.54880]→[60.54880:54957](∅→∅) − Task::done(crate::Msg::ToRepo(repo::MsgIn::GetChangeDiffs { hash }))
+ Task::done(crate::ManagingRepoMsg::ToRepo(
+ repo::MsgIn::GetChangeDiffs { hash },
+ ))
replacement in inflorescence/src/selection.rs at line 2087
[60.55762]→[60.55762:55812](∅→∅) − ) -> (LogChangeFileSelection, Task<crate::Msg>) {
+ ) -> (LogChangeFileSelection, Task<crate::ManagingRepoMsg>) {
replacement in inflorescence/src/selection.rs at line 2115
[57.75945]→[57.75945:75980](∅→∅) − ) -> (Channel, Task<crate::Msg>) {
+ ) -> (Channel, Task<crate::ManagingRepoMsg>) {
replacement in inflorescence/src/selection.rs at line 2126
[60.56432]→[59.23242:23340](∅→∅),
[57.76251]→[59.23242:23340](∅→∅),
[59.23340]→[57.76365:76377](∅→∅),
[57.76365]→[57.76365:76377](∅→∅) − Task::done(crate::Msg::ToRepo(repo::MsgIn::LoadOtherChannelLog(
− name.clone(),
− )))
+ Task::done(crate::ManagingRepoMsg::ToRepo(
+ repo::MsgIn::LoadOtherChannelLog(name.clone()),
+ ))
replacement in inflorescence/src/selection.rs at line 2163
[60.56629]→[60.56629:56666](∅→∅) − ) -> (LogChange, Task<crate::Msg>) {
+ ) -> (LogChange, Task<crate::ManagingRepoMsg>) {
replacement in inflorescence/src/selection.rs at line 2179
[57.77100]→[60.56755:56832](∅→∅) − Task::done(crate::Msg::ToRepo(repo::MsgIn::GetChangeDiffs { hash }))
+ Task::done(crate::ManagingRepoMsg::ToRepo(
+ repo::MsgIn::GetChangeDiffs { hash },
+ ))
replacement in inflorescence/src/selection.rs at line 2215
[60.57248]→[60.57248:57298](∅→∅) − ) -> (LogChangeFileSelection, Task<crate::Msg>) {
+ ) -> (LogChangeFileSelection, Task<crate::ManagingRepoMsg>) {
replacement in inflorescence/src/selection.rs at line 2244
[57.77430]→[53.39540:39577](∅→∅),
[53.39540]→[53.39540:39577](∅→∅) − ) -> (LogChange, Task<crate::Msg>) {
+ ) -> (LogChange, Task<crate::ManagingRepoMsg>) {
replacement in inflorescence/src/selection.rs at line 2260
[57.77663]→[60.57893:57970](∅→∅) − Task::done(crate::Msg::ToRepo(repo::MsgIn::GetChangeDiffs { hash }))
+ Task::done(crate::ManagingRepoMsg::ToRepo(
+ repo::MsgIn::GetChangeDiffs { hash },
+ ))
replacement in inflorescence/src/selection.rs at line 2296
[57.78928]→[53.40813:40863](∅→∅),
[53.40813]→[53.40813:40863](∅→∅) − ) -> (LogChangeFileSelection, Task<crate::Msg>) {
+ ) -> (LogChangeFileSelection, Task<crate::ManagingRepoMsg>) {
replacement in inflorescence/src/main.rs at line 11
[79.372]→[88.898:937](∅→∅) − use inflorescence_iced_widget::report;
+ use inflorescence_iced_widget::{dir_picker, report};
replacement in inflorescence/src/main.rs at line 32
[28.5413]→[57.79778:79799](∅→∅) + use std::{cmp, env, mem};
replacement in inflorescence/src/main.rs at line 65
[87.583]→[87.583:722](∅→∅) − .map(|path| std::fs::canonicalize(path).unwrap())
− .unwrap_or_else(|| PathBuf::from("/home/tz/dev/inflorescence"));
+ .map(|path| std::fs::canonicalize(path).unwrap());
replacement in inflorescence/src/main.rs at line 74
[30.357]→[30.357:395](∅→∅) − let _ = (update, view, subs);
+ let _ = (update_managing_repo, view, subs);
edit in inflorescence/src/main.rs at line 81
+ model: model::State,
+ /// Some when `model.sub` is `ManagingRepo`
+ managing_repo: Option<ManagingRepo>,
+ }
+
+ #[derive(Debug)]
+ struct ManagingRepo {
edit in inflorescence/src/main.rs at line 92
[64.1897]→[64.1897:1922](∅→∅) edit in inflorescence/src/main.rs at line 100
+ ManagingRepo(ManagingRepoMsg),
+ }
+
+ #[derive(Debug)]
+ enum ManagingRepoMsg {
replacement in inflorescence/src/main.rs at line 111
[2.2962]→[29.4226:4278](∅→∅) − fn init(repo_path: PathBuf) -> (State, Task<Msg>) {
+ fn init(repo_path: Option<PathBuf>) -> (State, Task<Msg>) {
edit in inflorescence/src/main.rs at line 119
+ let window_scale = 1.0;
+ let allowed_actions = default();
+ let sub_menu = None;
+ let report = report::Container::default();
+
+ if let Some(repo_path) = repo_path {
+ let (sub, managing_repo, managing_repo_task) =
+ init_managing_repo(repo_path);
+
+ let tasks = Task::batch([
+ open_window_task.map(|_id| Msg::NoOp),
+ set_icon_task,
+ managing_repo_task,
+ ]);
+
+ let model = model::State {
+ sub: model::SubState::ManagingRepo(sub),
+ window_size,
+ window_scale,
+ allowed_actions,
+ sub_menu,
+ report,
+ };
+
+ (
+ State {
+ model,
+ managing_repo: Some(managing_repo),
+ },
+ tasks,
+ )
+ } else {
+ let start_path = env::home_dir().unwrap_or_else(|| PathBuf::from("/"));
+ let (picker, picker_task) = dir_picker::init(start_path);
+
+ let tasks = Task::batch([
+ open_window_task.map(|_id| Msg::NoOp),
+ set_icon_task,
+ picker_task.map(view::Msg::PickingRepo).map(Msg::View),
+ ]);
+
+ let state = model::PickingRepoDir { picker };
+ let sub = model::SubState::PickingRepoDir(state);
+ let model = model::State {
+ sub,
+ window_size,
+ window_scale,
+ allowed_actions,
+ sub_menu,
+ report,
+ };
+ (
+ State {
+ model,
+ managing_repo: None,
+ },
+ tasks,
+ )
+ }
+ }
+
+ fn init_managing_repo(
+ repo_path: PathBuf,
+ ) -> (model::ManagingRepo, ManagingRepo, Task<Msg>) {
replacement in inflorescence/src/main.rs at line 188
[10.639]→[23.25649:25685](∅→∅) − Msg::LoadedId(Box::new(id))
+ ManagingRepoMsg::LoadedId(Box::new(id))
replacement in inflorescence/src/main.rs at line 194
[13.2157]→[39.4707:4754](∅→∅),
[39.4754]→[22.708:731](∅→∅),
[23.25735]→[22.708:731](∅→∅),
[22.708]→[22.708:731](∅→∅),
[22.731]→[13.2157:2176](∅→∅),
[13.2157]→[13.2157:2176](∅→∅),
[13.2203]→[13.2203:2225](∅→∅),
[13.2225]→[23.25736:25771](∅→∅) − open_window_task.map(|_id| Msg::NoOp),
− set_icon_task,
− repo_task,
− load_id_task,
− files_task.map(Msg::File),
+ repo_task.map(Msg::ManagingRepo),
+ load_id_task.map(Msg::ManagingRepo),
+ files_task.map(ManagingRepoMsg::File).map(Msg::ManagingRepo),
replacement in inflorescence/src/main.rs at line 199
[18.965]→[63.9544:9575](∅→∅),
[63.9575]→[59.23589:23610](∅→∅),
[59.23589]→[59.23589:23610](∅→∅),
[59.23610]→[75.1182:1209](∅→∅) − let model = model::State {
− window_size,
− window_scale: 1.0,
+ let sub = model::ManagingRepo {
replacement in inflorescence/src/main.rs at line 201
[59.23629]→[59.23629:23669](∅→∅) − sub: model::SubState::Loading {
+ sub: model::ManagingRepoSubState::Loading {
replacement in inflorescence/src/main.rs at line 205
[59.23738]→[59.23738:23774](∅→∅),
[59.23774]→[82.533528:533552](∅→∅),
[82.533552]→[65.7334:7380](∅→∅),
[59.23774]→[65.7334:7380](∅→∅) − allowed_actions: default(),
− sub_menu: None,
− report: report::Container::default(),
+ };
+ let managing_repo = ManagingRepo {
+ repo_fs_watch: None,
+ repo_tx_in,
+ files,
+ _repo_thread: repo_thread,
replacement in inflorescence/src/main.rs at line 212
[9.200]→[5.1438:1460](∅→∅),
[10.753]→[5.1438:1460](∅→∅),
[18.965]→[5.1438:1460](∅→∅),
[6.1997]→[5.1438:1460](∅→∅),
[13.2267]→[5.1438:1460](∅→∅),
[8.5993]→[5.1438:1460](∅→∅),
[59.23781]→[5.1438:1460](∅→∅),
[5.1438]→[5.1438:1460](∅→∅),
[10.776]→[9.201:234](∅→∅),
[39.4780]→[9.201:234](∅→∅),
[5.1460]→[9.201:234](∅→∅),
[9.257]→[8.5994:6018](∅→∅),
[6.2031]→[8.5994:6018](∅→∅),
[7.130]→[21.145:164](∅→∅),
[21.164]→[63.9576:9595](∅→∅),
[63.9595]→[76.5249:5288](∅→∅),
[20.91]→[5.1520:1531](∅→∅),
[7.130]→[5.1520:1531](∅→∅),
[18.991]→[5.1520:1531](∅→∅),
[14.1512]→[5.1520:1531](∅→∅),
[13.2347]→[5.1520:1531](∅→∅),
[41.2974]→[5.1520:1531](∅→∅),
[76.5288]→[5.1520:1531](∅→∅),
[42.8924]→[5.1520:1531](∅→∅),
[63.9595]→[5.1520:1531](∅→∅),
[59.23799]→[5.1520:1531](∅→∅),
[53.42417]→[5.1520:1531](∅→∅),
[57.80032]→[5.1520:1531](∅→∅),
[5.1520]→[5.1520:1531](∅→∅),
[5.1531]→[8.6076:6091](∅→∅),
[8.6091]→[5.1545:1551](∅→∅),
[5.1545]→[5.1545:1551](∅→∅) − (
− State {
− repo_fs_watch: None,
− repo_tx_in,
− files,
− model,
− _repo_thread: repo_thread,
− },
− tasks,
− )
+ (sub, managing_repo, tasks)
replacement in inflorescence/src/main.rs at line 218
[39.4884]→[66.482:538](∅→∅),
[66.538]→[39.4885:4955](∅→∅),
[59.23909]→[39.4885:4955](∅→∅),
[23.25919]→[39.4885:4955](∅→∅),
[39.4955]→[23.25967:25998](∅→∅),
[23.25967]→[23.25967:25998](∅→∅),
[23.25998]→[63.9622:9663](∅→∅),
[63.9663]→[59.23910:23975](∅→∅),
[57.80110]→[59.23910:23975](∅→∅) − Msg::View(msg) => update_from_view(state, msg),
− Msg::Window(event) => update_from_window_event(state, event),
− Msg::LoadedId(id) => {
− match &mut state.model.sub {
− model::SubState::Loading { user_ids, repo } => {
+ Msg::View(msg) => match &mut state.model.sub {
+ model::SubState::PickingRepoDir(model) => {
+ let (task, new_sub_state) =
+ update_picking_repo_from_view(model, msg);
+ if let Some((new_sub, managing_repo)) = new_sub_state {
+ state.model.sub = model::SubState::ManagingRepo(new_sub);
+ state.managing_repo = Some(managing_repo);
+ }
+ task
+ }
+ model::SubState::ManagingRepo(model) => {
+ let sub = state.managing_repo.as_mut().unwrap();
+ update_managing_repo_from_view(
+ sub,
+ model,
+ &mut state.model.sub_menu,
+ &mut state.model.report,
+ &state.model.allowed_actions,
+ msg,
+ )
+ .map(Msg::ManagingRepo)
+ }
+ },
+ Msg::Window(event) => update_from_window_event(&mut state.model, event)
+ .map(Msg::ManagingRepo),
+ Msg::ManagingRepo(msg) => {
+ if let model::SubState::ManagingRepo(model) = &mut state.model.sub {
+ let sub = state.managing_repo.as_mut().unwrap();
+ update_managing_repo(sub, model, &mut state.model.report, msg)
+ .map(Msg::ManagingRepo)
+ } else {
+ Task::none()
+ }
+ }
+ };
+
+ action::update_allowed_actions(&mut state.model);
+
+ task
+ }
+
+ fn update_managing_repo(
+ state: &mut ManagingRepo,
+ model: &mut model::ManagingRepo,
+ report: &mut report::Container,
+ msg: ManagingRepoMsg,
+ ) -> Task<ManagingRepoMsg> {
+ match msg {
+ ManagingRepoMsg::LoadedId(id) => {
+ match &mut model.sub {
+ model::ManagingRepoSubState::Loading { user_ids, repo } => {
replacement in inflorescence/src/main.rs at line 271
[57.80301]→[63.9664:9742](∅→∅),
[63.9742]→[57.80371:80548](∅→∅),
[59.24052]→[57.80371:80548](∅→∅),
[57.80371]→[57.80371:80548](∅→∅),
[57.80548]→[63.9743:9798](∅→∅),
[63.9798]→[57.80599:80705](∅→∅),
[57.80599]→[57.80599:80705](∅→∅),
[57.80705]→[70.16872:16922](∅→∅),
[70.16922]→[77.6715:6760](∅→∅),
[77.6760]→[57.80705:80732](∅→∅),
[70.16922]→[57.80705:80732](∅→∅),
[57.80705]→[57.80705:80732](∅→∅) − state.model.sub = model::SubState::Ready(ReadyState {
− user_id: *id,
− repo,
− selection: default(),
− navigation: default(),
− record_changes: default(),
− forking_channel_name: default(),
− logs: default(),
− to_record: default(),
− jobs: default(),
− })
+ model.sub =
+ model::ManagingRepoSubState::Ready(ReadyState {
+ user_id: *id,
+ repo,
+ selection: default(),
+ navigation: default(),
+ record_changes: default(),
+ forking_channel_name: default(),
+ logs: default(),
+ to_record: default(),
+ jobs: default(),
+ })
replacement in inflorescence/src/main.rs at line 287
[57.80845]→[59.24053:24172](∅→∅) − model::SubState::SelectingId { .. } => unreachable!(),
− model::SubState::Ready(..) => {
+ model::ManagingRepoSubState::SelectingId { .. } => {
+ unreachable!()
+ }
+ model::ManagingRepoSubState::Ready(..) => {
replacement in inflorescence/src/main.rs at line 296
[59.24183]→[59.24183:24213](∅→∅) + ManagingRepoMsg::ToRepo(msg) => {
replacement in inflorescence/src/main.rs at line 300
[8.6830]→[23.26033:26065](∅→∅) − Msg::FromRepo(msg) => {
+ ManagingRepoMsg::FromRepo(msg) => {
replacement in inflorescence/src/main.rs at line 302
[8.6908]→[8.6908:6949](∅→∅) − update_from_repo(state, msg)
+ update_from_repo(state, model, report, msg)
replacement in inflorescence/src/main.rs at line 304
[40.3747]→[60.58386:58437](∅→∅),
[60.58437]→[59.24288:24296](∅→∅),
[40.3747]→[59.24288:24296](∅→∅),
[59.24296]→[82.533553:533701](∅→∅),
[65.7483]→[59.24365:24375](∅→∅),
[63.9947]→[59.24365:24375](∅→∅),
[82.533701]→[59.24365:24375](∅→∅),
[59.24365]→[59.24365:24375](∅→∅) − Msg::File(msg) => update_file(state, msg),
− };
−
− state.model.allowed_actions = action::get_allowed(
− &state.model.sub,
− &state.model.sub_menu,
− &state.model.report,
− );
−
− task
+ ManagingRepoMsg::File(msg) => update_file(state, model, msg),
+ }
replacement in inflorescence/src/main.rs at line 308
[60.58441]→[60.58441:58506](∅→∅) − fn update_file(state: &mut State, msg: file::Msg) -> Task<Msg> {
+ fn update_file(
+ state: &mut ManagingRepo,
+ model: &mut model::ManagingRepo,
+ msg: file::Msg,
+ ) -> Task<ManagingRepoMsg> {
replacement in inflorescence/src/main.rs at line 318
[60.58599]→[63.9948:9995](∅→∅) − }) = model::is_ready_mut(&mut state.model)
+ }) = model::is_ready_mut(model)
replacement in inflorescence/src/main.rs at line 363
[39.4985]→[39.4985:5008](∅→∅) + model: &mut model::State,
replacement in inflorescence/src/main.rs at line 365
[39.5034]→[39.5034:5051](∅→∅) + ) -> Task<ManagingRepoMsg> {
replacement in inflorescence/src/main.rs at line 369
[39.5165]→[63.9996:10040](∅→∅) − state.model.window_size = size;
+ model.window_size = size;
replacement in inflorescence/src/main.rs at line 372
[75.1264]→[75.1264:1310](∅→∅) − state.model.window_scale = scale;
+ model.window_scale = scale;
replacement in inflorescence/src/main.rs at line 391
[76.5362]→[76.5362:5377](∅→∅) replacement in inflorescence/src/main.rs at line 398
[32.932]→[32.932:999](∅→∅) − let repo_msg_out_task = Task::run(repo_rx_out, Msg::FromRepo);
+ let repo_msg_out_task = Task::run(repo_rx_out, ManagingRepoMsg::FromRepo);
replacement in inflorescence/src/main.rs at line 403
[23.26301]→[66.539:609](∅→∅) − fn update_from_view(state: &mut State, msg: view::Msg) -> Task<Msg> {
+ fn update_picking_repo_from_view(
+ state: &mut model::PickingRepoDir,
+ msg: view::Msg,
+ ) -> (Task<Msg>, Option<(model::ManagingRepo, ManagingRepo)>) {
+ let mut new_state = None;
+ let model::PickingRepoDir { picker } = state;
+ let task = match msg {
+ view::Msg::Action(msg) => {
+ dbg!(msg);
+ Task::none()
+ }
+ view::Msg::UnfilteredSelection(msg) => {
+ dbg!(msg);
+ Task::none()
+ }
+ view::Msg::PickingRepo(msg) => {
+ let (task, action) = dir_picker::update(picker, msg);
+ let task = task.map(view::Msg::PickingRepo).map(Msg::View);
+ if let Some(dir_picker::Action::Picked(dir)) = action {
+ // If it contains Pijul repo, init ManagingRepo state
+ // TODO: If it contains Git, offer to migrate it
+ // TODO: Otherwise, offer to init Pijul from scratch
+ let (sub, managing_repo, managing_repo_task) =
+ init_managing_repo(dir);
+ new_state = Some((sub, managing_repo));
+ Task::batch([task, managing_repo_task])
+ } else {
+ task
+ }
+ }
+ view::Msg::EditRecordMsg(_)
+ | view::Msg::EditRecordDesc(_)
+ | view::Msg::EditForkChannelName(_)
+ | view::Msg::ToRecord(_) => Task::none(),
+ };
+ (task, new_state)
+ }
+
+ fn update_managing_repo_from_view(
+ state: &mut ManagingRepo,
+ model: &mut model::ManagingRepo,
+ sub_menu: &mut Option<model::SubMenu>,
+ report: &mut report::Container,
+ allowed_actions: &[action::Binding],
+ msg: view::Msg,
+ ) -> Task<ManagingRepoMsg> {
replacement in inflorescence/src/main.rs at line 451
[62.11876]→[63.10041:10107](∅→∅) − && !action::is_allowed(&state.model.allowed_actions, msg)
+ && !action::is_allowed(allowed_actions, msg)
replacement in inflorescence/src/main.rs at line 458
[23.26390]→[62.11877:12019](∅→∅),
[62.12019]→[63.10108:10186](∅→∅) − view::Msg::Action(msg) => update_from_action(state, msg),
− view::Msg::EditRecordMsg(action) => edit_record_msg(state, action),
− view::Msg::EditRecordDesc(action) => edit_record_desc(state, action),
+ view::Msg::Action(msg) => {
+ update_from_action(state, model, sub_menu, report, msg)
+ }
+ view::Msg::EditRecordMsg(action) => edit_record_msg(model, action),
+ view::Msg::EditRecordDesc(action) => edit_record_desc(model, action),
replacement in inflorescence/src/main.rs at line 467
[59.25307]→[63.10187:10242](∅→∅) − }) = model::is_ready_mut(&mut state.model)
+ }) = model::is_ready_mut(model)
replacement in inflorescence/src/main.rs at line 480
[62.12284]→[63.10243:10298](∅→∅) − }) = model::is_ready_mut(&mut state.model)
+ }) = model::is_ready_mut(model)
replacement in inflorescence/src/main.rs at line 497
[70.17034]→[70.17034:17089](∅→∅) − }) = model::is_ready_mut(&mut state.model)
+ }) = model::is_ready_mut(model)
edit in inflorescence/src/main.rs at line 503
+ view::Msg::PickingRepo(_) => Task::none(),
replacement in inflorescence/src/main.rs at line 508
[62.12681]→[62.12681:12704](∅→∅) + state: &mut ManagingRepo,
+ model: &mut model::ManagingRepo,
+ sub_menu: &mut Option<model::SubMenu>,
+ report: &mut report::Container,
replacement in inflorescence/src/main.rs at line 513
[62.12734]→[62.12734:12751](∅→∅) + ) -> Task<ManagingRepoMsg> {
replacement in inflorescence/src/main.rs at line 516
[62.12794]→[82.533702:533909](∅→∅),
[82.533909]→[83.2932:3004](∅→∅) − if let Some(sub_menu) = &state.model.sub_menu {
− match sub_menu {
− model::SubMenu::Push => push(state),
− model::SubMenu::Pull => pull(state),
− model::SubMenu::ResetChange => reset_change(state),
+ if let Some(menu) = &sub_menu {
+ match menu {
+ model::SubMenu::Push => push(state, model, sub_menu),
+ model::SubMenu::Pull => pull(state, model, sub_menu),
+ model::SubMenu::ResetChange => {
+ reset_change(state, model, sub_menu, report)
+ }
replacement in inflorescence/src/main.rs at line 530
[57.83140]→[63.10299:10354](∅→∅) − }) = model::is_ready_mut(&mut state.model)
+ }) = model::is_ready_mut(model)
replacement in inflorescence/src/main.rs at line 572
[62.12836]→[82.534052:534145](∅→∅) − if state.model.sub_menu.is_some() {
− state.model.sub_menu = None;
+ if sub_menu.is_some() {
+ *sub_menu = None;
replacement in inflorescence/src/main.rs at line 579
[57.84007]→[63.10400:10455](∅→∅) − }) = model::is_ready_mut(&mut state.model)
+ }) = model::is_ready_mut(model)
replacement in inflorescence/src/main.rs at line 610
[57.84946]→[63.10739:10794](∅→∅) − }) = model::is_ready_mut(&mut state.model)
+ }) = model::is_ready_mut(model)
replacement in inflorescence/src/main.rs at line 624
[57.85298]→[62.12887:13087](∅→∅),
[62.13087]→[63.10795:10917](∅→∅),
[63.10917]→[62.13087:13163](∅→∅),
[62.13087]→[62.13087:13163](∅→∅),
[62.13163]→[83.3005:3064](∅→∅),
[83.3064]→[62.13229:13294](∅→∅),
[62.13229]→[62.13229:13294](∅→∅) − action::FilteredMsg::SaveRecord => save_record(state),
− action::FilteredMsg::PostponeRecord => defer_record(state),
− action::FilteredMsg::DiscardRecord => abandon_record(state),
− action::FilteredMsg::FocusNext => focus_next(state),
− action::FilteredMsg::FocusPrev => focus_prev(state),
− action::FilteredMsg::AddUntrackedFile => add_untracked_file(state),
− action::FilteredMsg::RmChange => rm_change(state),
− action::FilteredMsg::StartRecord => start_record(state),
+ action::FilteredMsg::SaveRecord => save_record(state, model),
+ action::FilteredMsg::PostponeRecord => defer_record(model),
+ action::FilteredMsg::DiscardRecord => abandon_record(model),
+ action::FilteredMsg::FocusNext => focus_next(model),
+ action::FilteredMsg::FocusPrev => focus_prev(model),
+ action::FilteredMsg::AddUntrackedFile => {
+ add_untracked_file(state, model)
+ }
+ action::FilteredMsg::RmChange => rm_change(state, model, sub_menu),
+ action::FilteredMsg::StartRecord => start_record(model),
replacement in inflorescence/src/main.rs at line 637
[59.26154]→[63.10918:10973](∅→∅) − }) = model::is_ready_mut(&mut state.model)
+ }) = model::is_ready_mut(model)
replacement in inflorescence/src/main.rs at line 648
[57.85578]→[63.10974:11029](∅→∅) − }) = model::is_ready_mut(&mut state.model)
+ }) = model::is_ready_mut(model)
replacement in inflorescence/src/main.rs at line 666
[57.85988]→[63.11030:11085](∅→∅) − }) = model::is_ready_mut(&mut state.model)
+ }) = model::is_ready_mut(model)
replacement in inflorescence/src/main.rs at line 682
[60.60824]→[64.2136:2205](∅→∅) − action::FilteredMsg::ClipboardCopy => clipboard_copy(state),
+ action::FilteredMsg::ClipboardCopy => clipboard_copy(model),
replacement in inflorescence/src/main.rs at line 684
[77.6856]→[66.610:654](∅→∅),
[65.7537]→[66.610:654](∅→∅) − if !state.model.report.hidden {
replacement in inflorescence/src/main.rs at line 686
[66.698]→[66.698:775](∅→∅) replacement in inflorescence/src/main.rs at line 691
[66.911]→[65.7537:7605](∅→∅),
[65.7537]→[65.7537:7605](∅→∅) − state.model.report.hidden = !state.model.report.hidden;
+ report.hidden = !report.hidden;
replacement in inflorescence/src/main.rs at line 695
[77.6912]→[66.982:1056](∅→∅),
[66.982]→[66.982:1056](∅→∅) − let to_copy = report::entries_to_string(&state.model.report);
+ let to_copy = report::entries_to_string(report);
replacement in inflorescence/src/main.rs at line 701
[70.17346]→[70.17346:17401](∅→∅) − }) = model::is_ready_mut(&mut state.model)
+ }) = model::is_ready_mut(model)
replacement in inflorescence/src/main.rs at line 714
[70.17729]→[70.17729:17784](∅→∅) − }) = model::is_ready_mut(&mut state.model)
+ }) = model::is_ready_mut(model)
replacement in inflorescence/src/main.rs at line 745
[76.5576]→[82.534190:534298](∅→∅) − action::FilteredMsg::EnterSubMenu(sub_menu) => {
− state.model.sub_menu = Some(sub_menu);
+ action::FilteredMsg::EnterSubMenu(new_sub_menu) => {
+ *sub_menu = Some(new_sub_menu);
replacement in inflorescence/src/main.rs at line 758
[60.61030]→[63.11086:11129](∅→∅) − }) = model::is_ready(&state.model)
+ }) = model::is_ready(model)
replacement in inflorescence/src/main.rs at line 864
[82.534302]→[82.534302:534445](∅→∅) − fn push(state: &mut State) -> Task<Msg> {
− if let Some(ReadyState { repo, jobs, .. }) =
− model::is_ready_mut(&mut state.model)
− {
+ fn push(
+ state: &mut ManagingRepo,
+ model: &mut model::ManagingRepo,
+ sub_menu: &mut Option<model::SubMenu>,
+ ) -> Task<ManagingRepoMsg> {
+ if let Some(ReadyState { repo, jobs, .. }) = model::is_ready_mut(model) {
replacement in inflorescence/src/main.rs at line 880
[82.534706]→[82.534706:534739](∅→∅) − state.model.sub_menu = None;
replacement in inflorescence/src/main.rs at line 884
[64.2209]→[82.534757:534900](∅→∅) − fn pull(state: &mut State) -> Task<Msg> {
− if let Some(ReadyState { repo, jobs, .. }) =
− model::is_ready_mut(&mut state.model)
− {
+ fn pull(
+ state: &mut ManagingRepo,
+ model: &mut model::ManagingRepo,
+ sub_menu: &mut Option<model::SubMenu>,
+ ) -> Task<ManagingRepoMsg> {
+ if let Some(ReadyState { repo, jobs, .. }) = model::is_ready_mut(model) {
replacement in inflorescence/src/main.rs at line 900
[82.535161]→[82.535161:535194](∅→∅) − state.model.sub_menu = None;
replacement in inflorescence/src/main.rs at line 904
[82.535214]→[83.3065:3209](∅→∅) − fn reset_change(state: &mut State) -> Task<Msg> {
− if let Some(ReadyState { selection, .. }) =
− model::is_ready_mut(&mut state.model)
+ fn reset_change(
+ state: &mut ManagingRepo,
+ model: &mut model::ManagingRepo,
+ sub_menu: &mut Option<model::SubMenu>,
+ report: &mut report::Container,
+ ) -> Task<ManagingRepoMsg> {
+ if let Some(ReadyState { selection, .. }) = model::is_ready_mut(model)
replacement in inflorescence/src/main.rs at line 929
[83.3689]→[83.3689:3726](∅→∅) − &mut state.model.report,
replacement in inflorescence/src/main.rs at line 934
[83.3884]→[83.3884:3917](∅→∅) − state.model.sub_menu = None;
replacement in inflorescence/src/main.rs at line 938
[83.3937]→[64.2209:2341](∅→∅),
[82.535214]→[64.2209:2341](∅→∅),
[64.2209]→[64.2209:2341](∅→∅) − fn clipboard_copy(state: &mut State) -> Task<Msg> {
− if let Some(ReadyState { selection, .. }) = model::is_ready(&state.model) {
+ fn clipboard_copy(model: &mut model::ManagingRepo) -> Task<ManagingRepoMsg> {
+ if let Some(ReadyState { selection, .. }) = model::is_ready(model) {
replacement in inflorescence/src/main.rs at line 968
[31.859]→[31.859:932](∅→∅),
[31.932]→[77.7847:7961](∅→∅) − fn update_from_repo(state: &mut State, msg: repo::MsgOut) -> Task<Msg> {
− let report_info = |state: &mut State, err: String| {
− report::show_info(&mut state.model.report, err);
+ fn update_from_repo(
+ state: &mut ManagingRepo,
+ model: &mut model::ManagingRepo,
+ report: &mut report::Container,
+ msg: repo::MsgOut,
+ ) -> Task<ManagingRepoMsg> {
+ let report_info = |report: &mut report::Container, err: String| {
+ report::show_info(report, err);
replacement in inflorescence/src/main.rs at line 978
[77.7989]→[68.11922:12034](∅→∅),
[31.932]→[68.11922:12034](∅→∅) − let report_err = |state: &mut State, err: String| {
− report::show_err(&mut state.model.report, err);
+ let report_err = |report: &mut report::Container, err: String| {
+ report::show_err(report, err);
replacement in inflorescence/src/main.rs at line 984
[31.948]→[31.948:1008](∅→∅),
[31.1008]→[68.12064:12141](∅→∅) − repo::MsgOut::Init(repo) => repo_init(state, repo),
− repo::MsgOut::InitFailed(err) => report_err(state, err.to_string()),
+ repo::MsgOut::Init(repo) => repo_init(state, model, report, repo),
+ repo::MsgOut::InitFailed(err) => report_err(report, err.to_string()),
replacement in inflorescence/src/main.rs at line 987
[76.5721]→[76.5721:5850](∅→∅) − report_err(state, "Task managing repo has crashed. This shouldn't happen, please report what happened!".to_string())
+ report_err(report, "Task managing repo has crashed. This shouldn't happen, please report what happened!".to_string())
replacement in inflorescence/src/main.rs at line 994
[68.12206]→[68.12206:12273](∅→∅) − repo_refreshed(state, repo_state, invalidate_logs)
+ repo_refreshed(state, model, repo_state, invalidate_logs)
replacement in inflorescence/src/main.rs at line 996
[68.12287]→[68.12287:12347](∅→∅) − Err(err) => report_err(state, err.to_string()),
+ Err(err) => report_err(report, err.to_string()),
replacement in inflorescence/src/main.rs at line 1000
[68.12473]→[68.12473:12533](∅→∅) − Err(err) => report_err(state, err.to_string()),
+ Err(err) => report_err(report, err.to_string()),
replacement in inflorescence/src/main.rs at line 1004
[68.12654]→[68.12654:12714](∅→∅) − Err(err) => report_err(state, err.to_string()),
+ Err(err) => report_err(report, err.to_string()),
replacement in inflorescence/src/main.rs at line 1007
[68.12795]→[68.12795:12923](∅→∅) − Ok(diffs) => repo_got_change_diffs(state, hash, diffs),
− Err(err) => report_err(state, err.to_string()),
+ Ok(diffs) => repo_got_change_diffs(model, hash, diffs),
+ Err(err) => report_err(report, err.to_string()),
replacement in inflorescence/src/main.rs at line 1011
[68.12992]→[68.12992:13103](∅→∅) − Ok(log) => got_entire_log(state, log),
− Err(err) => report_err(state, err.to_string()),
+ Ok(log) => got_entire_log(model, log),
+ Err(err) => report_err(report, err.to_string()),
replacement in inflorescence/src/main.rs at line 1015
[68.13190]→[68.13190:13260](∅→∅),
[68.13260]→[76.5861:5921](∅→∅) − Ok(log) => loaded_other_channel_log(state, channel, log),
− Err(err) => report_err(state, err.to_string()),
+ Ok(log) => loaded_other_channel_log(model, channel, log),
+ Err(err) => report_err(report, err.to_string()),
replacement in inflorescence/src/main.rs at line 1020
[77.8082]→[77.8082:8332](∅→∅) − Ok(()) => report_info(state, format!("Pushed to {channel}")),
− Err(repo::PushError::Empty) => report_info(state, format!("Nothing to push to {channel}")),
− Err(err) => report_err(state, err.to_string()),
+ Ok(()) => report_info(report, format!("Pushed to {channel}")),
+ Err(repo::PushError::Empty) => report_info(report, format!("Nothing to push to {channel}")),
+ Err(err) => report_err(report, err.to_string()),
replacement in inflorescence/src/main.rs at line 1025
[77.8399]→[77.8399:8453](∅→∅) − model::is_ready_mut(&mut state.model)
+ model::is_ready_mut(model)
replacement in inflorescence/src/main.rs at line 1033
[77.8647]→[77.8647:8901](∅→∅) − Ok(()) => report_info(state, format!("Pulled from {channel}")),
− Err(repo::PullError::Empty) => report_info(state, format!("Nothing to pull from {channel}")),
− Err(err) => report_err(state, err.to_string()),
+ Ok(()) => report_info(report, format!("Pulled from {channel}")),
+ Err(repo::PullError::Empty) => report_info(report, format!("Nothing to pull from {channel}")),
+ Err(err) => report_err(report, err.to_string()),
replacement in inflorescence/src/main.rs at line 1038
[77.8968]→[77.8968:9022](∅→∅) − model::is_ready_mut(&mut state.model)
+ model::is_ready_mut(model)
replacement in inflorescence/src/main.rs at line 1047
[11.5328]→[31.1209:1265](∅→∅) − fn add_untracked_file(state: &mut State) -> Task<Msg> {
+ fn add_untracked_file(
+ state: &mut ManagingRepo,
+ model: &mut model::ManagingRepo,
+ ) -> Task<ManagingRepoMsg> {
replacement in inflorescence/src/main.rs at line 1058
[57.86701]→[63.11130:11177](∅→∅) − }) = model::is_ready_mut(&mut state.model)
+ }) = model::is_ready_mut(model)
replacement in inflorescence/src/main.rs at line 1122
[31.2322]→[83.3938:3985](∅→∅) − fn rm_change(state: &mut State) -> Task<Msg> {
+ fn rm_change(
+ state: &mut ManagingRepo,
+ model: &mut model::ManagingRepo,
+ sub_menu: &mut Option<model::SubMenu>,
+ ) -> Task<ManagingRepoMsg> {
replacement in inflorescence/src/main.rs at line 1134
[57.87603]→[63.11178:11225](∅→∅) − }) = model::is_ready_mut(&mut state.model)
+ }) = model::is_ready_mut(model)
replacement in inflorescence/src/main.rs at line 1204
[83.4065]→[83.4065:4135](∅→∅) − state.model.sub_menu = Some(model::SubMenu::ResetChange);
+ *sub_menu = Some(model::SubMenu::ResetChange);
replacement in inflorescence/src/main.rs at line 1210
[31.3730]→[31.3730:3780](∅→∅) − fn start_record(state: &mut State) -> Task<Msg> {
+ fn start_record(model: &mut model::ManagingRepo) -> Task<ManagingRepoMsg> {
replacement in inflorescence/src/main.rs at line 1215
[63.11275]→[63.11275:11322](∅→∅) − }) = model::is_ready_mut(&mut state.model)
+ }) = model::is_ready_mut(model)
replacement in inflorescence/src/main.rs at line 1241
[31.4783]→[85.1843:1913](∅→∅) − fn edit_record_msg(state: &mut State, new_msg: String) -> Task<Msg> {
+ fn edit_record_msg(
+ model: &mut model::ManagingRepo,
+ new_msg: String,
+ ) -> Task<ManagingRepoMsg> {
replacement in inflorescence/src/main.rs at line 1248
[57.88931]→[63.11996:12043](∅→∅) − }) = model::is_ready_mut(&mut state.model)
+ }) = model::is_ready_mut(model)
replacement in inflorescence/src/main.rs at line 1256
[63.12125]→[63.12125:12148](∅→∅) + model: &mut model::ManagingRepo,
replacement in inflorescence/src/main.rs at line 1258
[63.12181]→[63.12181:12198](∅→∅) + ) -> Task<ManagingRepoMsg> {
replacement in inflorescence/src/main.rs at line 1262
[63.12308]→[63.12308:12355](∅→∅) − }) = model::is_ready_mut(&mut state.model)
+ }) = model::is_ready_mut(model)
replacement in inflorescence/src/main.rs at line 1269
[31.5015]→[31.5015:5064](∅→∅) − fn save_record(state: &mut State) -> Task<Msg> {
+ fn save_record(
+ state: &mut ManagingRepo,
+ model: &mut model::ManagingRepo,
+ ) -> Task<ManagingRepoMsg> {
replacement in inflorescence/src/main.rs at line 1280
[57.89110]→[63.12412:12459](∅→∅) − }) = model::is_ready_mut(&mut state.model)
+ }) = model::is_ready_mut(model)
replacement in inflorescence/src/main.rs at line 1320
[31.5836]→[31.5836:5886](∅→∅),
[31.5886]→[63.12916:13015](∅→∅) − fn defer_record(state: &mut State) -> Task<Msg> {
− if let Some(ReadyState { record_changes, .. }) =
− model::is_ready_mut(&mut state.model)
+ fn defer_record(model: &mut model::ManagingRepo) -> Task<ManagingRepoMsg> {
+ if let Some(ReadyState { record_changes, .. }) = model::is_ready_mut(model)
replacement in inflorescence/src/main.rs at line 1339
[31.6184]→[31.6184:6236](∅→∅) − fn abandon_record(state: &mut State) -> Task<Msg> {
+ fn abandon_record(model: &mut model::ManagingRepo) -> Task<ManagingRepoMsg> {
replacement in inflorescence/src/main.rs at line 1343
[63.13537]→[63.13537:13584](∅→∅) − }) = model::is_ready_mut(&mut state.model)
+ }) = model::is_ready_mut(model)
replacement in inflorescence/src/main.rs at line 1351
[31.6363]→[63.13657:13705](∅→∅) − fn focus_next(state: &mut State) -> Task<Msg> {
+ fn focus_next(model: &mut model::ManagingRepo) -> Task<ManagingRepoMsg> {
replacement in inflorescence/src/main.rs at line 1355
[63.13781]→[63.13781:13828](∅→∅) − }) = model::is_ready_mut(&mut state.model)
+ }) = model::is_ready_mut(model)
replacement in inflorescence/src/main.rs at line 1364
[63.13983]→[63.13983:14031](∅→∅) − fn focus_prev(state: &mut State) -> Task<Msg> {
+ fn focus_prev(model: &mut model::ManagingRepo) -> Task<ManagingRepoMsg> {
replacement in inflorescence/src/main.rs at line 1368
[63.14107]→[63.14107:14154](∅→∅) − }) = model::is_ready_mut(&mut state.model)
+ }) = model::is_ready_mut(model)
replacement in inflorescence/src/main.rs at line 1377
[63.14313]→[57.90711:90783](∅→∅),
[31.6363]→[57.90711:90783](∅→∅),
[57.90783]→[63.14314:14347](∅→∅),
[63.14347]→[59.26375:26435](∅→∅),
[57.90814]→[59.26375:26435](∅→∅),
[59.26435]→[63.14348:14403](∅→∅) − fn repo_init(state: &mut State, repo_state: repo::State) -> Task<Msg> {
− match &mut state.model.sub {
− model::SubState::Loading { user_ids, repo: _ } => {
− state.model.sub = if user_ids.len() == 1 {
+ fn repo_init(
+ state: &mut ManagingRepo,
+ model: &mut model::ManagingRepo,
+ report: &mut report::Container,
+ repo_state: repo::State,
+ ) -> Task<ManagingRepoMsg> {
+ match &mut model.sub {
+ model::ManagingRepoSubState::Loading { user_ids, repo: _ } => {
+ model.sub = if user_ids.len() == 1 {
replacement in inflorescence/src/main.rs at line 1387
[57.90976]→[59.26436:26488](∅→∅) − model::SubState::Ready(ReadyState {
+ model::ManagingRepoSubState::Ready(ReadyState {
replacement in inflorescence/src/main.rs at line 1399
[57.91347]→[59.26489:26536](∅→∅) − model::SubState::SelectingId {
+ model::ManagingRepoSubState::SelectingId {
edit in inflorescence/src/main.rs at line 1406
+ }
+ model::ManagingRepoSubState::SelectingId { repo, .. } => {
+ *repo = Some(repo_state)
replacement in inflorescence/src/main.rs at line 1410
[57.91626]→[59.26537:26656](∅→∅) − model::SubState::SelectingId { repo, .. } => *repo = Some(repo_state),
− model::SubState::Ready(_) => {}
+ model::ManagingRepoSubState::Ready(_) => {}
replacement in inflorescence/src/main.rs at line 1416
[79.549]→[79.549:643](∅→∅) − let (ignore, ignore_err) =
− Gitignore::new(state.model.repo_path.join(".ignore"));
+ let (ignore, ignore_err) = Gitignore::new(model.repo_path.join(".ignore"));
replacement in inflorescence/src/main.rs at line 1420
[79.767]→[79.767:823](∅→∅) − report::show_err(&mut state.model.report, msg);
+ report::show_err(report, msg);
replacement in inflorescence/src/main.rs at line 1460
[31.8807]→[63.14452:14517](∅→∅) − .watch(&state.model.repo_path, RecursiveMode::Recursive)
+ .watch(&model.repo_path, RecursiveMode::Recursive)
replacement in inflorescence/src/main.rs at line 1464
[31.8998]→[59.26657:26723](∅→∅) − Msg::ToRepo(repo::MsgIn::RefreshChangedAndUntrackedFiles)
+ ManagingRepoMsg::ToRepo(repo::MsgIn::RefreshChangedAndUntrackedFiles)
replacement in inflorescence/src/main.rs at line 1473
[57.91824]→[57.91824:91847](∅→∅) + state: &mut ManagingRepo,
+ model: &mut model::ManagingRepo,
replacement in inflorescence/src/main.rs at line 1477
[57.91903]→[57.91903:91920](∅→∅) + ) -> Task<ManagingRepoMsg> {
replacement in inflorescence/src/main.rs at line 1480
[78.402]→[63.14518:14551](∅→∅),
[57.91920]→[63.14518:14551](∅→∅),
[63.14551]→[59.26724:26784](∅→∅),
[57.91951]→[59.26724:26784](∅→∅) − match &mut state.model.sub {
− model::SubState::Loading { user_ids: _, repo } => {
+ match &mut model.sub {
+ model::ManagingRepoSubState::Loading { user_ids: _, repo } => {
replacement in inflorescence/src/main.rs at line 1484
[59.26831]→[59.26831:26954](∅→∅) − model::SubState::SelectingId { repo, .. } => *repo = Some(repo_state),
− model::SubState::Ready(ReadyState {
+ model::ManagingRepoSubState::SelectingId { repo, .. } => {
+ *repo = Some(repo_state)
+ }
+ model::ManagingRepoSubState::Ready(ReadyState {
replacement in inflorescence/src/main.rs at line 1521
[57.92735]→[37.9093:9110](∅→∅),
[37.9093]→[37.9093:9110](∅→∅) + ) -> Task<ManagingRepoMsg> {
replacement in inflorescence/src/main.rs at line 1582
[71.5567]→[71.5567:5611](∅→∅) + .map(ManagingRepoMsg::File)
replacement in inflorescence/src/main.rs at line 1632
[37.10218]→[59.26955:27082](∅→∅) − Task::done(Msg::ToRepo(repo::MsgIn::GetChangeDiffs {
− hash,
− }))
+ Task::done(ManagingRepoMsg::ToRepo(
+ repo::MsgIn::GetChangeDiffs { hash },
+ ))
replacement in inflorescence/src/main.rs at line 1666
[57.93803]→[59.27083:27190](∅→∅),
[59.27190]→[57.93926:93946](∅→∅),
[57.93926]→[57.93926:93946](∅→∅) − Task::done(Msg::ToRepo(repo::MsgIn::LoadOtherChannelLog(
− name.clone(),
− )))
+ Task::done(ManagingRepoMsg::ToRepo(
+ repo::MsgIn::LoadOtherChannelLog(name.clone()),
+ ))
replacement in inflorescence/src/main.rs at line 1727
[57.95968]→[59.27191:27255](∅→∅) − Task::done(Msg::ToRepo(repo::MsgIn::LoadEntireLog))
+ Task::done(ManagingRepoMsg::ToRepo(repo::MsgIn::LoadEntireLog))
replacement in inflorescence/src/main.rs at line 1743
[57.96269]→[57.96269:96292](∅→∅) + model: &mut model::ManagingRepo,
replacement in inflorescence/src/main.rs at line 1746
[57.96351]→[57.96351:96368](∅→∅) + ) -> Task<ManagingRepoMsg> {
replacement in inflorescence/src/main.rs at line 1751
[57.96461]→[63.14584:14631](∅→∅) − }) = model::is_ready_mut(&mut state.model)
+ }) = model::is_ready_mut(model)
replacement in inflorescence/src/main.rs at line 1823
[41.5853]→[53.53277:53345](∅→∅),
[53.53345]→[63.14632:14719](∅→∅) − fn got_entire_log(state: &mut State, log: repo::Log) -> Task<Msg> {
− if let Some(ReadyState { logs, .. }) = model::is_ready_mut(&mut state.model)
− {
+ fn got_entire_log(
+ model: &mut model::ManagingRepo,
+ log: repo::Log,
+ ) -> Task<ManagingRepoMsg> {
+ if let Some(ReadyState { logs, .. }) = model::is_ready_mut(model) {
replacement in inflorescence/src/main.rs at line 1834
[57.100572]→[57.100572:100595](∅→∅) + model: &mut model::ManagingRepo,
replacement in inflorescence/src/main.rs at line 1837
[57.100646]→[57.100646:100663](∅→∅),
[57.100663]→[63.14720:14807](∅→∅) − ) -> Task<Msg> {
− if let Some(ReadyState { logs, .. }) = model::is_ready_mut(&mut state.model)
− {
+ ) -> Task<ManagingRepoMsg> {
+ if let Some(ReadyState { logs, .. }) = model::is_ready_mut(model) {
replacement in inflorescence/src/main.rs at line 1845
[14.4299]→[56.21753:21800](∅→∅) − fn subs(_state: &State) -> Subscription<Msg> {
+ fn subs(state: &State) -> Subscription<Msg> {
+ let key_subs = match &state.model.sub {
+ model::SubState::PickingRepoDir(_picking_repo) => {
+ Subscription::none()
+ // dir_picker::subs(&picking_repo.picker)
+ // .map(view::Msg::PickingRepo)
+ // .map(Msg::View)
+ }
+ model::SubState::ManagingRepo(model) => subs_managing_repo(model),
+ };
+
+ let window_subs = window::events().map(|(_id, event)| Msg::Window(event));
+
+ Subscription::batch([key_subs, window_subs])
+ }
+
+ fn subs_managing_repo(_model: &model::ManagingRepo) -> Subscription<Msg> {
replacement in inflorescence/src/main.rs at line 1864
[4.2763]→[86.279:849](∅→∅) − let key_subs =
− keyboard::listen().filter_map(|event| {
− match event {
− keyboard::Event::KeyPressed {
− key,
− modifiers: mods,
− ..
− } => {
− let action = |msg| Some(Msg::View(view::Msg::Action(msg)));
− let selection = |selection| {
− action(action::FilteredMsg::Selection(selection))
− };
+ keyboard::listen().filter_map(|event| {
+ let action = |msg| Some(Msg::View(view::Msg::Action(msg)));
+ let selection =
+ |selection| action(action::FilteredMsg::Selection(selection));
+ let unfiltered = |selection| {
+ Some(Msg::View(view::Msg::UnfilteredSelection(selection)))
+ };
replacement in inflorescence/src/main.rs at line 1872
[43.2303]→[86.850:2867](∅→∅) − if mods.is_empty() {
− match key {
− Key::Character(c) => match c.as_str() {
− // _________________________________________________________
− // Directions
− "j" => selection(selection::Msg::PressDir(
− selection::Dir::Down,
− )),
− "k" => {
− selection(selection::Msg::PressDir(selection::Dir::Up))
− }
− "h" => selection(selection::Msg::PressDir(
− selection::Dir::Left,
− )),
− "l" => selection(selection::Msg::PressDir(
− selection::Dir::Right,
− )),
− // _________________________________________________________
− // Other keys (sort alphabetically)
− "a" => action(action::FilteredMsg::AddUntrackedFile),
− "c" => action(action::FilteredMsg::SelectChannel),
− "e" => action(action::FilteredMsg::ShowEntireLog),
− "f" => action(action::FilteredMsg::ForkChannel),
− "t" => action(
− action::FilteredMsg::ToRecordToggleSelectedFileOrChange,
− ),
− "r" => action(action::FilteredMsg::StartRecord),
− "x" => action(action::FilteredMsg::RmChange),
− _ => None,
− },
− Key::Named(key::Named::Enter) => {
− action(action::FilteredMsg::Confirm)
+ match event {
+ keyboard::Event::KeyPressed {
+ key,
+ modifiers: mods,
+ ..
+ } => {
+ if mods.is_empty() {
+ match key {
+ Key::Character(c) => match c.as_str() {
+ // _____________________________________________
+ // Directions
+ "j" => selection(selection::Msg::PressDir(
+ selection::Dir::Down,
+ )),
+ "k" => {
+ selection(selection::Msg::PressDir(selection::Dir::Up))
replacement in inflorescence/src/main.rs at line 1889
[86.2897]→[86.2897:3029](∅→∅) − Key::Named(key::Named::Escape) => {
− action(action::FilteredMsg::Cancel)
+ "h" => selection(selection::Msg::PressDir(
+ selection::Dir::Left,
+ )),
+ "l" => selection(selection::Msg::PressDir(
+ selection::Dir::Right,
+ )),
+ // _____________________________________________
+ // Other keys (sort alphabetically)
+ "a" => action(action::FilteredMsg::AddUntrackedFile),
+ "c" => action(action::FilteredMsg::SelectChannel),
+ "e" => action(action::FilteredMsg::ShowEntireLog),
+ "f" => action(action::FilteredMsg::ForkChannel),
+ "t" => action(
+ action::FilteredMsg::ToRecordToggleSelectedFileOrChange,
+ ),
+ "r" => action(action::FilteredMsg::StartRecord),
+ "x" => action(action::FilteredMsg::RmChange),
+ _ => None,
+ },
+ Key::Named(key::Named::Enter) => {
+ action(action::FilteredMsg::Confirm)
+ }
+ Key::Named(key::Named::Escape) => {
+ action(action::FilteredMsg::Cancel)
+ }
+ Key::Named(key::Named::ArrowDown) => {
+ selection(selection::Msg::PressDir(selection::Dir::Down))
+ }
+ Key::Named(key::Named::ArrowUp) => {
+ selection(selection::Msg::PressDir(selection::Dir::Up))
+ }
+ Key::Named(key::Named::ArrowLeft) => {
+ selection(selection::Msg::PressDir(selection::Dir::Left))
+ }
+ Key::Named(key::Named::ArrowRight) => {
+ selection(selection::Msg::PressDir(selection::Dir::Right))
+ }
+ Key::Named(key::Named::Tab) => {
+ action(action::FilteredMsg::FocusNext)
+ }
+ Key::Named(_) | Key::Unidentified => None,
+ }
+ } else {
+ match key {
+ Key::Character(c) => match c.as_str() {
+ "c" if mods == Modifiers::CTRL => {
+ action(action::FilteredMsg::ClipboardCopy)
replacement in inflorescence/src/main.rs at line 1937
[86.3059]→[86.3059:3216](∅→∅) − Key::Named(key::Named::ArrowDown) => {
− selection(selection::Msg::PressDir(selection::Dir::Down))
+ "c" if mods == Modifiers::SHIFT | Modifiers::CTRL => {
+ action(action::FilteredMsg::ClipboardCopyReports)
+ }
+ "d" if mods == Modifiers::CTRL => {
+ action(action::FilteredMsg::DiscardRecord)
replacement in inflorescence/src/main.rs at line 1943
[86.3246]→[86.3246:3399](∅→∅) − Key::Named(key::Named::ArrowUp) => {
− selection(selection::Msg::PressDir(selection::Dir::Up))
+ "p" if mods == Modifiers::CTRL => {
+ action(action::FilteredMsg::PostponeRecord)
replacement in inflorescence/src/main.rs at line 1946
[86.3429]→[86.3429:3586](∅→∅) − Key::Named(key::Named::ArrowLeft) => {
− selection(selection::Msg::PressDir(selection::Dir::Left))
+ "r" if mods == Modifiers::CTRL => {
+ action(action::FilteredMsg::RefreshRepo)
replacement in inflorescence/src/main.rs at line 1949
[86.3616]→[86.3616:3775](∅→∅) − Key::Named(key::Named::ArrowRight) => {
− selection(selection::Msg::PressDir(selection::Dir::Right))
+ "r" if mods == Modifiers::SHIFT => {
+ action(action::FilteredMsg::ToggleReports)
replacement in inflorescence/src/main.rs at line 1952
[86.3805]→[86.3805:3937](∅→∅) − Key::Named(key::Named::Tab) => {
− action(action::FilteredMsg::FocusNext)
+ "s" if mods == Modifiers::CTRL => {
+ action(action::FilteredMsg::SaveRecord)
replacement in inflorescence/src/main.rs at line 1955
[86.3967]→[86.3967:4038](∅→∅) − Key::Named(_) | Key::Unidentified => None,
+ "f" if mods == Modifiers::SHIFT => action(
+ action::FilteredMsg::EnterSubMenu(model::SubMenu::Pull),
+ ),
+ "j" if mods == Modifiers::SHIFT => selection(
+ selection::Msg::AltPressDir(selection::Dir::Down),
+ ),
+ "k" if mods == Modifiers::SHIFT => selection(
+ selection::Msg::AltPressDir(selection::Dir::Up),
+ ),
+ "h" if mods == Modifiers::SHIFT => selection(
+ selection::Msg::AltPressDir(selection::Dir::Left),
+ ),
+ "l" if mods == Modifiers::SHIFT => selection(
+ selection::Msg::AltPressDir(selection::Dir::Right),
+ ),
+ "p" if mods == Modifiers::SHIFT => action(
+ action::FilteredMsg::EnterSubMenu(model::SubMenu::Push),
+ ),
+ "t" if mods == Modifiers::SHIFT => {
+ action(action::FilteredMsg::ToRecord(
+ to_record::Msg::ToggleOverall,
+ ))
+ }
+ _ => None,
+ },
+ Key::Named(key::Named::ArrowDown)
+ if mods == Modifiers::SHIFT =>
+ {
+ selection(selection::Msg::AltPressDir(selection::Dir::Down))
replacement in inflorescence/src/main.rs at line 1985
[86.4064]→[86.4064:5679](∅→∅) − } else {
− match key {
− Key::Character(c) => match c.as_str() {
− "c" if mods == Modifiers::CTRL => {
− action(action::FilteredMsg::ClipboardCopy)
− }
− "c" if mods == Modifiers::SHIFT | Modifiers::CTRL => {
− action(action::FilteredMsg::ClipboardCopyReports)
− }
− "d" if mods == Modifiers::CTRL => {
− action(action::FilteredMsg::DiscardRecord)
− }
− "p" if mods == Modifiers::CTRL => {
− action(action::FilteredMsg::PostponeRecord)
− }
− "r" if mods == Modifiers::CTRL => {
− action(action::FilteredMsg::RefreshRepo)
− }
− "r" if mods == Modifiers::SHIFT => {
− action(action::FilteredMsg::ToggleReports)
− }
− "s" if mods == Modifiers::CTRL => {
− action(action::FilteredMsg::SaveRecord)
− }
− "f" if mods == Modifiers::SHIFT => action(
− action::FilteredMsg::EnterSubMenu(model::SubMenu::Pull),
+ Key::Named(key::Named::ArrowUp) if mods == Modifiers::SHIFT => {
+ selection(selection::Msg::AltPressDir(selection::Dir::Up))
+ }
+ Key::Named(key::Named::ArrowLeft)
+ if mods == Modifiers::SHIFT =>
+ {
+ selection(selection::Msg::AltPressDir(selection::Dir::Left))
+ }
+ Key::Named(key::Named::ArrowRight)
+ if mods == Modifiers::SHIFT =>
+ {
+ selection(selection::Msg::AltPressDir(
+ selection::Dir::Right,
+ ))
+ }
+ Key::Named(key::Named::Tab) if mods == Modifiers::SHIFT => {
+ action(action::FilteredMsg::FocusPrev)
+ }
+ Key::Named(_) | Key::Unidentified => None,
+ }
+ }
+ }
+ keyboard::Event::KeyReleased {
+ key,
+ modifiers: mods,
+ ..
+ } => {
+ if mods.is_empty() {
+ match key {
+ Key::Character(c) => match c.as_str() {
+ "j" =>
+ unfiltered(
+ selection::UnfilteredMsg::ReleaseDir(
+ selection::Dir::Down,
+ ),
+ ),
+ "k" =>
+ unfiltered(
+ selection::UnfilteredMsg::ReleaseDir(
+ selection::Dir::Up,
+ ),
replacement in inflorescence/src/main.rs at line 2027
[86.5714]→[86.5714:5879](∅→∅) − "j" if mods == Modifiers::SHIFT => selection(
− selection::Msg::AltPressDir(selection::Dir::Down),
+ "h" =>
+ unfiltered(
+ selection::UnfilteredMsg::ReleaseDir(
+ selection::Dir::Left,
+ ),
replacement in inflorescence/src/main.rs at line 2033
[86.5914]→[86.5914:6077](∅→∅) − "k" if mods == Modifiers::SHIFT => selection(
− selection::Msg::AltPressDir(selection::Dir::Up),
+ "l" =>
+ unfiltered(
+ selection::UnfilteredMsg::ReleaseDir(
+ selection::Dir::Right,
+ ),
replacement in inflorescence/src/main.rs at line 2039
[86.6112]→[86.6112:6277](∅→∅) − "h" if mods == Modifiers::SHIFT => selection(
− selection::Msg::AltPressDir(selection::Dir::Left),
+ _ => None,
+ },
+ Key::Named(key::Named::ArrowDown) => {
+ unfiltered(
+ selection::UnfilteredMsg::ReleaseDir(
+ selection::Dir::Down,
replacement in inflorescence/src/main.rs at line 2046
[86.6312]→[86.6312:6478](∅→∅) − "l" if mods == Modifiers::SHIFT => selection(
− selection::Msg::AltPressDir(selection::Dir::Right),
+ )
+ }
+ Key::Named(key::Named::ArrowUp) => {
+ unfiltered(
+ selection::UnfilteredMsg::ReleaseDir(
+ selection::Dir::Up,
replacement in inflorescence/src/main.rs at line 2053
[86.6513]→[86.6513:6681](∅→∅) − "p" if mods == Modifiers::SHIFT => action(
− action::FilteredMsg::EnterSubMenu(model::SubMenu::Push),
+ )
+ }
+ Key::Named(key::Named::ArrowLeft) => {
+ unfiltered(
+ selection::UnfilteredMsg::ReleaseDir(
+ selection::Dir::Left,
replacement in inflorescence/src/main.rs at line 2060
[86.6716]→[86.6716:8074](∅→∅) − "t" if mods == Modifiers::SHIFT => {
− action(action::FilteredMsg::ToRecord(
− to_record::Msg::ToggleOverall,
− ))
− }
− _ => None,
− },
− Key::Named(key::Named::ArrowDown)
− if mods == Modifiers::SHIFT =>
− {
− selection(selection::Msg::AltPressDir(selection::Dir::Down))
− }
− Key::Named(key::Named::ArrowUp) if mods == Modifiers::SHIFT => {
− selection(selection::Msg::AltPressDir(selection::Dir::Up))
− }
− Key::Named(key::Named::ArrowLeft)
− if mods == Modifiers::SHIFT =>
− {
− selection(selection::Msg::AltPressDir(selection::Dir::Left))
− }
− Key::Named(key::Named::ArrowRight)
− if mods == Modifiers::SHIFT =>
− {
− selection(selection::Msg::AltPressDir(
+ )
+ }
+ Key::Named(key::Named::ArrowRight) => {
+ unfiltered(
+ selection::UnfilteredMsg::ReleaseDir(
replacement in inflorescence/src/main.rs at line 2066
[86.8133]→[86.8133:8459](∅→∅) − ))
− }
− Key::Named(key::Named::Tab) if mods == Modifiers::SHIFT => {
− action(action::FilteredMsg::FocusPrev)
− }
− Key::Named(_) | Key::Unidentified => None,
replacement in inflorescence/src/main.rs at line 2069
[86.8485]→[86.8485:13117](∅→∅) − }
− }
− keyboard::Event::KeyReleased {
− key,
− modifiers: mods,
− ..
− } => {
− if mods.is_empty() {
− match key {
− Key::Character(c) => match c.as_str() {
− "j" => Some(Msg::View(
− view::Msg::UnfilteredSelection(
− selection::UnfilteredMsg::ReleaseDir(
− selection::Dir::Down,
− ),
− ),
− )),
− "k" => Some(Msg::View(
− view::Msg::UnfilteredSelection(
− selection::UnfilteredMsg::ReleaseDir(
− selection::Dir::Up,
− ),
− ),
− )),
− "h" => Some(Msg::View(
− view::Msg::UnfilteredSelection(
− selection::UnfilteredMsg::ReleaseDir(
− selection::Dir::Left,
− ),
− ),
− )),
− "l" => Some(Msg::View(
− view::Msg::UnfilteredSelection(
− selection::UnfilteredMsg::ReleaseDir(
− selection::Dir::Right,
− ),
− ),
− )),
− _ => None,
− },
− Key::Named(key::Named::ArrowDown) => {
− Some(Msg::View(view::Msg::UnfilteredSelection(
− selection::UnfilteredMsg::ReleaseDir(
− selection::Dir::Down,
− ),
− )))
− }
− Key::Named(key::Named::ArrowUp) => {
− Some(Msg::View(view::Msg::UnfilteredSelection(
− selection::UnfilteredMsg::ReleaseDir(
− selection::Dir::Up,
− ),
− )))
− }
− Key::Named(key::Named::ArrowLeft) => {
− Some(Msg::View(view::Msg::UnfilteredSelection(
− selection::UnfilteredMsg::ReleaseDir(
− selection::Dir::Left,
− ),
− )))
− }
− Key::Named(key::Named::ArrowRight) => {
− Some(Msg::View(view::Msg::UnfilteredSelection(
− selection::UnfilteredMsg::ReleaseDir(
− selection::Dir::Right,
− ),
− )))
− }
− Key::Named(_) | Key::Unidentified => None,
− }
− } else {
− None
− }
− }
− keyboard::Event::ModifiersChanged(_) => None,
+ Key::Named(_) | Key::Unidentified => None,
+ }
+ } else {
+ None
+ }
replacement in inflorescence/src/main.rs at line 2075
[7.1677]→[86.13118:13130](∅→∅),
[86.13130]→[39.5639:5719](∅→∅),
[39.5639]→[39.5639:5719](∅→∅),
[48.14542]→[46.8110:8111](∅→∅),
[53.55617]→[46.8110:8111](∅→∅),
[46.8110]→[46.8110:8111](∅→∅),
[46.8111]→[86.13131:13180](∅→∅) − });
−
− let window_subs = window::events().map(|(_id, event)| Msg::Window(event));
−
− Subscription::batch([key_subs, window_subs])
+ keyboard::Event::ModifiersChanged(_) => None,
+ }
+ })
replacement in inflorescence/src/main.rs at line 2081
[45.3737]→[63.15090:15128](∅→∅),
[63.15128]→[57.101219:101329](∅→∅),
[57.101219]→[57.101219:101329](∅→∅) − view::main(
− &state.model,
− |id_hash| file::try_get_src_file(&state.files, id_hash),
− window_id,
− )
− .map(Msg::View)
+ let get_diff = |id_hash| {
+ if let Some(managing_repo) = &state.managing_repo {
+ file::try_get_src_file(&managing_repo.files, id_hash)
+ } else {
+ None
+ }
+ };
+ view::main(&state.model, get_diff, window_id).map(Msg::View)
replacement in iced_utils/src/task/wrappers.rs at line 144
[40.10978]→[28.4436:4496](∅→∅),
[28.4436]→[28.4436:4496](∅→∅),
[28.4496]→[75.1788:1824](∅→∅) − let set_icon_task = Task::perform(
− async move {
− use image::ImageFormat;
+ let set_icon_task = Task::future(async move {
+ use image::ImageFormat;
replacement in iced_utils/src/task/wrappers.rs at line 147
[28.4569]→[28.4569:4776](∅→∅) − let icon_bytes = tokio::fs::read(path).await.unwrap();
− window::icon::from_file_data(&icon_bytes, Some(ImageFormat::Png))
− .unwrap()
− },
− |msg| msg,
− )
+ let icon_bytes = tokio::fs::read(path).await.unwrap();
+ window::icon::from_file_data(&icon_bytes, Some(ImageFormat::Png))
+ .unwrap()
+ })
edit in iced_utils/src/task/mod.rs at line 11
+
+ #[cfg(not(any(test, feature = "testing")))]
+ #[doc(inline)]
+ pub use iced::task::Handle;
edit in iced_utils/src/task/mod.rs at line 151
+ }
+ }
+
+ pub fn abortable(self) -> (Self, Handle)
+ where
+ T: 'static,
+ {
+ let (stream, handle) = match self.stream {
+ Some(stream) => {
+ let (stream, handle) = iced::futures::stream::abortable(stream);
+
+ (
+ Some(iced_runtime::futures::boxed_stream(stream)),
+ InternalHandle::Manual(handle),
+ )
+ }
+ None => (
+ None,
+ InternalHandle::Manual(
+ iced::futures::stream::AbortHandle::new_pair().0,
+ ),
+ ),
+ };
+
+ (Self { stream }, Handle { internal: handle })
+ }
+ }
+
+ #[cfg(any(test, feature = "testing"))]
+ impl<T> std::fmt::Debug for Task<T> {
+ fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+ f.debug_struct(&format!("Task<{}>", std::any::type_name::<T>()))
+ .finish()
+ }
+ }
+
+ /// A handle to a [`Task`] that can be used for aborting it.
+ #[cfg(any(test, feature = "testing"))]
+ #[derive(Debug, Clone)]
+ pub struct Handle {
+ internal: InternalHandle,
+ }
+
+ #[cfg(any(test, feature = "testing"))]
+ #[derive(Debug, Clone)]
+ enum InternalHandle {
+ Manual(iced::futures::stream::AbortHandle),
+ AbortOnDrop(std::sync::Arc<iced::futures::stream::AbortHandle>),
+ }
+
+ #[cfg(any(test, feature = "testing"))]
+ impl InternalHandle {
+ pub fn as_ref(&self) -> &iced::futures::stream::AbortHandle {
+ match self {
+ InternalHandle::Manual(handle) => handle,
+ InternalHandle::AbortOnDrop(handle) => handle.as_ref(),
+ }
+ }
+ }
+
+ #[cfg(any(test, feature = "testing"))]
+ impl Handle {
+ pub fn abort(&self) {
+ self.internal.as_ref().abort();
+ }
+
+ pub fn abort_on_drop(self) -> Self {
+ match &self.internal {
+ InternalHandle::Manual(handle) => Self {
+ internal: InternalHandle::AbortOnDrop(std::sync::Arc::new(
+ handle.clone(),
+ )),
+ },
+ InternalHandle::AbortOnDrop(_) => self,
edit in iced_utils/src/task/mod.rs at line 227
+
+ pub fn is_aborted(&self) -> bool {
+ self.internal.as_ref().is_aborted()
+ }
edit in iced_utils/src/task/mod.rs at line 233
+ #[cfg(any(test, feature = "testing"))]
+ impl Drop for Handle {
+ fn drop(&mut self) {
+ if let InternalHandle::AbortOnDrop(handle) = &mut self.internal {
+ let handle = std::mem::replace(
+ handle,
+ std::sync::Arc::new(
+ iced::futures::stream::AbortHandle::new_pair().0,
+ ),
+ );
+
+ if let Some(handle) = std::sync::Arc::into_inner(handle) {
+ handle.abort();
+ }
+ }
+ }
+ }
+
edit in Cargo.toml at line 31
+ [workspace.dependencies.async-stream]
+ version = "0.3"
edit in Cargo.toml at line 89
+ [workspace.dependencies.normpath]
+ version = "1"
edit in Cargo.toml at line 93
+ [workspace.dependencies.nucleo-matcher]
+ version = "0.3"
edit in Cargo.lock at line 379
+ ]
+
+ [[package]]
+ name = "async-stream"
+ version = "0.3.6"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+ checksum = "0b5a71a6f37880a80d1d7f19efd781e4b5de42c88f0722cc13bcb6cc2cfe8476"
+ dependencies = [
+ "async-stream-impl",
+ "futures-core",
+ "pin-project-lite",
edit in Cargo.lock at line 393
+ name = "async-stream-impl"
+ version = "0.3.6"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+ checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d"
+ dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.114",
+ ]
+
+ [[package]]
edit in Cargo.lock at line 2711
edit in Cargo.lock at line 2716
edit in Cargo.lock at line 2718
+ "normpath",
+ "nucleo-matcher",
+ "tokio",
edit in Cargo.lock at line 3483
+ name = "normpath"
+ version = "1.5.0"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+ checksum = "bf23ab2b905654b4cb177e30b629937b3868311d4e1cba859f899c041046e69b"
+ dependencies = [
+ "windows-sys 0.61.2",
+ ]
+
+ [[package]]
edit in Cargo.lock at line 3541
+ name = "nucleo-matcher"
+ version = "0.3.1"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+ checksum = "bf33f538733d1a5a3494b836ba913207f14d9d4a1d3cd67030c5061bdd2cac85"
+ dependencies = [
+ "memchr",
+ "unicode-segmentation",
+ ]
+
+ [[package]]