allow to copy change hash

[?]
Aug 15, 2025, 1:27 PM
PKLUHYE4BGIMJKU6VKGBGSHEB2ZT53OYMTFBYCZYCO4J3RVTRXSAC

Dependencies

  • [2] 6YZAVBWU Initial commit
  • [3] IQDCHWCP load a pijul repo
  • [4] SWWE2R6M display basic repo stuff
  • [5] WT3GA27P add cursor with selection
  • [6] UB2ITZJS refresh changed files on FS changes
  • [7] EC3TVL4X add untracked files
  • [8] S2NVIFXR allow to enter record msg
  • [9] YBJRDOTC make all repo actions async
  • [10] KM5PSZ4A watch repo once loaded
  • [11] 2VUX5BTD load identity
  • [12] A5YBC77V record!
  • [13] D7A7MSIH allow to defer or abandon record, add buttons
  • [14] 4WO3ZJM2 show untracked files' contents
  • [15] V55EAIWQ add src file LRU cache
  • [16] ZVI4AWER woot contents_diff
  • [17] BFN2VHZS refactor file stuff into sub-mod
  • [18] 3SYSJKYL add app icon
  • [19] 23SFYK4Q big view refactor into a new crate
  • [20] 6F7Q4ZLR avoid unused warns
  • [21] ACDXXAX2 refactor main's updates into smaller fns
  • [22] I2AG42PA new cols layout
  • [23] YKHE3XMW refactor diffs handling
  • [24] KEPKF3WO unify diffs handling, simplify view
  • [25] KWTBNTO3 diffs selection and scrolling
  • [26] PTWZYQFR use nav-scrollable for repo status
  • [27] UR4J677R nav for log changes and refactors
  • [28] OJPGHVC3 entire log!
  • [29] FJSVMFB4 add `iced_expl_widgets` with forked scrollable
  • [30] WAOGSCOJ very nice refactor, wip adding channels logs
  • [31] EJPSD5XO shared allowed actions conditions between update and view
  • [32] YK3MOJJL chonky refactor, wip other channels logs & diffs
  • [33] 7WCB5YQJ refactor msgs and modules
  • [34] AZ5D2LQU allow to set record description
  • [35] JZXYSIYD channel selection!
  • [36] ELG3UDT6 allow to rm added files
  • [37] SASAN2XC use nav-scrollable
  • [38] A6Z4O6RC actions menu
  • [39] L6KSEFQI move cursor related stuff into its module
  • [40] PTFDJ567 add untracked files encoding
  • [*] WGID4LS4 absolutely slayed testing with iced task

Change contents

  • edit in libflorescence/src/repo.rs at line 239
    [26.643]
    [4.595]
    }
    pub fn hash_to_string(hash: &ChangeHash) -> String {
    pijul::Base32::to_base32(hash)
  • replacement in inflorescence_view/src/view.rs at line 1007
    [27.7891][19.25168:25225](),[19.25168][19.25168:25225]()
    let mut short_hash = pijul::Base32::to_base32(hash);
    [27.7891]
    [19.25225]
    let mut short_hash = repo::hash_to_string(hash);
  • edit in inflorescence_model/src/action.rs at line 33
    [34.2928]
    [31.4320]
    ClipboardCopy,
  • edit in inflorescence_model/src/action.rs at line 71
    [34.3009]
    [31.5127]
    (ClipboardCopy, ClipboardCopy) => true,
  • edit in inflorescence_model/src/action.rs at line 87
    [34.3076]
    [31.5587]
    (ClipboardCopy, _) => false,
  • edit in inflorescence_model/src/action.rs at line 236
    [31.8943]
    [31.8943]
    let clipboard_copy_change_hash = || Binding {
    key: "C-c",
    label: "copy hash",
    msg: Some(FilteredMsg::ClipboardCopy),
    };
  • replacement in inflorescence_model/src/action.rs at line 253
    [31.9295][31.9295:9341]()
    MainSelection::Untracked => {
    [31.9295]
    [31.9341]
    StatusSelection::Untracked => {
  • replacement in inflorescence_model/src/action.rs at line 258
    [31.9521][31.9521:9576]()
    MainSelection::AddedFromUntracked => {
    [31.9521]
    [31.9576]
    StatusSelection::AddedFromUntracked => {
  • replacement in inflorescence_model/src/action.rs at line 263
    [31.9756][31.9756:9798]()
    MainSelection::Other => {
    [31.9756]
    [31.9798]
    StatusSelection::LogChange => {
    push_if(can_select_right, right, ma);
    ma.push(clipboard_copy_change_hash());
    push_if(can_record, start_record, ma)
    }
    StatusSelection::Other => {
  • edit in inflorescence_model/src/action.rs at line 287
    [31.10349]
    [31.10349]
    ma.push(clipboard_copy_change_hash());
  • edit in inflorescence_model/src/action.rs at line 299
    [31.10669]
    [31.10669]
    ma.push(clipboard_copy_change_hash());
  • edit in inflorescence_model/src/action.rs at line 350
    [32.20910]
    [32.20910]
    ma.push(clipboard_copy_change_hash());
  • edit in inflorescence_model/src/action.rs at line 361
    [32.21205]
    [32.21205]
    ma.push(clipboard_copy_change_hash());
  • edit in inflorescence_model/src/action.rs at line 373
    [32.21466]
    [32.21466]
    ma.push(clipboard_copy_change_hash());
  • edit in inflorescence_model/src/action.rs at line 387
    [31.12397]
    [31.12397]
    ma.push(clipboard_copy_change_hash());
  • edit in inflorescence_model/src/action.rs at line 398
    [31.12703]
    [31.12703]
    ma.push(clipboard_copy_change_hash());
  • edit in inflorescence_model/src/action.rs at line 410
    [31.13014]
    [31.13014]
    ma.push(clipboard_copy_change_hash());
  • replacement in inflorescence_model/src/action.rs at line 439
    [31.13504][31.13504:13538]()
    selection: MainSelection,
    [31.13504]
    [31.13538]
    selection: StatusSelection,
  • replacement in inflorescence_model/src/action.rs at line 483
    [31.14335][31.14335:14356]()
    enum MainSelection {
    [31.14335]
    [31.14356]
    enum StatusSelection {
  • edit in inflorescence_model/src/action.rs at line 486
    [31.14395]
    [31.14395]
    LogChange,
  • replacement in inflorescence_model/src/action.rs at line 567
    [31.17097][31.17097:17162]()
    selection: MainSelection::Untracked,
    [31.17097]
    [32.22456]
    selection: StatusSelection::Untracked,
  • replacement in inflorescence_model/src/action.rs at line 588
    [31.17957][31.17957:18019]()
    MainSelection::AddedFromUntracked
    [31.17957]
    [31.18019]
    StatusSelection::AddedFromUntracked
  • replacement in inflorescence_model/src/action.rs at line 590
    [31.18052][31.18052:18101]()
    MainSelection::Other
    [31.18052]
    [31.18101]
    StatusSelection::Other
  • replacement in inflorescence_model/src/action.rs at line 635
    [31.20624][31.20624:20685]()
    selection: MainSelection::Other,
    [31.20624]
    [32.23517]
    selection: StatusSelection::LogChange,
  • replacement in inflorescence_model/src/action.rs at line 642
    [31.20894][31.20894:20947]()
    selection: MainSelection::Other,
    [31.20894]
    [31.20947]
    selection: StatusSelection::Other,
  • edit in inflorescence/src/main.rs at line 63
    [20.416]
    [2.2959]
    }
    #[derive(Debug)]
    struct State {
    repo_fs_watch: Option<Debouncer<RecommendedWatcher, RecommendedCache>>,
    repo_tx_in: mpsc::UnboundedSender<repo::MsgIn>,
    /// Cache for untracked and changed files loaded from disk
    files: file::State,
    model: model::State,
    }
    #[derive(Debug, Clone)]
    enum Msg {
    View(view::Msg),
    NoOp,
    Window(window::Event),
    LoadedId(Box<Id>),
    RepoTaskExited,
    ToRepo(repo::MsgIn),
    FromRepo(repo::MsgOut),
    File(file::Msg),
  • edit in inflorescence/src/main.rs at line 129
    [5.624][3.1328:1363](),[6.1551][3.1328:1363](),[4.5076][3.1328:1363](),[3.1328][3.1328:1363](),[11.797][10.258:334](),[22.4810][10.258:334](),[3.1363][10.258:334](),[10.358][9.6092:6144](),[7.2096][9.6092:6144](),[13.58][23.2975:3038](),[23.3038][17.165:189](),[13.58][17.165:189](),[17.189][34.9596:9621](),[17.238][15.1025:1028](),[16.1224][15.1025:1028](),[24.2962][15.1025:1028](),[23.3248][15.1025:1028](),[25.8995][15.1025:1028](),[34.9621][15.1025:1028](),[33.11742][15.1025:1028](),[28.42705][15.1025:1028](),[30.80070][15.1025:1028](),[15.1025][15.1025:1028](),[2.3042][2.3042:3066](),[2.3066][19.25772:25783](),[19.25783][33.11743:11764](),[33.11764][22.4811:4848](),[19.25803][22.4811:4848](),[18.814][12.4573:4596](),[14.2734][12.4573:4596](),[22.4848][12.4573:4596](),[5.668][12.4573:4596](),[11.816][9.6176:6196](),[12.4596][9.6176:6196](),[5.668][9.6176:6196](),[9.6196][31.23800:23825](),[31.23825][9.6196:6224](),[9.6196][9.6196:6224](),[21.142][17.239:260](),[13.216][17.239:260]()
    }
    #[derive(Debug)]
    struct State {
    repo_fs_watch: Option<Debouncer<RecommendedWatcher, RecommendedCache>>,
    repo_tx_in: mpsc::UnboundedSender<repo::MsgIn>,
    /// Cache for untracked and changed files loaded from disk
    files: file::State,
    model: model::State,
    }
    #[derive(Debug, Clone)]
    enum Msg {
    View(view::Msg),
    NoOp,
    Window(window::Event),
    LoadedId(Box<Id>),
    RepoTaskExited,
    ToRepo(repo::MsgIn),
    FromRepo(repo::MsgOut),
    File(file::Msg),
  • edit in inflorescence/src/main.rs at line 481
    [32.60824]
    [32.60824]
    action::FilteredMsg::ClipboardCopy => clipboard_copy(state),
  • edit in inflorescence/src/main.rs at line 591
    [32.64717]
    [21.856]
    }
    fn clipboard_copy(state: &mut State) -> Task<Msg> {
    if let Some(ReadyState { selection, .. }) = model::is_ready(&state.model) {
    let to_copy = match selection::unify(selection) {
    selection::Unified::Status(Some(
    inflorescence_model::selection::Status::LogChange(
    selection::LogChange { hash, .. },
    ),
    )) => Some(repo::hash_to_string(hash)),
    selection::Unified::Channel(Some(selection::Channel {
    log: Some(selection::LogChange { hash, .. }),
    ..
    })) => Some(repo::hash_to_string(hash)),
    selection::Unified::EntireLog(Some(selection::LogChange {
    hash,
    ..
    })) => Some(repo::hash_to_string(hash)),
    selection::Unified::Status(_)
    | selection::Unified::Channel(_)
    | selection::Unified::EntireLog(_) => None,
    };
    if let Some(to_copy) = to_copy {
    task::clipboard_write(to_copy)
    } else {
    Task::none()
    }
    } else {
    Task::none()
    }
  • edit in inflorescence/src/main.rs at line 1400
    [8.1479]
    [13.2234]
    "c" if mods == Modifiers::CTRL => {
    action(action::FilteredMsg::ClipboardCopy)
    }
  • edit in iced_utils/src/task/wrappers.rs at line 11
    [29.184]
    [29.184]
    /// Write the given contents to the clipboard.
    pub fn clipboard_write<T>(contents: String) -> Task<T> {
    #[cfg(not(any(test, feature = "testing")))]
    let task = iced::clipboard::write(contents);
    #[cfg(any(test, feature = "testing"))]
    let task = {
    let _ = contents;
    Task::none()
    };
  • edit in iced_utils/src/task/wrappers.rs at line 23
    [29.185]
    [29.185]
    task
    }