diff --git a/Cargo.lock b/Cargo.lock index 174dedc..854efcf 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -12,6 +12,18 @@ dependencies = [ "uuid", ] +[[package]] +name = "accesskit_android" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e27dedd5e1932e1f52fedcde681bc2ae4213df53bad5b295103aa36b1d0ffb6" +dependencies = [ + "accesskit", + "accesskit_consumer", + "jni 0.21.1", + "log", +] + [[package]] name = "accesskit_atspi_common" version = "0.19.1" @@ -19,7 +31,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "023da0e5097f46df7092d5280b02efb9bbf8d93298daeced42652463e357d636" dependencies = [ "accesskit", - "accesskit_consumer 0.38.0", + "accesskit_consumer", "atspi-common", "phf", "serde", @@ -28,22 +40,26 @@ dependencies = [ [[package]] name = "accesskit_consumer" -version = "0.37.0" +version = "0.38.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f950720ce064757a1b629caad3a408e8d2c63bb01f29b8a3ff8daa331053ffeb" +checksum = "5d10a236f96f87d70732e44520046785431ef01d5bcd6b041317bfadd2f88245" dependencies = [ "accesskit", "hashbrown 0.16.1", ] [[package]] -name = "accesskit_consumer" -version = "0.38.0" +name = "accesskit_ios" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d10a236f96f87d70732e44520046785431ef01d5bcd6b041317bfadd2f88245" +checksum = "750c4e9f6ce888dfe8a10c0f1b5ceb646a7854fd46579d74919219d1bb314083" dependencies = [ "accesskit", + "accesskit_consumer", "hashbrown 0.16.1", + "objc2 0.5.3", + "objc2-foundation 0.2.2", + "objc2-ui-kit 0.2.2", ] [[package]] @@ -53,9 +69,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ce02dc63b43f0c9296af9ac946312a2dc8814427d7a64d2d600971dac55b6076" dependencies = [ "accesskit", - "accesskit_consumer 0.38.0", + "accesskit_consumer", "hashbrown 0.16.1", - "objc2 0.5.2", + "objc2 0.5.3", "objc2-app-kit 0.2.2", "objc2-foundation 0.2.2", ] @@ -75,17 +91,17 @@ dependencies = [ "futures-lite", "futures-util", "serde", - "zbus", + "zbus 5.19.0", ] [[package]] name = "accesskit_windows" -version = "0.33.1" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36e93ac7bf50b964f1cbb75f741629a4e950571baa1ef1274457ab5a80d9bcc2" +checksum = "106c2b961215864d1c2e703ee63269c25c4e80a577ffb2c1017b9c17dcdf83a1" dependencies = [ "accesskit", - "accesskit_consumer 0.37.0", + "accesskit_consumer", "hashbrown 0.16.1", "static_assertions", "windows 0.62.2", @@ -94,9 +110,9 @@ dependencies = [ [[package]] name = "addr2line" -version = "0.25.1" +version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b5d307320b3181d6d7954e663bd7c774a838b8220fe0593c86d9fb09f498b4b" +checksum = "e567177890eb1617b1f774005b66b26b2377afd138a2ca37aae7d8f0c81429d4" dependencies = [ "gimli", ] @@ -121,13 +137,15 @@ dependencies = [ [[package]] name = "ahash" -version = "0.8.12" +version = "0.8.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" +checksum = "3019c0b8d883a8a17df3129e417ef463c087807d245e8881a31d583dee1c0519" dependencies = [ "cfg-if", "const-random", + "getrandom 0.4.3", "once_cell", + "serde", "version_check", "zerocopy", ] @@ -161,24 +179,66 @@ dependencies = [ [[package]] name = "allocator-api2" -version = "0.2.21" +version = "0.2.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57b212daf2e827b1ccdd778b7eb48ba433e58cb0e4f27b43cd6b7a608425a014" + +[[package]] +name = "android-activity" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f2a1bb052857d5dd49572219344a7332b31b76405648eabac5bc68978251bcd" +dependencies = [ + "android-properties", + "bitflags 2.13.2", + "cc", + "jni 0.22.4", + "libc", + "log", + "ndk", + "ndk-context", + "ndk-sys", + "num_enum", + "thiserror 2.0.21", +] + +[[package]] +name = "android-properties" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc7eb209b1518d6bb87b283c20095f5228ecda460da70b44f0802523dea6da04" + +[[package]] +name = "android_log-sys" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84521a3cf562bc62942e294181d9eef17eb38ceb8c68677bc49f144e4c3d4f8d" + +[[package]] +name = "android_logger" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" +checksum = "dbb4e440d04be07da1f1bf44fb4495ebd58669372fe0cffa6e48595ac5bd88a3" +dependencies = [ + "android_log-sys", + "env_filter", + "log", +] [[package]] name = "android_system_properties" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae221649c9976a6f6c56ae1facf410f3ddb33cc661c4b7b61020a912d4237fbc" +checksum = "204ddd8b860c1ff4b89d3cef1d23180caa4d0c34d34c9c2b009bc441ffb94d0f" dependencies = [ "libc", ] [[package]] name = "anyhow" -version = "1.0.104" +version = "1.0.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "330a5ed07fa54e4702c9d6c4174f74427fc0ef6e214bbd677ae50a5099946470" +checksum = "2cb931c189b85683d69a5cfad41d4d418671e1ac413dd209f3f2fc31e3cfd902" [[package]] name = "approx" @@ -190,19 +250,19 @@ dependencies = [ ] [[package]] -name = "ar_archive_writer" -version = "0.5.3" +name = "arbitrary" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73cd58deff2140a0a8eae87e417bd01db68a33e148aa93d1e8cd837e55e312b6" -dependencies = [ - "object 0.39.1", -] +checksum = "3bc62ac97cc33321f50863d514c3bc38a453947a8f9e781137e47c7401020aed" [[package]] -name = "arbitrary" -version = "1.4.2" +name = "arc-swap" +version = "1.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3d036a3c4ab069c7b410a2ce876bd74808d2d0888a82667669f8e783a898bf1" +checksum = "84a22b5d51209f6de83d37a0b33d320acb8da88823e42a94c075140708f032a5" +dependencies = [ + "rustversion", +] [[package]] name = "arg_enum_proc_macro" @@ -223,9 +283,9 @@ checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" [[package]] name = "arrayvec" -version = "0.7.8" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3fb67a6e08acf24fdeccbac2cb6ac4305825bd1f117462e0e6f2f193345ad56" +checksum = "47a64a0fd06e123e9e3cf3ad01432af17dcab8185e8023edcf184fe696f9675d" [[package]] name = "as-raw-xcb-connection" @@ -266,7 +326,7 @@ dependencies = [ "wayland-backend", "wayland-client", "wayland-protocols", - "zbus", + "zbus 5.19.0", ] [[package]] @@ -295,9 +355,9 @@ dependencies = [ [[package]] name = "async-executor" -version = "1.14.0" +version = "1.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c96bf972d85afc50bf5ab8fe2d54d1586b4e0b46c97c50a0c9e71e2f7bcd812a" +checksum = "f426a31126c735126297bc5ea7a521263c9faff4f63ca415267ee625651c4f37" dependencies = [ "async-task", "concurrent-queue", @@ -331,16 +391,16 @@ dependencies = [ "futures-lite", "parking", "polling", - "rustix 1.1.5", + "rustix 1.1.6", "slab", "windows-sys 0.61.2", ] [[package]] name = "async-lock" -version = "3.4.2" +version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290f7f2596bd5b78a9fec8088ccd89180d7f9f55b94b0576823bbbdc72ee8311" +checksum = "0876700b0d007ad25d5508865a4259c3af9af6d296bf663a0d586d0bc3369f6f" dependencies = [ "event-listener", "event-listener-strategy", @@ -373,18 +433,18 @@ dependencies = [ "cfg-if", "event-listener", "futures-lite", - "rustix 1.1.5", + "rustix 1.1.6", ] [[package]] name = "async-recursion" -version = "1.1.1" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" +checksum = "4f8abc12baad266b1c8cec146854c195b5864b4221d4b2ca7296a7ae82d9e451" dependencies = [ "proc-macro2", "quote", - "syn 2.0.119", + "syn 3.0.10", ] [[package]] @@ -399,7 +459,7 @@ dependencies = [ "cfg-if", "futures-core", "futures-io", - "rustix 1.1.5", + "rustix 1.1.6", "signal-hook-registry", "slab", "windows-sys 0.61.2", @@ -419,15 +479,9 @@ checksum = "82f6aeea286b8eb4dd3431a1be1b59d290ace00f5bfd8e2a159bc2a05e2c1667" dependencies = [ "proc-macro2", "quote", - "syn 3.0.6", + "syn 3.0.10", ] -[[package]] -name = "atomic" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c59bdb34bc650a32731b31bd8f0829cc15d24a708ee31559e0bb34f2bc320cba" - [[package]] name = "atomic-waker" version = "1.1.2" @@ -453,7 +507,7 @@ dependencies = [ "enumflags2", "serde", "static_assertions", - "zbus", + "zbus 5.19.0", "zbus-lockstep", "zbus-lockstep-macros", "zbus_names", @@ -468,7 +522,7 @@ checksum = "2230e48787ed3eb4088996eab66a32ca20c0b67bbd4fd6cdfe79f04f1f04c9fc" dependencies = [ "atspi-common", "serde", - "zbus", + "zbus 5.19.0", ] [[package]] @@ -506,7 +560,7 @@ dependencies = [ "anyhow", "arrayvec", "log", - "nom 8.0.0", + "nom", "num-rational", "v_frame", ] @@ -522,15 +576,15 @@ dependencies = [ [[package]] name = "backtrace" -version = "0.3.76" +version = "0.3.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb531853791a215d7c62a30daf0dde835f381ab5de4589cfe7c649d2cbe92bd6" +checksum = "42f4220217f3288537b83684130f42fad43320b1c3b805f1910d683d52ded24f" dependencies = [ "addr2line", "cfg-if", "libc", - "miniz_oxide 0.8.9", - "object 0.37.3", + "miniz_oxide 0.9.1", + "object", "rustc-demangle", "windows-link 0.2.1", ] @@ -548,29 +602,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac07cdecf99051d9a5238b80f35af32cdeba5b336e55d957b318b50137e18da5" [[package]] -name = "base64ct" -version = "1.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2af50177e190e07a26ab74f8b1efbfe2ef87da2116221318cb1c2e82baf7de06" - -[[package]] -name = "bindgen" -version = "0.71.1" +name = "bit-set" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f58bf3d7db68cfbac37cfc485a8d711e87e064c3d0fe0435b92f7a407f9d6b3" +checksum = "08807e080ed7f9d5433fa9b275196cfc35414f66a0c79d864dc51a0d825231a3" dependencies = [ - "bitflags 2.13.2", - "cexpr", - "clang-sys", - "itertools 0.13.0", - "log", - "prettyplease", - "proc-macro2", - "quote", - "regex", - "rustc-hash 2.1.3", - "shlex 1.3.0", - "syn 2.0.119", + "bit-vec 0.8.0", ] [[package]] @@ -579,9 +616,15 @@ version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34ddef2995421ab6a5c779542c81ee77c115206f4ad9d5a8e05f4ff49716a3dd" dependencies = [ - "bit-vec", + "bit-vec 0.9.1", ] +[[package]] +name = "bit-vec" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7" + [[package]] name = "bit-vec" version = "0.9.1" @@ -590,9 +633,9 @@ checksum = "b71798fca2c1fe1086445a7258a4bc81e6e49dcd24c8d0dd9a1e57395b603f51" [[package]] name = "bit_field" -version = "0.10.3" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e4b40c7323adcfc0a41c4b88143ed58346ff65a288fc144329c5c45e05d70c6" +checksum = "cb2907cc03d08cdb1c6724ad0670ce67c4a71e1c45a6d7635224011714cfc4b1" [[package]] name = "bitflags" @@ -630,6 +673,15 @@ dependencies = [ "generic-array", ] +[[package]] +name = "block-buffer" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2f6c7dbe95a6ed67ad9f18e57daf93a2f034c524b99fd2b76d18fdfeb6660aa" +dependencies = [ + "hybrid-array", +] + [[package]] name = "block-padding" version = "0.3.3" @@ -645,7 +697,7 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c132eebf10f5cad5289222520a4a058514204aed6d791f1cf4fe8088b82d15f" dependencies = [ - "objc2 0.5.2", + "objc2 0.5.3", ] [[package]] @@ -654,7 +706,7 @@ version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cdeb9d870516001442e364c5220d3574d2da8dc765554b4a617230d33fa58ef5" dependencies = [ - "objc2 0.6.4", + "objc2 0.6.5", ] [[package]] @@ -670,16 +722,6 @@ dependencies = [ "piper", ] -[[package]] -name = "borsh" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "553c5d846a6ba5150c65e3b1b8ec073bcf1abc20f9b7220de384a4443ea4e20a" -dependencies = [ - "bytes", - "cfg_aliases", -] - [[package]] name = "built" version = "0.8.1" @@ -688,9 +730,9 @@ checksum = "5c0e531d93d39c34eef561e929e8a7f86d77a5af08aac4f6d6e39976c51858e9" [[package]] name = "bumpalo" -version = "3.20.3" +version = "3.20.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649" +checksum = "87a0cf66fd1eb2fb7b822cb78370d82303750809bc6ba855f3f58e517d3238db" [[package]] name = "by_address" @@ -715,14 +757,14 @@ checksum = "6a1f896587b6f2c069c73d2f0913e2d590c3990285cd2f0b6aa02b786b4c679c" dependencies = [ "proc-macro2", "quote", - "syn 3.0.6", + "syn 3.0.10", ] [[package]] name = "byteorder" -version = "1.5.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" +checksum = "34fb07aac3b9f547c7af8dc897dfe73c10847b6c71130c364bdd7891d979c816" [[package]] name = "byteorder-lite" @@ -732,20 +774,19 @@ checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495" [[package]] name = "bytes" -version = "1.12.1" +version = "1.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc652a48c352aef3ea3aed32080501cf3ef6ed5da78602a020c991775b0aff04" +checksum = "776dfebd015e2d8732c684a2c71003674ccb49457b539b9e82151ba38e96dd7c" [[package]] name = "calloop" -version = "0.14.4" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dbf9978365bac10f54d1d4b04f7ce4427e51f71d61f2fe15e3fed5166474df7" +checksum = "43b32313e937c8721c9d17ee9bf60699a6402b4b7c2cb6ac1bee0ffcaa4b4e5e" dependencies = [ "bitflags 2.13.2", "polling", - "rustix 1.1.5", - "slab", + "rustix 1.1.6", "tracing", ] @@ -756,7 +797,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "138efcf0940a02ebf0cc8d1eff41a1682a46b431630f4c52450d6265876021fa" dependencies = [ "calloop", - "rustix 1.1.5", + "rustix 1.1.6", "wayland-backend", "wayland-client", ] @@ -770,44 +811,23 @@ dependencies = [ "cipher", ] -[[package]] -name = "cbindgen" -version = "0.28.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eadd868a2ce9ca38de7eeafdcec9c7065ef89b42b32f0839278d55f35c54d1ff" -dependencies = [ - "heck 0.4.1", - "indexmap", - "log", - "proc-macro2", - "quote", - "serde", - "serde_json", - "syn 2.0.119", - "tempfile", - "toml 0.8.23", -] - [[package]] name = "cc" -version = "1.5.1" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f360145194ee8e21db5ee7f3fcd4fe52210864c75c985dae33218202c8bbe040" +checksum = "95e45cf2980b2d467be49a9ed942c9179b701063a7ca3d037de7ee9bd67f8d66" dependencies = [ "find-msvc-tools", "jobserver", "libc", - "shlex 2.0.1", + "shlex", ] [[package]] -name = "cexpr" -version = "0.6.0" +name = "cesu8" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" -dependencies = [ - "nom 7.1.3", -] +checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" [[package]] name = "cfg-if" @@ -821,15 +841,6 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f079e83a288787bcd14a6aea84cee5c87a67c5a3e660c30f557a3d24761b3527" -[[package]] -name = "cgl" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ced0551234e87afee12411d535648dd89d2e7f34c78b753395567aff3d447ff" -dependencies = [ - "libc", -] - [[package]] name = "chacha20" version = "0.10.2" @@ -861,22 +872,11 @@ version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" dependencies = [ - "crypto-common", + "crypto-common 0.1.7", "inout", "zeroize", ] -[[package]] -name = "clang-sys" -version = "1.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "157a8ba7b480713b56f4c09fd13fc3e0a22a5dfab8097ba61cbc5feef950788a" -dependencies = [ - "glob", - "libc", - "libloading", -] - [[package]] name = "cocoa" version = "0.25.0" @@ -901,7 +901,7 @@ checksum = "f79398230a6e2c08f5c9760610eb6924b52aa9e7950a619602baba59dcbbdbb2" dependencies = [ "bitflags 2.13.2", "block", - "cocoa-foundation 0.2.0", + "cocoa-foundation 0.2.1", "core-foundation 0.10.0", "core-graphics 0.24.0", "foreign-types", @@ -925,18 +925,27 @@ dependencies = [ [[package]] name = "cocoa-foundation" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e14045fb83be07b5acf1c0884b2180461635b433455fa35d1cd6f17f1450679d" +checksum = "81411967c50ee9a1fc11365f8c585f863a22a9697c89239c452292c40ba79b0d" dependencies = [ "bitflags 2.13.2", "block", "core-foundation 0.10.0", "core-graphics-types 0.2.0", - "libc", "objc", ] +[[package]] +name = "codespan-reporting" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" +dependencies = [ + "termcolor", + "unicode-width 0.1.14", +] + [[package]] name = "codespan-reporting" version = "0.13.1" @@ -945,7 +954,7 @@ checksum = "af491d569909a7e4dee0ad7db7f5341fef5c614d5b8ec8cf765732aba3cff681" dependencies = [ "serde", "termcolor", - "unicode-width", + "unicode-width 0.2.3", ] [[package]] @@ -954,6 +963,16 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" +[[package]] +name = "combine" +version = "4.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4356eba6976435498d05a311ee9fc486da3bc81c200d3f0d7dd9703b41913f92" +dependencies = [ + "bytes", + "memchr", +] + [[package]] name = "concurrent-queue" version = "2.5.0" @@ -975,27 +994,26 @@ dependencies = [ [[package]] name = "const-oid" -version = "0.9.6" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" +checksum = "be95d4a884358a21a199689323c29e9256b4a1b315e22f183d155422041d3a9a" [[package]] name = "const-random" -version = "0.1.18" +version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87e00182fe74b066627d63b85fd550ac2998d4b0bd86bfed477a0ae4c7c71359" +checksum = "d38d4bb3e79c716fd0330d8da84171b0135e59e01076e99f22b75a64c56e952c" dependencies = [ "const-random-macro", ] [[package]] name = "const-random-macro" -version = "0.1.16" +version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e" +checksum = "d66bb491e9fc48cb3fed9d57df886880a751d540d645ebc86b6d9d35b8fa8457" dependencies = [ - "getrandom 0.2.17", - "once_cell", + "getrandom 0.4.3", "tiny-keccak", ] @@ -1095,19 +1113,6 @@ dependencies = [ "libc", ] -[[package]] -name = "core-graphics2" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4416167a69126e617f8d0a214af0e3c1dbdeffcb100ddf72dcd1a1ac9893c146" -dependencies = [ - "bitflags 2.13.2", - "block", - "cfg-if", - "core-foundation 0.10.0", - "libc", -] - [[package]] name = "core-text" version = "21.0.0" @@ -1120,59 +1125,12 @@ dependencies = [ "libc", ] -[[package]] -name = "core-video" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "139679cc63eb9504bdbe37e37874b0247136177655f0008588781e90863afa62" -dependencies = [ - "block", - "core-foundation 0.10.0", - "core-graphics2", - "io-surface", - "libc", - "metal", -] - [[package]] name = "core_detect" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f8f80099a98041a3d1622845c271458a2d73e688351bf3cb999266764b81d48" -[[package]] -name = "core_maths" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77745e017f5edba1a9c1d854f6f3a52dac8a12dd5af5d2f54aecf61e43d80d30" -dependencies = [ - "libm", -] - -[[package]] -name = "cosmic-text" -version = "0.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be17b688510d934ce13f48a2beba700e11583e281e0fda99c22bb256a14eda73" -dependencies = [ - "bitflags 2.13.2", - "fontdb 0.23.0", - "harfrust 0.5.2", - "linebender_resource_handle", - "log", - "rangemap", - "rustc-hash 2.1.3", - "self_cell", - "skrifa 0.40.0", - "smol_str", - "swash", - "sys-locale", - "unicode-bidi", - "unicode-linebreak", - "unicode-script", - "unicode-segmentation", -] - [[package]] name = "cpufeatures" version = "0.2.17" @@ -1193,9 +1151,9 @@ dependencies = [ [[package]] name = "crc32fast" -version = "1.5.2" +version = "1.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01a7799fd6b852db0e61728dde9a204c423b44d689dbd432522543614b490e78" +checksum = "fd9ae8fcb3ea71b0b26338b4ffb13006bb175de8fd07921089a906ce7e5e6945" dependencies = [ "cfg-if", ] @@ -1250,11 +1208,20 @@ dependencies = [ "typenum", ] +[[package]] +name = "crypto-common" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce6e4c961d6cd6c9a86db418387425e8bdeaf05b3c8bc1411e6dca4c252f1453" +dependencies = [ + "hybrid-array", +] + [[package]] name = "ctor" -version = "1.0.13" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "914a755b7c2d4af2bdcff7ce1739e2db9a1b81a9b07123d8015786ae03c0980d" +checksum = "ea691ed9f36489d087419b8b2ba3ef27d89621380b4178c73e2445a379e4e0f4" dependencies = [ "link-section", "linktime-proc-macro", @@ -1262,14 +1229,14 @@ dependencies = [ [[package]] name = "curve25519-dalek" -version = "4.1.3" +version = "5.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be" +checksum = "94c1aa5a9b7626ed65ac0cf5ea9d4f1547af89017fbac20bd4de40022fff516f" dependencies = [ "cfg-if", - "cpufeatures 0.2.17", + "cpufeatures 0.3.1", "curve25519-dalek-derive", - "digest", + "digest 0.11.3", "fiat-crypto", "rustc_version", "subtle", @@ -1288,26 +1255,51 @@ dependencies = [ ] [[package]] -name = "data-url" -version = "0.3.2" +name = "darling" +version = "0.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be1e0bca6c3637f992fc1cc7cbc52a78c1ef6db076dbf1059c4323d6a2048376" +checksum = "9cdf337090841a411e2a7f3deb9187445851f91b309c0c0a29e05f74a00a48c0" +dependencies = [ + "darling_core", + "darling_macro", +] [[package]] -name = "der" -version = "0.7.10" +name = "darling_core" +version = "0.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7c1832837b905bbfb5101e07cc24c8deddf52f93225eee6ead5f4d63d53ddcb" +checksum = "1247195ecd7e3c85f83c8d2a366e4210d588e802133e1e355180a9870b517ea4" dependencies = [ - "const-oid", - "zeroize", + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 2.0.119", +] + +[[package]] +name = "darling_macro" +version = "0.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d38308df82d1080de0afee5d069fa14b0326a88c14f15c5ccda35b4a6c414c81" +dependencies = [ + "darling_core", + "quote", + "syn 2.0.119", ] +[[package]] +name = "data-url" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be1e0bca6c3637f992fc1cc7cbc52a78c1ef6db076dbf1059c4323d6a2048376" + [[package]] name = "deranged" -version = "0.5.8" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cd812cc2bc1d69d4764bd80df88b4317eaef9e773c75226407d9bc0876b211c" +checksum = "9e9de72ce2ad1f90dc62fa25f0f430ef85eb4b0d8fa0be4f30373bc40a21d28e" [[package]] name = "derive_more" @@ -1332,17 +1324,40 @@ dependencies = [ "unicode-xid", ] +[[package]] +name = "derive_setters" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7e6f6fa1f03c14ae082120b84b3c7fbd7b8588d924cf2d7c3daf9afd49df8b9" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn 2.0.119", +] + [[package]] name = "digest" version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ - "block-buffer", - "crypto-common", + "block-buffer 0.10.4", + "crypto-common 0.1.7", "subtle", ] +[[package]] +name = "digest" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1dd6dbb5841937940781866fa1281a1ff7bd3bf827091440879f9994983d5c2" +dependencies = [ + "block-buffer 0.12.1", + "const-oid", + "crypto-common 0.2.2", +] + [[package]] name = "dirs" version = "5.0.1" @@ -1382,7 +1397,7 @@ dependencies = [ "libc", "option-ext", "redox_users 0.5.3", - "windows-sys 0.61.2", + "windows-sys 0.101.0", ] [[package]] @@ -1399,8 +1414,7 @@ checksum = "1e0e367e4e7da84520dedcac1901e4da967309406d1e51017ae1abfb97adbd38" dependencies = [ "bitflags 2.13.2", "block2 0.6.2", - "libc", - "objc2 0.6.4", + "objc2 0.6.5", ] [[package]] @@ -1411,7 +1425,7 @@ checksum = "c6232dd377dcc64799954cbd3a9bb882e9cdc1308ccd87b1c098f1fb2eaf82a8" dependencies = [ "proc-macro2", "quote", - "syn 3.0.6", + "syn 3.0.10", ] [[package]] @@ -1464,53 +1478,51 @@ checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555" [[package]] name = "ed25519" -version = "2.2.3" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" +checksum = "29fcf32e6c73d1079f83ab4d782de2d81620346a5f38c6237a86a22f8368980a" dependencies = [ - "pkcs8", "signature", ] [[package]] name = "ed25519-dalek" -version = "2.2.0" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70e796c081cee67dc755e1a36a0a172b897fab85fc3f6bc48307991f64e4eca9" +checksum = "6ebaa1a2bf1290ab3bfe5a7b771d050ebffab2711c19a81691c683a5144a25de" dependencies = [ "curve25519-dalek", "ed25519", - "serde", - "sha2", + "sha2 0.11.3", "subtle", "zeroize", ] [[package]] name = "either" -version = "1.18.0" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "252afb9ae5eaa683babdc6a068b3f5726eb19e05070c731f9b2a23a7c3e8ed34" +checksum = "0e9c71c2167ca323c882b99918929403426e2373ea17242ff5653e0d5e1058be" [[package]] name = "embed-resource" -version = "3.0.11" +version = "3.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbfdaacccebec3b28e4866b8973543c7647797db5ada1bdab552e48fe665fbbd" +checksum = "6168487b5e7eb2673e6efe1200b1848016e436a6ca0b8031bf04bd9d493a249f" dependencies = [ "cc", "memchr", "rustc_version", - "toml 1.1.6+spec-1.1.0", + "toml", "vswhom", "winreg", ] [[package]] name = "encoding_rs" -version = "0.8.42" +version = "0.8.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e985e0451871ad22fb8d2b6b076e2028a502a0d3950998c2c5c0a4f9b5d9679" +checksum = "89253175e704ab869b04f9db224d38630e0211a53841a79181deae0889e169f5" dependencies = [ "cfg-if", "core_detect", @@ -1558,6 +1570,16 @@ dependencies = [ "syn 2.0.119", ] +[[package]] +name = "env_filter" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bf3c259d255ca70051b30e2e95b5446cdb8949ac4cd22c0d7fd634d89f568e2" +dependencies = [ + "log", + "regex", +] + [[package]] name = "equator" version = "0.4.2" @@ -1580,15 +1602,15 @@ dependencies = [ [[package]] name = "equivalent" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" +checksum = "00d174d5400e5e8fd687ad1049e2f578285fa914201b1af7e8b112a4546bd826" [[package]] name = "erased-serde" -version = "0.4.10" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2add8a07dd6a8d93ff627029c51de145e12686fbc36ecb298ac22e74cf02dec" +checksum = "1e59b668157f32d3459d4bd634861a06ffa2503a461ca5f0916b9f0252605e66" dependencies = [ "serde", "serde_core", @@ -1597,9 +1619,9 @@ dependencies = [ [[package]] name = "errno" -version = "0.3.14" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" +checksum = "e35d6e78f4cebb90e51d543db8fe41528851d6deeef6ef21ebd4bfdc1e784776" dependencies = [ "libc", "windows-sys 0.61.2", @@ -1646,17 +1668,15 @@ dependencies = [ [[package]] name = "exr" -version = "1.74.2" +version = "1.74.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "711fe42c9964295e01ee3fba3f9fe0e1d24b98886950d68efe81b1c76e21adf3" +checksum = "cb29d0be702adf92c645d9b2f93472906ba83d400e59f98adb3770ce5c18c2f6" dependencies = [ "bit_field", "half", "lebe", "miniz_oxide 0.8.9", - "num-complex", - "pulp", - "rayon-core", + "multiversion", "smallvec", "zune-inflate", ] @@ -1666,6 +1686,9 @@ name = "fastrand" version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da7c62ceae207dd37ea5b845da6a0696c799f85e97da1ab5b7910be3c1c80223" +dependencies = [ + "getrandom 0.4.3", +] [[package]] name = "fax" @@ -1684,9 +1707,9 @@ dependencies = [ [[package]] name = "fiat-crypto" -version = "0.2.9" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" +checksum = "64cd1e32ddd350061ae6edb1b082d7c54915b5c672c389143b9a63403a109f24" [[package]] name = "filedescriptor" @@ -1701,21 +1724,15 @@ dependencies = [ [[package]] name = "find-msvc-tools" -version = "0.1.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aedcfb3409746eddb02b9e19ebda1c3394f759a152e48ee875a0844d1b955484" - -[[package]] -name = "fixedbitset" -version = "0.5.7" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d674e81391d1e1ab681a28d99df07927c6d4aa5b027d7da16ba32d1d21ecd99" +checksum = "3e44f110d1777dc6559a51e7d45083945ded4f1bf3305494350f693b6d20b9c8" [[package]] name = "flate2" -version = "1.1.10" +version = "1.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e634e2e0ebac1ee034020da1ca582e17ffe4e0f5e985823721e168928136dcb" +checksum = "626d4928326b646e70f65ed36fc7cf9f206bdb68a0019ee7c6b4709da4e084c4" dependencies = [ "crc32fast", "miniz_oxide 0.9.1", @@ -1742,16 +1759,22 @@ checksum = "8bf7cc16383c4b8d58b9905a8509f02926ce3058053c056376248d958c9df1e8" [[package]] name = "flume" -version = "0.11.1" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0e4dd2a88388a1f4ccc7c9ce104604dab68d9f408dc34cd45823d5a9069095" +checksum = "5e139bc46ca777eb5efaf62df0ab8cc5fd400866427e56c68b22e414e53bd3be" dependencies = [ + "fastrand", "futures-core", "futures-sink", - "nanorand", "spin 0.9.9", ] +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + [[package]] name = "foldhash" version = "0.1.5" @@ -1766,18 +1789,9 @@ checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb" [[package]] name = "font-types" -version = "0.11.3" +version = "0.12.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b38ad915f6dadd993ced50848a8291a543bd41ca62bc10740d5e64e2ab4cfd7" -dependencies = [ - "bytemuck", -] - -[[package]] -name = "font-types" -version = "0.12.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8eb065f3251655b3c90e22e5e363f310fc5332fb3402e37bbc94752283248f6" +checksum = "835ae9d781464a79026cde387f9cbc650c9a4909d7cf7e658b127e3c35d2f35d" dependencies = [ "bytemuck", ] @@ -1793,29 +1807,37 @@ dependencies = [ [[package]] name = "fontdb" -version = "0.23.0" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "457e789b3d1202543297a350643cf459f836cade38934e7a4cf6a39e7cde2905" +checksum = "2660c5e9157bf76d2db1294e4a9feba604ef610819a3b591088d0d8392a3290f" dependencies = [ "fontconfig-parser", "log", "memmap2", "slotmap", "tinyvec", - "ttf-parser", ] [[package]] -name = "fontdb" -version = "0.24.0" +name = "fontique" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2660c5e9157bf76d2db1294e4a9feba604ef610819a3b591088d0d8392a3290f" +checksum = "6688bc1294fe7117d788937b6c53480169b29c566954af490830d4c09da9516a" dependencies = [ - "fontconfig-parser", - "log", + "hashbrown 0.17.2", + "linebender_resource_handle", "memmap2", - "slotmap", - "tinyvec", + "objc2 0.6.5", + "objc2-core-foundation", + "objc2-core-text", + "objc2-foundation 0.3.2", + "parlance", + "read-fonts", + "roxmltree 0.21.2", + "smallvec", + "windows 0.62.2", + "windows-core 0.62.2", + "yeslogic-fontconfig-sys", ] [[package]] @@ -1836,7 +1858,7 @@ checksum = "ea5190182e6915eb873ddbc16e23b711b6eb1f9c00a0d0a3a91b5f6228475225" dependencies = [ "proc-macro2", "quote", - "syn 3.0.6", + "syn 3.0.10", ] [[package]] @@ -1847,9 +1869,9 @@ checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" [[package]] name = "form_urlencoded" -version = "1.2.2" +version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" +checksum = "afa489199eaffb1211795df1c6236ce1ad0d41a6fa45250add73e3b02420f06e" dependencies = [ "percent-encoding", ] @@ -1865,15 +1887,6 @@ dependencies = [ "pkg-config", ] -[[package]] -name = "fsevent-sys" -version = "4.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76ee7a02da4d231650c7cea31349b889be2f45ddb3ef3032d2ec8185f6313fd2" -dependencies = [ - "libc", -] - [[package]] name = "futures" version = "0.3.34" @@ -1899,19 +1912,6 @@ dependencies = [ "futures-sink", ] -[[package]] -name = "futures-concurrency" -version = "7.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "175cd8cca9e1d45b87f18ffa75088f2099e3c4fe5e2f83e42de112560bea8ea6" -dependencies = [ - "fixedbitset", - "futures-core", - "futures-lite", - "pin-project", - "smallvec", -] - [[package]] name = "futures-core" version = "0.3.34" @@ -1937,9 +1937,9 @@ checksum = "53c0fa8157de1303bfffdaa1cc2a673bfffb60102f76b0ef4441659124373fed" [[package]] name = "futures-lite" -version = "2.6.1" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f78e10609fe0e0b3f4157ffab1876319b5b0db102a2c60dc4626306dc46b44ad" +checksum = "28aadd44bf60a243dd4f49b467a5ff30fee9e4dbaed326795d433ffa8a561730" dependencies = [ "fastrand", "futures-core", @@ -1956,7 +1956,7 @@ checksum = "9fb9654ba8355388abeb8dcb4fc62f511300867002afc858860463bdd9fe0c44" dependencies = [ "proc-macro2", "quote", - "syn 3.0.6", + "syn 3.0.10", ] [[package]] @@ -2004,7 +2004,7 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bd49230192a3797a9a4d6abe9b3eed6f7fa4c8a8a4947977c6f80025f92cbd8" dependencies = [ - "rustix 1.1.5", + "rustix 1.1.6", "windows-link 0.2.1", ] @@ -2061,9 +2061,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.32.3" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e629b9b98ef3dd8afe6ca2bd0f89306cec16d43d907889945bc5d6687f2f13c7" +checksum = "1033caf0b349c518623b5396bfb2cf0bddf44f0306d543a250e5743297aafd10" [[package]] name = "gl_generator" @@ -2077,10 +2077,10 @@ dependencies = [ ] [[package]] -name = "glob" -version = "0.3.4" +name = "glam" +version = "0.30.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4eba85ea1d0a966a983acd07deee566e67395d2d96b6fb39e62b5a833f1eb0b" +checksum = "19fc433e8437a212d1b6f1e68c7824af3aed907da60afa994e7f542d18d12aa9" [[package]] name = "glow" @@ -2139,37 +2139,25 @@ dependencies = [ [[package]] name = "gpui-ce" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0af79c6659e0fea67773cfbd751fc5c8e51be00139827f365d7d1237a468a4d" +version = "0.3.0" +source = "git+https://github.com/404oops/vampir.git?rev=64ce7c0e377ca48f4c36570d820c8360293e3d6c#64ce7c0e377ca48f4c36570d820c8360293e3d6c" dependencies = [ "accesskit", "anyhow", "async-channel", "async-task", - "bindgen", + "backtrace", "bitflags 2.13.2", - "block", - "cbindgen", "chrono", - "cocoa 0.26.0", - "cocoa-foundation 0.2.0", - "core-foundation 0.10.0", - "core-foundation-sys", - "core-graphics 0.24.0", - "core-text", - "core-video", "ctor", "derive_more", + "derive_setters", "embed-resource", "etagere", - "foreign-types", "futures", - "futures-concurrency", "getrandom 0.3.4", "gpui_ce_collections", "gpui_ce_macros", - "gpui_ce_media", "gpui_ce_refineable", "gpui_ce_scheduler", "gpui_ce_shared_string", @@ -2179,20 +2167,19 @@ dependencies = [ "http", "image", "inventory", - "itertools 0.14.0", + "itertools", + "libc", "log", "lyon", - "mach2", - "metal", "num_cpus", - "objc", + "objc2-core-foundation", + "objc2-core-video", "palette", "parking", "parking_lot", - "pathfinder_geometry", + "phf", "pin-project", - "pollster 0.4.0", - "postage", + "pollster", "profiling", "rand 0.9.5", "raw-window-handle", @@ -2202,30 +2189,74 @@ dependencies = [ "seahash", "serde", "serde_json", - "skrifa 0.46.2", + "skrifa", "slotmap", "smallvec", "spin 0.10.1", - "stacksafe", - "strum", + "strum 0.28.0", "taffy", "thiserror 2.0.21", + "tracing", + "ttf-parser", + "unicode-bidi", "unicode-segmentation", "url", "usvg", "uuid", "waker-fn", - "web-time", + "windows 0.61.3", "windows 0.62.2", +] + +[[package]] +name = "gpui_ce_apple" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa083d7db19daf89b46955f73b86712790f5b29658e83636344f12ec218031e2" +dependencies = [ + "anyhow", + "async-task", + "block2 0.6.2", + "core-foundation 0.10.0", + "core-foundation-sys", + "core-graphics 0.24.0", + "core-text", + "derive_more", + "dispatch2", + "etagere", + "foreign-types", + "futures", + "gpui-ce", + "gpui_ce_collections", + "gpui_ce_parley", + "gpui_ce_render", + "gpui_ce_util", + "image", + "libc", + "log", + "mach2", + "metal", + "objc2 0.6.5", + "objc2-core-foundation", + "objc2-core-video", + "objc2-foundation 0.3.2", + "objc2-metal 0.3.2", + "objc2-quartz-core 0.3.2", + "objc2-security", + "parking_lot", + "pathfinder_geometry", + "skrifa", + "smallvec", + "thiserror 2.0.21", + "wgsl-rs", "zed-font-kit", - "zed-scap", ] [[package]] name = "gpui_ce_collections" -version = "0.2.2" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3f707750f990017957611d0909c1a53c6bd7b7c6cfb2fd8095141c99afa2a49" +checksum = "9a50a4b92bb986496158b619d9b0bc730dc5dcdb27f6cbc84359227e0b70894b" dependencies = [ "gpui_ce_util", "indexmap", @@ -2234,9 +2265,9 @@ dependencies = [ [[package]] name = "gpui_ce_derive_refineable" -version = "0.2.2" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a399d81b69ae3cec57ab87c3e2f2a415b443481195dd091256abca771c377d2b" +checksum = "f2093181860ea347ba22f9645aac164becd52ce5ac157a1f9ccce5a07b01cea9" dependencies = [ "proc-macro2", "quote", @@ -2244,10 +2275,32 @@ dependencies = [ ] [[package]] -name = "gpui_ce_linux" -version = "0.1.0" +name = "gpui_ce_ios" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab947c84c6460f6431c99bd6a8b0954591bfa511c0006515ecc3897e7a903c84" +checksum = "380935ab92414a1c1c054e3a217b032a0012d1128c662e94005785cfd8cf7086" +dependencies = [ + "accesskit_ios", + "anyhow", + "block2 0.6.2", + "futures", + "gpui-ce", + "gpui_ce_apple", + "log", + "objc2 0.6.5", + "objc2-core-foundation", + "objc2-foundation 0.3.2", + "objc2-quartz-core 0.3.2", + "objc2-ui-kit 0.3.2", + "parking_lot", + "raw-window-handle", + "uuid", +] + +[[package]] +name = "gpui_ce_linux" +version = "0.3.0" +source = "git+https://github.com/404oops/vampir.git?rev=64ce7c0e377ca48f4c36570d820c8360293e3d6c#64ce7c0e377ca48f4c36570d820c8360293e3d6c" dependencies = [ "accesskit", "accesskit_unix", @@ -2262,24 +2315,22 @@ dependencies = [ "futures", "gpui-ce", "gpui_ce_collections", + "gpui_ce_parley", "gpui_ce_util", "gpui_ce_wgpu", "image", - "itertools 0.14.0", + "itertools", "libc", "log", + "memfd", "notify-rust", "oo7", "open", "parking_lot", - "pathfinder_geometry", - "pollster 0.4.0", - "profiling", "raw-window-handle", "smallvec", "smol", - "strum", - "swash", + "strum 0.28.0", "url", "uuid", "wayland-backend", @@ -2297,111 +2348,154 @@ dependencies = [ [[package]] name = "gpui_ce_macos" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af0fe6b615e579ce0180198417815547c1c9ae654dc1e2382299f0c3f3564f79" +version = "0.3.0" +source = "git+https://github.com/404oops/vampir.git?rev=64ce7c0e377ca48f4c36570d820c8360293e3d6c#64ce7c0e377ca48f4c36570d820c8360293e3d6c" dependencies = [ "accesskit", "accesskit_macos", "anyhow", - "async-task", - "block", "block2 0.6.2", - "cbindgen", "cocoa 0.26.0", "core-foundation 0.10.0", "core-foundation-sys", "core-graphics 0.24.0", "core-text", - "core-video", "ctor", - "derive_more", "dispatch2", "etagere", "foreign-types", "futures", "gpui-ce", + "gpui_ce_apple", "gpui_ce_collections", - "gpui_ce_media", + "gpui_ce_parley", + "gpui_ce_scheduler", "gpui_ce_util", "image", - "itertools 0.14.0", - "libc", + "itertools", "log", - "mach2", "metal", "objc", - "objc2 0.6.4", + "objc2 0.6.5", "objc2-app-kit 0.3.2", + "objc2-core-video", "objc2-foundation 0.3.2", - "objc2-user-notifications", + "objc2-user-notifications 0.3.2", "palette", "parking_lot", - "pathfinder_geometry", "raw-window-handle", "semver", + "skrifa", "smallvec", - "strum", + "strum 0.28.0", + "url", "uuid", "zed-font-kit", ] [[package]] name = "gpui_ce_macros" -version = "0.1.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92b8dc0ee902563235e47809c403e1d59b1beb53a7dc916e66f2f7864ac41483" +checksum = "3b28e8c6c9f75c3cc2c3d07918572ff9d8f78bd61a72b1a545bea88daefbb978" dependencies = [ - "heck 0.5.0", + "heck", "proc-macro2", "quote", "syn 2.0.119", ] [[package]] -name = "gpui_ce_media" -version = "0.2.2" +name = "gpui_ce_mobile" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c67e75d8c59ca24f95df41dd102aa7b4c93d306046ec0f2aa15c7f16022283c" +checksum = "7a1d3851dba337d09aa5e0a0ba1f0a68459f87b0948280addf2544bab3c869c2" dependencies = [ + "accesskit", + "accesskit_android", + "android-activity", + "android_logger", "anyhow", - "bindgen", - "core-foundation 0.10.0", - "core-video", - "ctor", - "foreign-types", - "metal", - "objc", + "futures", + "gpui-ce", + "gpui_ce_parley", + "gpui_ce_wgpu", + "jni 0.22.4", + "libc", + "log", + "memmap2", + "ndk", + "ndk-context", + "ndk-sys", + "parking_lot", + "raw-window-handle", + "rustc-hash 2.1.3", + "smallvec", + "uuid", +] + +[[package]] +name = "gpui_ce_parley" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2254b91da65d1e8823708275347e88a83141dbb9cb58d3ab0736168ea4d9673c" +dependencies = [ + "anyhow", + "fontique", + "gpui-ce", + "parking_lot", + "parley", + "skrifa", + "swash", + "unicode-segmentation", ] [[package]] name = "gpui_ce_platform" -version = "0.1.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42fc3ad60af3e375b224e701a3e5db31f4def8e3a1099899882e937a9e9c12e9" +checksum = "9e195209c604737d67a1d9ae56345209cd1a6d74abe45f8f3f16c31e278440b3" dependencies = [ + "anyhow", "console_error_panic_hook", "gpui-ce", + "gpui_ce_apple", + "gpui_ce_ios", "gpui_ce_linux", "gpui_ce_macos", + "gpui_ce_mobile", "gpui_ce_web", "gpui_ce_windows", ] [[package]] name = "gpui_ce_refineable" -version = "0.2.2" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "536a08dd1678cede87b6f91d58fc7dcfcb37c4d46075954d55db0b120b28dc28" +checksum = "bc760d0665a16cd3058a4076a02ed7b7422102bac4c8551ec13943599f586a98" dependencies = [ "gpui_ce_derive_refineable", ] +[[package]] +name = "gpui_ce_render" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b326f0a39d3ca9c3e40efa3156bf4d371158e1c2281258bb6dafd97a6f321ca" +dependencies = [ + "gpui-ce", + "naga 24.0.0", + "naga 29.0.4", + "smallvec", + "wgsl-rs", + "windows 0.62.2", +] + [[package]] name = "gpui_ce_scheduler" -version = "0.2.2" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ba0e1b5482fa9bc8ee71117c981e4d9afc5511624bedd9454040c95aca26091" +checksum = "09be7fb293688e06a2ea871715fbb57fdb9e17f88d8629ed53c9ee1a60e69515" dependencies = [ "async-task", "backtrace", @@ -2410,14 +2504,15 @@ dependencies = [ "futures", "parking_lot", "rand 0.9.5", + "wasm_thread", "web-time", ] [[package]] name = "gpui_ce_shared_string" -version = "0.1.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eadabf028fc7322e74aa5d823defca7441d335cfd3592fb0ba3af1b0532e39da" +checksum = "5310ad372bd963a7fb527fda31bfb75e6ed86b7f44e2e076ced47d0e28d655eb" dependencies = [ "schemars", "serde", @@ -2426,9 +2521,9 @@ dependencies = [ [[package]] name = "gpui_ce_sum_tree" -version = "0.2.2" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e5462a23e7ff0d4ca09f585b6de33d9ef6c302d57106fac5f6a3cc35bdf9e8f" +checksum = "56017a4f9a24251a1ef38715b1e9a415be7066410a7e6002bb3267544740736f" dependencies = [ "heapless", "log", @@ -2438,9 +2533,9 @@ dependencies = [ [[package]] name = "gpui_ce_util" -version = "0.2.6" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3214d3b3693a92cc8caf5547cedeb2f0bd5498be5475261e48dd0482bf9514a0" +checksum = "89433e8e93ee8684fc076dab4b8fc1085ca2fadbe4f42c28311940afae61ef1d" dependencies = [ "anyhow", "log", @@ -2449,14 +2544,16 @@ dependencies = [ [[package]] name = "gpui_ce_web" -version = "0.1.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac03c593fc6ee1957a7a55594b506ff6218662ea4a20523407252c2b5d570c01" +checksum = "f887b0a426caf694fcc7ef204c5bf344236b8ff6bddf354e35426506073da29c" dependencies = [ "anyhow", "console_error_panic_hook", "futures", "gpui-ce", + "gpui_ce_parley", + "gpui_ce_scheduler", "gpui_ce_wgpu", "http", "js-sys", @@ -2466,46 +2563,49 @@ dependencies = [ "uuid", "wasm-bindgen", "wasm-bindgen-futures", + "wasm_thread", "web-sys", "web-time", ] [[package]] name = "gpui_ce_wgpu" -version = "0.1.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d986e05a9106ac0ecf048f9b5a4a6b030d6b538836dc3ad0a0686da01d4a830" +checksum = "d3168d4877f63a3e4a36dce067dd3c19d6df5604be3ac0d357da2aedc9e44db0" dependencies = [ "anyhow", - "bytemuck", - "cosmic-text", "etagere", "gpui-ce", "gpui_ce_collections", + "gpui_ce_render", "gpui_ce_util", - "itertools 0.14.0", "js-sys", "log", + "metal", + "objc2 0.6.5", + "objc2-core-foundation", + "objc2-core-video", + "objc2-io-surface", + "objc2-metal 0.3.2", "parking_lot", - "pollster 0.4.0", + "pollster", "profiling", "raw-window-handle", "smallvec", - "swash", - "unicode-bidi", - "unicode-segmentation", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", "wgpu", - "zed-font-kit", + "wgsl-rs", + "windows 0.61.3", + "windows 0.62.2", ] [[package]] name = "gpui_ce_windows" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "063326fe043ef3f51b0b36877e8d9f9af0e20d6dfe51efcb275a3cd380128e02" +version = "0.3.0" +source = "git+https://github.com/404oops/vampir.git?rev=64ce7c0e377ca48f4c36570d820c8360293e3d6c#64ce7c0e377ca48f4c36570d820c8360293e3d6c" dependencies = [ "accesskit", "accesskit_windows", @@ -2515,27 +2615,26 @@ dependencies = [ "futures", "gpui-ce", "gpui_ce_collections", + "gpui_ce_parley", + "gpui_ce_render", + "gpui_ce_scheduler", "gpui_ce_util", "image", - "itertools 0.14.0", + "itertools", "log", "parking_lot", "rand 0.9.5", "raw-window-handle", "smallvec", "uuid", + "wgsl-rs", + "windows 0.61.3", "windows 0.62.2", "windows-core 0.62.2", "windows-numerics 0.3.1", "windows-registry", ] -[[package]] -name = "grid" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b40ca9252762c466af32d0b1002e91e4e1bc5398f77455e55474deb466355ff5" - [[package]] name = "half" version = "2.7.1" @@ -2548,19 +2647,6 @@ dependencies = [ "zerocopy", ] -[[package]] -name = "harfrust" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9da2e5ae821f6e96664977bf974d6d6a2d6682f9ccee23e62ec1d134246845f9" -dependencies = [ - "bitflags 2.13.2", - "bytemuck", - "core_maths", - "read-fonts 0.37.0", - "smallvec", -] - [[package]] name = "harfrust" version = "0.12.0" @@ -2569,7 +2655,7 @@ checksum = "c03d949a14aa089bbb282f7dd76a498a7f684428e4257202efc119ec010376f9" dependencies = [ "bitflags 2.13.2", "bytemuck", - "read-fonts 0.41.0", + "read-fonts", "smallvec", ] @@ -2610,26 +2696,23 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.17.1" +version = "0.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a" +checksum = "735eaa21a6a5ffb2e84362faaeb90c05ba8e19797ca30428478cb6ea3a4921bc" +dependencies = [ + "foldhash 0.2.0", +] [[package]] name = "heapless" -version = "0.9.3" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25ba4bd83f9415b58b4ed8dc5714c76e626a105be4646c02630ad730ad3b5aa4" +checksum = "411fdef4df93751117bd9ef8caa0e7f99c65dafec5bd84313eb8e2fdd75e32f2" dependencies = [ "hash32", "stable_deref_trait", ] -[[package]] -name = "heck" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" - [[package]] name = "heck" version = "0.5.0" @@ -2669,7 +2752,7 @@ version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "digest", + "digest 0.10.7", ] [[package]] @@ -2683,9 +2766,9 @@ dependencies = [ [[package]] name = "http" -version = "1.5.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "918d3568bebf352712bc2ef3d46a8bcf1a75b373be6539de198e9105cbbf9ce0" +checksum = "a07dc2d082802d1782faa5b3c8ac252f3a4fc89f51e76c3f37dc2d1a5b857c05" dependencies = [ "bytes", "itoa", @@ -2720,15 +2803,23 @@ version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" +[[package]] +name = "hybrid-array" +version = "0.4.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27f864f10dfb56725ce5ce5472bc52252c8f93a4ab86327122cebf62c5f59a17" +dependencies = [ + "typenum", +] + [[package]] name = "hyper" -version = "1.11.1" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27b501faa50e7a26c3d3560ca625132f4078a17771f4810baf70475ae48cbe43" +checksum = "229c6ff5584df4c6becbfe00567128bac768c8cd32ebc8a8366bd81ed072e8f3" dependencies = [ "atomic-waker", "bytes", - "futures-channel", "futures-core", "http", "http-body", @@ -2806,9 +2897,9 @@ dependencies = [ [[package]] name = "icu_collections" -version = "2.3.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa68d21081c4a05d5a901a1c62add574c77048b6a1c67be3b50ce0b60d4ca513" +checksum = "fe090a42a0d3140fed8c63263ed1fecc02422cb2f4bfe55cd8de2de1b8e105dd" dependencies = [ "displaydoc", "potential_utf", @@ -2820,22 +2911,43 @@ dependencies = [ [[package]] name = "icu_locale_core" -version = "2.3.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d56e28588da92eee5c3201a6eff33fabdd49b62269c8938d4ff050ce4d900deb" +checksum = "25d29b57c17c6528d0dc4c2141cfa2d08200465acb537a3909c8b9b8a4a984c0" dependencies = [ "displaydoc", "litemap", + "serde", "tinystr", "writeable", "zerovec", ] +[[package]] +name = "icu_locale_fallback" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "406e9ae5b95d8aa37db6293405931b766a6172d1848daee22d70eb44aa78a43c" +dependencies = [ + "icu_locale_core", + "icu_locale_fallback_data", + "icu_provider", + "potential_utf", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_locale_fallback_data" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3632ebbd0c5c3637ba1a40bdf8288f2cb9d2268e73441a69d5fc73d7cfbaa87c" + [[package]] name = "icu_normalizer" -version = "2.3.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12f9cf5f235641ed274641dd81c3f28d870e276763d0797aeeab72317b1c646f" +checksum = "404a3b8c486f205c87fe7f23ab6894d84a4ad76d6e4671ae1981ba7def87c599" dependencies = [ "icu_collections", "icu_normalizer_data", @@ -2847,15 +2959,15 @@ dependencies = [ [[package]] name = "icu_normalizer_data" -version = "2.3.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1563da1ed3e0b3bf3d74c9b85917ac9c56464d2f57242270c09c9e752f8021a0" +checksum = "20f0088bfb7441f7a37fa0c9e20cb1e9cba1cac6b9ce8cd2a6dc44294f8e8cbc" [[package]] name = "icu_properties" -version = "2.3.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e7ca276ad3145661a65914e6daf131ca5120cd3dcee8f8f3214b8875184a148" +checksum = "2ea83d991c56158f7cf898bf86436c1dfe7c07ee82fe88951f2695c9f37a379f" dependencies = [ "displaydoc", "icu_collections", @@ -2868,18 +2980,20 @@ dependencies = [ [[package]] name = "icu_properties_data" -version = "2.3.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e590f038c1464a96894fd6d10127e90a8be4509f56ff7ecef851b15cee0b7caa" +checksum = "b98f29af82d02b163fe50161388350e743bb3107cc8e8c2f7314cb505faddfcf" [[package]] name = "icu_provider" -version = "2.3.1" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d27bbb9d3abbefac45d55f647c9de1d44aafcd1186eb91879afef17c396c3e73" +checksum = "413099315636c588ee8f011190b329b971a09a8fae9d157e01dcae8379468514" dependencies = [ "displaydoc", "icu_locale_core", + "serde", + "stable_deref_trait", "writeable", "yoke", "zerofrom", @@ -2887,6 +3001,35 @@ dependencies = [ "zerovec", ] +[[package]] +name = "icu_segmenter" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61b195dc605f81aa181bec9b3bd14e26cc71b903e4644f6af578ca9772c7a710" +dependencies = [ + "icu_collections", + "icu_locale_fallback", + "icu_provider", + "icu_segmenter_data", + "potential_utf", + "smallvec", + "utf8_iter", + "zerotrie", + "zerovec", +] + +[[package]] +name = "icu_segmenter_data" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "913a7d294ad056474749152107309fdee3ec17d2482d1ab70fdc61a81c64b9a3" + +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + [[package]] name = "idna" version = "1.1.0" @@ -2925,7 +3068,6 @@ dependencies = [ "png", "qoi", "ravif", - "rayon", "rgb", "tiff", "zune-core", @@ -2934,9 +3076,9 @@ dependencies = [ [[package]] name = "image-webp" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "525e9ff3e1a4be2fbea1fdf0e98686a6d98b4d8f937e1bf7402245af1909e8c3" +checksum = "7c8d2831f3eb9706eeac62164959a288f12c047a3c53b353c6c00d5d60eb5c7f" dependencies = [ "byteorder-lite", "quick-error", @@ -2956,9 +3098,9 @@ checksum = "6e44b0a4eaa4c82f441d50a963f2d5f05a787240aeee097597033e72accfd22f" [[package]] name = "immersion" -version = "0.2.8" +version = "0.3.0" dependencies = [ - "base64 0.22.1", + "base64 0.23.1", "block2 0.6.2", "chrono", "dirs 7.0.0", @@ -2969,28 +3111,28 @@ dependencies = [ "ksni", "musit-core", "notify-rust", - "objc2 0.6.4", + "objc2 0.6.5", "objc2-app-kit 0.3.2", "objc2-foundation 0.3.2", "objc2-service-management", - "objc2-uniform-type-identifiers", - "objc2-user-notifications", - "once_cell", + "objc2-uniform-type-identifiers 0.3.2", + "objc2-user-notifications 0.3.2", "raw-window-handle", "reqwest", "resvg", "semver", "serde", "serde_json", - "sha2", + "sha2 0.11.3", "tempfile", + "trash", "unicode-segmentation", "vampir", "windows 0.62.2", "winreg", "winresource", "x11rb", - "zbus", + "zbus 5.19.0", ] [[package]] @@ -3000,7 +3142,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cc4e190f5d26ca7051642629da2c52fc03bde85a03197c99408dcd291734c855" dependencies = [ "equivalent", - "hashbrown 0.17.1", + "hashbrown 0.17.2", "serde", "serde_core", ] @@ -3048,73 +3190,134 @@ dependencies = [ [[package]] name = "inventory" -version = "0.3.24" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6928282826c822ad91bf1c9a1cb90a30ba1c26770749929b4656cd6be829cd7c" +dependencies = [ + "rustversion", +] + +[[package]] +name = "ipnet" +version = "2.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "007d6e6b91097094791302ccc6cd0588e0700ddac5c6829035bcd71eff4dc433" + +[[package]] +name = "is-docker" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "928bae27f42bc99b60d9ac7334e3a21d10ad8f1835a4e12ec3ec0464765ed1b3" +dependencies = [ + "once_cell", +] + +[[package]] +name = "is-wsl" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4f0c30c76f2f4ccee3fe55a2435f691ca00c0e4bd87abe4f4a851b1d4dac39b" +checksum = "173609498df190136aa7dea1a91db051746d339e18476eed5ca40521f02d7aa5" +dependencies = [ + "is-docker", + "once_cell", +] + +[[package]] +name = "itertools" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285" dependencies = [ - "rustversion", + "either", ] [[package]] -name = "io-surface" -version = "0.16.1" +name = "itoa" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "554b8c5d64ec09a3a520fe58e4d48a73e00ff32899cdcbe32a4877afd4968b8e" -dependencies = [ - "cgl", - "core-foundation 0.10.0", - "core-foundation-sys", - "leaky-cow", -] +checksum = "3bd1574e617a9a6c1f8f8181bd7e841e1f20e4277607ef28945765188d6284d4" [[package]] -name = "ipnet" -version = "2.12.2" +name = "jiff" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "791930b43c0d5973160d90a8f3894509f2b273430f5c5c73b668636d0287c5c0" +checksum = "379ed44bd4e16d3926160e2b3a78b79ca0952ef5c037f124f554842ba272ef92" +dependencies = [ + "jiff-core", + "jiff-static", + "log", + "portable-atomic", + "portable-atomic-util", + "serde_core", + "windows-link 0.2.1", +] [[package]] -name = "is-docker" -version = "0.2.0" +name = "jiff-core" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "928bae27f42bc99b60d9ac7334e3a21d10ad8f1835a4e12ec3ec0464765ed1b3" +checksum = "0df46fc314b4f458aee614afcd8676ed6cb3637413aa359d47d2646cbc038b79" dependencies = [ - "once_cell", + "log", ] [[package]] -name = "is-wsl" -version = "0.4.0" +name = "jiff-static" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "173609498df190136aa7dea1a91db051746d339e18476eed5ca40521f02d7aa5" +checksum = "27b729c549d3efb5855b3c80b0ee8ee1850d56330a127382fe2760965741c1f3" dependencies = [ - "is-docker", - "once_cell", + "jiff-core", + "proc-macro2", + "quote", + "syn 3.0.10", ] [[package]] -name = "itertools" -version = "0.13.0" +name = "jni" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97" dependencies = [ - "either", + "cesu8", + "cfg-if", + "combine", + "jni-sys 0.3.1", + "log", + "thiserror 1.0.69", + "walkdir", + "windows-sys 0.45.0", ] [[package]] -name = "itertools" -version = "0.14.0" +name = "jni" +version = "0.22.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285" +checksum = "5efd9a482cf3a427f00d6b35f14332adc7902ce91efb778580e180ff90fa3498" dependencies = [ - "either", + "cfg-if", + "combine", + "jni-macros", + "jni-sys 0.4.1", + "log", + "simd_cesu8", + "thiserror 2.0.21", + "walkdir", + "windows-link 0.2.1", ] [[package]] -name = "itoa" -version = "1.0.18" +name = "jni-macros" +version = "0.22.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" +checksum = "a00109accc170f0bdb141fed3e393c565b6f5e072365c3bd58f5b062591560a3" +dependencies = [ + "proc-macro2", + "quote", + "rustc_version", + "simd_cesu8", + "syn 2.0.119", +] [[package]] name = "jni-sys" @@ -3156,9 +3359,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.106" +version = "0.3.107" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7883d941dae510fb2d978fc3fe018c71c9e2892fd38854de3e8b92c2e5ad9cc5" +checksum = "8dc09d2154098bbf4ef54eab6b117a3c24cbbffe94046b16ee6d6d4510584d3a" dependencies = [ "cfg-if", "futures-util", @@ -3204,15 +3407,17 @@ dependencies = [ [[package]] name = "ksni" -version = "0.3.6" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "814b44c24cd2cb236c3b8a41c7f08237b452a8e76ecaa81f1cec40b5b678215b" +checksum = "d49a7ac89853917f01d75f6bac3e7c8e282ae621dd63fbbfc50fe331304fa580" dependencies = [ + "arc-swap", + "crossbeam-queue", "futures-util", "pastey 0.2.3", "serde", "tokio", - "zbus", + "zbus 5.19.0", ] [[package]] @@ -3229,24 +3434,9 @@ dependencies = [ [[package]] name = "lazy_static" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" - -[[package]] -name = "leak" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd100e01f1154f2908dfa7d02219aeab25d0b9c7fa955164192e3245255a0c73" - -[[package]] -name = "leaky-cow" -version = "0.1.1" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40a8225d44241fd324a8af2806ba635fc7c8a7e9a7de4d5cf3ef54e71f5926fc" -dependencies = [ - "leak", -] +checksum = "20870f649af7073d53e38067b2a84312175d56ea15217e1b15bc83506ec50afb" [[package]] name = "lebe" @@ -3256,9 +3446,9 @@ checksum = "7a79a3332a6609480d7d0c9eab957bca6b455b91bb84e66d19f5ff66294b85b8" [[package]] name = "libc" -version = "0.2.189" +version = "0.2.191" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3eaf3ede3fee6db1a4c2ee091bf8a8b4dccdc6d17f656fb07896ee72867612f2" +checksum = "65cd87c9a6d60536580b316ad985726104730a5151c99845f2490428ef91240a" [[package]] name = "libfuzzer-sys" @@ -3303,9 +3493,9 @@ checksum = "d4a5ff6bcca6c4867b1c4fd4ef63e4db7436ef363e0ad7531d1558856bae64f4" [[package]] name = "link-section" -version = "0.19.3" +version = "0.19.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39c29a617ce3df32c08497bdc1ab6e2376e0b17948ac166a2fbe5977c5954cd9" +checksum = "4d9aae57673c1a235149777a74d152f3210ebd3e3b13346d2cdb6809e566bd3c" [[package]] name = "linktime-proc-macro" @@ -3333,9 +3523,9 @@ checksum = "47d9d19d1d6efa0109d2f65ff4c85cddd50bd572e5a00127ab10987290bcefae" [[package]] name = "litrs" -version = "1.0.0" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11d3d7f243d5c5a8b9bb5d6dd2b1602c0cb0b9db1621bafc7ed66e35ff9fe092" +checksum = "02b614978e47ce529faee66579f2b2fe19c94aa96d910a6a9a8043b2b02d8175" [[package]] name = "lock_api" @@ -3348,9 +3538,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.34" +version = "0.4.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9f8bd3e56ce4dfc153cf470fffbfa98c7620958b312ca5c3a4b8d5181fd13c6" +checksum = "5d15f86d12da44cd8d4ec3c73984537eb7f4cadcb9776a575a0a8a05ca11005c" dependencies = [ "serde_core", "value-bag", @@ -3383,9 +3573,9 @@ dependencies = [ [[package]] name = "lyon_algorithms" -version = "1.0.21" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdfa8785f95e57914ddb35e3b59994aeba6f5e79e9cfd03da1c269f010f36009" +checksum = "f3a6b9d4e8b48acd531fbf1241ad9b270df6e60b6b92bdea1469f4f40899d805" dependencies = [ "lyon_path", "num-traits", @@ -3393,9 +3583,9 @@ dependencies = [ [[package]] name = "lyon_geom" -version = "1.0.19" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4336502e29e32af93cf2dad2214ed6003c17ceb5bd499df77b1de663b9042b92" +checksum = "d82dd26aa4dc0b5b70b9115de59824842bcb43cf4a28e1b1e6d0ad148c93f93e" dependencies = [ "arrayvec", "euclid", @@ -3414,9 +3604,9 @@ dependencies = [ [[package]] name = "lyon_tessellation" -version = "1.0.22" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43b8dcf906637ecef61b3c0740c7a4e7f27caeb31257cfac0cc579ce15be6005" +checksum = "fd4872650e70dc907dd4f7ebc449d7d657a0d2658e423b2e724970870bbbf75b" dependencies = [ "float_next_after", "lyon_path", @@ -3431,7 +3621,7 @@ checksum = "fd604973958ddcc11b561193c0fb96ba146506ef2f231ef2e7c35fd2cbc9beca" dependencies = [ "cc", "log", - "objc2 0.6.4", + "objc2 0.6.5", "objc2-foundation 0.3.2", "time", "uuid", @@ -3439,12 +3629,9 @@ dependencies = [ [[package]] name = "mach2" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a1b95cd5421ec55b445b5ae102f5ea0e768de1f82bd3001e11f426c269c3aea" -dependencies = [ - "libc", -] +checksum = "dae608c151f68243f2b000364e1f7b186d9c29845f7d2d85bd31b9ad77ad552b" [[package]] name = "malloc_buf" @@ -3462,7 +3649,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ea1f30cedd69f0a2954655f7188c6a834246d2bcf1e315e2ac40c4b24dc9519" dependencies = [ "cfg-if", - "rayon", ] [[package]] @@ -3472,7 +3658,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" dependencies = [ "cfg-if", - "digest", + "digest 0.10.7", ] [[package]] @@ -3481,11 +3667,20 @@ version = "2.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98" +[[package]] +name = "memfd" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57804b2c9b69967f1536a56f86297e367a33b19e98852ed624b84551cdbc0d90" +dependencies = [ + "rustix 1.1.6", +] + [[package]] name = "memmap2" -version = "0.9.11" +version = "0.9.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1219ed1b7f229ee7104d281dd01d6802fe28bb6e95d292942c4daacdeb798c0" +checksum = "6b0ca1155a9ecc25aa12e8313a119f32edf0255fea2f44839c4ac0a12b2ac157" dependencies = [ "libc", ] @@ -3514,12 +3709,6 @@ dependencies = [ "paste", ] -[[package]] -name = "minimal-lexical" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" - [[package]] name = "miniz_oxide" version = "0.8.9" @@ -3542,9 +3731,9 @@ dependencies = [ [[package]] name = "mio" -version = "1.2.3" +version = "1.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b18443e9c262bfe8fa82f51666e2642c53393f7e5c27b3e1aeab922cff5b9d8" +checksum = "20521a903f02b0a573cd6840e9d0a5a0cc043d361fe924092cd70f8556cc9c4a" dependencies = [ "libc", "log", @@ -3562,6 +3751,28 @@ dependencies = [ "pxfm", ] +[[package]] +name = "multiversion" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb8a68be21d0755f83bfe47e79b896cc732687cf1903f0e50585e8d6ecc53076" +dependencies = [ + "multiversion-macros", + "target-features", +] + +[[package]] +name = "multiversion-macros" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a05e0c3c3e4edaa21d87c645852ed0b0c3663752bcc6ec43353bd6189dce35e1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", + "target-features", +] + [[package]] name = "multiversion_no_op" version = "1.0.0" @@ -3570,20 +3781,40 @@ checksum = "743fb55ba31b18fb1ecef6bdc9aa2743314978ac084044301a7eee33fb99a20d" [[package]] name = "musit-core" -version = "0.2.8" +version = "0.3.0" dependencies = [ "chrono", "dirs 7.0.0", "flate2", "notify", - "once_cell", "regex", "serde", "serde_json", - "sha2", + "sha2 0.11.3", "tempfile", ] +[[package]] +name = "naga" +version = "24.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e380993072e52eef724eddfcde0ed013b0c023c3f0417336ed041aa9f076994e" +dependencies = [ + "arrayvec", + "bit-set 0.8.0", + "bitflags 2.13.2", + "cfg_aliases", + "codespan-reporting 0.11.1", + "hexf-parse", + "indexmap", + "log", + "rustc-hash 1.1.0", + "strum 0.26.3", + "termcolor", + "thiserror 2.0.21", + "unicode-xid", +] + [[package]] name = "naga" version = "29.0.4" @@ -3591,11 +3822,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2bf919621e7975acb27d881bae2fb993e0d45c8e0446e85e6272971e00dc8df" dependencies = [ "arrayvec", - "bit-set", + "bit-set 0.9.1", "bitflags 2.13.2", "cfg-if", "cfg_aliases", - "codespan-reporting", + "codespan-reporting 0.13.1", "half", "hashbrown 0.16.1", "hexf-parse", @@ -3611,14 +3842,26 @@ dependencies = [ ] [[package]] -name = "nanorand" -version = "0.7.0" +name = "ndk" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a51313c5820b0b02bd422f4b44776fbf47961755c74ce64afc73bfad10226c3" +checksum = "c3f42e7bbe13d351b6bead8286a43aac9534b82bd3cc43e47037f012ebfd62d4" dependencies = [ - "getrandom 0.2.17", + "bitflags 2.13.2", + "jni-sys 0.3.1", + "log", + "ndk-sys", + "num_enum", + "raw-window-handle", + "thiserror 1.0.69", ] +[[package]] +name = "ndk-context" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" + [[package]] name = "ndk-sys" version = "0.6.0+11769913" @@ -3643,16 +3886,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "nom" -version = "7.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" -dependencies = [ - "memchr", - "minimal-lexical", -] - [[package]] name = "nom" version = "8.0.0" @@ -3670,41 +3903,43 @@ checksum = "0676bb32a98c1a483ce53e500a81ad9c3d5b3f7c920c28c24e9cb0980d0b5bc8" [[package]] name = "notify" -version = "8.2.0" +version = "9.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d3d07927151ff8575b7087f245456e549fea62edf0ec4e565a5ee50c8402bc3" +checksum = "5482d5bd11b91a337521980e5d52fe115bdccfb4c217099daaf0abd69159dc4e" dependencies = [ "bitflags 2.13.2", - "fsevent-sys", "inotify", "kqueue", "libc", "log", "mio", "notify-types", + "objc2-core-foundation", + "objc2-core-services", "walkdir", - "windows-sys 0.60.2", + "windows-sys 0.61.2", + "xxhash-rust", ] [[package]] name = "notify-rust" -version = "4.18.1" +version = "4.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe430c879247371c47fdedd328ad4e301e6b30b533c5fd5db1c06d75253d0e46" +checksum = "57da5b5d3b7809bf71858da5a2818c3404ca4688c02c8abecdda0fcdec235df3" dependencies = [ "futures-lite", "log", "mac-notification-sys", "serde", "tauri-winrt-notification", - "zbus", + "zbus 6.6.0", ] [[package]] name = "notify-types" -version = "2.1.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42b8cfee0e339a0337359f3c88165702ac6e600dc01c0cc9579a92d62b08477a" +checksum = "cbd044e85df3d939d8e32a1c35a3b737c7d0a4eeb7acd737bd207644e00f4e5f" dependencies = [ "bitflags 2.13.2", ] @@ -3765,7 +4000,6 @@ version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" dependencies = [ - "bytemuck", "num-traits", ] @@ -3836,6 +4070,28 @@ dependencies = [ "libc", ] +[[package]] +name = "num_enum" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d0bca838442ec211fa11de3a8b0e0e8f3a4522575b5c4c06ed722e005036f26" +dependencies = [ + "num_enum_derive", + "rustversion", +] + +[[package]] +name = "num_enum_derive" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "680998035259dcfcafe653688bf2aa6d3e2dc05e98be6ab46afb089dc84f1df8" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.119", +] + [[package]] name = "objc" version = "0.2.7" @@ -3865,9 +4121,9 @@ checksum = "cdb91bdd390c7ce1a8607f35f3ca7151b65afc0ff5ff3b34fa350f7d7c7e4310" [[package]] name = "objc2" -version = "0.5.2" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46a785d4eeff09c14c487497c162e92766fbb3e4059a71840cecc03d9a50b804" +checksum = "19d5490aaf8f1d7cf7688dfa9b0ce07900e168852c45cd2c03f534dfd27cfd0b" dependencies = [ "objc-sys", "objc2-encode", @@ -3875,9 +4131,9 @@ dependencies = [ [[package]] name = "objc2" -version = "0.6.4" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a12a8ed07aefc768292f076dc3ac8c48f3781c8f2d5851dd3d98950e8c5a89f" +checksum = "08849bbd4767dfae9457696856ae1c84fe4e0281bbe4a7abff2d0e06fb7981f8" dependencies = [ "objc2-encode", ] @@ -3891,7 +4147,7 @@ dependencies = [ "bitflags 2.13.2", "block2 0.5.1", "libc", - "objc2 0.5.2", + "objc2 0.5.3", "objc2-core-data 0.2.2", "objc2-core-image 0.2.2", "objc2-foundation 0.2.2", @@ -3907,8 +4163,8 @@ dependencies = [ "bitflags 2.13.2", "block2 0.6.2", "libc", - "objc2 0.6.4", - "objc2-cloud-kit", + "objc2 0.6.5", + "objc2-cloud-kit 0.3.2", "objc2-core-data 0.3.2", "objc2-core-foundation", "objc2-core-graphics", @@ -3917,7 +4173,20 @@ dependencies = [ "objc2-core-video", "objc2-foundation 0.3.2", "objc2-quartz-core 0.3.2", - "objc2-uniform-type-identifiers", + "objc2-uniform-type-identifiers 0.3.2", +] + +[[package]] +name = "objc2-cloud-kit" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74dd3b56391c7a0596a295029734d3c1c5e7e510a4cb30245f8221ccea96b009" +dependencies = [ + "bitflags 2.13.2", + "block2 0.5.1", + "objc2 0.5.3", + "objc2-core-location 0.2.2", + "objc2-foundation 0.2.2", ] [[package]] @@ -3927,10 +4196,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73ad74d880bb43877038da939b7427bba67e9dd42004a18b809ba7d87cee241c" dependencies = [ "bitflags 2.13.2", - "objc2 0.6.4", + "objc2 0.6.5", "objc2-foundation 0.3.2", ] +[[package]] +name = "objc2-contacts" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5ff520e9c33812fd374d8deecef01d4a840e7b41862d849513de77e44aa4889" +dependencies = [ + "block2 0.5.1", + "objc2 0.5.3", + "objc2-foundation 0.2.2", +] + [[package]] name = "objc2-core-data" version = "0.2.2" @@ -3939,7 +4219,7 @@ checksum = "617fbf49e071c178c0b24c080767db52958f716d9eabdf0890523aeae54773ef" dependencies = [ "bitflags 2.13.2", "block2 0.5.1", - "objc2 0.5.2", + "objc2 0.5.3", "objc2-foundation 0.2.2", ] @@ -3950,7 +4230,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b402a653efbb5e82ce4df10683b6b28027616a2715e90009947d50b8dd298fa" dependencies = [ "bitflags 2.13.2", - "objc2 0.6.4", + "objc2 0.6.5", "objc2-foundation 0.3.2", ] @@ -3961,8 +4241,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a180dd8642fa45cdb7dd721cd4c11b1cadd4929ce112ebd8b9f5803cc79d536" dependencies = [ "bitflags 2.13.2", + "block2 0.6.2", "dispatch2", - "objc2 0.6.4", + "libc", + "objc2 0.6.5", ] [[package]] @@ -3973,7 +4255,7 @@ checksum = "e022c9d066895efa1345f8e33e584b9f958da2fd4cd116792e15e07e4720a807" dependencies = [ "bitflags 2.13.2", "dispatch2", - "objc2 0.6.4", + "objc2 0.6.5", "objc2-core-foundation", "objc2-io-surface", ] @@ -3985,7 +4267,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "55260963a527c99f1819c4f8e3b47fe04f9650694ef348ffd2227e8196d34c80" dependencies = [ "block2 0.5.1", - "objc2 0.5.2", + "objc2 0.5.3", "objc2-foundation 0.2.2", "objc2-metal 0.2.2", ] @@ -3996,20 +4278,42 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5d563b38d2b97209f8e861173de434bd0214cf020e3423a52624cd1d989f006" dependencies = [ - "objc2 0.6.4", + "objc2 0.6.5", "objc2-foundation 0.3.2", ] +[[package]] +name = "objc2-core-location" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "000cfee34e683244f284252ee206a27953279d370e309649dc3ee317b37e5781" +dependencies = [ + "block2 0.5.1", + "objc2 0.5.3", + "objc2-contacts", + "objc2-foundation 0.2.2", +] + [[package]] name = "objc2-core-location" version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca347214e24bc973fc025fd0d36ebb179ff30536ed1f80252706db19ee452009" dependencies = [ - "objc2 0.6.4", + "objc2 0.6.5", "objc2-foundation 0.3.2", ] +[[package]] +name = "objc2-core-services" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "583300ad934cba24ff5292aee751ecc070f7ca6b39a574cc21b7b5e588e06a0b" +dependencies = [ + "libc", + "objc2-core-foundation", +] + [[package]] name = "objc2-core-text" version = "0.3.2" @@ -4017,7 +4321,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0cde0dfb48d25d2b4862161a4d5fcc0e3c24367869ad306b0c9ec0073bfed92d" dependencies = [ "bitflags 2.13.2", - "objc2 0.6.4", + "objc2 0.6.5", "objc2-core-foundation", "objc2-core-graphics", ] @@ -4029,10 +4333,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d425caf1df73233f29fd8a5c3e5edbc30d2d4307870f802d18f00d83dc5141a6" dependencies = [ "bitflags 2.13.2", - "objc2 0.6.4", + "objc2 0.6.5", "objc2-core-foundation", "objc2-core-graphics", "objc2-io-surface", + "objc2-metal 0.3.2", ] [[package]] @@ -4050,7 +4355,7 @@ dependencies = [ "bitflags 2.13.2", "block2 0.5.1", "libc", - "objc2 0.5.2", + "objc2 0.5.3", ] [[package]] @@ -4062,7 +4367,7 @@ dependencies = [ "bitflags 2.13.2", "block2 0.6.2", "libc", - "objc2 0.6.4", + "objc2 0.6.5", "objc2-core-foundation", ] @@ -4073,10 +4378,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "180788110936d59bab6bd83b6060ffdfffb3b922ba1396b312ae795e1de9d81d" dependencies = [ "bitflags 2.13.2", - "objc2 0.6.4", + "objc2 0.6.5", "objc2-core-foundation", ] +[[package]] +name = "objc2-link-presentation" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1a1ae721c5e35be65f01a03b6d2ac13a54cb4fa70d8a5da293d7b0020261398" +dependencies = [ + "block2 0.5.1", + "objc2 0.5.3", + "objc2-app-kit 0.2.2", + "objc2-foundation 0.2.2", +] + [[package]] name = "objc2-metal" version = "0.2.2" @@ -4085,7 +4402,7 @@ checksum = "dd0cba1276f6023976a406a14ffa85e1fdd19df6b0f737b063b95f6c8c7aadd6" dependencies = [ "bitflags 2.13.2", "block2 0.5.1", - "objc2 0.5.2", + "objc2 0.5.3", "objc2-foundation 0.2.2", ] @@ -4097,7 +4414,9 @@ checksum = "a0125f776a10d00af4152d74616409f0d4a2053a6f57fa5b7d6aa2854ac04794" dependencies = [ "bitflags 2.13.2", "block2 0.6.2", - "objc2 0.6.4", + "dispatch2", + "objc2 0.6.5", + "objc2-core-foundation", "objc2-foundation 0.3.2", ] @@ -4109,7 +4428,7 @@ checksum = "e42bee7bff906b14b167da2bac5efe6b6a07e6f7c0a21a7308d40c960242dc7a" dependencies = [ "bitflags 2.13.2", "block2 0.5.1", - "objc2 0.5.2", + "objc2 0.5.3", "objc2-foundation 0.2.2", "objc2-metal 0.2.2", ] @@ -4121,7 +4440,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96c1358452b371bf9f104e21ec536d37a650eb10f7ee379fff67d2e08d537f1f" dependencies = [ "bitflags 2.13.2", - "objc2 0.6.4", + "objc2 0.6.5", "objc2-core-foundation", "objc2-foundation 0.3.2", "objc2-metal 0.3.2", @@ -4134,7 +4453,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "709fe137109bd1e8b5a99390f77a7d8b2961dafc1a1c5db8f2e60329ad6d895a" dependencies = [ "bitflags 2.13.2", - "objc2 0.6.4", + "objc2 0.6.5", "objc2-core-foundation", ] @@ -4145,12 +4464,68 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b213642d6959cc6023ceb1217aa595eaaf09b8094ce95127c103cab611fe65e8" dependencies = [ "block2 0.6.2", - "objc2 0.6.4", + "objc2 0.6.5", "objc2-core-foundation", "objc2-foundation 0.3.2", "objc2-security", ] +[[package]] +name = "objc2-symbols" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a684efe3dec1b305badae1a28f6555f6ddd3bb2c2267896782858d5a78404dc" +dependencies = [ + "objc2 0.5.3", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-ui-kit" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8bb46798b20cd6b91cbd113524c490f1686f4c4e8f49502431415f3512e2b6f" +dependencies = [ + "bitflags 2.13.2", + "block2 0.5.1", + "objc2 0.5.3", + "objc2-cloud-kit 0.2.2", + "objc2-core-data 0.2.2", + "objc2-core-image 0.2.2", + "objc2-core-location 0.2.2", + "objc2-foundation 0.2.2", + "objc2-link-presentation", + "objc2-quartz-core 0.2.2", + "objc2-symbols", + "objc2-uniform-type-identifiers 0.2.2", + "objc2-user-notifications 0.2.2", +] + +[[package]] +name = "objc2-ui-kit" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d87d638e33c06f577498cbcc50491496a3ed4246998a7fbba7ccb98b1e7eab22" +dependencies = [ + "bitflags 2.13.2", + "block2 0.6.2", + "objc2 0.6.5", + "objc2-core-foundation", + "objc2-foundation 0.3.2", + "objc2-quartz-core 0.3.2", +] + +[[package]] +name = "objc2-uniform-type-identifiers" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44fa5f9748dbfe1ca6c0b79ad20725a11eca7c2218bceb4b005cb1be26273bfe" +dependencies = [ + "block2 0.5.1", + "objc2 0.5.3", + "objc2-foundation 0.2.2", +] + [[package]] name = "objc2-uniform-type-identifiers" version = "0.3.2" @@ -4158,10 +4533,23 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7902ac02859fc1f7045f8b598c63f1ae0cc7efeaa06a9bc9f3d9a3c955974fa4" dependencies = [ "block2 0.6.2", - "objc2 0.6.4", + "objc2 0.6.5", "objc2-foundation 0.3.2", ] +[[package]] +name = "objc2-user-notifications" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76cfcbf642358e8689af64cee815d139339f3ed8ad05103ed5eaf73db8d84cb3" +dependencies = [ + "bitflags 2.13.2", + "block2 0.5.1", + "objc2 0.5.3", + "objc2-core-location 0.2.2", + "objc2-foundation 0.2.2", +] + [[package]] name = "objc2-user-notifications" version = "0.3.2" @@ -4170,8 +4558,8 @@ checksum = "9df9128cbbfef73cda168416ccf7f837b62737d748333bfe9ab71c245d76613e" dependencies = [ "bitflags 2.13.2", "block2 0.6.2", - "objc2 0.6.4", - "objc2-core-location", + "objc2 0.6.5", + "objc2-core-location 0.3.2", "objc2-foundation 0.3.2", ] @@ -4195,18 +4583,9 @@ dependencies = [ [[package]] name = "object" -version = "0.37.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff76201f031d8863c38aa7f905eca4f53abbfa15f609db4277d44cd8938f33fe" -dependencies = [ - "memchr", -] - -[[package]] -name = "object" -version = "0.39.1" +version = "0.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e5a6c098c7a3b6547378093f5cc30bc54fd361ce711e05293a5cc589562739b" +checksum = "dd229a0361b9d0d4396176e02d65897f487eebeab7caa6d443855ee152ca0b9c" dependencies = [ "memchr", ] @@ -4231,7 +4610,7 @@ dependencies = [ "blocking", "cbc", "cipher", - "digest", + "digest 0.10.7", "endi", "futures-lite", "futures-util", @@ -4244,19 +4623,19 @@ dependencies = [ "pbkdf2", "serde", "serde_bytes", - "sha2", + "sha2 0.10.9", "subtle", - "zbus", - "zbus_macros", + "zbus 5.19.0", + "zbus_macros 5.19.0", "zeroize", "zvariant", ] [[package]] name = "open" -version = "5.4.4" +version = "5.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa576c76302b7b808eecc68061e67336c47833ef9d22caa74dda10fa9675eebc" +checksum = "8d8c8b8e725ad26404d6896eb2f064294a0a7b4f1d9120210d85544684c4ca95" dependencies = [ "is-wsl", "libc", @@ -4270,9 +4649,9 @@ checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" [[package]] name = "ordered-float" -version = "5.5.0" +version = "5.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c7c9e0d9b23589f26070720bac724174bfec1083e82f7854cdd0267518343c0" +checksum = "7f59006ce1e204c30956638535b74d317bca99477b9356dfaec54c37f6f600ab" dependencies = [ "num-traits", ] @@ -4347,6 +4726,39 @@ dependencies = [ "windows-link 0.2.1", ] +[[package]] +name = "parlance" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4dcf6494b3c3efb17296ea83ed6b0040d857785b2806e66d61ef3f73f5e03ef" + +[[package]] +name = "parley" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22d2ff88bd3f7d68d1d9b09c7e6209f9a8e8c05088295140a2bcf2e9b17038c5" +dependencies = [ + "fontique", + "harfrust", + "hashbrown 0.17.2", + "icu_normalizer", + "icu_properties", + "icu_segmenter", + "linebender_resource_handle", + "parlance", + "parley_data", + "skrifa", +] + +[[package]] +name = "parley_data" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1567535334d6ba2d3cde19221ba9a7bd0fabb3cbd99046ddfb10ae061cfcc889" +dependencies = [ + "icu_properties", +] + [[package]] name = "paste" version = "1.0.15" @@ -4377,9 +4789,9 @@ dependencies = [ [[package]] name = "pathfinder_simd" -version = "0.5.6" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4500030c302e4af1d423f36f3b958d1aecb6c04184356ed5a833bf6b60435777" +checksum = "866282e66a5609f51217181eecb81cf4f2bf78c79d41b662f9cf711e0fcb60ff" dependencies = [ "rustc_version", ] @@ -4390,7 +4802,7 @@ version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" dependencies = [ - "digest", + "digest 0.10.7", "hmac", ] @@ -4451,29 +4863,29 @@ checksum = "5be167a7af36ee22fe3115051bc51f6e6c7054c9348e28deb4f49bd6f705a315" [[package]] name = "pin-project" -version = "1.1.13" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2466b2336ed02bcdca6b294417127b90ec92038d1d5c4fbeac971a922e0e0924" +checksum = "a6c2123f4708bbd422630a6dae7c03f678b1ce1f1c99e4c4b3beac69c8174cc9" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.13" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c96395f0a926bc13b1c17622aaddda1ecb55d49c8f1bf9777e4d877800a43f8b" +checksum = "358938fd6df944c1e44bb328b60fb275f13c804aac47ba26a1165d45a3f87756" dependencies = [ "proc-macro2", "quote", - "syn 2.0.119", + "syn 3.0.10", ] [[package]] name = "pin-project-lite" -version = "0.2.17" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" +checksum = "f120c8d5021b34abd2f2ffd7ee96687cbcd6c54a3e68d86b6169f4a5cd480ffe" [[package]] name = "piper" @@ -4486,16 +4898,6 @@ dependencies = [ "futures-io", ] -[[package]] -name = "pkcs8" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" -dependencies = [ - "der", - "spki", -] - [[package]] name = "pkg-config" version = "0.3.34" @@ -4525,16 +4927,10 @@ dependencies = [ "concurrent-queue", "hermit-abi", "pin-project-lite", - "rustix 1.1.5", + "rustix 1.1.6", "windows-sys 0.61.2", ] -[[package]] -name = "pollster" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5da3b0203fd7ee5720aa0b5e790b591aa5d3f41c3ed2c34a3a393382198af2f7" - [[package]] name = "pollster" version = "0.4.0" @@ -4565,37 +4961,22 @@ dependencies = [ "portable-atomic", ] -[[package]] -name = "postage" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af3fb618632874fb76937c2361a7f22afd393c982a2165595407edc75b06d3c1" -dependencies = [ - "atomic", - "crossbeam-queue", - "futures", - "log", - "parking_lot", - "pin-project", - "pollster 0.2.5", - "static_assertions", - "thiserror 1.0.69", -] - [[package]] name = "potential_utf" version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d83eb9bc6d8e5cf568e7a1101d60ee05e81ed50ea106026f3d18deeb046d7661" dependencies = [ + "serde_core", + "writeable", "zerovec", ] [[package]] name = "powerfmt" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" +checksum = "4a6394b9e965e73d0a289ee54f589087e2c676aedf60885baf52c76b771e4958" [[package]] name = "ppv-lite86" @@ -4612,23 +4993,13 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8cf8e6a8aa66ce33f63993ffc4ea4271eb5b0530a9002db8455ea6050c77bfa" -[[package]] -name = "prettyplease" -version = "0.2.37" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" -dependencies = [ - "proc-macro2", - "syn 2.0.119", -] - [[package]] name = "proc-macro-crate" version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e67ba7e9b2b56446f1d419b1d807906278ffa1a658a8a5d8a39dcb1f5a78614f" dependencies = [ - "toml_edit 0.25.15+spec-1.1.0", + "toml_edit", ] [[package]] @@ -4659,39 +5030,6 @@ dependencies = [ "syn 2.0.119", ] -[[package]] -name = "psm" -version = "0.1.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dcd034599e63b970727f70d79e02d62390a4a84f7c6b827c27c46d5ac3fa622" -dependencies = [ - "ar_archive_writer", - "cc", -] - -[[package]] -name = "pulp" -version = "0.22.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "046aa45b989642ec2e4717c8e72d677b13edd831a4d3b6cf37d9a3e54912496a" -dependencies = [ - "bytemuck", - "cfg-if", - "libm", - "num-complex", - "paste", - "pulp-wasm-simd-flag", - "raw-cpuid", - "reborrow", - "version_check", -] - -[[package]] -name = "pulp-wasm-simd-flag" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d8f70e07b9c3962945a74e59ca1c511bba65b6419468acc217c457d93f3c740" - [[package]] name = "pxfm" version = "0.1.30" @@ -4751,7 +5089,7 @@ dependencies = [ "bytes", "getrandom 0.4.3", "lru-slab", - "rand 0.10.3", + "rand 0.10.4", "rand_pcg", "ring", "rustc-hash 2.1.3", @@ -4822,9 +5160,9 @@ dependencies = [ [[package]] name = "rand" -version = "0.10.3" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65c9fb96cbc91e3478eaae79a69fcd3f1ae4ad052e471fe6732fff548984b4af" +checksum = "8f6fa277c67e6ea590466f04c3fe82cb509f0864fe470643e5570de9514a9b11" dependencies = [ "chacha20", "getrandom 0.4.3", @@ -4877,9 +5215,9 @@ checksum = "63b8176103e19a2643978565ca18b50549f6101881c443590420e4dc998a3c69" [[package]] name = "rand_pcg" -version = "0.10.2" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "caa0f4137e1c0a72f4c651489402276c8e8e1cf081f3b0ba156d2cbeef09e86a" +checksum = "eb95882a1e14462c69aea9984bb261293ccfe6022ef8de0eda18bd5afb0052df" dependencies = [ "rand_core 0.10.1", ] @@ -4890,12 +5228,6 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca45419789ae5a7899559e9512e58ca889e41f04f1f2445e9f4b290ceccd1d08" -[[package]] -name = "rangemap" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a611d15b50743feb4c76b7d03edcb0e64f399c26961e4efe6975bc398be6aa3d" - [[package]] name = "rav1e" version = "0.8.1" @@ -4912,7 +5244,7 @@ dependencies = [ "built", "cfg-if", "interpolate_name", - "itertools 0.14.0", + "itertools", "libc", "libfuzzer-sys", "log", @@ -4942,19 +5274,9 @@ dependencies = [ "loop9", "quick-error", "rav1e", - "rayon", "rgb", ] -[[package]] -name = "raw-cpuid" -version = "11.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "498cd0dc59d73224351ee52a95fee0f1a617a2eae0e7d9d720cc622c73a54186" -dependencies = [ - "bitflags 2.13.2", -] - [[package]] name = "raw-window-handle" version = "0.6.2" @@ -4967,7 +5289,7 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "40d213455a5f1dc59214213c7330e074ddf8114c9a42411eb890c767357ce135" dependencies = [ - "objc2 0.6.4", + "objc2 0.6.5", "objc2-core-foundation", "objc2-foundation 0.3.2", "objc2-quartz-core 0.3.2", @@ -4993,17 +5315,6 @@ dependencies = [ "crossbeam-utils", ] -[[package]] -name = "read-fonts" -version = "0.37.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b634fabf032fab15307ffd272149b622260f55974d9fad689292a5d33df02e5" -dependencies = [ - "bytemuck", - "core_maths", - "font-types 0.11.3", -] - [[package]] name = "read-fonts" version = "0.41.0" @@ -5011,27 +5322,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "046a7d674daf459825b32f5062056d6882db0d2f5a479fbd76ccfc870ac18709" dependencies = [ "bytemuck", - "font-types 0.12.5", - "once_cell", -] - -[[package]] -name = "read-fonts" -version = "0.43.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "005c8acf251756c478b0bf402885bfd88a1476020c4c7e6060edc1aa68da38ea" -dependencies = [ - "bytemuck", - "font-types 0.12.5", + "font-types", "once_cell", ] -[[package]] -name = "reborrow" -version = "0.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03251193000f4bd3b042892be858ee50e8b3719f2b08e5833ac4353724632430" - [[package]] name = "redox_syscall" version = "0.5.18" @@ -5079,14 +5373,14 @@ checksum = "92ecd8964f8453721699a1ed72037b0db49ce2f5a5138486ee89bed6f67cdf3a" dependencies = [ "proc-macro2", "quote", - "syn 3.0.6", + "syn 3.0.10", ] [[package]] name = "regex" -version = "1.13.1" +version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f020237b6c8eed93db2e2cb53c00c60a8e1bc73da7d073199a1180401450218d" +checksum = "9807af0e638c12e753aa1b4e601791bf2a8f71274023c8bbeec12fc149950857" dependencies = [ "aho-corasick", "memchr", @@ -5096,9 +5390,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.18" +version = "0.4.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad8553b9b26413251cbf30e620595c7a41b3887f03da04579c0e6b0d6a06b4b2" +checksum = "41d60ef07df457506a0a1a2073112eb4aae5733dbd2813c3da77d1b0fd441158" dependencies = [ "aho-corasick", "memchr", @@ -5107,9 +5401,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.11" +version = "0.8.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4" +checksum = "d902046e6a28a1e4c3cab97258a0ce11e994903f01c2d97a9447a0b3df85f4f6" [[package]] name = "renderdoc-sys" @@ -5206,9 +5500,9 @@ checksum = "6c20b6793b5c2fa6553b250154b78d6d0db37e72700ae35fad9387a46f487c97" [[package]] name = "roxmltree" -version = "0.21.1" +version = "0.21.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1964b10c76125c36f8afe190065a4bf9a87bf324842c05701330bba9f1cacbb" +checksum = "9da7f59328b09405b181fee1018925fad50f157afb43c0c0f5c522c256dd5907" dependencies = [ "memchr", ] @@ -5255,9 +5549,9 @@ dependencies = [ [[package]] name = "rustix" -version = "1.1.5" +version = "1.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "891efababe418670775f199f0d233d84843c227a0949a883ce15b37c78d6629d" +checksum = "e5e76742e5294153d4dde1207dbec5bdd81eef6fabdc0d2118babadabfd858aa" dependencies = [ "bitflags 2.13.2", "errno", @@ -5268,9 +5562,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.45" +version = "0.23.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d41d731c7d2f962d1ccc364cec258de3c0e93b38c2fb3ba97ac74513048d634" +checksum = "4ac0e747c10d93d873fd4c50b26ef47ad92d1bfb48f6922003bb514070f6e88c" dependencies = [ "once_cell", "ring", @@ -5282,9 +5576,9 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.15.1" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f4925028c7eb5d1fcdaf196971378ed9d2c1c4efc7dc5d011256f76c99c0a96" +checksum = "102f35f7de7b06d8c61f1cff6592f5253e0dea431c74867aad5dfd70f44663fb" dependencies = [ "web-time", "zeroize", @@ -5292,9 +5586,9 @@ dependencies = [ [[package]] name = "rustls-webpki" -version = "0.103.15" +version = "0.103.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3c3cf1d8b1e7d4927e2d154c3fcb02979afb9939629c62cd9048d4f07b60ac2" +checksum = "e3a0760a887c14823fca5a1c970b01d47c328c696c0c64829d1df50e8f853fd5" dependencies = [ "ring", "rustls-pki-types", @@ -5324,9 +5618,9 @@ dependencies = [ [[package]] name = "schemars" -version = "1.2.2" +version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "687274d293b6cdc6e73e0fee520bf2049650090d7164f87672d212a3c530cf4a" +checksum = "ab508826f74a77ca9d5aba6ff19b522583ee3eaf28a19384ff3d0e5835fadf6e" dependencies = [ "dyn-clone", "indexmap", @@ -5338,14 +5632,14 @@ dependencies = [ [[package]] name = "schemars_derive" -version = "1.2.2" +version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d98c67716b46af2f0b8cf752abc930f6f9aecfbf671ecfb531db8a31dbe4e2ba" +checksum = "e1c3a92094fa7d61aa124645844facb6b554dfc797136d0f5fd1f890e2bffc69" dependencies = [ "proc-macro2", "quote", "serde_derive_internals", - "syn 3.0.6", + "syn 3.0.10", ] [[package]] @@ -5389,12 +5683,6 @@ version = "4.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" -[[package]] -name = "self_cell" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ab42ca02749e120097e328d91d415325bdf43b1c72c4c8badf37375fe40a813" - [[package]] name = "semver" version = "1.0.28" @@ -5442,7 +5730,7 @@ checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348" dependencies = [ "proc-macro2", "quote", - "syn 3.0.6", + "syn 3.0.10", ] [[package]] @@ -5453,7 +5741,7 @@ checksum = "f852137cce035d6a4df67ccce505ff6b3e9fd3a10e3e52b24dc71e650bb1a9bd" dependencies = [ "proc-macro2", "quote", - "syn 3.0.6", + "syn 3.0.10", ] [[package]] @@ -5467,10 +5755,11 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.151" +version = "1.0.154" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c841b55ecdae098c80dcae9cf767f6f8a0c2cdb3416bbef72181df4d0fe73f14" +checksum = "e7e9cc8b1b85264074fbcc02a88680c4096b1e47df8f739dceb03bf482f04bd6" dependencies = [ + "foldhash 0.2.0", "indexmap", "itoa", "memchr", @@ -5487,23 +5776,14 @@ checksum = "8d3b1629de253c70a0508c3899572da79ca359fdab27c7920ff00406df418906" dependencies = [ "proc-macro2", "quote", - "syn 3.0.6", -] - -[[package]] -name = "serde_spanned" -version = "0.6.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf41e0cfaf7226dca15e8197172c295a782857fcb97fad1808a166870dee75a3" -dependencies = [ - "serde", + "syn 3.0.10", ] [[package]] name = "serde_spanned" -version = "1.1.1" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6662b5879511e06e8999a8a235d848113e942c9124f211511b16466ee2995f26" +checksum = "9c187e0a369471c550af028cba56d4f4fa2a489ad28151ae95a4d340a2a8b782" dependencies = [ "serde_core", ] @@ -5534,14 +5814,19 @@ checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" dependencies = [ "cfg-if", "cpufeatures 0.2.17", - "digest", + "digest 0.10.7", ] [[package]] -name = "shlex" -version = "1.3.0" +name = "sha2" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" +checksum = "820083d430c52864bf834423fc988cbcf61685d6f9d22a765a64e3f6cfe3521c" +dependencies = [ + "cfg-if", + "cpufeatures 0.3.1", + "digest 0.11.3", +] [[package]] name = "shlex" @@ -5561,12 +5846,9 @@ dependencies = [ [[package]] name = "signature" -version = "2.2.0" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" -dependencies = [ - "rand_core 0.6.4", -] +checksum = "28d567dcbaf0049cb8ac2608a76cd95ff9e4412e1899d389ee400918ca7537f5" [[package]] name = "simd-adler32" @@ -5575,14 +5857,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3a219298ac11a56ea9a6d2120044824d6f01aeb034955e7af7bc16858527deea" [[package]] -name = "simd_helpers" -version = "0.1.0" +name = "simd_cesu8" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95890f873bec569a0362c235787f3aca6e1e887302ba4840839bcc6459c42da6" +checksum = "11031e251abf8611c80f460e19dbdeb54a66db918e49c65a7065b46ac7aec520" dependencies = [ - "quote", + "rustc_version", + "simdutf8", ] +[[package]] +name = "simd_helpers" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f48ea32978b7ad365bd1ecce83827746d5d50dc006a8c85112b7acc3c716e3e7" + [[package]] name = "simdutf8" version = "0.1.5" @@ -5604,16 +5893,6 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33f4fe9184a62d842c9ef383018f3306d8ba224fd9d836f56d7288308847c256" -[[package]] -name = "skrifa" -version = "0.40.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fbdfe3d2475fbd7ddd1f3e5cf8288a30eb3e5f95832829570cd88115a7434ac" -dependencies = [ - "bytemuck", - "read-fonts 0.37.0", -] - [[package]] name = "skrifa" version = "0.44.0" @@ -5621,17 +5900,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "819ab7d62b1d3e72d9d9dea5650bac30424f9111364bb94928dbf5ecad1baa68" dependencies = [ "bytemuck", - "read-fonts 0.41.0", -] - -[[package]] -name = "skrifa" -version = "0.46.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4febebda507fb889c545a37a135517769d1391941013561292897961d1887d6" -dependencies = [ - "bytemuck", - "read-fonts 0.43.3", + "read-fonts", ] [[package]] @@ -5651,9 +5920,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.16.2" +version = "1.16.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9395f0f0eee849a9b707b2f06bb92a6a422090e2123bb2ef8e87a0e61892a8e" +checksum = "3244542535d5de959d90ec55d1b5ff0fd2bb7b1310223907d5f11932847f7b59" [[package]] name = "smol" @@ -5674,14 +5943,34 @@ dependencies = [ [[package]] name = "smol_str" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4aaa7368fcf4852a4c2dd92df0cace6a71f2091ca0a23391ce7f3a31833f1523" +checksum = "eeb7109d23f319619d4cc0de5464613c8b7b1a09db2774a58101459cf6be2f10" dependencies = [ - "borsh", "serde_core", ] +[[package]] +name = "snafu" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e84b3f4eacbf3a1ce05eac6763b4d629d60cbc94d632e4092c54ade71f1e1a2" +dependencies = [ + "snafu-derive", +] + +[[package]] +name = "snafu-derive" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1c97747dbf44bb1ca44a561ece23508e99cb592e862f22222dcf42f51d1e451" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn 2.0.119", +] + [[package]] name = "socket2" version = "0.6.5" @@ -5719,16 +6008,6 @@ dependencies = [ "bitflags 2.13.2", ] -[[package]] -name = "spki" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" -dependencies = [ - "base64ct", - "der", -] - [[package]] name = "stable_deref_trait" version = "1.2.1" @@ -5736,70 +6015,64 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" [[package]] -name = "stacker" -version = "0.1.25" +name = "static_assertions" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "707f49d46706bacf8a2b00d51dace3f9de527c13eec3778f570c411f89e69967" -dependencies = [ - "cc", - "cfg-if", - "libc", - "psm", - "windows-sys 0.61.2", -] +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] -name = "stacksafe" -version = "1.0.3" +name = "strict-num" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95f9c34983ac74195c710c473db6fdf1085f64a47dbaa0090d1bea03be70da66" +checksum = "6637bab7722d379c8b41ba849228d680cc12d0a45ba1fa2b48f2a30577a06731" dependencies = [ - "stacker", - "stacksafe-macro", + "float-cmp", ] [[package]] -name = "stacksafe-macro" -version = "1.0.3" +name = "strsim" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6feeae42a2d6b0dcb8aeb2f08d9e48cdac600239cf8a20fc59f9e252e86bdfe1" -dependencies = [ - "proc-macro2", - "quote", - "syn 3.0.6", -] +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] -name = "static_assertions" -version = "1.1.0" +name = "strum" +version = "0.26.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" +checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" +dependencies = [ + "strum_macros 0.26.4", +] [[package]] -name = "strict-num" -version = "0.1.1" +name = "strum" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6637bab7722d379c8b41ba849228d680cc12d0a45ba1fa2b48f2a30577a06731" +checksum = "9628de9b8791db39ceda2b119bbe13134770b56c138ec1d3af810d045c04f9bd" dependencies = [ - "float-cmp", + "strum_macros 0.28.0", ] [[package]] -name = "strum" -version = "0.27.2" +name = "strum_macros" +version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af23d6f6c1a224baef9d3f61e287d2761385a5b88fdab4eb4c6f11aeb54c4bcf" +checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" dependencies = [ - "strum_macros", + "heck", + "proc-macro2", + "quote", + "rustversion", + "syn 2.0.119", ] [[package]] name = "strum_macros" -version = "0.27.2" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7695ce3845ea4b33927c055a39dc438a45b059f7c1b3d91d38d10355fb8cbca7" +checksum = "ab85eea0270ee17587ed4156089e10b9e6880ee688791d45a905f5b1ca36f664" dependencies = [ - "heck 0.5.0", + "heck", "proc-macro2", "quote", "syn 2.0.119", @@ -5898,9 +6171,9 @@ checksum = "0193cc4331cfd2f3d2011ef287590868599a2f33c3e69bc22c1a3d3acf9e02fb" [[package]] name = "svgtypes" -version = "0.16.1" +version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "695b5790b3131dafa99b3bbfd25a216edb3d216dad9ca208d4657bfb8f2abc3d" +checksum = "9f12b12995e3638c70618c1facb1ce65302f6a6f706b675f07c58a5d7391120e" dependencies = [ "kurbo", "siphasher", @@ -5912,7 +6185,7 @@ version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c2499c2d826531388872b2268718aed907a39bd785ab0dcfe57fab26283f92e" dependencies = [ - "skrifa 0.44.0", + "skrifa", "yazi", "zeno", ] @@ -5930,9 +6203,9 @@ dependencies = [ [[package]] name = "syn" -version = "3.0.6" +version = "3.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8593e8e72159ed2257d083c7a454a85cbf854f37a0966d8d483aff8c8a3ebcee" +checksum = "4ae9ccbea3a7b0b09443036490c8f34a8b1b760fd345e5c0dae0aac718faea79" dependencies = [ "proc-macro2", "quote", @@ -5956,16 +6229,7 @@ checksum = "901704edd0dfe137f1987838ee4f259e4e063c31371bdb423f7ae38ec6f77f02" dependencies = [ "proc-macro2", "quote", - "syn 3.0.6", -] - -[[package]] -name = "sys-locale" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8eab9a99a024a169fe8a903cf9d4a3b3601109bcc13bd9e3c6fff259138626c4" -dependencies = [ - "libc", + "syn 3.0.10", ] [[package]] @@ -5984,14 +6248,14 @@ dependencies = [ [[package]] name = "taffy" -version = "0.12.2" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "340a09581f29809fc0df82a3955501dc7f2a21f887e5d1c13dbe288fe1c0bef4" +checksum = "639627c87f43b9181c811f40a6296409e093a17bc761214cba3c15df74f86b99" dependencies = [ "arrayvec", - "grid", "serde", "slotmap", + "smallvec", ] [[package]] @@ -6006,6 +6270,12 @@ dependencies = [ "objc", ] +[[package]] +name = "target-features" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1bbb9f3c5c463a01705937a24fdabc5047929ac764b2d5b9cf681c1f5041ed5" + [[package]] name = "tauri-winrt-notification" version = "0.8.1" @@ -6026,7 +6296,7 @@ dependencies = [ "fastrand", "getrandom 0.4.3", "once_cell", - "rustix 1.1.5", + "rustix 1.1.6", "windows-sys 0.61.2", ] @@ -6076,7 +6346,7 @@ checksum = "fe5197923287db20a58125f0bc85c062f7f2c892de97b18c356f9efb14b28524" dependencies = [ "proc-macro2", "quote", - "syn 3.0.6", + "syn 3.0.10", ] [[package]] @@ -6149,11 +6419,12 @@ dependencies = [ [[package]] name = "tinystr" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1e27c91459209c2986af3dcf603a5a74a4368754ce37414f59acc971167f643" +checksum = "abc840c238154d58f9e86b2792261edfde565a17696e1cda1a449de27979801a" dependencies = [ "displaydoc", + "serde_core", "zerovec", ] @@ -6165,9 +6436,9 @@ checksum = "fd3ca314f692efd6c868f8408f53fe444634a845f96c028b97d35f6a1f79f0ee" [[package]] name = "tokio" -version = "1.53.1" +version = "1.54.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "202caea871b69668250d242070849eb495be178ed697a3e98aebce5bc81a0bed" +checksum = "b52fd3255258d26fac7264ab5a76b53c13367136dc011d3d6ad4f8ed070396a3" dependencies = [ "bytes", "libc", @@ -6188,7 +6459,7 @@ checksum = "78773a2a397f451582ce068015985c33193cf6dea8b74d2a639fe457b2f07b0e" dependencies = [ "proc-macro2", "quote", - "syn 3.0.6", + "syn 3.0.10", ] [[package]] @@ -6203,95 +6474,54 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc1beb996b9d83529a9e75c17a1686767d148d70663143c7854d8b4a09ced362" -dependencies = [ - "serde", - "serde_spanned 0.6.9", - "toml_datetime 0.6.11", - "toml_edit 0.22.27", -] - -[[package]] -name = "toml" -version = "1.1.6+spec-1.1.0" +version = "1.2.3+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "920602543f0911ab71da12c50d59701da54c196d1a2bf5cb4b75667f137a406a" +checksum = "26b1f26e9485c1fa43ee89fe76e9f3fb9e2e52bb227f8594b4d687496b83d073" dependencies = [ "indexmap", "serde_core", - "serde_spanned 1.1.1", - "toml_datetime 1.1.1+spec-1.1.0", + "serde_spanned", + "toml_datetime", "toml_parser", "toml_writer", - "winnow 1.0.4", -] - -[[package]] -name = "toml_datetime" -version = "0.6.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c" -dependencies = [ - "serde", + "winnow", ] [[package]] name = "toml_datetime" -version = "1.1.1+spec-1.1.0" +version = "1.1.3+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3165f65f62e28e0115a00b2ebdd37eb6f3b641855f9d636d3cd4103767159ad7" +checksum = "173f25c883cd2176a2d8212155638c0a60d484a9d84546d270866f40f56b6e49" dependencies = [ "serde_core", ] [[package]] name = "toml_edit" -version = "0.22.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a" -dependencies = [ - "indexmap", - "serde", - "serde_spanned 0.6.9", - "toml_datetime 0.6.11", - "toml_write", - "winnow 0.7.15", -] - -[[package]] -name = "toml_edit" -version = "0.25.15+spec-1.1.0" +version = "0.25.21+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1340ea94a5856333492c9064b02c778b191dd2c853778d9609debdcdfea3a614" +checksum = "88497dab46de5bf343ec66b05c251e48c6213f3e9170c70a70a823f7abe886a4" dependencies = [ "indexmap", - "toml_datetime 1.1.1+spec-1.1.0", + "toml_datetime", "toml_parser", - "winnow 1.0.4", + "winnow", ] [[package]] name = "toml_parser" -version = "1.1.3+spec-1.1.0" +version = "1.1.7+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d38ac1cf9b95face32296c0a3ede1fdc270627c9d9c02a7274dd6d960dc4d56" +checksum = "0bb28d6e049a9766c3bd91a8326e6179f5b132dec87906bb97018ef7a2f3431a" dependencies = [ - "winnow 1.0.4", + "winnow", ] -[[package]] -name = "toml_write" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d99f8c9a7727884afe522e9bd5edbfc91a3312b36a77b5fb8926e4c31a41801" - [[package]] name = "toml_writer" -version = "1.1.2+spec-1.1.0" +version = "1.2.0+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d56353a2a665ad0f41a421187180aab746c8c325620617ad883a99a1cbe66d2" +checksum = "009dbb7700f11c55ef83aebbe4c0e9cf1f1ac0844bd8d6f00dc38f302026e13a" [[package]] name = "tower" @@ -6370,6 +6600,25 @@ dependencies = [ "once_cell", ] +[[package]] +name = "trash" +version = "5.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7363f9516b65bd2e855f4e6c3338b1a98efc2773c25349c958908897e1170ded" +dependencies = [ + "jiff", + "libc", + "log", + "objc2 0.6.5", + "objc2-foundation 0.3.2", + "once_cell", + "percent-encoding", + "scopeguard", + "urlencoding", + "windows 0.62.2", + "windows-core 0.62.2", +] + [[package]] name = "try-lock" version = "0.2.5" @@ -6381,9 +6630,6 @@ name = "ttf-parser" version = "0.25.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2df906b07856748fa3f6e0ad0cbaa047052d4a7dd609e231c4f72cee8c36f31" -dependencies = [ - "core_maths", -] [[package]] name = "typeid" @@ -6416,21 +6662,15 @@ checksum = "5c1cb5db39152898a79168971543b1cb5020dff7fe43c8dc468b0885f5e29df5" [[package]] name = "unicode-ident" -version = "1.0.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d245f478577f809a851594d02313b640fb437e0bb33866753cff937863096954" - -[[package]] -name = "unicode-linebreak" -version = "0.1.5" +version = "1.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b09c83c3c29d37506a3e260c08c03743a6bb66a9cd432c6934ab501a190571f" +checksum = "a2c754d6c33795a1c324727428e5a7dedb5b06195f9890bdbcba760d3e246563" [[package]] name = "unicode-script" -version = "0.5.8" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "383ad40bb927465ec0ce7720e033cb4ca06912855fc35db31b5755d0de75b1ee" +checksum = "aa04c955db05429d464c74d495c1ee677e1866e783a4c3747f9c0cef7756cabf" [[package]] name = "unicode-segmentation" @@ -6446,9 +6686,15 @@ checksum = "b1d386ff53b415b7fe27b50bb44679e2cc4660272694b7b6f3326d8480823a94" [[package]] name = "unicode-width" -version = "0.2.2" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" + +[[package]] +name = "unicode-width" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254" +checksum = "ca718471876992059f251e33aafc334346ada08042b7661dd1fe313a9bced557" [[package]] name = "unicode-xid" @@ -6464,9 +6710,9 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.5.8" +version = "2.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed" +checksum = "f00cd2407bb42c0ef17be88d4cf020f5cceffd121665bac9b8b9493a369b3b1a" dependencies = [ "form_urlencoded", "idna", @@ -6474,6 +6720,12 @@ dependencies = [ "serde", ] +[[package]] +name = "urlencoding" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" + [[package]] name = "usvg" version = "0.48.1" @@ -6482,16 +6734,16 @@ checksum = "977d0a4abdef933f424a99fe09f95576e089b90aebc6f016a3bc813762493e91" dependencies = [ "base64 0.23.1", "data-url", - "fontdb 0.24.0", - "harfrust 0.12.0", + "fontdb", + "harfrust", "imagesize", "kurbo", "log", "pico-args", - "roxmltree 0.21.1", + "roxmltree 0.21.2", "simplecss", "siphasher", - "skrifa 0.44.0", + "skrifa", "strict-num", "svgtypes", "tiny-skia-path", @@ -6503,15 +6755,24 @@ dependencies = [ [[package]] name = "utf8_iter" -version = "1.0.4" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" +checksum = "af3bd9d3e571c26fcce9d033b87ea5ab061b8d2ffe9b7a5675d810d68f03edf0" +dependencies = [ + "utf_types", +] + +[[package]] +name = "utf_types" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a3b425286980a367278453f3b6d28cdcb134b574e5a35824a6ff5eebad50bb6" [[package]] name = "uuid" -version = "1.26.1" +version = "1.29.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ef6dac1e96601b4fb3acccccff2139741fcb757cb9a36089bf5be91cfb285ce" +checksum = "3c14b15dffa2f4bd712103e857140aa04a4f2ff6e955c77d7eb8e53ee02a3b64" dependencies = [ "getrandom 0.4.3", "js-sys", @@ -6569,13 +6830,13 @@ dependencies = [ [[package]] name = "vampir" -version = "0.2.0" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4417e64bc5f488228a9aa3c1ca13b930310f74d3b826c9675894f282a4dbe45a" +checksum = "034b01eda1fd0406416168c45a9fea1aa63fde65ec8a5c147e2b60ce09e691e1" dependencies = [ "gpui-ce", "image", - "objc2 0.6.4", + "objc2 0.6.5", "objc2-app-kit 0.3.2", "objc2-foundation 0.3.2", "unicode-segmentation", @@ -6615,9 +6876,9 @@ checksum = "317211a0dc0ceedd78fb2ca9a44aed3d7b9b26f81870d485c07122b4350673b7" [[package]] name = "walkdir" -version = "2.5.0" +version = "2.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +checksum = "b42e295b7452c4604982280d8586001fcad9b8b201cac67bca9771e7a7475403" dependencies = [ "same-file", "winapi-util", @@ -6625,9 +6886,9 @@ dependencies = [ [[package]] name = "want" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +checksum = "ec4cdd0dd910afe868b7ef477227d8d538b46b3075031afee8a9f2acb0a2ed0b" dependencies = [ "try-lock", ] @@ -6649,12 +6910,11 @@ dependencies = [ [[package]] name = "wasm-bindgen" -version = "0.2.129" +version = "0.2.130" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bb54f33acc68fd454578d9820b0bde1a1a3d17aa17bb7b6595806d02886d409" +checksum = "a0181c14ddd6c7b8b0b0132a5f1ea2f32be0d893cd3ea97b6e3b28886b8a3d1c" dependencies = [ "cfg-if", - "once_cell", "rustversion", "wasm-bindgen-macro", "wasm-bindgen-shared", @@ -6662,9 +6922,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.79" +version = "0.4.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3cbab34de2d982e9b48e18d216d04c4a6f641066ff19ffb699980f591ee3610e" +checksum = "5e14e0327cb5368ad60ccb22d04a9827a693c95a926d8d125e9fa39e0baec501" dependencies = [ "js-sys", "tokio", @@ -6673,9 +6933,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.129" +version = "0.2.130" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e29d0c35b16e224a7eeb5cd2d25e3e1968fbd65604117b44d3b789d00ee8535" +checksum = "6e931a02a39abdbf66966fc35902b5ed58344750a70885bed4ebb3d8eaf28ed9" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -6683,26 +6943,38 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.129" +version = "0.2.130" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f501a8bc3719dba86ef8ae4728879c08001bea749eb1333ac5b91e040e2a6b7" +checksum = "2ca4b54280e455bd831e33a6b8e734baf432fe63fbc35c42ac14ce67a043a53a" dependencies = [ "bumpalo", "proc-macro2", "quote", - "syn 3.0.6", + "syn 3.0.10", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.129" +version = "0.2.130" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23f0c9c52aa7cd7d77769a4cfe2a9adb1b331f489a41d912ce14513d5ab995c6" +checksum = "3b1f9c3798725016c6ee5f2f57869ec0831e8bbc0ab0310a86e787e97f41389e" dependencies = [ "unicode-ident", ] +[[package]] +name = "wasm_thread" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7516db7f32decdadb1c3b8deb1b7d78b9df7606c5cc2f6241737c2ab3a0258e" +dependencies = [ + "futures", + "js-sys", + "wasm-bindgen", + "web-sys", +] + [[package]] name = "wayland-backend" version = "0.3.17" @@ -6711,7 +6983,8 @@ checksum = "38a91b4eaddff87b1cd1074985e3713da4af2c49742d1b356b2c01670a67a078" dependencies = [ "cc", "downcast-rs", - "rustix 1.1.5", + "log", + "rustix 1.1.6", "scoped-tls", "smallvec", "wayland-sys", @@ -6724,7 +6997,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3c36a0f861ad76d0901f2800b46321410d9f73f2ea88aac0650d86c32688073" dependencies = [ "bitflags 2.13.2", - "rustix 1.1.5", + "rustix 1.1.6", "wayland-backend", "wayland-scanner", ] @@ -6735,7 +7008,7 @@ version = "0.31.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4a52d18780be9b1314328a3de5f930b73d2200112e3849ca6cb11822793fb34d" dependencies = [ - "rustix 1.1.5", + "rustix 1.1.6", "wayland-client", "xcursor", ] @@ -6803,9 +7076,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.106" +version = "0.3.107" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88261b9deccee56594c11a3460c462c41f58d148598fe70ad77070126a68aba4" +checksum = "d7d179596ff5ec0f6de4db64d54011bde6289cc49603d3a6e4ce3f329207ab88" dependencies = [ "js-sys", "wasm-bindgen", @@ -6823,9 +7096,9 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "1.0.9" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dcd9d09a39985f5344844e66b0c530a33843579125f23e21e9f0f220850f22a" +checksum = "7265c9301c16a8711c992c2d8da90ee77ef54b1ed51482d6dfeb00dc756b1297" dependencies = [ "rustls-pki-types", ] @@ -6851,7 +7124,7 @@ dependencies = [ "hashbrown 0.16.1", "js-sys", "log", - "naga", + "naga 29.0.4", "parking_lot", "portable-atomic", "profiling", @@ -6873,8 +7146,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2f519832254e56965a9940c4af57dcb75f702b6f6fa4a0b172f685395843a4d7" dependencies = [ "arrayvec", - "bit-set", - "bit-vec", + "bit-set 0.9.1", + "bit-vec 0.9.1", "bitflags 2.13.2", "bytemuck", "cfg_aliases", @@ -6882,7 +7155,7 @@ dependencies = [ "hashbrown 0.16.1", "indexmap", "log", - "naga", + "naga 29.0.4", "once_cell", "parking_lot", "portable-atomic", @@ -6893,6 +7166,7 @@ dependencies = [ "thiserror 2.0.21", "wgpu-core-deps-apple", "wgpu-core-deps-emscripten", + "wgpu-core-deps-wasm", "wgpu-core-deps-windows-linux-android", "wgpu-hal", "wgpu-naga-bridge", @@ -6917,6 +7191,15 @@ dependencies = [ "wgpu-hal", ] +[[package]] +name = "wgpu-core-deps-wasm" +version = "29.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af1fb1798be2a912497d4c224f72d39bb0cb34af50e8bcc29865bc339c943059" +dependencies = [ + "wgpu-hal", +] + [[package]] name = "wgpu-core-deps-windows-linux-android" version = "29.0.4" @@ -6935,7 +7218,7 @@ dependencies = [ "android_system_properties", "arrayvec", "ash", - "bit-set", + "bit-set 0.9.1", "bitflags 2.13.2", "block2 0.6.2", "bytemuck", @@ -6951,9 +7234,9 @@ dependencies = [ "libc", "libloading", "log", - "naga", + "naga 29.0.4", "ndk-sys", - "objc2 0.6.4", + "objc2 0.6.5", "objc2-core-foundation", "objc2-foundation 0.3.2", "objc2-metal 0.3.2", @@ -6986,7 +7269,7 @@ version = "29.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95226013f547544b223281cd16a4fb549aa9dcb562adbda0faae4c73ffbbc161" dependencies = [ - "naga", + "naga 29.0.4", "wgpu-types", ] @@ -7004,6 +7287,41 @@ dependencies = [ "web-sys", ] +[[package]] +name = "wgsl-rs" +version = "0.1.0-beta.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20205e0ed5ccc5543652a6e5699455da154d9dc722c74e9e33f8514260d710e1" +dependencies = [ + "glam", + "half", + "naga 29.0.4", + "paste", + "snafu", + "wgsl-rs-ir", + "wgsl-rs-macros", +] + +[[package]] +name = "wgsl-rs-ir" +version = "0.1.0-beta.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "291227cb39d86fd08dd66d1d967dd4d03ef0058688c36edd1215134f198d8007" + +[[package]] +name = "wgsl-rs-macros" +version = "0.1.0-beta.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b381fbc656986e2551e0bfe1152e112aaceecbafeb5a1ca0314cc40e08c045c0" +dependencies = [ + "itertools", + "proc-macro2", + "quote", + "snafu", + "syn 2.0.119", + "wgsl-rs-ir", +] + [[package]] name = "which" version = "6.0.3" @@ -7229,6 +7547,12 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" +[[package]] +name = "windows-link" +version = "0.101.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4e57b2aae53a240c62b65069a63eaf8d5fa747f5d0d8e670c5210a98847bce4" + [[package]] name = "windows-numerics" version = "0.2.0" @@ -7305,6 +7629,15 @@ dependencies = [ "windows-link 0.2.1", ] +[[package]] +name = "windows-sys" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +dependencies = [ + "windows-targets 0.42.2", +] + [[package]] name = "windows-sys" version = "0.48.0" @@ -7334,20 +7667,35 @@ dependencies = [ [[package]] name = "windows-sys" -version = "0.60.2" +version = "0.61.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" dependencies = [ - "windows-targets 0.53.5", + "windows-link 0.2.1", ] [[package]] name = "windows-sys" -version = "0.61.2" +version = "0.101.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" +checksum = "eed2df9f5f458664c87437f6758f0d93085b06433bf66b2b84c23c19f3d2012c" dependencies = [ - "windows-link 0.2.1", + "windows-link 0.101.0", +] + +[[package]] +name = "windows-targets" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" +dependencies = [ + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", ] [[package]] @@ -7374,30 +7722,13 @@ dependencies = [ "windows_aarch64_gnullvm 0.52.6", "windows_aarch64_msvc 0.52.6", "windows_i686_gnu 0.52.6", - "windows_i686_gnullvm 0.52.6", + "windows_i686_gnullvm", "windows_i686_msvc 0.52.6", "windows_x86_64_gnu 0.52.6", "windows_x86_64_gnullvm 0.52.6", "windows_x86_64_msvc 0.52.6", ] -[[package]] -name = "windows-targets" -version = "0.53.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" -dependencies = [ - "windows-link 0.2.1", - "windows_aarch64_gnullvm 0.53.1", - "windows_aarch64_msvc 0.53.1", - "windows_i686_gnu 0.53.1", - "windows_i686_gnullvm 0.53.1", - "windows_i686_msvc 0.53.1", - "windows_x86_64_gnu 0.53.1", - "windows_x86_64_gnullvm 0.53.1", - "windows_x86_64_msvc 0.53.1", -] - [[package]] name = "windows-threading" version = "0.1.0" @@ -7425,6 +7756,12 @@ dependencies = [ "windows-link 0.2.1", ] +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" + [[package]] name = "windows_aarch64_gnullvm" version = "0.48.5" @@ -7438,10 +7775,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] -name = "windows_aarch64_gnullvm" -version = "0.53.1" +name = "windows_aarch64_msvc" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" [[package]] name = "windows_aarch64_msvc" @@ -7456,10 +7793,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] -name = "windows_aarch64_msvc" -version = "0.53.1" +name = "windows_i686_gnu" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" [[package]] name = "windows_i686_gnu" @@ -7473,12 +7810,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" -[[package]] -name = "windows_i686_gnu" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3" - [[package]] name = "windows_i686_gnullvm" version = "0.52.6" @@ -7486,10 +7817,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] -name = "windows_i686_gnullvm" -version = "0.53.1" +name = "windows_i686_msvc" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" [[package]] name = "windows_i686_msvc" @@ -7504,10 +7835,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] -name = "windows_i686_msvc" -version = "0.53.1" +name = "windows_x86_64_gnu" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" [[package]] name = "windows_x86_64_gnu" @@ -7522,10 +7853,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] -name = "windows_x86_64_gnu" -version = "0.53.1" +name = "windows_x86_64_gnullvm" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" [[package]] name = "windows_x86_64_gnullvm" @@ -7540,10 +7871,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] -name = "windows_x86_64_gnullvm" -version = "0.53.1" +name = "windows_x86_64_msvc" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" [[package]] name = "windows_x86_64_msvc" @@ -7557,47 +7888,32 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" -[[package]] -name = "windows_x86_64_msvc" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" - -[[package]] -name = "winnow" -version = "0.7.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df79d97927682d2fd8adb29682d1140b343be4ac0f08fd68b7765d9c059d3945" -dependencies = [ - "memchr", -] - [[package]] name = "winnow" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23b97319f7b8343df12cc98938e5c3eb436064524c8d2b4e30a1d3a36eecdf81" +checksum = "8c3b93199df0ab874cdf0c6a94f0a0dc3423fe41f1cafb62b8bd7b1deb277aef" dependencies = [ "memchr", ] [[package]] name = "winreg" -version = "0.55.0" +version = "0.56.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb5a765337c50e9ec252c2069be9bf91c7df47afb103b642ba3a53bf8101be97" +checksum = "7d6f32a0ff4a9f6f01231eb2059cc85479330739333e0e58cadf03b6af2cca10" dependencies = [ "cfg-if", - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] name = "winresource" -version = "0.1.31" +version = "0.1.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0986a8b1d586b7d3e4fe3d9ea39fb451ae22869dcea4aa109d287a374d866087" +checksum = "a2bc6d36480b829272a5bdabf08e6dca8004761c1da7e35efef800540c66221b" dependencies = [ - "toml 1.1.6+spec-1.1.0", + "toml", "version_check", ] @@ -7657,7 +7973,7 @@ dependencies = [ "as-raw-xcb-connection", "gethostname", "libc", - "rustix 1.1.5", + "rustix 1.1.6", "x11rb-protocol", "xcursor", ] @@ -7682,9 +7998,9 @@ dependencies = [ [[package]] name = "xcursor" -version = "0.3.11" +version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "163b33ed8786455e2fa5d72f554057ce3f3182425434f756cd39c99839d88e23" +checksum = "083a6e8d274c0502e7dc9b37f9bc26fdaf666efc9002c38815ea50d19a179aac" [[package]] name = "xim-ctext" @@ -7734,6 +8050,12 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec7a2a501ed189703dba8b08142f057e887dfc4b2cc4db2d343ac6376ba3e0b9" +[[package]] +name = "xxhash-rust" +version = "0.8.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40de123dbb523ebcc00d61ec01840ad192578afc378d859f3429caa38308fad5" + [[package]] name = "y4m" version = "0.8.0" @@ -7742,15 +8064,15 @@ checksum = "7a5a4b21e1a62b67a2970e6831bc091d7b87e119e7f9791aef9702e3bef04448" [[package]] name = "yazi" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e01738255b5a16e78bbb83e7fbba0a1e7dd506905cfc53f4622d89015a03fbb5" +checksum = "ac366ea532fa8ee6a992cec9dea525b1dc284e69702f36c2ab5fbebadc81ec86" [[package]] name = "yeslogic-fontconfig-sys" -version = "6.0.1" +version = "6.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d8b8abf912b9a29ff112e1671c97c33636903d13a69712037190e6805af4f76" +checksum = "b2232035104db97d8ded0e24a20d6ba61a0f904e5830d437f411d9a499336224" dependencies = [ "dlib", "once_cell", @@ -7759,9 +8081,9 @@ dependencies = [ [[package]] name = "yoke" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "709fe23a0424b6a435d82152b1bd3fdfb0833487d5fa90d05d42762a9891fef5" +checksum = "417ef3fcf6c300b7dbd25c85531a746931c02ad536f3cf4786ed1e88223340b3" dependencies = [ "stable_deref_trait", "yoke-derive", @@ -7770,13 +8092,13 @@ dependencies = [ [[package]] name = "yoke-derive" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33811428bee40dbceb6d545e95754741d17a6aef9a4849f0fd62e2ba4f412a78" +checksum = "ec8ebde2db3681e8c9980cc27822030e68752690ddfa9473e739aeb4dbde6d71" dependencies = [ "proc-macro2", "quote", - "syn 3.0.6", + "syn 3.0.10", "synstructure", ] @@ -7802,7 +8124,7 @@ dependencies = [ "hex", "libc", "ordered-stream", - "rustix 1.1.5", + "rustix 1.1.6", "serde", "serde_repr", "tokio", @@ -7810,12 +8132,39 @@ dependencies = [ "uds_windows", "uuid", "windows-sys 0.61.2", - "winnow 1.0.4", - "zbus_macros", + "winnow", + "zbus_macros 5.19.0", "zbus_names", "zvariant", ] +[[package]] +name = "zbus" +version = "6.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e0ea2f1a9da0558d47969ca08a4bb5397aa0a2d1e700e599c72f2064b2c0abe" +dependencies = [ + "async-trait", + "bitflags 2.13.2", + "endi", + "futures-core", + "hex", + "libc", + "ordered-stream", + "rustix 1.1.6", + "serde", + "serde_repr", + "socket2", + "uds_windows", + "uuid", + "windows-sys 0.61.2", + "winnow", + "zbus_macros 6.6.0", + "zbus_utils", + "zcheapstr", + "zruntime", +] + [[package]] name = "zbus-lockstep" version = "0.5.2" @@ -7849,23 +8198,48 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 3.0.6", + "syn 3.0.10", "zbus_names", "zvariant", "zvariant_utils", ] +[[package]] +name = "zbus_macros" +version = "6.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6101224e3a5ff01f23f19510837e30aae926060869781b79f7b230203420c26" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.10", + "zbus_utils", +] + [[package]] name = "zbus_names" -version = "4.3.4" +version = "4.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8bf88b4a3ff53e883001e0e0115b297a9d53c31b9c1edd2bfdd853e3428624e" +checksum = "812a12be4ead7a59e18ea8f047d08add0066b73bc62fc1467066a2472ae088dd" dependencies = [ "serde", - "winnow 1.0.4", + "winnow", "zvariant", ] +[[package]] +name = "zbus_utils" +version = "6.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b180774785a9d3ae6695dbf0d0baac91eb4facef62f7be0007d3e3965d86fc6" +dependencies = [ + "proc-macro2", + "quote", + "serde", + "syn 3.0.10", + "winnow", +] + [[package]] name = "zbus_xml" version = "5.2.1" @@ -7873,16 +8247,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d1586c021a01ca0a9216dcd874e546382e156a5cbab5fab6cb5f10087e22682a" dependencies = [ "serde", - "winnow 1.0.4", + "winnow", "zbus_names", "zvariant", ] [[package]] name = "zcheapstr" -version = "1.1.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1afec51604565183aeb5c54c20aeab286120d4e4460f7f76e3e8bb8c0d99473" +checksum = "2da34e7164b75d803c3197b86e6cf61b874106fbd472c5082575a8bc5fbd0907" dependencies = [ "serde", ] @@ -7956,18 +8330,18 @@ checksum = "6df3dc4292935e51816d896edcd52aa30bc297907c26167fec31e2b0c6a32524" [[package]] name = "zerocopy" -version = "0.8.59" +version = "0.8.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6df92bf3d9227be3d53173901ddbffac2babc27ae50f397776ffd6dc33f800cb" +checksum = "cba8a86aee14fc8cc6c208af60854b3d4ab7185a9a369a12c648faa2716ff42a" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.8.59" +version = "0.8.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac4f328cf2f05d084e496c3e9c3f33ed0a183656a16e1fcec4d464d8373aec82" +checksum = "f89bca3b96ceb3cfcb4572790402f977442270d252b9a8504ebc258760c55f94" dependencies = [ "proc-macro2", "quote", @@ -7991,15 +8365,15 @@ checksum = "f75b4683f6c7f45248d4d64056a24298c6281e0993356d7d1b4a1a962ef10d4a" dependencies = [ "proc-macro2", "quote", - "syn 3.0.6", + "syn 3.0.10", "synstructure", ] [[package]] name = "zeroize" -version = "1.9.0" +version = "1.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13c156562582aa81c60cb29407084cdb54c4164760106ab78e6c5b0858cf64e" +checksum = "85ccff8a4805aba1eaa4cd4afcd49f7557dd2cf5fd79ffc37f8959466effc5aa" dependencies = [ "zeroize_derive", ] @@ -8024,14 +8398,16 @@ dependencies = [ "displaydoc", "yoke", "zerofrom", + "zerovec", ] [[package]] name = "zerovec" -version = "0.11.8" +version = "0.11.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb0464e17806c1d976d5cba29399c7f08e516e279e2ba493f63123b5fca67dd8" +checksum = "f58a2799cfe9a1670c7ea8edbd52ef8edb93cb37a7f83bf31ba9e35d9dae6a40" dependencies = [ + "serde", "yoke", "zerofrom", "zerovec-derive", @@ -8039,20 +8415,20 @@ dependencies = [ [[package]] name = "zerovec-derive" -version = "0.11.6" +version = "0.11.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34df6fc39dbd26ddc9c10e6a2984476e13acce22e64e4487636ef494369225da" +checksum = "c3743ddbf47738d929cd1ae2e199d40d0162979dfe31aef8ae646d2bf00bf97a" dependencies = [ "proc-macro2", "quote", - "syn 3.0.6", + "syn 3.0.10", ] [[package]] name = "zlib-rs" -version = "0.6.8" +version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b268e58e7c693d7c271f93ffc4ba3b380412554231c85bf61ca7af91042a4112" +checksum = "aa76918995d776d9dd34d371030be228d021137449771493d56e29f77e4148ac" [[package]] name = "zmij" @@ -8060,11 +8436,24 @@ version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b" +[[package]] +name = "zruntime" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac67096b97c00742108c4674db6bb6178adb78c4b66a506b0e4a7a9593aa5d9e" +dependencies = [ + "futures-core", + "futures-io", + "rustix 1.1.6", + "socket2", + "windows-sys 0.61.2", +] + [[package]] name = "zune-core" -version = "0.5.3" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d56377fd46368984a170bc5aac5567e52ca5da874caa60bea39fcbca78fb658b" +checksum = "c1a65ee146f41cb456b005bc898af3ab1495ded4ee61ac3637103f40ccacac18" [[package]] name = "zune-inflate" @@ -8086,15 +8475,15 @@ dependencies = [ [[package]] name = "zvariant" -version = "5.15.0" +version = "5.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1d34c27cc6cdd1f458427519dd6b8612f7b7e3f7b9a0b2355d041dda9869147" +checksum = "80bf6d6cd6a4b601acb64cfb8284cdc643fcfa75ef26ae3c46ec8aa4e8a1fbb7" dependencies = [ "endi", "enumflags2", "serde", "serde_bytes", - "winnow 1.0.4", + "winnow", "zcheapstr", "zvariant_derive", "zvariant_utils", @@ -8102,14 +8491,14 @@ dependencies = [ [[package]] name = "zvariant_derive" -version = "5.15.0" +version = "5.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "864155e69b4352db0c7f374917bf45d1e0c8d17659c8b3dbf9795f3673f8c497" +checksum = "ef2672456ba1cb54b5eaec136e63135b3c7495fb938e53b28a62e633496d486d" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 3.0.6", + "syn 3.0.10", "zvariant_utils", ] @@ -8122,6 +8511,6 @@ dependencies = [ "proc-macro2", "quote", "serde", - "syn 3.0.6", - "winnow 1.0.4", + "syn 3.0.10", + "winnow", ] diff --git a/Cargo.toml b/Cargo.toml index f6466bc..7a09f35 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ members = ["crates/musit-core", "crates/immersion"] resolver = "2" [workspace.package] -version = "0.2.8" +version = "0.3.0" edition = "2024" license = "GPL-3.0-only" @@ -11,17 +11,16 @@ license = "GPL-3.0-only" # gpui-ce is the community edition of Zed's GPUI, synced from Zed and published # to crates.io. It is imported as `gpui` so the code reads as GPUI code, and it # is the edition vampir builds against, so both crates share one set of types. -gpui = { package = "gpui-ce", version = "0.2.2" } +gpui = { package = "gpui-ce", version = "0.3.0" } unicode-segmentation = "1" serde = { version = "1", features = ["derive"] } serde_json = { version = "1", features = ["preserve_order"] } -sha2 = "0.10" +sha2 = "0.11" flate2 = "1" regex = "1" -once_cell = "1" chrono = { version = "0.4", default-features = false, features = ["clock"] } dirs = "7" -notify = "8" +notify = "9" tempfile = "3" [profile.release] @@ -34,3 +33,10 @@ inherits = "release" lto = "fat" codegen-units = 1 strip = "symbols" + +# Vampir GPUI 0.3 fixes, including the macOS startup deadlock fix. +[patch.crates-io] +gpui-ce = { git = "https://github.com/404oops/vampir.git", rev = "64ce7c0e377ca48f4c36570d820c8360293e3d6c" } +gpui_ce_macos = { git = "https://github.com/404oops/vampir.git", rev = "64ce7c0e377ca48f4c36570d820c8360293e3d6c" } +gpui_ce_windows = { git = "https://github.com/404oops/vampir.git", rev = "64ce7c0e377ca48f4c36570d820c8360293e3d6c" } +gpui_ce_linux = { git = "https://github.com/404oops/vampir.git", rev = "64ce7c0e377ca48f4c36570d820c8360293e3d6c" } diff --git a/RELEASE_TITLE b/RELEASE_TITLE index 894dd5c..051a1ed 100644 --- a/RELEASE_TITLE +++ b/RELEASE_TITLE @@ -1 +1 @@ -Immersion 0.2.8 — Smoother Settings +Immersion 0.3.0 — Version Pruners, Context Menus & Optimizations diff --git a/assets/screenshots/immersion-music.png b/assets/screenshots/immersion-music.png index 84c8f30..25de6a2 100644 Binary files a/assets/screenshots/immersion-music.png and b/assets/screenshots/immersion-music.png differ diff --git a/assets/screenshots/immersion-pruner.png b/assets/screenshots/immersion-pruner.png new file mode 100644 index 0000000..27a6841 Binary files /dev/null and b/assets/screenshots/immersion-pruner.png differ diff --git a/assets/screenshots/immersion-version-notes.png b/assets/screenshots/immersion-version-notes.png index d2d6270..683b5f4 100644 Binary files a/assets/screenshots/immersion-version-notes.png and b/assets/screenshots/immersion-version-notes.png differ diff --git a/assets/screenshots/immersion-visual.png b/assets/screenshots/immersion-visual.png index 2c52b7b..d0a417e 100644 Binary files a/assets/screenshots/immersion-visual.png and b/assets/screenshots/immersion-visual.png differ diff --git a/crates/immersion/Cargo.toml b/crates/immersion/Cargo.toml index a5b3e73..e105825 100644 --- a/crates/immersion/Cargo.toml +++ b/crates/immersion/Cargo.toml @@ -13,17 +13,17 @@ winresource = "0.1" [dependencies] musit-core = { path = "../musit-core" } # The widget toolkit (https://github.com/404oops/vampir), from crates.io. -vampir = "0.2.0" +vampir = "0.4.2" +trash = "5" gpui.workspace = true # The platform backend for gpui-ce. `runtime_shaders` compiles the Metal # shaders at startup so a machine with only the command line tools can build. -gpui_platform = { package = "gpui_ce_platform", version = "0.1.0", features = ["font-kit", "runtime_shaders", "x11"] } +gpui_platform = { package = "gpui_ce_platform", version = "0.3.0", features = ["font-kit", "runtime_shaders", "x11"] } unicode-segmentation.workspace = true serde.workspace = true serde_json.workspace = true chrono.workspace = true dirs.workspace = true -once_cell.workspace = true [target.'cfg(target_os = "linux")'.dependencies] ksni = { version = "0.3.6", features = ["blocking"] } @@ -110,18 +110,18 @@ windows = { version = "0.62", features = [ ] } image = { version = "0.25", default-features = false, features = ["png"] } -base64 = "0.22" -ed25519-dalek = "2" +base64 = "0.23" +ed25519-dalek = "3" semver = "1" sha2.workspace = true reqwest = { version = "0.12", default-features = false, features = ["blocking", "rustls-tls"] } tempfile.workspace = true -winreg = "0.55" +winreg = "0.56" [dev-dependencies] tempfile.workspace = true -base64 = "0.22" -ed25519-dalek = "2" +base64 = "0.23" +ed25519-dalek = "3" semver = "1" sha2.workspace = true diff --git a/crates/immersion/locales/README.md b/crates/immersion/locales/README.md index c3d916d..1f65586 100644 --- a/crates/immersion/locales/README.md +++ b/crates/immersion/locales/README.md @@ -12,7 +12,8 @@ English is the default and the fallback for an untranslated key. Adding a language requires another JSON file and an entry in `src/i18n.rs` to load and select it, plus a choice in both language dropdowns. -The main window, settings, onboarding, version details, dialogs, save -notifications, and macOS menus use these catalogs. Technical identifiers, -file paths, project names, diagnostic activity logs, and backend messages keep -their original text. See the [translation guide](../../../wiki/Translations.md). +The main window, settings, onboarding, version details, Manage Versions pruner, +context menus, dialogs, save notifications, and macOS/Linux menus use these +catalogs. Technical identifiers, file paths, project names, diagnostic activity +logs, and backend messages keep their original text. See the +[translation guide](../../../wiki/Translations.md). diff --git a/crates/immersion/locales/de.json b/crates/immersion/locales/de.json index 507baa2..d436eb4 100644 --- a/crates/immersion/locales/de.json +++ b/crates/immersion/locales/de.json @@ -33,7 +33,7 @@ "layout_dialog.title": "Wie sind Ihre Projekte angeordnet?", "common.cancel": "Abbrechen", "common.ok": "OK", - "settings.title": "Einstellungen", + "settings.title": "Optionen", "common.close": "Schließen", "settings.projects_folder": "Ordner für Projekte", "settings.no_folder": "Noch kein Ordner gewählt", @@ -95,7 +95,7 @@ "versions.path": "Pfad", "versions.opened": "Geöffnet", "versions.project_note": "Notiz zum Projekt", - "versions.save_note": "Sichern", + "versions.save_note": "Notiz speichern", "versions.version": "Version", "versions.saved": "Gesichert", "versions.current": "Aktuell", @@ -134,5 +134,37 @@ "date.sep": "Sep", "date.oct": "Okt", "date.nov": "Nov", - "date.dec": "Dez" + "date.dec": "Dez", + "context.change_name": "Namen ändern", + "context.open_folder": "Übergeordneten Ordner öffnen", + "context.open_project": "Projekt öffnen", + "context.delete_project": "Projekt löschen", + "context.delete_version": "Version löschen", + "context.trash_message": "{path} in den Papierkorb verschieben?", + "context.move_to_trash": "In den Papierkorb verschieben", + "context.trash_failed": "Projekt konnte nicht in den Papierkorb verschoben werden", + "context.trash_outside_folder": "Der Projektpfad liegt außerhalb des überwachten Ordners.", + "context.manage_versions": "Versionen verwalten…", + "pruner.title": "Versionen verwalten", + "pruner.before": "Vorher", + "pruner.after": "Nachher", + "pruner.before_count": "Aktuell {count} Sicherungen · {size}", + "pruner.after_count": "Danach {keep} ({remove} entfernt) · {size} (spart {saved})", + "pruner.after_count_none": "Danach {keep} (0 entfernt) · {size}", + "pruner.keep_label": "Zu behaltende Sicherungen", + "pruner.apply": "{count} entfernen", + "pruner.nothing_to_prune": "Nichts zu entfernen", + "settings.tab_close_buttons": "Schließen-Schaltflächen auf Ordner-Tabs anzeigen", + "settings.global_pruner": "Globale Versionsbereinigung", + "settings.global_pruner_detail": "Entfernt ältere gespeicherte Versionen in allen überwachten Ordnern und behält die neuesten Sicherungen sowie die aktuelle Version pro Projekt.", + "settings.global_pruner_keep": "Sicherungen pro Projekt", + "settings.global_pruner_empty": "Keine überwachten Projekte gefunden.", + "settings.global_pruner_summary": "{remove} Sicherungen in {projects} Projekten werden entfernt ({keep} von {total} behalten, ~{size} frei).", + "settings.global_pruner_none": "Alle {total} Sicherungen in {projects} Projekten bleiben erhalten.", + "settings.storage_saver": "Speichersparmodus", + "settings.storage_saver_detail": "Entfernt nach jedem Speichern automatisch ältere Versionen gemäß dem Limit unten und schützt stets die aktuelle Version.", + "settings.storage_info_used": "Belegter Sicherungsspeicher: {used}", + "settings.storage_info_with_saved": "Belegter Sicherungsspeicher: {used} · Gesamt eingespart: {saved}", + "dialog.global_prune_title": "Alle Projekte bereinigen", + "dialog.global_prune_message": "{count} ältere Sicherungen in {projects} Projekten dauerhaft löschen und bis zu {keep} pro Projekt behalten?\n\nDies kann nicht rückgängig gemacht werden." } diff --git a/crates/immersion/locales/el.json b/crates/immersion/locales/el.json index 4250209..4810304 100644 --- a/crates/immersion/locales/el.json +++ b/crates/immersion/locales/el.json @@ -33,7 +33,7 @@ "layout_dialog.title": "Πώς είναι οργανωμένα τα έργα σας;", "common.cancel": "Ακύρωση", "common.ok": "Εντάξει", - "settings.title": "Ρυθμίσεις", + "settings.title": "Επιλογές", "common.close": "Κλείσιμο", "settings.projects_folder": "Φάκελος έργων", "settings.no_folder": "Δεν έχει επιλεγεί φάκελος", @@ -95,7 +95,7 @@ "versions.path": "Διαδρομή", "versions.opened": "Άνοιξε", "versions.project_note": "Σημείωση έργου", - "versions.save_note": "Αποθήκευση", + "versions.save_note": "Αποθήκευση σημείωσης", "versions.version": "Έκδοση", "versions.saved": "Αποθηκεύτηκε", "versions.current": "Τρέχουσα", @@ -134,5 +134,37 @@ "date.sep": "Σεπ", "date.oct": "Οκτ", "date.nov": "Νοε", - "date.dec": "Δεκ" + "date.dec": "Δεκ", + "context.change_name": "Αλλαγή ονόματος", + "context.open_folder": "Άνοιγμα φακέλου που το περιέχει", + "context.open_project": "Άνοιγμα έργου", + "context.delete_project": "Διαγραφή έργου", + "context.delete_version": "Διαγραφή έκδοσης", + "context.trash_message": "Μετακίνηση του {path} στον κάδο του συστήματος;", + "context.move_to_trash": "Μετακίνηση στον κάδο", + "context.trash_failed": "Αδυναμία μετακίνησης του έργου στον κάδο", + "context.trash_outside_folder": "Η διαδρομή του έργου βρίσκεται εκτός του παρακολουθούμενου φακέλου.", + "context.manage_versions": "Διαχείριση εκδόσεων…", + "pruner.title": "Διαχείριση εκδόσεων", + "pruner.before": "Πριν", + "pruner.after": "Μετά", + "pruner.before_count": "{count} αντίγραφα τώρα · {size}", + "pruner.after_count": "{keep} μετά ({remove} διαγραφή) · {size} (εξοικ. {saved})", + "pruner.after_count_none": "{keep} μετά (0 διαγραφές) · {size}", + "pruner.keep_label": "Αντίγραφα προς διατήρηση", + "pruner.apply": "Διαγραφή {count}", + "pruner.nothing_to_prune": "Τίποτα προς διαγραφή", + "settings.tab_close_buttons": "Εμφάνιση κουμπιών κλεισίματος στις καρτέλες φακέλων", + "settings.global_pruner": "Καθολική εκκαθάριση εκδόσεων", + "settings.global_pruner_detail": "Αφαιρεί παλαιότερες αποθηκευμένες εκδόσεις σε όλους τους φακέλους, διατηρώντας τα νεότερα αντίγραφα και την τρέχουσα έκδοση κάθε έργου.", + "settings.global_pruner_keep": "αντίγραφα ανά έργο", + "settings.global_pruner_empty": "Δεν βρέθηκαν παρακολουθούμενα έργα.", + "settings.global_pruner_summary": "Θα διαγραφούν {remove} αντίγραφα σε {projects} έργα (διατηρούνται {keep} από {total}, ~{size} ελεύθερα).", + "settings.global_pruner_none": "Θα διατηρηθούν και τα {total} αντίγραφα σε {projects} έργα.", + "settings.storage_saver": "Εξοικονόμηση χώρου", + "settings.storage_saver_detail": "Διαγράφει αυτόματα παλαιότερες εκδόσεις μετά από κάθε αποθήκευση με βάση το παρακάτω όριο, προστατεύοντας πάντα την τρέχουσα έκδοση.", + "settings.storage_info_used": "Χώρος αντιγράφων: {used}", + "settings.storage_info_with_saved": "Χώρος αντιγράφων: {used} · Συνολική εξοικονόμηση: {saved}", + "dialog.global_prune_title": "Εκκαθάριση όλων των έργων", + "dialog.global_prune_message": "Μόνιμη διαγραφή {count} παλαιότερων αντιγράφων σε {projects} έργα, διατηρώντας έως {keep} ανά έργο;\n\nΑυτή η ενέργεια δεν μπορεί να αναιρεθεί." } diff --git a/crates/immersion/locales/en.json b/crates/immersion/locales/en.json index ff3aa77..3b71e22 100644 --- a/crates/immersion/locales/en.json +++ b/crates/immersion/locales/en.json @@ -33,7 +33,7 @@ "layout_dialog.title": "How are your projects organized?", "common.cancel": "Cancel", "common.ok": "OK", - "settings.title": "Settings", + "settings.title": "Options", "common.close": "Close", "settings.projects_folder": "Projects folder", "settings.no_folder": "No folder selected yet", @@ -134,5 +134,37 @@ "date.sep": "Sep", "date.oct": "Oct", "date.nov": "Nov", - "date.dec": "Dec" + "date.dec": "Dec", + "context.change_name": "Change Name", + "context.open_folder": "Open Enclosing Folder", + "context.open_project": "Open Project", + "context.delete_project": "Delete Project", + "context.delete_version": "Delete Version", + "context.trash_message": "Move {path} to the system Trash?", + "context.move_to_trash": "Move to Trash", + "context.trash_failed": "Could Not Move Project to Trash", + "context.trash_outside_folder": "Project path is outside its monitored folder.", + "context.manage_versions": "Manage Versions…", + "pruner.title": "Manage Versions", + "pruner.before": "Before", + "pruner.after": "After", + "pruner.before_count": "{count} backups currently · {size}", + "pruner.after_count": "{keep} backups after ({remove} removed) · {size} (saves {saved})", + "pruner.after_count_none": "{keep} backups after (0 removed) · {size}", + "pruner.keep_label": "Backups to keep", + "pruner.apply": "Prune {count}", + "pruner.nothing_to_prune": "Nothing to prune", + "settings.tab_close_buttons": "Show folder tab close buttons", + "settings.global_pruner": "Global version pruner", + "settings.global_pruner_detail": "Trim older saved versions across all watched folders, keeping the newest backups and the current version for each project.", + "settings.global_pruner_keep": "backups to keep per project", + "settings.global_pruner_empty": "No watched projects found.", + "settings.global_pruner_summary": "{remove} backups will be removed across {projects} projects ({keep} of {total} kept, ~{size} freed).", + "settings.global_pruner_none": "All {total} backups across {projects} projects will be kept.", + "settings.storage_saver": "Storage saver", + "settings.storage_saver_detail": "Automatically prune older versions after each save using the keep limit below, always protecting the current version.", + "settings.storage_info_used": "Backup storage used: {used}", + "settings.storage_info_with_saved": "Backup storage used: {used} · Total saved by pruning: {saved}", + "dialog.global_prune_title": "Prune All Projects", + "dialog.global_prune_message": "Permanently delete {count} older backups across {projects} projects, keeping up to {keep} per project?\n\nThis cannot be undone." } diff --git a/crates/immersion/locales/es.json b/crates/immersion/locales/es.json index 2b8b669..f1b258a 100644 --- a/crates/immersion/locales/es.json +++ b/crates/immersion/locales/es.json @@ -33,7 +33,7 @@ "layout_dialog.title": "¿Cómo están organizados tus proyectos?", "common.cancel": "Cancelar", "common.ok": "Aceptar", - "settings.title": "Ajustes", + "settings.title": "Opciones", "common.close": "Cerrar", "settings.projects_folder": "Carpeta de proyectos", "settings.no_folder": "Aún no hay ninguna carpeta elegida", @@ -134,5 +134,37 @@ "date.sep": "sep", "date.oct": "oct", "date.nov": "nov", - "date.dec": "dic" + "date.dec": "dic", + "context.change_name": "Cambiar nombre", + "context.open_folder": "Abrir carpeta contenedora", + "context.open_project": "Abrir proyecto", + "context.delete_project": "Eliminar proyecto", + "context.delete_version": "Eliminar versión", + "context.trash_message": "¿Mover {path} a la papelera del sistema?", + "context.move_to_trash": "Mover a la papelera", + "context.trash_failed": "No se pudo mover el proyecto a la papelera", + "context.trash_outside_folder": "La ruta del proyecto está fuera de la carpeta vigilada.", + "context.manage_versions": "Gestionar versiones…", + "pruner.title": "Gestionar versiones", + "pruner.before": "Antes", + "pruner.after": "Después", + "pruner.before_count": "{count} copias actualmente · {size}", + "pruner.after_count": "{keep} después ({remove} eliminadas) · {size} (ahorra {saved})", + "pruner.after_count_none": "{keep} después (0 eliminadas) · {size}", + "pruner.keep_label": "Copias a conservar", + "pruner.apply": "Eliminar {count}", + "pruner.nothing_to_prune": "Nada que eliminar", + "settings.tab_close_buttons": "Mostrar botones de cierre en las pestañas de carpetas", + "settings.global_pruner": "Limpieza global de versiones", + "settings.global_pruner_detail": "Elimina versiones guardadas antiguas en todas las carpetas supervisadas, conservando las copias más recientes y la versión actual de cada proyecto.", + "settings.global_pruner_keep": "copias a conservar por proyecto", + "settings.global_pruner_empty": "No se encontraron proyectos supervisados.", + "settings.global_pruner_summary": "Se eliminarán {remove} copias en {projects} proyectos (se conservan {keep} de {total}, ~{size} liberados).", + "settings.global_pruner_none": "Se conservarán las {total} copias en {projects} proyectos.", + "settings.storage_saver": "Ahorro de almacenamiento", + "settings.storage_saver_detail": "Elimina automáticamente versiones antiguas tras cada guardado usando el límite inferior, protegiendo siempre la versión actual.", + "settings.storage_info_used": "Espacio usado en copias: {used}", + "settings.storage_info_with_saved": "Espacio usado en copias: {used} · Total ahorrado: {saved}", + "dialog.global_prune_title": "Limpiar todos los proyectos", + "dialog.global_prune_message": "¿Eliminar permanentemente {count} copias antiguas en {projects} proyectos, conservando hasta {keep} por proyecto?\n\nEsta acción no se puede deshacer." } diff --git a/crates/immersion/locales/fr.json b/crates/immersion/locales/fr.json index 5b39365..1af326b 100644 --- a/crates/immersion/locales/fr.json +++ b/crates/immersion/locales/fr.json @@ -33,7 +33,7 @@ "layout_dialog.title": "Comment vos projets sont-ils organisés ?", "common.cancel": "Annuler", "common.ok": "OK", - "settings.title": "Réglages", + "settings.title": "Options", "common.close": "Fermer", "settings.projects_folder": "Dossier de projets", "settings.no_folder": "Aucun dossier choisi", @@ -95,7 +95,7 @@ "versions.path": "Chemin", "versions.opened": "Ouvert", "versions.project_note": "Note du projet", - "versions.save_note": "Enregistrer", + "versions.save_note": "Enregistrer la note", "versions.version": "Version", "versions.saved": "Enregistrée", "versions.current": "Actuelle", @@ -134,5 +134,37 @@ "date.sep": "sept.", "date.oct": "oct.", "date.nov": "nov.", - "date.dec": "déc." + "date.dec": "déc.", + "context.change_name": "Changer le nom", + "context.open_folder": "Ouvrir le dossier parent", + "context.open_project": "Ouvrir le projet", + "context.delete_project": "Supprimer le projet", + "context.delete_version": "Supprimer la version", + "context.trash_message": "Déplacer {path} dans la corbeille du système ?", + "context.move_to_trash": "Déplacer dans la corbeille", + "context.trash_failed": "Impossible de déplacer le projet dans la corbeille", + "context.trash_outside_folder": "Le chemin du projet se trouve en dehors du dossier surveillé.", + "context.manage_versions": "Gérer les versions…", + "pruner.title": "Gérer les versions", + "pruner.before": "Avant", + "pruner.after": "Après", + "pruner.before_count": "{count} sauvegardes actuellement · {size}", + "pruner.after_count": "{keep} après ({remove} supprimées) · {size} (économie {saved})", + "pruner.after_count_none": "{keep} après (0 supprimée) · {size}", + "pruner.keep_label": "Sauvegardes à conserver", + "pruner.apply": "Supprimer {count}", + "pruner.nothing_to_prune": "Rien à supprimer", + "settings.tab_close_buttons": "Afficher les boutons de fermeture des onglets de dossier", + "settings.global_pruner": "Nettoyage global des versions", + "settings.global_pruner_detail": "Supprime les anciennes versions enregistrées dans tous les dossiers surveillés, en conservant les plus récentes et la version actuelle de chaque projet.", + "settings.global_pruner_keep": "sauvegardes à garder par projet", + "settings.global_pruner_empty": "Aucun projet surveillé trouvé.", + "settings.global_pruner_summary": "{remove} sauvegardes seront supprimées dans {projects} projets ({keep} sur {total} conservées, ~{size} libérés).", + "settings.global_pruner_none": "Toutes les {total} sauvegardes dans {projects} projets seront conservées.", + "settings.storage_saver": "Économiseur de stockage", + "settings.storage_saver_detail": "Supprime automatiquement les anciennes versions après chaque enregistrement selon la limite ci-dessous, en protégeant toujours la version actuelle.", + "settings.storage_info_used": "Stockage des sauvegardes : {used}", + "settings.storage_info_with_saved": "Stockage des sauvegardes : {used} · Total économisé : {saved}", + "dialog.global_prune_title": "Nettoyer tous les projets", + "dialog.global_prune_message": "Supprimer définitivement {count} anciennes sauvegardes dans {projects} projets, en gardant jusqu'à {keep} par projet ?\n\nCette action est irréversible." } diff --git a/crates/immersion/locales/sr.json b/crates/immersion/locales/sr.json index 1beb19f..a90efbc 100644 --- a/crates/immersion/locales/sr.json +++ b/crates/immersion/locales/sr.json @@ -33,7 +33,7 @@ "layout_dialog.title": "Како су организовани ваши пројекти?", "common.cancel": "Откажи", "common.ok": "У реду", - "settings.title": "Подешавања", + "settings.title": "Опције", "common.close": "Затвори", "settings.projects_folder": "Фасцикла пројеката", "settings.no_folder": "Фасцикла још није изабрана", @@ -95,7 +95,7 @@ "versions.path": "Путања", "versions.opened": "Отворено", "versions.project_note": "Белешка о пројекту", - "versions.save_note": "Сачувај", + "versions.save_note": "Сачувај белешку", "versions.version": "Верзија", "versions.saved": "Сачувано", "versions.current": "Тренутна", @@ -134,5 +134,37 @@ "date.sep": "сеп", "date.oct": "окт", "date.nov": "нов", - "date.dec": "дец" + "date.dec": "дец", + "context.change_name": "Промени име", + "context.open_folder": "Отвори садржећу фасциклу", + "context.open_project": "Отвори пројекат", + "context.delete_project": "Избриши пројекат", + "context.delete_version": "Избриши верзију", + "context.trash_message": "Преместити {path} у системско смеће?", + "context.move_to_trash": "Премести у смеће", + "context.trash_failed": "Није могуће преместити пројекат у смеће", + "context.trash_outside_folder": "Путања пројекта је изван надгледане фасцикле.", + "context.manage_versions": "Управљај верзијама…", + "pruner.title": "Управљање верзијама", + "pruner.before": "Пре", + "pruner.after": "После", + "pruner.before_count": "Тренутно копија: {count} · {size}", + "pruner.after_count": "Остаје: {keep} (брише се {remove}) · {size} (уштеда {saved})", + "pruner.after_count_none": "Остаје: {keep} (0 обрисано) · {size}", + "pruner.keep_label": "Број копија за чување", + "pruner.apply": "Избриши {count}", + "pruner.nothing_to_prune": "Нема ништа за брисање", + "settings.tab_close_buttons": "Прикажи дугмад за затварање картица фасцикли", + "settings.global_pruner": "Глобално чишћење верзија", + "settings.global_pruner_detail": "Уклања старије сачуване верзије у свим надгледаним фасциклама, чувајући најновије и тренутну верзију за сваки пројекат.", + "settings.global_pruner_keep": "копија по пројекту", + "settings.global_pruner_empty": "Нема пронађених надгледаних пројеката.", + "settings.global_pruner_summary": "Биће избрисано {remove} копија у {projects} пројеката (остаје {keep} од {total}, ослобађа се ~{size}).", + "settings.global_pruner_none": "Свих {total} копија у {projects} пројеката биће сачувано.", + "settings.storage_saver": "Уштеда простора", + "settings.storage_saver_detail": "Аутоматски брише старије верзије након сваког чувања према доњем ограничењу, увек чувајући тренутну верзију.", + "settings.storage_info_used": "Заузето за резервне копије: {used}", + "settings.storage_info_with_saved": "Заузето за резервне копије: {used} · Укупно уштеђено: {saved}", + "dialog.global_prune_title": "Очисти све пројекте", + "dialog.global_prune_message": "Трајно избрисати {count} старијих копија у {projects} пројеката, чувајући до {keep} по пројекту?\n\nОва радња се не може опозвати." } diff --git a/crates/immersion/src/app.rs b/crates/immersion/src/app.rs index 42e1cc4..14dea2a 100644 --- a/crates/immersion/src/app.rs +++ b/crates/immersion/src/app.rs @@ -28,7 +28,14 @@ pub struct ConfirmState { pub enum ConfirmAction { ResetConfig, + Noop, DeleteVersion(String), + GlobalPrune(usize), + TrashProject { + paths: Vec, + root: String, + layout: String, + }, RemoveFolder(i32), } @@ -128,15 +135,36 @@ impl HueAnim { const FILE_ICON_PIXELS: usize = 128; /// Lowercase extension of a file name, empty when it has none. -fn file_extension(file_name: &str) -> String { +/// Avoids heap allocation when checking against the icon cache. +fn file_extension_str(file_name: &str) -> Option<&str> { match file_name.rsplit_once('.') { - Some((stem, extension)) if !stem.is_empty() && !extension.is_empty() => { - extension.to_ascii_lowercase() - } - _ => String::new(), + Some((stem, extension)) if !stem.is_empty() && !extension.is_empty() => Some(extension), + _ => None, } } +fn file_extension(file_name: &str) -> String { + file_extension_str(file_name) + .map(str::to_ascii_lowercase) + .unwrap_or_default() +} + +/// Cached text widths and localized option lists for the active language, +/// recomputed only when the language changes rather than on every frame. +#[derive(Clone, Debug, Default)] +pub(crate) struct UiTextMetrics { + pub language: &'static str, + pub sort_combo_width: f32, + pub projects_title_width: f32, + pub sort_label_width: f32, + pub detail_key_width: f32, + pub version_actions_min_width: f32, + pub sort_options: Vec, + pub log_options: Vec, + pub scheme_options: Vec, + pub language_options: Vec, +} + /// Signed distance from `from` to `to` the short way around the colour wheel. fn shortest_hue_delta(from: f64, to: f64) -> f64 { (to - from + 540.0).rem_euclid(360.0) - 180.0 @@ -165,11 +193,16 @@ pub struct RootView { pub project_note_input: Entity, pub version_note_input: Entity, pub retention_input: Entity, + pub pruner_keep_input: Entity, + pub global_pruner_keep_input: Entity, - // Modals. Settings is the app's own panel; the layout and confirm + // Modals. Options is the app's own panel; the layout and confirm // dialogs are vampir dialogs, so whether one is up lives in `controls` // and these only carry what it shows. pub settings_open: bool, + pub global_prune_snapshot: musit_core::backend::GlobalPruneSnapshot, + pub(crate) pruner: Option, + pub(crate) context_target: Option, pub update_settings_error: bool, // Refresh platform/config state on opening Settings and on explicit changes. pub settings_launch_needs_approval: bool, @@ -182,7 +215,13 @@ pub struct RootView { // Version manager state. pub vm_graph: Vec, + pub(crate) graph_paint: std::rc::Rc, + /// Per-node ancestry flag for `vm_selected_id`, recomputed only when the + /// graph or selection changes (zero allocations during render/paint). + pub(crate) selected_ancestors: std::rc::Rc>, pub vm_selected_id: String, + /// Cached localized text widths for headers and inspector keys. + pub(crate) ui_metrics: UiTextMetrics, pub vm_graph_extent: (f32, f32), /// Column count the graph was last laid out for (see `sync_graph_columns`). pub vm_graph_columns: usize, @@ -319,6 +358,7 @@ impl RootView { self.tab_name_input.update(cx, |input, _| { input.placeholder = crate::i18n::tr("input.tab_name").into() }); + self.ui_metrics.language = ""; cx.notify(); } @@ -372,6 +412,12 @@ impl RootView { input.set_text(&backend.snapshot_retention().to_string(), cx); input }); + let pruner_keep_input = cx.new(|cx| TextInput::new(cx, "", false, field_style(&theme))); + let global_pruner_keep_input = cx.new(|cx| { + let mut input = TextInput::new(cx, "", false, field_style(&theme)); + input.set_text(&backend.storage_saver_keep().to_string(), cx); + input + }); let tab_name_input = cx.new(|cx| { TextInput::new( cx, @@ -417,6 +463,50 @@ impl RootView { }); } + // Pruner spinbox direct entry: update preview live when a valid count is typed. + { + let weak = cx.entity().downgrade(); + pruner_keep_input.update(cx, |input, _| { + input.on_change = Some(Box::new(move |text, cx| { + let Ok(value) = text.trim().parse::() else { + return; + }; + if value == 0 { + return; + } + if let Some(root) = weak.upgrade() { + root.update(cx, |root, cx| { + if let Some(pruner) = root.pruner.as_mut() { + pruner.set_keep_count(value); + cx.notify(); + } + }); + } + })); + }); + } + + // Global pruner spinbox direct entry: update preview live when within range. + { + let weak = cx.entity().downgrade(); + global_pruner_keep_input.update(cx, |input, _| { + input.on_change = Some(Box::new(move |text, cx| { + let Ok(value) = text.trim().parse::() else { + return; + }; + if !(1..=500).contains(&value) { + return; + } + if let Some(root) = weak.upgrade() { + root.update(cx, |root, cx| { + root.backend.set_storage_saver_keep(value); + cx.notify(); + }); + } + })); + }); + } + // Search field pushes straight into the backend (onTextEdited). { let weak = cx.entity().downgrade(); @@ -430,18 +520,23 @@ impl RootView { }); } - // Backend pump. + // Adaptive backend pump: polls fast (50 ms) while scans, saves, or + // monitoring init are in flight, relaxes to 250 ms when idle and + // visible, and drops to 1 s when hidden in the menu bar / tray. cx.spawn(async move |this, cx| { + let mut interval = Duration::from_millis(50); loop { - cx.background_executor() - .timer(Duration::from_millis(50)) - .await; - let alive = this - .update(cx, |root: &mut RootView, cx| root.pump(cx)) - .is_ok(); - if !alive { + cx.background_executor().timer(interval).await; + let Ok(busy) = this.update(cx, |root: &mut RootView, cx| root.pump(cx)) else { break; - } + }; + interval = if busy { + Duration::from_millis(50) + } else if crate::is_window_hidden() { + Duration::from_secs(1) + } else { + Duration::from_millis(250) + }; } }) .detach(); @@ -471,7 +566,12 @@ impl RootView { project_note_input, version_note_input, retention_input, + pruner_keep_input, + global_pruner_keep_input, settings_open: false, + global_prune_snapshot: musit_core::backend::GlobalPruneSnapshot::default(), + pruner: None, + context_target: None, update_settings_error: false, settings_launch_needs_approval: false, settings_updates_enabled: true, @@ -479,7 +579,10 @@ impl RootView { layout_dialog: LayoutDialogState::default(), confirm: None, vm_graph: Vec::new(), + graph_paint: std::rc::Rc::default(), + selected_ancestors: std::rc::Rc::default(), vm_selected_id: String::new(), + ui_metrics: UiTextMetrics::default(), vm_graph_extent: (0.0, 0.0), vm_graph_columns: 0, vm_graph_layout_w: 0.0, @@ -529,10 +632,28 @@ impl RootView { self.backend.flush_pending_persist(); } - fn pump(&mut self, cx: &mut Context) { - self.backend.process_pending(); + /// Non-destructively dismisses all transient modals, dialogs, context + /// menus, combos, and inline renames when the window is closed/hidden so + /// reopening from the menu bar or tray always shows a clean main window. + pub fn dismiss_transient_overlays(&mut self, cx: &mut Context) { + self.backend.flush_pending_persist(); + self.settings_open = false; + self.settings_enter_at = None; + self.settings_exit_at = None; + self.pruner = None; + self.confirm = None; + self.context_target = None; + self.renaming_tab = None; + self.controls.close_dialog(); + self.controls.close_menu(); + self.controls.close_combo(); + cx.notify(); + } + + pub(crate) fn pump(&mut self, cx: &mut Context) -> bool { + let busy = self.backend.process_pending(); if !self.backend.has_pending_events() { - return; + return busy; } let events = self.backend.take_events(); @@ -593,6 +714,7 @@ impl RootView { BackendEvent::ConfigReset => { self.refresh_language(cx); self.settings_open = false; + self.pruner = None; self.settings_enter_at = None; self.settings_exit_at = None; self.onboarding = Some(OnboardingStep::Welcome); @@ -614,7 +736,7 @@ impl RootView { let body = if artifact_name.is_empty() { crate::i18n::tr_args("notification.project_saved", &[("project", &project_name), ("version", &version_label)]) } else { - crate::i18n::tr_args("notification.artifact_saved", &[("project", &project_name), ("artifact", &artifact_name), ("version", &version_label)]) + crate::i18n::tr_args("notification.artifact_saved", &[("project", &project_name), ("artifact", artifact_name), ("version", &version_label)]) }; crate::platform::show_notification(crate::i18n::tr("notification.saved"), &body); } @@ -658,6 +780,7 @@ impl RootView { self.project_note_loaded = loaded; } cx.notify(); + true } /// Developer detail (on-disk layout: `.immersion/settings.json`, `.musit` @@ -770,15 +893,38 @@ impl RootView { input.style = field; cx.notify(); }); - self.tab_name_input.update(cx, |input, cx| { + self.global_pruner_keep_input.update(cx, |input, cx| { input.style = field; cx.notify(); }); + if self.pruner.is_some() { + self.pruner_keep_input.update(cx, |input, cx| { + input.style = field; + cx.notify(); + }); + } else { + self.pruner_keep_input.update(cx, |input, _| { + input.style = field; + }); + } + if self.renaming_tab.is_some() { + self.tab_name_input.update(cx, |input, cx| { + input.style = field; + cx.notify(); + }); + } else { + self.tab_name_input.update(cx, |input, _| { + input.style = field; + }); + } } // ---- Modal helpers ---------------------------------------------------- - fn schedule_modal_exit(cx: &mut Context, finish: impl FnOnce(&mut RootView) + 'static) { + pub(crate) fn schedule_modal_exit( + cx: &mut Context, + finish: impl FnOnce(&mut RootView) + 'static, + ) { cx.spawn(async move |this, cx| { cx.background_executor() .timer(vampir::easing::MODAL_EXIT) @@ -823,10 +969,14 @@ impl RootView { // Off any text input, so keys typed while the panel is up don't edit // fields behind the scrim. self.controls.focus_root(window, cx); - // Discard any half-typed retention value from a previous visit. + // Discard any half-typed retention or global-pruner values from a previous visit. let retention = self.backend.snapshot_retention().to_string(); self.retention_input .update(cx, |input, cx| input.set_text(&retention, cx)); + let global_keep = self.backend.storage_saver_keep().to_string(); + self.global_pruner_keep_input + .update(cx, |input, cx| input.set_text(&global_keep, cx)); + self.global_prune_snapshot = self.backend.global_prune_snapshot(); self.refresh_settings_preferences(); self.settings_open = true; self.settings_enter_at = Some(Instant::now()); @@ -944,6 +1094,20 @@ impl RootView { Self::load_note_field(&input, &mut loaded, ¬e, has_selection, force, cx); self.version_note_loaded = loaded; } + self.refresh_selected_ancestors(); + if let Some(pruner) = self.pruner.as_mut() + && pruner.source_nodes.is_empty() + && !self.vm_graph.is_empty() + { + let source = self.backend.selected_project_version_graph(); + let storage = self.backend.selected_project_storage_snapshot(); + let refreshed = + crate::ui::pruner::PrunerState::new(pruner.project_name.clone(), source, storage); + let keep_text = refreshed.keep_count.to_string(); + *pruner = refreshed; + self.pruner_keep_input + .update(cx, |input, cx| input.set_text(&keep_text, cx)); + } self.sync_node_fade(&previous_selected); cx.notify(); @@ -987,6 +1151,7 @@ impl RootView { // yank it away on the next refresh. self.pending_select_latest = false; let previous = std::mem::replace(&mut self.vm_selected_id, version_id.to_string()); + self.refresh_selected_ancestors(); if !previous.is_empty() { self.node_fade = Some(SelectionFade { to: version_id.to_string(), @@ -1025,10 +1190,15 @@ impl RootView { /// The OS document icon for `file_name`, looked up (once) by extension. pub fn file_icon(&mut self, file_name: &str) -> Option> { - let extension = file_extension(file_name); - if extension.is_empty() { + let Some(ext) = file_extension_str(file_name) else { return None; + }; + if !ext.bytes().any(|b| b.is_ascii_uppercase()) + && let Some(cached) = self.file_icons.get(ext) + { + return cached.clone(); } + let extension = file_extension(file_name); if let Some(cached) = self.file_icons.get(&extension) { return cached.clone(); } @@ -1038,13 +1208,96 @@ impl RootView { icon } + /// Returns true if `file_name`'s extension already has a cached icon entry. + pub fn has_cached_file_icon(&self, file_name: &str) -> bool { + let Some(ext) = file_extension_str(file_name) else { + return true; + }; + if !ext.bytes().any(|b| b.is_ascii_uppercase()) { + self.file_icons.contains_key(ext) + } else { + self.file_icons.contains_key(&ext.to_ascii_lowercase()) + } + } + /// Cache-only variant of [`Self::file_icon`] for render paths that hold /// other borrows of the view; warm the cache with `file_icon` first. pub fn cached_file_icon(&self, file_name: &str) -> Option> { - self.file_icons - .get(&file_extension(file_name)) - .cloned() - .flatten() + let ext = file_extension_str(file_name)?; + if !ext.bytes().any(|b| b.is_ascii_uppercase()) { + self.file_icons.get(ext).cloned().flatten() + } else { + self.file_icons + .get(&ext.to_ascii_lowercase()) + .cloned() + .flatten() + } + } + + /// Refreshes cached localized text widths whenever the active language changes. + pub(crate) fn ensure_ui_metrics(&mut self, window: &Window) -> &UiTextMetrics { + let lang = crate::i18n::language(); + if self.ui_metrics.language != lang { + use crate::i18n::tr; + use crate::ui::main_view::ui_text_width; + use gpui::FontWeight; + + let sort_combo_width = [tr("sort.name"), tr("sort.last_opened")] + .into_iter() + .map(|option| ui_text_width(window, option, 12.5, FontWeight::NORMAL)) + .fold(0.0_f32, f32::max) + + 44.0; + let projects_title_width = + ui_text_width(window, tr("main.projects"), 13.0, FontWeight::SEMIBOLD); + let sort_label_width = + ui_text_width(window, tr("main.sort_by"), 12.0, FontWeight::MEDIUM); + let detail_key_width = [ + tr("versions.file"), + tr("versions.path"), + tr("versions.opened"), + ] + .into_iter() + .map(|label| ui_text_width(window, label, 12.0, FontWeight::NORMAL)) + .fold(52.0_f32, f32::max) + .ceil() + + 6.0; + // Sum of the 3 version-column action buttons (text + horizontal + // padding + borders) plus inter-button gaps, so Column 3 expands + // enough to keep all 3 buttons on one row in wide languages. + let button_w = |label: &str, floor: f32| { + (ui_text_width(window, label, 12.5, FontWeight::MEDIUM) + 32.0) + .ceil() + .max(floor) + }; + let version_actions_min_width = button_w(tr("versions.delete"), 72.0) + + button_w(tr("versions.save_note"), 96.0) + + button_w(tr("versions.open"), 104.0) + + 28.0; // gaps + breathing room + + self.ui_metrics = UiTextMetrics { + language: lang, + sort_combo_width, + projects_title_width, + sort_label_width, + detail_key_width, + version_actions_min_width, + sort_options: vec![ + tr("sort.name").to_string(), + tr("sort.last_opened").to_string(), + ], + log_options: vec![tr("log.info").to_string(), tr("log.debug").to_string()], + scheme_options: vec![ + tr("appearance.system").to_string(), + tr("appearance.light").to_string(), + tr("appearance.dark").to_string(), + ], + language_options: crate::i18n::LANGUAGE_NAMES + .into_iter() + .map(str::to_string) + .collect(), + }; + } + &self.ui_metrics } /// Closes the open combo, if any, letting its list fade back out the way @@ -1069,6 +1322,15 @@ impl RootView { self.vm_graph_placement = fitted.placement; self.vm_graph_layout_w = layout_w; self.vm_graph_extent = graph_layout::extent(&self.vm_graph); + self.graph_paint = std::rc::Rc::new(crate::ui::version_manager::GraphPaintData::new( + &self.vm_graph, + )); + self.refresh_selected_ancestors(); + } + + fn refresh_selected_ancestors(&mut self) { + self.selected_ancestors = + std::rc::Rc::new(self.graph_paint.ancestors_mask(&self.vm_selected_id)); } /// Re-flows the graph if the pane size changed (window or split resize, @@ -1107,18 +1369,9 @@ impl RootView { latest.version.id.clone() } - /// Set of the selected node and all its ancestors (for link highlight). - pub fn ancestor_id_set(&self, version_id: &str) -> std::collections::HashSet { - let mut ids = std::collections::HashSet::new(); - let mut current = version_id.to_string(); - while !current.is_empty() { - ids.insert(current.clone()); - current = self - .node_by_id(¤t) - .map(|node| node.parent_id.clone()) - .unwrap_or_default(); - } - ids + /// Cached per-node ancestry mask for the selected version. + pub(crate) fn selected_ancestors(&self) -> std::rc::Rc> { + self.selected_ancestors.clone() } /// Whether a vampir dialog is on screen, open or fading out. @@ -1145,6 +1398,13 @@ impl RootView { { return true; } + if self + .pruner + .as_ref() + .is_some_and(|p| modal_opacity(p.enter_at, p.exit_at).1) + { + return true; + } self.settings_open && modal_opacity(self.settings_enter_at, self.settings_exit_at).1 } @@ -1159,6 +1419,8 @@ impl RootView { } else if self.dialog_showing() { // A dialog on its way out passes Escape on; it must not close // the settings panel underneath as well. + } else if self.pruner.is_some() { + self.request_close_pruner(cx); } else if self.settings_open { self.request_close_settings(cx); } @@ -1177,6 +1439,64 @@ impl RootView { // the pump refreshes once. self.backend.delete_version_by_id(version_id); } + ConfirmAction::GlobalPrune(keep_count) => { + let keep_count = *keep_count; + self.backend.prune_all_projects(keep_count); + self.global_prune_snapshot = self.backend.global_prune_snapshot(); + } + ConfirmAction::TrashProject { + paths, + root, + layout, + } => { + let paths = paths.clone(); + let root = root.clone(); + let layout = layout.clone(); + let ready = self.backend.pause_folder_monitoring(&root); + cx.spawn(async move |this, cx| { + let result = cx + .background_executor() + .spawn(async move { + ready.recv().map_err(|error| error.to_string())?; + crate::ui::context_menus::trash_project_paths(&paths) + }) + .await; + this.update(cx, |this, cx| { + if let Err(error) = result { + this.open_confirm(ConfirmState { + title: crate::i18n::tr("context.trash_failed").into(), + message: error.to_string(), + confirm_text: crate::i18n::tr("common.close").into(), + danger: false, + action: ConfirmAction::Noop, + }); + } + // Refresh the affected workspace even after a partial failure. + // Do not re-add a tab removed while the Trash operation ran. + if this + .backend + .folder_tabs() + .iter() + .any(|tab| tab.path == root) + { + let active = this.backend.projects_folder_path().to_string(); + this.backend.load_projects_from_folder(&root, &layout); + if let Some(index) = this + .backend + .folder_tabs() + .iter() + .position(|tab| tab.path == active) + { + this.backend.set_active_folder_index(index as i32); + } + } + cx.notify(); + }) + .ok(); + }) + .detach(); + } + ConfirmAction::Noop => {} ConfirmAction::RemoveFolder(index) => { self.pending_select_latest = true; self.backend.remove_projects_folder(*index); @@ -1214,6 +1534,7 @@ impl Render for RootView { self.render_main_view(window, cx).into_any_element() }; let modals = self.render_modal_layer(window, cx); + let context_menu = self.render_context_menu(cx); // Tab, Shift-Tab and Escape are the toolkit's; it puts their handlers // on the root, and passes on an Escape it had nothing to close for. @@ -1221,7 +1542,7 @@ impl Render for RootView { // the graph pan is a drag of the app's own and shares the stream. let root = vampir::handle_keys(div().id("root"), self, cx) .size_full() - .font_family(vampir::ui_font()) + .font(vampir::ui_font_face()) .bg(crate::ui::lighting::lit(theme.app_background, 0.035)) .text_color(theme.text_primary) .on_action(cx.listener(Self::dismiss)) @@ -1237,7 +1558,8 @@ impl Render for RootView { }), ) .child(body) - .children(modals); + .children(modals) + .children(context_menu); // Asked after the tree is built, as the toolkit requires: a control // that found its target moved while it was being built (a tab whose diff --git a/crates/immersion/src/i18n.rs b/crates/immersion/src/i18n.rs index 1f4ae8b..02576eb 100644 --- a/crates/immersion/src/i18n.rs +++ b/crates/immersion/src/i18n.rs @@ -160,9 +160,12 @@ mod tests { include_str!("main.rs"), include_str!("app.rs"), include_str!("platform/mac.rs"), + include_str!("platform/linux.rs"), + include_str!("ui/context_menus.rs"), include_str!("ui/main_view.rs"), include_str!("ui/modals.rs"), include_str!("ui/onboarding.rs"), + include_str!("ui/pruner.rs"), include_str!("ui/version_manager.rs"), include_str!("i18n.rs"), ]; diff --git a/crates/immersion/src/main.rs b/crates/immersion/src/main.rs index 43ad84e..bb6cf80 100644 --- a/crates/immersion/src/main.rs +++ b/crates/immersion/src/main.rs @@ -8,6 +8,7 @@ mod ui; mod updater; use std::cell::{Cell, RefCell}; +#[cfg(target_os = "linux")] use std::time::Duration; use gpui::{ @@ -29,7 +30,7 @@ pub(crate) const LINUX_APP_ID: &str = "io.github._404oops.immersion"; const LINUX_ICON: vampir::AppIcon = vampir::AppIcon::png(include_bytes!("../assets/icons/window-linux.png")); -actions!(immersion, [Quit, Hide, HideOthers, ShowAll]); +actions!(immersion, [Quit, CloseWindow, Hide, HideOthers, ShowAll]); #[cfg(target_os = "macos")] fn set_localized_menus(cx: &App) { @@ -53,10 +54,48 @@ fn set_localized_menus(cx: &App) { OsMenuItem::os_action(tr("menu.paste"), ti::Paste, OsAction::Paste), OsMenuItem::os_action(tr("menu.select_all"), ti::SelectAll, OsAction::SelectAll), ]), - Menu::new(tr("menu.window")).items(Vec::::new()), + Menu::new(tr("menu.window")).items([OsMenuItem::action(tr("common.close"), CloseWindow)]), ]); } +/// Closes or hides the main window, matching the platform's close-button +/// behavior (hides to the menu bar/tray where available, otherwise quits). +/// Non-destructively dismisses any open modals/dialogs so reopening the window +/// always returns to a clean main view. Returns whether the OS window should +/// proceed with closing. +fn close_or_hide_main_window(cx: &mut App) -> bool { + MAIN_WINDOW.with(|slot| { + if let Some(handle) = slot.borrow().as_ref() + && let Ok(entity) = handle.entity(cx) + { + entity.update(cx, |view, cx| view.dismiss_transient_overlays(cx)); + } + }); + if cfg!(target_os = "macos") { + // Order the window out (animated) rather than hiding the whole app: + // an app-hidden window comes back with no animation at all. + if !platform::hide_main_window() { + cx.hide(); + } + platform::set_background_agent_mode(true); + APP_HIDDEN.with(|hidden| hidden.set(true)); + false + } else if cfg!(target_os = "linux") && platform::status_item_available() { + if !platform::hide_main_window() { + MAIN_WINDOW.with(|slot| { + if let Some(handle) = slot.borrow().as_ref() { + let _ = handle.update(cx, |_view, win, _cx| win.minimize_window()); + } + }); + } + APP_HIDDEN.with(|hidden| hidden.set(true)); + false + } else { + cx.quit(); + true + } +} + thread_local! { static MAIN_WINDOW: RefCell>> = const { RefCell::new(None) }; // Whether the app is hidden in the menu bar (window closed / agent mode). @@ -66,6 +105,10 @@ thread_local! { static LOGIN_HIDE_PENDING: Cell = const { Cell::new(false) }; } +pub(crate) fn is_window_hidden() -> bool { + APP_HIDDEN.with(|hidden| hidden.get()) +} + /// Brings the main window back: leaves background-agent mode, activates the /// app and shows (or re-activates) the window. /// @@ -77,6 +120,15 @@ fn present_main_window(cx: &mut App) { APP_HIDDEN.with(|hidden| hidden.set(false)); #[cfg(target_os = "linux")] LOGIN_HIDE_PENDING.with(|pending| pending.set(false)); + MAIN_WINDOW.with(|window| { + if let Some(handle) = window.borrow().as_ref() + && let Ok(entity) = handle.entity(cx) + { + entity.update(cx, |view, cx| { + view.pump(cx); + }); + } + }); cx.activate(true); // Linux only maps the window here; GPUI's activation raises it. if !platform::show_main_window() || cfg!(target_os = "linux") { @@ -84,7 +136,7 @@ fn present_main_window(cx: &mut App) { if let Some(handle) = window.borrow().as_ref() { handle .update(cx, |_view, win, _cx| { - win.activate_window(); + win.activate(); }) .ok(); } @@ -155,8 +207,12 @@ fn main() { Some("TextInput"), ), KeyBinding::new("secondary-q", Quit, None), + KeyBinding::new("secondary-w", CloseWindow, None), ]); cx.on_action(|_: &Quit, cx| cx.quit()); + cx.on_action(|_: &CloseWindow, cx| { + close_or_hide_main_window(cx); + }); #[cfg(target_os = "macos")] { @@ -220,28 +276,7 @@ fn main() { // if that fails. window .update(cx, |_view, win, cx| { - win.on_window_should_close(cx, |_win, cx| { - if cfg!(target_os = "macos") { - // Order the window out (animated) rather than hiding - // the whole app: an app-hidden window comes back with - // no animation at all. - if !platform::hide_main_window() { - cx.hide(); - } - platform::set_background_agent_mode(true); - APP_HIDDEN.with(|hidden| hidden.set(true)); - false - } else if cfg!(target_os = "linux") && platform::status_item_available() { - if !platform::hide_main_window() { - _win.minimize_window(); - } - APP_HIDDEN.with(|hidden| hidden.set(true)); - false - } else { - cx.quit(); - true - } - }); + win.on_window_should_close(cx, |_win, cx| close_or_hide_main_window(cx)); }) .ok(); @@ -275,16 +310,32 @@ fn main() { })); } - // Raise requests from secondary instances. + // Raise requests from secondary instances: wait on the channel off + // the main thread so idle wakeups stay at zero. + cx.spawn(async move |cx| { + let mut rx = raise_rx; + loop { + let next = cx + .background_executor() + .spawn(async move { rx.recv().ok().map(|()| rx) }) + .await; + let Some(returned) = next else { + break; + }; + rx = returned; + cx.update(present_main_window); + } + }) + .detach(); + + // Linux system-tray commands arrive on a channel owned by ksni. + #[cfg(target_os = "linux")] cx.spawn(async move |cx| { loop { cx.background_executor() .timer(Duration::from_millis(200)) .await; platform::poll_status_item(); - if raise_rx.try_recv().is_ok() { - cx.update(present_main_window); - } } }) .detach(); diff --git a/crates/immersion/src/platform/linux.rs b/crates/immersion/src/platform/linux.rs index 0e3cc10..42c8bcd 100644 --- a/crates/immersion/src/platform/linux.rs +++ b/crates/immersion/src/platform/linux.rs @@ -78,7 +78,7 @@ impl ksni::Tray for ImmersionTray { fn menu(&self) -> Vec> { vec![ StandardItem { - label: "Open Immersion".into(), + label: crate::i18n::tr("menu.open_immersion").into(), activate: Box::new(|tray: &mut Self| { let _ = tray.commands.send(Command::Open); }), @@ -86,7 +86,7 @@ impl ksni::Tray for ImmersionTray { } .into(), StandardItem { - label: "Quit Immersion".into(), + label: crate::i18n::tr("menu.quit_immersion").into(), activate: Box::new(|tray: &mut Self| { let _ = tray.commands.send(Command::Quit); }), diff --git a/crates/immersion/src/platform/linux_icons.rs b/crates/immersion/src/platform/linux_icons.rs index 8586049..f362321 100644 --- a/crates/immersion/src/platform/linux_icons.rs +++ b/crates/immersion/src/platform/linux_icons.rs @@ -7,7 +7,7 @@ use std::collections::HashMap; use std::path::{Path, PathBuf}; -use once_cell::sync::Lazy; +use std::sync::LazyLock; /// `$XDG_DATA_HOME` then `$XDG_DATA_DIRS`, most specific first. fn data_dirs() -> Vec { @@ -294,7 +294,7 @@ fn current_theme_name() -> Option { /// The current theme and everything it inherits, ending with hicolor as /// the spec requires. Loaded once: the app caches icons per extension too. -static THEMES: Lazy> = Lazy::new(|| { +static THEMES: LazyLock> = LazyLock::new(|| { let mut names: Vec = Vec::new(); let mut themes = Vec::new(); // Depth-first, so each theme's parents follow it in the listed order. diff --git a/crates/immersion/src/platform/mac.rs b/crates/immersion/src/platform/mac.rs index 3c39540..9aa38df 100644 --- a/crates/immersion/src/platform/mac.rs +++ b/crates/immersion/src/platform/mac.rs @@ -23,8 +23,9 @@ use objc2_user_notifications::{ /// Menu bar template icon. const MENUBAR_ICON: &[u8] = include_bytes!("../../assets/icons/menubar.png"); -/// App icon for the Dock when running unbundled. -const APP_ICON: &[u8] = include_bytes!("../../assets/icons/app.png"); +/// App icon for the Dock when running unbundled (256px — crisp at 2x without +/// decoding a 2048pt / 64 MiB Retina backing store). +const APP_ICON: &[u8] = include_bytes!("../../assets/icons/window-linux.png"); thread_local! { static OPEN_CALLBACK: RefCell>> = const { RefCell::new(None) }; @@ -533,8 +534,21 @@ pub fn file_type_icon_png(extension: &str, size_px: usize) -> Option> { return None; } let icon = render_type_icon_png(extension, size_px)?; - let generic = render_type_icon_png("immersion-unclaimed-type-probe", size_px)?; - if icon == generic { None } else { Some(icon) } + thread_local! { + static GENERIC_ICON: RefCell)>> = const { RefCell::new(None) }; + } + let matches_generic = GENERIC_ICON.with(|slot| { + let mut slot = slot.borrow_mut(); + if slot + .as_ref() + .is_none_or(|(cached_size, _)| *cached_size != size_px) + { + let rendered = render_type_icon_png("immersion-unclaimed-type-probe", size_px)?; + *slot = Some((size_px, rendered)); + } + Some(slot.as_ref().unwrap().1 == icon) + })?; + if matches_generic { None } else { Some(icon) } } fn render_type_icon_png(extension: &str, size_px: usize) -> Option> { diff --git a/crates/immersion/src/platform/mod.rs b/crates/immersion/src/platform/mod.rs index 68bdf1f..cdb9e03 100644 --- a/crates/immersion/src/platform/mod.rs +++ b/crates/immersion/src/platform/mod.rs @@ -166,8 +166,5 @@ pub fn status_item_available() -> bool { cfg!(target_os = "macos") } -#[cfg(not(target_os = "linux"))] -pub fn poll_status_item() {} - #[cfg(not(target_os = "macos"))] pub fn set_dock_icon_if_unbundled() {} diff --git a/crates/immersion/src/ui/context_menus.rs b/crates/immersion/src/ui/context_menus.rs new file mode 100644 index 0000000..c69ac4d --- /dev/null +++ b/crates/immersion/src/ui/context_menus.rs @@ -0,0 +1,310 @@ +use crate::app::{ConfirmAction, ConfirmState, RootView}; +use crate::i18n::{tr, tr_args}; +use gpui::{AnyElement, Context, MouseDownEvent, Pixels, Point, Window, prelude::*}; +use vampir::{MenuItem, context_menu}; + +#[derive(Clone, Debug)] +pub(crate) enum Target { + Folder(String), + Project { + path: String, + file: String, + }, + Version { + path: String, + file: String, + id: String, + }, +} + +#[derive(Clone, Copy)] +enum Action { + Open, + Reveal, + ManageVersions, + Delete, + Rename, +} + +impl RootView { + pub(crate) fn show_context_menu( + &mut self, + target: Target, + at: Point, + cx: &mut Context, + ) { + self.context_target = Some(target); + self.controls.open_menu("item-actions", at, ""); + cx.notify(); + } + + pub(crate) fn version_context_menu( + &mut self, + id: &str, + event: &MouseDownEvent, + cx: &mut Context, + ) { + let Some(project) = self + .backend + .projects() + .get(self.backend.selected_project_index() as usize) + else { + return; + }; + let target = Target::Version { + path: self + .backend + .project_root_path(self.backend.selected_project_index()) + .unwrap_or_default() + .to_string(), + file: project.file.clone(), + id: id.into(), + }; + self.show_context_menu(target, event.position, cx); + cx.stop_propagation(); + } + + pub(crate) fn render_context_menu(&mut self, cx: &mut Context) -> Option { + let target = self.context_target.clone()?; + let items = match &target { + Target::Folder(_) => vec![ + MenuItem::action(Action::Rename, tr("context.change_name")), + MenuItem::action(Action::Reveal, tr("context.open_folder")), + MenuItem::separator(), + MenuItem::action(Action::Delete, tr("common.delete")).danger(), + ], + Target::Project { .. } => vec![ + MenuItem::action(Action::Open, tr("context.open_project")), + MenuItem::action(Action::Reveal, tr("context.open_folder")), + MenuItem::action(Action::ManageVersions, tr("context.manage_versions")), + MenuItem::separator(), + MenuItem::action(Action::Delete, tr("context.delete_project")).danger(), + ], + Target::Version { .. } => vec![ + MenuItem::action(Action::Open, tr("versions.open")), + MenuItem::action(Action::Reveal, tr("context.open_folder")), + MenuItem::action(Action::ManageVersions, tr("context.manage_versions")), + MenuItem::separator(), + MenuItem::action(Action::Delete, tr("context.delete_version")).danger(), + ], + }; + context_menu( + "item-actions", + &items, + self.theme.palette(), + self, + cx, + move |this, action, window, cx| this.run_context_action(&target, action, window, cx), + ) + .map(IntoElement::into_any_element) + } + + fn run_context_action( + &mut self, + target: &Target, + action: Action, + window: &mut Window, + cx: &mut Context, + ) { + match target { + Target::Folder(path) => { + let folders = self.backend.folder_tabs(); + let Some(index) = folders.iter().position(|f| &f.path == path) else { + return; + }; + let folder = &folders[index]; + match action { + Action::Rename => { + self.renaming_tab = Some(index as i32); + self.tab_name_input + .update(cx, |input, cx| input.set_text(&folder.name, cx)); + window.focus(&self.tab_name_input.read(cx).focus_handle.clone(), cx); + } + Action::Reveal => cx.open_with_system(std::path::Path::new(path)), + Action::Delete => self.open_confirm(ConfirmState { + title: tr("main.remove_title").into(), + message: tr_args("main.remove_message", &[("folder", &folder.name)]), + confirm_text: tr("common.remove").into(), + danger: true, + action: ConfirmAction::RemoveFolder(index as i32), + }), + Action::Open | Action::ManageVersions => {} + } + } + Target::Project { path, file } | Target::Version { path, file, .. } => { + let Some(index) = + self.backend + .projects() + .iter() + .enumerate() + .find_map(|(index, p)| { + (self.backend.project_root_path(index as i32) == Some(path.as_str()) + && &p.file == file) + .then_some(index) + }) + else { + return; + }; + self.select_project(index as i32, cx); + match (action, target) { + (Action::Reveal, _) => cx.open_with_system(std::path::Path::new(path)), + (Action::ManageVersions, _) => self.open_pruner(window, cx), + (Action::Open, Target::Project { .. }) => { + self.backend.open_project(index as i32) + } + (Action::Open, Target::Version { id, .. }) => { + self.pending_select_latest = true; + self.backend.restore_version_by_id(id); + } + (Action::Delete, Target::Version { id, .. }) => self.open_confirm( + crate::ui::modals::delete_version_confirm(id, self.show_dev_details()), + ), + (Action::Delete, Target::Project { .. }) => { + let root = self.backend.projects_folder_path(); + let paths = match project_trash_paths( + path, + file, + root, + self.backend.projects_folder_layout(), + ) { + Ok(paths) => paths, + Err(error) => { + self.open_confirm(ConfirmState { + title: tr("context.trash_failed").into(), + message: error.to_string(), + confirm_text: tr("common.close").into(), + danger: false, + action: ConfirmAction::Noop, + }); + cx.notify(); + return; + } + }; + self.open_confirm(ConfirmState { + title: tr("context.delete_project").into(), + message: tr_args( + "context.trash_message", + &[("path", &paths[0].display().to_string())], + ), + confirm_text: tr("context.move_to_trash").into(), + danger: true, + action: ConfirmAction::TrashProject { + paths, + root: root.to_string(), + layout: self.backend.projects_folder_layout().to_string(), + }, + }); + } + _ => {} + } + } + } + cx.notify(); + } +} + +pub(crate) fn trash_project_paths(paths: &[std::path::PathBuf]) -> Result<(), String> { + #[cfg(target_os = "macos")] + { + use trash::macos::{DeleteMethod, TrashContextExtMacos}; + let mut context = trash::TrashContext::default(); + // Finder automation requires a separate permission and can wait for it indefinitely. + context.set_delete_method(DeleteMethod::NsFileManager); + context.delete_all(paths).map_err(|error| error.to_string()) + } + #[cfg(not(target_os = "macos"))] + trash::delete_all(paths).map_err(|error| error.to_string()) +} + +/// Files layout shares a directory with other projects; never trash that directory. +fn project_trash_paths( + path: &str, + file: &str, + root: &str, + layout: &str, +) -> std::io::Result> { + use std::path::{Component, Path}; + let invalid = || { + std::io::Error::new( + std::io::ErrorKind::InvalidInput, + tr("context.trash_outside_folder"), + ) + }; + let directory = Path::new(path); + let canonical_root = Path::new(root).canonicalize()?; + let canonical_directory = directory.canonicalize()?; + if !canonical_directory.starts_with(&canonical_root) + || file.is_empty() + || Path::new(file) + .components() + .any(|part| !matches!(part, Component::Normal(_))) + { + return Err(invalid()); + } + let project_file = directory.join(file); + if !project_file + .canonicalize()? + .starts_with(&canonical_directory) + { + return Err(invalid()); + } + if layout == "Bundles" && canonical_directory != canonical_root { + Ok(vec![directory.to_path_buf()]) + } else { + Ok(vec![project_file]) + } +} + +#[cfg(test)] +mod tests { + use super::project_trash_paths; + use std::fs; + + #[test] + fn trash_plan_preserves_shared_directories_and_rejects_escaped_paths() { + let fixture = tempfile::tempdir().unwrap(); + let root = fixture.path(); + fs::write(root.join("song.als"), b"song").unwrap(); + fs::write(root.join("other.als"), b"other").unwrap(); + let root_str = root.to_str().unwrap(); + for layout in ["Files", "Bundles"] { + assert_eq!( + project_trash_paths(root_str, "song.als", root_str, layout).unwrap(), + vec![root.join("song.als")] + ); + } + let bundle = root.join("bundle"); + fs::create_dir(&bundle).unwrap(); + fs::write(bundle.join("song.als"), b"song").unwrap(); + assert_eq!( + project_trash_paths(bundle.to_str().unwrap(), "song.als", root_str, "Bundles").unwrap(), + vec![bundle] + ); + assert!(project_trash_paths(root_str, "../song.als", root_str, "Files").is_err()); + assert!(project_trash_paths(root_str, "missing.als", root_str, "Files").is_err()); + assert!(project_trash_paths(root_str, root_str, root_str, "Files").is_err()); + assert!(root.join("other.als").exists()); + } + + #[cfg(unix)] + #[test] + fn trash_plan_rejects_symlinks_leading_outside_the_workspace() { + let root = tempfile::tempdir().unwrap(); + let external = tempfile::tempdir().unwrap(); + fs::write(external.path().join("song.als"), b"song").unwrap(); + std::os::unix::fs::symlink( + external.path().join("song.als"), + root.path().join("song.als"), + ) + .unwrap(); + assert!( + project_trash_paths( + root.path().to_str().unwrap(), + "song.als", + root.path().to_str().unwrap(), + "Files" + ) + .is_err() + ); + } +} diff --git a/crates/immersion/src/ui/main_view.rs b/crates/immersion/src/ui/main_view.rs index 9755bb9..a39f034 100644 --- a/crates/immersion/src/ui/main_view.rs +++ b/crates/immersion/src/ui/main_view.rs @@ -5,7 +5,7 @@ use chrono::{Datelike, Local, NaiveDateTime}; use gpui::{ Context, ElementId, FontWeight, MouseButton, MouseDownEvent, ObjectFit, SharedString, TextRun, - Window, canvas, div, font, img, prelude::*, px, relative, uniform_list, + Window, canvas, div, img, prelude::*, px, relative, uniform_list, }; use crate::app::{ConfirmAction, ConfirmState, GRAPH_PANE_MIN, LIST_PANE_MIN, RootView}; @@ -27,8 +27,8 @@ const TAB_HEIGHT: f32 = CONTROL_HEIGHT; /// themselves (both drag handles are exactly this thick). const PANE_GAP: f32 = 12.0; -fn ui_text_width(window: &Window, text: &str, size: f32, weight: FontWeight) -> f32 { - let mut face = font(vampir::ui_font()); +pub(crate) fn ui_text_width(window: &Window, text: &str, size: f32, weight: FontWeight) -> f32 { + let mut face = vampir::ui_font_face(); face.weight = weight; let run = TextRun { len: text.len(), @@ -38,7 +38,7 @@ fn ui_text_width(window: &Window, text: &str, size: f32, weight: FontWeight) -> f32::from( window .text_system() - .shape_line(text.into(), px(size), &[run], None) + .shape_line(text.into(), px(size), &[run]) .width(), ) } @@ -68,7 +68,7 @@ fn kind_monogram(kind: &str) -> String { /// "2026-09-02 00:52:09" as "Sep 2", or "Sep 2, 2025" outside the current /// year; anything unparseable is shown as is. -fn short_date(stamp: &str) -> String { +fn short_date(stamp: &str, current_year: i32) -> String { let Ok(when) = NaiveDateTime::parse_from_str(stamp, "%Y-%m-%d %H:%M:%S") else { return stamp.to_string(); }; @@ -84,13 +84,13 @@ fn short_date(stamp: &str) -> String { } else { when.day().to_string() }; - return if when.year() == Local::now().year() { + return if when.year() == current_year { format!("{day} {month}") } else { format!("{day} {month} {}", when.year()) }; } - if when.year() == Local::now().year() { + if when.year() == current_year { when.format("%b %-d").to_string() } else { when.format("%b %-d, %Y").to_string() @@ -155,9 +155,11 @@ impl RootView { .child(self.render_add_folder_button(cx)) .child( // Tab height, so the three header controls line up on - // both edges instead of stepping. + // both edges instead of stepping. Size naturally with a + // minimum width so wide translations ("Einstellungen", + // "Подешавања") keep full horizontal padding. div() - .w(px(92.0)) + .min_w(px(92.0)) .h(px(TAB_HEIGHT)) .flex_none() .child(panel_button( @@ -251,7 +253,7 @@ impl RootView { .flex_1() .min_w_0() .h_full() - .child(self.render_graph_panel(cx)), + .child(self.render_graph_panel(window, cx)), ), ) // Split handle: same gap as the list|graph one, so the @@ -305,7 +307,7 @@ impl RootView { } // Close (stop watching the folder; history stays on disk) is // offered on the active tab only. - if index == active { + if index == active && self.backend.show_tab_close_buttons() { tab = tab.closable(); } tab @@ -373,6 +375,21 @@ impl RootView { cx.notify(); }), ) + .on_mouse_down( + MouseButton::Right, + cx.listener(|this, event: &MouseDownEvent, _window, cx| { + if let Some(index) = this.controls.tab_at(FOLDER_TABS, event.position) + && let Some(folder) = this.backend.folder_tabs().get(index) + { + this.show_context_menu( + crate::ui::context_menus::Target::Folder(folder.path.clone()), + event.position, + cx, + ); + cx.stop_propagation(); + } + }), + ) .child(tab_bar( FOLDER_TABS, &tabs, @@ -496,25 +513,30 @@ impl RootView { let project_count = self.backend.projects().len(); let has_projects = project_count > 0; let is_scanning = self.backend.is_scanning_projects(); - let sort_options = vec![ - tr("sort.name").to_string(), - tr("sort.last_opened").to_string(), - ]; let sort_index = if self.backend.sort_mode() == "Last Opened" { 1 } else { 0 }; - // The pop-up list uses the button's width, so size it for the longest - // translated option rather than only the currently selected one. - let natural_combo_width = sort_options - .iter() - .map(|option| ui_text_width(window, option, 12.5, FontWeight::NORMAL)) - .fold(0.0_f32, f32::max) - + 44.0; // text padding, chevron, and a little breathing room - let title_width = ui_text_width(window, tr("main.projects"), 13.0, FontWeight::SEMIBOLD) + // Use cached language-dependent header widths and option lists instead + // of shaping text or reallocating Strings on every single frame. + let (natural_combo_width, projects_title_width, sort_label_width, sort_options) = { + let metrics = self.ensure_ui_metrics(window); + ( + metrics.sort_combo_width, + metrics.projects_title_width, + metrics.sort_label_width, + metrics.sort_options.clone(), + ) + }; + let count_digits = if has_projects { + project_count.checked_ilog10().unwrap_or(0) as f32 + 1.0 + } else { + 0.0 + }; + let title_width = projects_title_width + if has_projects { - 6.0 + ui_text_width(window, &project_count.to_string(), 12.0, FontWeight::NORMAL) + 6.0 + count_digits * 7.5 } else { 0.0 }; @@ -527,7 +549,6 @@ impl RootView { let combo_width = natural_combo_width .max(80.0) .min((header_width - title_width - 8.0).max(80.0)); - let sort_label_width = ui_text_width(window, tr("main.sort_by"), 12.0, FontWeight::MEDIUM); let show_sort_label = title_width + 8.0 + sort_label_width + 8.0 + combo_width <= header_width; @@ -624,17 +645,20 @@ impl RootView { theme.row_odd }; let on_accent = theme.button_label; - // Warm the icon cache for the rows about to be - // built: one OS lookup per new extension. - let files: Vec = range - .clone() - .filter_map(|index| { - this.backend.projects().get(index).map(|p| p.file.clone()) - }) - .collect(); - for file in &files { + // Warm the icon cache only for extensions not yet + // seen (zero allocations once warmed). + let mut uncached: Vec = Vec::new(); + for index in range.clone() { + if let Some(project) = this.backend.projects().get(index) + && !this.has_cached_file_icon(&project.file) + { + uncached.push(project.file.clone()); + } + } + for file in &uncached { this.file_icon(file); } + let current_year = Local::now().year(); range .map(|index| { let Some(project) = this.backend.projects().get(index) @@ -689,7 +713,7 @@ impl RootView { let opened = if project.last_opened.is_empty() { String::new() } else { - short_date(&project.last_opened) + short_date(&project.last_opened, current_year) }; div() .h(px(PROJECT_ROW_PITCH)) @@ -718,6 +742,14 @@ impl RootView { .items_center() .gap(px(10.0)) .cursor_pointer() + .on_mouse_down(MouseButton::Right, cx.listener(move |this, event: &MouseDownEvent, _window, cx| { + if let Some(project) = this.backend.projects().get(index) { + let target = crate::ui::context_menus::Target::Project { path: this.backend.project_root_path(index as i32).unwrap_or_default().to_string(), file: project.file.clone() }; + this.select_project(index as i32, cx); + this.show_context_menu(target, event.position, cx); + cx.stop_propagation(); + } + })) .on_mouse_down( MouseButton::Left, cx.listener( diff --git a/crates/immersion/src/ui/mod.rs b/crates/immersion/src/ui/mod.rs index 1bd2329..54f5775 100644 --- a/crates/immersion/src/ui/mod.rs +++ b/crates/immersion/src/ui/mod.rs @@ -8,3 +8,6 @@ pub mod version_manager; /// The lighting recipes live in the vampir toolkit now. Re-exported under /// the path the view code already uses. pub use vampir::lighting; + +pub(crate) mod context_menus; +pub(crate) mod pruner; diff --git a/crates/immersion/src/ui/modals.rs b/crates/immersion/src/ui/modals.rs index fc6ab40..ea3b4b3 100644 --- a/crates/immersion/src/ui/modals.rs +++ b/crates/immersion/src/ui/modals.rs @@ -7,7 +7,7 @@ use gpui::{ }; use crate::app::{ConfirmAction, ConfirmState, RootView}; -use crate::i18n::tr; +use crate::i18n::{tr, tr_args}; use crate::theme::MODAL_EDGE_PADDING; use crate::theme::MODAL_PANEL_RADIUS; use crate::ui::controls::{ @@ -17,8 +17,13 @@ use crate::ui::controls::{ use crate::ui::onboarding::{LAYOUTS, layout_choices}; use vampir::{DialogButton, dialog, radio_group}; -/// Settings panel width/height rule. -fn popup_size(window: &Window, min: (f32, f32), max: (f32, f32), pref: (f32, f32)) -> (f32, f32) { +/// Modal panel width/height rule. +pub(crate) fn popup_size( + window: &Window, + min: (f32, f32), + max: (f32, f32), + pref: (f32, f32), +) -> (f32, f32) { let viewport = window.viewport_size(); let available_w = (f32::from(viewport.width) - MODAL_EDGE_PADDING).max(0.0); let available_h = (f32::from(viewport.height) - MODAL_EDGE_PADDING).max(0.0); @@ -28,6 +33,31 @@ fn popup_size(window: &Window, min: (f32, f32), max: (f32, f32), pref: (f32, f32 ) } +/// Window-space rectangle of the Settings panel when it is open and fully +/// opaque, so background canvases can skip painting completely hidden regions. +pub(crate) fn settings_opaque_bounds( + settings_open: bool, + enter_at: Option, + exit_at: Option, + window: &Window, +) -> Option> { + if !settings_open { + return None; + } + let (opacity, _) = modal_opacity(enter_at, exit_at); + if opacity < 0.999 { + return None; + } + let viewport = window.viewport_size(); + let (w, h) = popup_size(window, (560.0, 480.0), (760.0, 720.0), (680.0, 640.0)); + let left = ((f32::from(viewport.width) - w) * 0.5).max(0.0); + let top = ((f32::from(viewport.height) - h) * 0.5).max(0.0); + Some(gpui::Bounds::new( + gpui::point(px(left), px(top)), + gpui::size(px(w), px(h)), + )) +} + impl RootView { pub fn render_modal_layer( &mut self, @@ -56,6 +86,29 @@ impl RootView { .bg(theme.modal_scrim) .opacity(scrim_opacity) .occlude() + .on_mouse_down( + gpui::MouseButton::Left, + cx.listener(|this, _event, _window, cx| { + if this.controls.dragging_anything() || this.dialog_showing() { + return; + } + const SETTINGS_COMBOS: [&str; 4] = [ + "language-settings", + "sort-settings", + "log-level", + "color-scheme", + ]; + if SETTINGS_COMBOS + .iter() + .any(|&id| this.controls.is_combo_open(id)) + || this.controls.take_combo_dismissal().is_some() + { + this.close_combo(); + } else { + this.request_close_settings(cx); + } + }), + ) .on_mouse_move(cx.listener( |this, event: &gpui::MouseMoveEvent, _window, cx| { this.global_mouse_move(event, cx); @@ -72,6 +125,10 @@ impl RootView { layers.push(self.render_settings_modal(window, cx).into_any_element()); } + if self.pruner.is_some() { + layers.extend(self.render_pruner_layer(window, cx)); + } + // The dialogs bring their own scrim and fade, and are deferred, so // one opened from the settings panel paints over it. layers.extend(self.render_layout_dialog(cx)); @@ -80,9 +137,9 @@ impl RootView { layers } - /// Centers the settings panel; opacity fade on enter/exit applied once to + /// Centers a modal panel; opacity fade on enter/exit applied once to /// the whole panel (chrome + content). - fn popup_frame( + pub(crate) fn popup_frame( &self, id: &'static str, size: (f32, f32), @@ -153,53 +210,109 @@ impl RootView { .to_string(); let launch_supported = self.backend.launch_at_startup_supported(); let launch_at_startup = self.backend.launch_at_startup(); - let sort_options = vec![ - tr("sort.name").to_string(), - tr("sort.last_opened").to_string(), - ]; + let (sort_options, log_options, scheme_options, language_options) = { + let metrics = self.ensure_ui_metrics(window); + ( + metrics.sort_options.clone(), + metrics.log_options.clone(), + metrics.scheme_options.clone(), + metrics.language_options.clone(), + ) + }; let sort_index = if self.backend.sort_mode() == "Last Opened" { 1 } else { 0 }; - let log_options = vec![tr("log.info").to_string(), tr("log.debug").to_string()]; let log_index = if self.backend.log_level() == "Debug" { 1 } else { 0 }; - let scheme_options = vec![ - tr("appearance.system").to_string(), - tr("appearance.light").to_string(), - tr("appearance.dark").to_string(), - ]; let scheme_index = match self.backend.color_scheme_mode_string() { "Light" => 1, "Dark" => 2, _ => 0, }; - let language_options = crate::i18n::LANGUAGE_NAMES.map(str::to_string); let language_index = crate::i18n::language_index(self.backend.language()); let dev_details = self.show_dev_details(); let retention = self.backend.snapshot_retention(); let retention_edit = self.retention_input.clone(); + let storage_saver_enabled = self.backend.storage_saver_enabled(); + let storage_saved_bytes = self.backend.storage_saved_bytes(); + let global_keep = self.backend.storage_saver_keep().clamp(1, 500); + let global_keep_edit = self.global_pruner_keep_input.clone(); + let global_preview = self.global_prune_snapshot.preview(global_keep as usize); + let estimated_freed_text = + musit_core::backend::format_bytes(global_preview.estimated_freed_bytes); + let storage_used_text = + musit_core::backend::format_bytes(global_preview.total_storage_bytes); + let storage_info = if storage_saved_bytes > 0 { + let saved_text = musit_core::backend::format_bytes(storage_saved_bytes); + tr_args( + "settings.storage_info_with_saved", + &[("used", &storage_used_text), ("saved", &saved_text)], + ) + } else { + tr_args( + "settings.storage_info_used", + &[("used", &storage_used_text)], + ) + }; + let global_summary = if global_preview.total_projects == 0 { + tr("settings.global_pruner_empty").to_string() + } else if global_preview.remove_versions > 0 { + tr_args( + "settings.global_pruner_summary", + &[ + ("remove", &global_preview.remove_versions.to_string()), + ("projects", &global_preview.affected_projects.to_string()), + ("keep", &global_preview.keep_versions.to_string()), + ("total", &global_preview.total_versions.to_string()), + ("size", &estimated_freed_text), + ], + ) + } else { + tr_args( + "settings.global_pruner_none", + &[ + ("total", &global_preview.total_versions.to_string()), + ("projects", &global_preview.total_projects.to_string()), + ], + ) + }; + let global_prune_label = if global_preview.remove_versions > 0 { + tr_args( + "pruner.apply", + &[("count", &global_preview.remove_versions.to_string())], + ) + } else { + tr("pruner.nothing_to_prune").to_string() + }; let notifications = self.backend.notifications_enabled(); let hue_value = self.backend.theme_hue(); let saturation_percent = (self.backend.theme_saturation() * 100.0).round() as i64; - let section_label = move |text: &str| { + let section_label = move |text: &'static str| { div() .text_size(px(13.0)) .font_weight(FontWeight::BOLD) .text_color(theme.vm_text_primary) - .child(SharedString::from(text.to_string())) + .child(SharedString::new_static(text)) }; - let meta_label = move |text: &str| { + let meta_label = move |text: &'static str| { div() .text_size(px(12.0)) .line_height(px(16.0)) .text_color(theme.vm_text_meta) - .child(SharedString::from(text.to_string())) + .child(SharedString::new_static(text)) + }; + let meta_text = move |text: String| { + div() + .text_size(px(12.0)) + .line_height(px(16.0)) + .text_color(theme.vm_text_meta) + .child(SharedString::from(text)) }; let content = div() @@ -222,7 +335,7 @@ impl RootView { .child(tr("settings.title")), ) .child(div().flex_1()) - .child(div().w(px(88.0)).child(panel_button( + .child(div().flex_none().min_w(px(88.0)).child(panel_button( "settings-close", tr("common.close"), ButtonVariant::Soft, @@ -278,11 +391,11 @@ impl RootView { .flex_col() .gap(px(8.0)) .child(section_label(tr("settings.projects_folder"))) - .child(meta_label(if folder_path.is_empty() { - tr("settings.no_folder") + .child(if folder_path.is_empty() { + meta_label(tr("settings.no_folder")) } else { - &folder_path - })) + meta_text(folder_path.clone()) + }) .child(panel_button( "choose-folder", if has_folder { @@ -549,6 +662,14 @@ impl RootView { )), ) .child(divider(&theme)) + .child(div().flex().items_center().gap(px(12.0)) + .child(div().flex_1().child(section_label(tr("settings.tab_close_buttons")))) + .child(themed_switch("tab-close-buttons", self.backend.show_tab_close_buttons(), true, &theme, self, cx, + |this, checked, _window, cx| { + this.backend.set_show_tab_close_buttons(checked); + cx.notify(); + }))) + .child(divider(&theme)) // Appearance. .child( div() @@ -637,6 +758,134 @@ impl RootView { ), ) .child(divider(&theme)) + // Storage saver & global version pruner. + .child( + div() + .rounded(px(10.0)) + .bg(theme.vm_panel) + .border_1() + .border_color(theme.vm_border) + .p(px(10.0)) + .flex() + .flex_col() + .gap(px(8.0)) + .child( + div() + .flex() + .items_center() + .gap(px(12.0)) + .child( + div() + .flex_1() + .flex() + .flex_col() + .gap(px(4.0)) + .child(section_label(tr( + "settings.storage_saver", + ))) + .child(meta_label(tr( + "settings.storage_saver_detail", + ))), + ) + .child(themed_switch( + "storage-saver-switch", + storage_saver_enabled, + true, + &theme, + self, + cx, + |this, checked, _w, cx| { + this.backend + .set_storage_saver_enabled(checked); + cx.notify(); + }, + )), + ) + .child(divider(&theme)) + .child(section_label(tr("settings.global_pruner"))) + .child(meta_label(tr("settings.global_pruner_detail"))) + .child( + div() + .flex() + .items_center() + .flex_wrap() + .gap(px(10.0)) + .child(themed_spinbox( + "global-pruner-keep", + SpinboxSettings { + value: global_keep, + min: 1, + max: 500, + enabled: true, + }, + &global_keep_edit, + &theme, + cx, + |this, value, _w, cx| { + this.backend + .set_storage_saver_keep(value); + cx.notify(); + }, + )) + .child(meta_label(tr( + "settings.global_pruner_keep", + ))) + .child(div().flex_1()) + .child(panel_button( + "global-prune-apply", + &global_prune_label, + ButtonVariant::Danger, + global_preview.remove_versions > 0, + &theme, + cx, + |this, _w, cx| { + let keep_count = this + .backend + .storage_saver_keep() + .clamp(1, 500) + as usize; + let preview = this + .global_prune_snapshot + .preview(keep_count); + if preview.remove_versions == 0 { + return; + } + let count_s = + preview.remove_versions.to_string(); + let projects_s = preview + .affected_projects + .to_string(); + let keep_s = keep_count.to_string(); + this.open_confirm(ConfirmState { + title: tr( + "dialog.global_prune_title", + ) + .to_string(), + message: tr_args( + "dialog.global_prune_message", + &[ + ("count", &count_s), + ("projects", &projects_s), + ("keep", &keep_s), + ], + ), + confirm_text: tr_args( + "pruner.apply", + &[("count", &count_s)], + ), + danger: true, + action: ConfirmAction::GlobalPrune( + keep_count, + ), + }); + cx.notify(); + }, + )), + ) + .child(meta_text(global_summary)) + .child(meta_text(storage_info)), + ) + .child(divider(&theme)) // Support zone. .child( div() diff --git a/crates/immersion/src/ui/onboarding.rs b/crates/immersion/src/ui/onboarding.rs index 4b936a4..e4003db 100644 --- a/crates/immersion/src/ui/onboarding.rs +++ b/crates/immersion/src/ui/onboarding.rs @@ -55,7 +55,7 @@ impl RootView { .justify_center() .child( div() - .w(px(560.0)) + .w(px(600.0)) .rounded(px(MODAL_PANEL_RADIUS)) .bg(theme.panel_surface) .border_1() @@ -89,7 +89,7 @@ impl RootView { "onboarding-language", crate::i18n::language_index(self.backend.language()), &crate::i18n::LANGUAGE_NAMES.map(str::to_string), - Some(180.0), + Some(210.0), cx, |this, index, _window, cx| { this.set_language(crate::i18n::LANGUAGES[index], cx) @@ -97,17 +97,27 @@ impl RootView { )), ) .child(wizard_text(theme, tr("onboarding.welcome.prompt"))) - .child(div().h(px(30.0)).w(px(240.0)).child(panel_button( - "onboarding-choose-folder", - tr("onboarding.choose_folder"), - ButtonVariant::Primary, - true, - theme, - cx, - |this, _w, cx| { - this.prompt_for_onboarding_folder(cx); - }, - ))) + .child( + div() + .flex() + .child( + div() + .h(px(30.0)) + .min_w(px(220.0)) + .flex_none() + .child(panel_button( + "onboarding-choose-folder", + tr("onboarding.choose_folder"), + ButtonVariant::Primary, + true, + theme, + cx, + |this, _w, cx| { + this.prompt_for_onboarding_folder(cx); + }, + )), + ), + ) .into_any_element() } @@ -146,35 +156,48 @@ impl RootView { div() .flex() .gap(px(10.0)) - .child(div().h(px(30.0)).w(px(120.0)).child(panel_button( - "onboarding-layout-back", - tr("onboarding.back"), - ButtonVariant::Soft, - true, - theme, - cx, - |this, _w, cx| { - this.onboarding = Some(OnboardingStep::Welcome); - cx.notify(); - }, - ))) + .child( + div() + .h(px(30.0)) + .min_w(px(110.0)) + .flex_none() + .child(panel_button( + "onboarding-layout-back", + tr("onboarding.back"), + ButtonVariant::Soft, + true, + theme, + cx, + |this, _w, cx| { + this.onboarding = Some(OnboardingStep::Welcome); + cx.notify(); + }, + )), + ) .child(div().flex_1()) - .child(div().h(px(30.0)).w(px(140.0)).child(panel_button( - "onboarding-layout-continue", - tr("onboarding.continue"), - ButtonVariant::Primary, - true, - theme, - cx, - move |this, _w, cx| { - let layout = LAYOUTS[this.onboarding_layout.min(LAYOUTS.len() - 1)]; - this.backend.add_projects_folder(&folder, layout); - this.onboarding = Some(OnboardingStep::Scanning { - folder: folder.clone(), - }); - cx.notify(); - }, - ))), + .child( + div() + .h(px(30.0)) + .min_w(px(130.0)) + .flex_none() + .child(panel_button( + "onboarding-layout-continue", + tr("onboarding.continue"), + ButtonVariant::Primary, + true, + theme, + cx, + move |this, _w, cx| { + let layout = + LAYOUTS[this.onboarding_layout.min(LAYOUTS.len() - 1)]; + this.backend.add_projects_folder(&folder, layout); + this.onboarding = Some(OnboardingStep::Scanning { + folder: folder.clone(), + }); + cx.notify(); + }, + )), + ), ) .into_any_element() } diff --git a/crates/immersion/src/ui/pruner.rs b/crates/immersion/src/ui/pruner.rs new file mode 100644 index 0000000..9b9aeac --- /dev/null +++ b/crates/immersion/src/ui/pruner.rs @@ -0,0 +1,768 @@ +//! Version Pruner modal: two side-by-side dotted-grid version graph panes +//! showing Before (with pruned nodes highlighted) and After (the reparented +//! surviving graph), backup count footers under each pane, and a spinbox +//! counter letting the user choose how many backups to keep. + +use std::collections::HashSet; +use std::rc::Rc; +use std::time::Instant; + +use gpui::{ + AnyElement, Context, ElementId, FontWeight, PathBuilder, ScrollHandle, SharedString, Window, + canvas, div, point, prelude::*, px, size, +}; +use musit_core::backend::{ + ProjectStorageSnapshot, VersionGraphNode, format_bytes, preview_pruned_graph, + select_versions_to_keep, +}; +use vampir::color::{WHITE, argb}; + +use crate::app::RootView; +use crate::i18n::{tr, tr_args}; +use crate::theme::{MONO_FONT, Theme}; +use crate::ui::controls::{ + ButtonVariant, ScrollAxis, SpinboxSettings, caption, lerp_rgba, modal_opacity, panel_button, + scrollbar, themed_spinbox, +}; +use crate::ui::graph_layout::{self, GraphNode, LABEL_FONT_PX, NODE_HALF_H, SUB_LABEL_FONT_PX}; +use crate::ui::lighting; +use crate::ui::modals::popup_size; +use crate::ui::version_manager::GraphPaintData; + +const PREVIEW_ZOOM: f32 = 0.82; +const PREVIEW_PANE_WIDTH: f32 = 420.0; + +pub(crate) struct PrunerState { + pub project_name: String, + pub source_nodes: Vec, + pub storage: ProjectStorageSnapshot, + pub keep_count: usize, + pub keep_ids: HashSet, + pub after_bytes: u64, + pub saved_bytes: u64, + pub before_nodes: Vec, + pub before_extent: (f32, f32), + pub before_gutters: Vec, + pub before_paint: Rc, + pub after_nodes: Vec, + pub after_extent: (f32, f32), + pub after_gutters: Vec, + pub after_paint: Rc, + pub before_scroll: ScrollHandle, + pub after_scroll: ScrollHandle, + pub enter_at: Option, + pub exit_at: Option, +} + +impl PrunerState { + pub fn new( + project_name: String, + source_nodes: Vec, + storage: ProjectStorageSnapshot, + ) -> Self { + let total = source_nodes.len(); + let initial_keep = if total > 1 { (total / 2).max(1) } else { total }; + let mut before_nodes: Vec = + source_nodes.iter().cloned().map(GraphNode::from).collect(); + let before_fitted = + graph_layout::layout_for_pane(&mut before_nodes, PREVIEW_PANE_WIDTH / PREVIEW_ZOOM); + let before_extent = graph_layout::extent(&before_nodes); + let before_paint = Rc::new(GraphPaintData::new(&before_nodes)); + + let mut state = Self { + project_name, + source_nodes, + storage, + keep_count: initial_keep, + keep_ids: HashSet::new(), + after_bytes: 0, + saved_bytes: 0, + before_nodes, + before_extent, + before_gutters: before_fitted.placement.gutters, + before_paint, + after_nodes: Vec::new(), + after_extent: (0.0, 0.0), + after_gutters: Vec::new(), + after_paint: Rc::default(), + before_scroll: ScrollHandle::new(), + after_scroll: ScrollHandle::new(), + enter_at: Some(Instant::now()), + exit_at: None, + }; + state.recompute_after(); + state + } + + pub fn set_keep_count(&mut self, keep_count: usize) { + let max = self.source_nodes.len().max(1); + let clamped = if self.source_nodes.is_empty() { + 0 + } else { + keep_count.clamp(1, max) + }; + if clamped == self.keep_count { + return; + } + self.keep_count = clamped; + self.recompute_after(); + } + + fn recompute_after(&mut self) { + self.keep_ids = select_versions_to_keep(&self.source_nodes, self.keep_count); + let (after_bytes, saved_bytes) = self.storage.preview_after(&self.keep_ids); + self.after_bytes = after_bytes; + self.saved_bytes = saved_bytes; + let pruned_graph = preview_pruned_graph(&self.source_nodes, &self.keep_ids); + let mut after_nodes: Vec = + pruned_graph.into_iter().map(GraphNode::from).collect(); + let after_fitted = + graph_layout::layout_for_pane(&mut after_nodes, PREVIEW_PANE_WIDTH / PREVIEW_ZOOM); + self.after_extent = graph_layout::extent(&after_nodes); + self.after_gutters = after_fitted.placement.gutters; + self.after_paint = Rc::new(GraphPaintData::new(&after_nodes)); + self.after_nodes = after_nodes; + } + + pub fn delete_ids(&self) -> HashSet { + self.source_nodes + .iter() + .filter(|n| !self.keep_ids.contains(&n.version.id)) + .map(|n| n.version.id.clone()) + .collect() + } +} + +impl RootView { + pub fn open_pruner(&mut self, window: &mut Window, cx: &mut Context) { + self.controls.focus_root(window, cx); + let project_name = self + .backend + .projects() + .get(self.backend.selected_project_index() as usize) + .map(|p| p.name.clone()) + .unwrap_or_default(); + let source_nodes = self.backend.selected_project_version_graph(); + let storage = self.backend.selected_project_storage_snapshot(); + let state = PrunerState::new(project_name, source_nodes, storage); + let keep_text = state.keep_count.to_string(); + self.pruner_keep_input + .update(cx, |input, cx| input.set_text(&keep_text, cx)); + self.pruner = Some(state); + cx.notify(); + } + + pub fn request_close_pruner(&mut self, cx: &mut Context) { + let Some(pruner) = self.pruner.as_mut() else { + return; + }; + if pruner.exit_at.is_some() { + return; + } + pruner.exit_at = Some(Instant::now()); + cx.notify(); + Self::schedule_modal_exit(cx, |root| { + if root.pruner.as_ref().is_some_and(|p| p.exit_at.is_some()) { + root.pruner = None; + } + }); + } + + pub(crate) fn render_pruner_layer( + &mut self, + window: &mut Window, + cx: &mut Context, + ) -> Vec { + let Some(pruner) = self.pruner.as_ref() else { + return Vec::new(); + }; + let theme = self.theme; + let (scrim_opacity, _) = modal_opacity(pruner.enter_at, pruner.exit_at); + let modal_size = popup_size(window, (760.0, 480.0), (1060.0, 680.0), (940.0, 560.0)); + + let total = pruner.source_nodes.len(); + let kept_count = pruner.keep_ids.len(); + let remove_count = total.saturating_sub(kept_count); + let keep_count_i32 = pruner.keep_count as i32; + let max_keep_i32 = total.max(1) as i32; + let project_name = pruner.project_name.clone(); + let enter_at = pruner.enter_at; + let exit_at = pruner.exit_at; + + let before_size = format_bytes(pruner.storage.total_bytes); + let after_size = format_bytes(pruner.after_bytes); + let saved_size = format_bytes(pruner.saved_bytes); + + let before_pane = self.render_pruner_grid_pane( + "pruner-before", + tr("pruner.before"), + tr_args( + "pruner.before_count", + &[("count", &total.to_string()), ("size", &before_size)], + ), + &pruner.before_nodes, + pruner.before_extent, + &pruner.before_gutters, + &pruner.before_paint, + Some(&pruner.keep_ids), + &pruner.before_scroll.clone(), + cx, + ); + let after_footer = if remove_count > 0 { + tr_args( + "pruner.after_count", + &[ + ("keep", &kept_count.to_string()), + ("remove", &remove_count.to_string()), + ("size", &after_size), + ("saved", &saved_size), + ], + ) + } else { + tr_args( + "pruner.after_count_none", + &[("keep", &kept_count.to_string()), ("size", &after_size)], + ) + }; + let after_pane = self.render_pruner_grid_pane( + "pruner-after", + tr("pruner.after"), + after_footer, + &pruner.after_nodes, + pruner.after_extent, + &pruner.after_gutters, + &pruner.after_paint, + None, + &pruner.after_scroll.clone(), + cx, + ); + + let keep_input = self.pruner_keep_input.clone(); + let apply_label = if remove_count > 0 { + tr_args("pruner.apply", &[("count", &remove_count.to_string())]) + } else { + tr("pruner.nothing_to_prune").to_string() + }; + + let content = div() + .size_full() + .flex() + .flex_col() + .p(px(14.0)) + .gap(px(12.0)) + // Header. + .child( + div() + .flex() + .items_center() + .gap(px(10.0)) + .child( + div() + .text_size(px(18.0)) + .font_weight(FontWeight::BOLD) + .text_color(theme.vm_text_primary) + .child(SharedString::new_static(tr("pruner.title"))), + ) + .when(!project_name.is_empty(), |el| { + el.child( + div() + .text_size(px(13.0)) + .text_color(theme.vm_text_meta) + .truncate() + .child(SharedString::from(project_name)), + ) + }), + ) + // Side-by-side Before / After grid panes. + .child( + div() + .flex_1() + .min_h_0() + .flex() + .gap(px(12.0)) + .child(before_pane) + .child(after_pane), + ) + // Footer: counter + Cancel / Prune actions. + .child( + div() + .flex_none() + .flex() + .items_center() + .gap(px(12.0)) + .child( + div() + .flex() + .items_center() + .gap(px(10.0)) + .child( + div() + .text_size(px(12.5)) + .font_weight(FontWeight::MEDIUM) + .text_color(theme.vm_text_primary) + .whitespace_nowrap() + .child(SharedString::new_static(tr("pruner.keep_label"))), + ) + .child(themed_spinbox( + "pruner-keep", + SpinboxSettings { + value: keep_count_i32, + min: 1, + max: max_keep_i32, + enabled: total > 1, + }, + &keep_input, + &theme, + cx, + |this, value, _w, cx| { + if let Some(pruner) = this.pruner.as_mut() { + pruner.set_keep_count(value.max(1) as usize); + let text = pruner.keep_count.to_string(); + this.pruner_keep_input + .update(cx, |input, cx| input.set_text(&text, cx)); + } + cx.notify(); + }, + )), + ) + .child(div().flex_1()) + .child(div().flex_none().min_w(px(90.0)).child(panel_button( + "pruner-cancel", + tr("common.cancel"), + ButtonVariant::Soft, + true, + &theme, + cx, + |this, _w, cx| { + this.request_close_pruner(cx); + }, + ))) + .child(div().flex_none().min_w(px(120.0)).child(panel_button( + "pruner-apply", + &apply_label, + ButtonVariant::Danger, + remove_count > 0, + &theme, + cx, + |this, _w, cx| { + if let Some(pruner) = this.pruner.as_ref() { + let delete_ids = pruner.delete_ids(); + if !delete_ids.is_empty() { + this.backend.prune_selected_project_versions(&delete_ids); + } + } + this.request_close_pruner(cx); + }, + ))), + ); + + vec![ + div() + .id("pruner-scrim") + .absolute() + .inset_0() + .bg(theme.modal_scrim) + .opacity(scrim_opacity) + .occlude() + .on_mouse_down( + gpui::MouseButton::Left, + cx.listener(|this, _event, _window, cx| { + if this.controls.dragging_anything() { + return; + } + this.request_close_pruner(cx); + }), + ) + .on_mouse_move( + cx.listener(|this, event: &gpui::MouseMoveEvent, _window, cx| { + this.global_mouse_move(event, cx); + }), + ) + .on_mouse_up( + gpui::MouseButton::Left, + cx.listener(|this, _event, _window, cx| { + this.global_mouse_up(cx); + }), + ) + .into_any_element(), + self.popup_frame( + "pruner-popup", + modal_size, + content.into_any_element(), + enter_at, + exit_at, + cx, + ) + .into_any_element(), + ] + } + + #[allow(clippy::too_many_arguments)] + fn render_pruner_grid_pane( + &self, + id: &'static str, + heading: &'static str, + footer: String, + nodes: &[GraphNode], + extent: (f32, f32), + gutters: &[f32], + paint_data: &Rc, + keep_ids_for_dimming: Option<&HashSet>, + scroll_handle: &ScrollHandle, + cx: &mut Context, + ) -> impl IntoElement + use<> { + let theme = self.theme; + let zoom = PREVIEW_ZOOM; + let content_w = extent.0 * zoom; + let content_h = extent.1 * zoom; + let paint_data = paint_data.clone(); + let gutters = gutters.to_vec(); + let kept_flags: Rc> = Rc::new(match keep_ids_for_dimming { + Some(keep) => nodes + .iter() + .map(|node| keep.contains(&node.version.id)) + .collect(), + None => vec![true; nodes.len()], + }); + let kept_for_canvas = kept_flags.clone(); + + let rendered_nodes: Vec<_> = nodes + .iter() + .enumerate() + .map(|(index, node)| { + let will_keep = kept_flags[index]; + render_preview_node(id, index, node, zoom, will_keep, &theme) + }) + .collect(); + + div() + .flex_1() + .min_w_0() + .h_full() + .flex() + .flex_col() + .gap(px(6.0)) + .child(caption(&theme, heading)) + .child( + div() + .flex_1() + .min_h_0() + .rounded(px(8.0)) + .bg(theme.vm_graph) + .border_1() + .border_color(theme.vm_border) + .shadow(lighting::panel(theme.is_dark_mode)) + .overflow_hidden() + .relative() + .when(nodes.is_empty(), |el| { + el.child( + div() + .absolute() + .inset_0() + .flex() + .items_center() + .justify_center() + .text_size(px(13.0)) + .text_color(theme.vm_text_meta) + .child(SharedString::new_static(tr("versions.none"))), + ) + }) + .when(!nodes.is_empty(), |el| { + el.child( + div() + .absolute() + .inset(px(6.0)) + .child( + div() + .id(ElementId::Name(format!("{id}-scroll").into())) + .size_full() + .overflow_scroll() + .restrict_scroll_to_axis() + .track_scroll(scroll_handle) + .child( + div() + .flex_none() + .w(px(content_w)) + .h(px(content_h)) + .min_w_full() + .min_h_full() + .relative() + .child( + canvas( + |_bounds, _window, _cx| {}, + move |bounds, _state, window, _cx| { + paint_preview_canvas( + bounds, + zoom, + &theme, + &paint_data, + &gutters, + &kept_for_canvas, + window, + ); + }, + ) + .absolute() + .size_full(), + ) + .children(rendered_nodes), + ), + ) + .child(scrollbar( + if id == "pruner-before" { + "pruner-before-v" + } else { + "pruner-after-v" + }, + scroll_handle, + ScrollAxis::Vertical, + self, + cx, + )) + .child(scrollbar( + if id == "pruner-before" { + "pruner-before-h" + } else { + "pruner-after-h" + }, + scroll_handle, + ScrollAxis::Horizontal, + self, + cx, + )), + ) + }), + ) + // Bottom backup count label under the pane. + .child( + div() + .flex_none() + .text_size(px(12.0)) + .font_weight(FontWeight::MEDIUM) + .text_color(theme.vm_text_meta) + .child(SharedString::from(footer)), + ) + } +} + +fn render_preview_node( + pane_id: &'static str, + index: usize, + node: &GraphNode, + zoom: f32, + will_keep: bool, + theme: &Theme, +) -> impl IntoElement + use<> { + let current = node.version.is_current; + let compressed = node.version.is_compressed; + let text_zoom = zoom.clamp(0.75, 1.4); + let fill_color = if !will_keep { + theme.button_danger_fill + } else if current { + theme.vm_node_current_fill + } else { + theme.vm_node_fill + }; + let border_color = if !will_keep { + theme.button_danger_label + } else if current { + theme.success_border + } else { + theme.node_border + }; + let label_color = if !will_keep { + theme.button_danger_label + } else if current { + WHITE + } else { + theme.vm_node_label + }; + let sub_label_color = if current && will_keep { + argb(0xffee_f2ff) + } else { + theme.vm_text_meta + }; + let show_full = + !node.version.full_label.is_empty() && node.version.full_label != node.version.label; + + div() + .id(ElementId::NamedInteger(pane_id.into(), index as u64)) + .absolute() + .left(px(((node.x - node.half_w) * zoom).round())) + .top(px(((node.y - NODE_HALF_H) * zoom).round())) + .w(px((node.half_w * 2.0 * zoom).round())) + .h(px((NODE_HALF_H * 2.0 * zoom).round())) + .when(!will_keep, |el| el.opacity(0.48)) + .child( + div() + .absolute() + .inset_0() + .rounded(px(9.0 * zoom)) + .bg(lighting::lit( + fill_color, + if current && will_keep { 0.1 } else { 0.05 }, + )) + .border(px(if compressed || !will_keep { 1.5 } else { 1.0 })) + .when(compressed || !will_keep, |el| el.border_dashed()) + .border_color(border_color) + .flex() + .flex_col() + .items_center() + .justify_center() + .gap(px(1.0)) + .overflow_hidden() + .child( + div() + .text_size(px(LABEL_FONT_PX * text_zoom)) + .font_family(MONO_FONT) + .font_weight(FontWeight::SEMIBOLD) + .text_color(label_color) + .child(SharedString::from(if node.version.label.is_empty() { + "?".to_string() + } else { + node.version.label.clone() + })), + ) + .when(show_full, |el| { + el.child( + div() + .text_size(px(SUB_LABEL_FONT_PX * text_zoom)) + .font_family(MONO_FONT) + .text_color(sub_label_color) + .opacity(0.9) + .child(SharedString::from(node.version.full_label.clone())), + ) + }), + ) +} + +fn paint_preview_canvas( + bounds: gpui::Bounds, + zoom: f32, + theme: &Theme, + paint_data: &GraphPaintData, + gutters: &[f32], + kept_flags: &[bool], + window: &mut Window, +) { + let origin = bounds.origin; + let grid_step = (graph_layout::GRID * zoom).max(10.0).round(); + let scale = window.scale_factor().max(0.1); + let to_device = |v: f32| (v * scale).round(); + let dot_device = to_device(2.0 * zoom.clamp(0.7, 1.6)).max(2.0); + let dot_size = dot_device / scale; + let dot_radius = dot_size / 2.0; + let grid_color = theme.vm_graph_grid; + let width = f32::from(bounds.size.width); + let height = f32::from(bounds.size.height); + let mask = window.content_mask().bounds; + let visible_left = (f32::from(mask.left()) - f32::from(origin.x)).max(0.0); + let visible_top = (f32::from(mask.top()) - f32::from(origin.y)).max(0.0); + let visible_right = (f32::from(mask.right()) - f32::from(origin.x)).min(width); + let visible_bottom = (f32::from(mask.bottom()) - f32::from(origin.y)).min(height); + + let mut gx = ((visible_left + dot_radius) / grid_step).ceil().max(0.0) * grid_step; + while gx + dot_radius <= visible_right { + let mut gy = ((visible_top + dot_radius) / grid_step).ceil().max(0.0) * grid_step; + while gy + dot_radius <= visible_bottom { + let left = to_device(f32::from(origin.x) + gx - dot_radius) / scale; + let top = to_device(f32::from(origin.y) + gy - dot_radius) / scale; + window.paint_quad( + gpui::PaintQuad::new(gpui::Bounds::new( + point(px(left), px(top)), + size(px(dot_size), px(dot_size)), + )) + .background(grid_color) + .corner_radii(px(dot_radius)), + ); + gy += grid_step; + } + gx += grid_step; + } + + let base_link = lerp_rgba(theme.vm_graph, theme.vm_graph_link, 0.65); + let pruned_link = lerp_rgba(theme.vm_graph, theme.button_danger_label, 0.35); + let stroke_width = 1.5 * zoom.clamp(0.7, 1.5); + let half = stroke_width * 0.5; + let snap = |v: f32| (v * 2.0).round() / 2.0; + + for (index, node) in paint_data.nodes.iter().enumerate() { + let Some(parent_index) = node.parent_index else { + continue; + }; + let parent = &paint_data.nodes[parent_index]; + let x1 = (parent.x + parent.half_w) * zoom; + let y1 = parent.y * zoom; + let x2 = (node.x - node.half_w) * zoom; + let y2 = node.y * zoom; + let mid_x = gutters + .get(parent.col) + .copied() + .unwrap_or((parent.x + node.x) * 0.5) + * zoom; + + let link_min_x = x1.min(x2).min(mid_x) - 12.0; + let link_max_x = x1.max(x2).max(mid_x) + 12.0; + let link_min_y = y1.min(y2) - 12.0; + let link_max_y = y1.max(y2) + 12.0; + if link_max_x < visible_left + || link_min_x > visible_right + || link_max_y < visible_top + || link_min_y > visible_bottom + { + continue; + } + + let kept = kept_flags.get(index).copied().unwrap_or(true) + && kept_flags.get(parent_index).copied().unwrap_or(true); + let color = if kept { base_link } else { pruned_link }; + let drop = (y2 - y1).abs(); + let radius = (10.0 * zoom).min(drop / 2.0); + let mut bar = |x: f32, y: f32, w: f32, h: f32| { + if w <= 0.0 || h <= 0.0 { + return; + } + window.paint_quad( + gpui::PaintQuad::new(gpui::Bounds::new( + point(origin.x + px(snap(x)), origin.y + px(snap(y))), + size(px(snap(w)), px(snap(h))), + )) + .background(color), + ); + }; + if radius <= 1.0 { + bar(x1, y1 - half, x2 - x1, stroke_width); + } else { + let down = if y2 > y1 { 1.0 } else { -1.0 }; + bar(x1, y1 - half, mid_x - radius - x1, stroke_width); + bar( + mid_x - half, + y1.min(y2) + radius, + stroke_width, + drop - 2.0 * radius, + ); + bar(mid_x + radius, y2 - half, x2 - mid_x - radius, stroke_width); + let mut turn = |from: (f32, f32), ctrl: (f32, f32), to: (f32, f32)| { + let mut builder = PathBuilder::stroke(px(stroke_width)); + builder.move_to(point(origin.x + px(from.0), origin.y + px(from.1))); + builder.curve_to( + point(origin.x + px(to.0), origin.y + px(to.1)), + point(origin.x + px(ctrl.0), origin.y + px(ctrl.1)), + ); + if let Ok(path) = builder.build() { + window.paint_path(path, color); + } + }; + turn( + (mid_x - radius, y1), + (mid_x, y1), + (mid_x, y1 + radius * down), + ); + turn( + (mid_x, y2 - radius * down), + (mid_x, y2), + (mid_x + radius, y2), + ); + } + } +} diff --git a/crates/immersion/src/ui/version_manager.rs b/crates/immersion/src/ui/version_manager.rs index 4da1562..cd59aba 100644 --- a/crates/immersion/src/ui/version_manager.rs +++ b/crates/immersion/src/ui/version_manager.rs @@ -4,7 +4,7 @@ use gpui::{ Context, ElementId, FontWeight, MouseButton, MouseDownEvent, ObjectFit, PathBuilder, Rgba, - SharedString, Window, canvas, div, fill, img, point, prelude::*, px, size, + SharedString, Window, canvas, div, img, point, prelude::*, px, size, }; use crate::app::RootView; @@ -19,14 +19,84 @@ use crate::ui::lighting; use crate::ui::modals::delete_version_confirm; use vampir::color::{WHITE, argb}; +use std::sync::LazyLock; + +static HOME_DIR: LazyLock> = + LazyLock::new(|| std::env::var("HOME").ok().filter(|home| !home.is_empty())); + +pub(crate) struct PaintNode { + pub(crate) parent_index: Option, + pub(crate) x: f32, + pub(crate) y: f32, + pub(crate) half_w: f32, + pub(crate) col: usize, +} + +/// Geometry shared by successive paints; rebuilt only when the graph is laid out. +/// Uses dense indices instead of duplicating ID strings across multiple maps. +#[derive(Default)] +pub(crate) struct GraphPaintData { + pub(crate) nodes: Vec, + index_by_id: std::collections::HashMap, +} + +impl GraphPaintData { + pub(crate) fn ancestors_mask(&self, version_id: &str) -> Vec { + let mut mask = vec![false; self.nodes.len()]; + let Some(mut current) = self.index_by_id.get(version_id).copied() else { + return mask; + }; + while current < mask.len() && !mask[current] { + mask[current] = true; + match self.nodes[current].parent_index { + Some(parent) => current = parent, + None => break, + } + } + mask + } + + pub(crate) fn new(graph: &[GraphNode]) -> Self { + let mut index_by_id = std::collections::HashMap::with_capacity(graph.len()); + for (index, node) in graph.iter().enumerate() { + index_by_id.insert(node.version.id.clone(), index); + } + let nodes = graph + .iter() + .map(|node| PaintNode { + parent_index: if node.parent_id.is_empty() { + None + } else { + index_by_id.get(&node.parent_id).copied() + }, + x: node.x, + y: node.y, + half_w: node.half_w, + col: node.col, + }) + .collect(); + Self { nodes, index_by_id } + } +} + impl RootView { - pub(crate) fn render_graph_panel(&mut self, cx: &mut Context) -> impl IntoElement { + pub(crate) fn render_graph_panel( + &mut self, + window: &Window, + cx: &mut Context, + ) -> impl IntoElement { // The pane may have been resized since the last layout. self.sync_graph_columns(); let theme = self.theme; let graph_empty = self.vm_graph.is_empty(); let (extent_w, extent_h) = self.vm_graph_extent; let zoom = self.graph_zoom; + let occluder = crate::ui::modals::settings_opaque_bounds( + self.settings_open, + self.settings_enter_at, + self.settings_exit_at, + window, + ); // The content is at least viewport-sized (min_w_full/min_h_full below) // so the dotted grid covers the whole pane even when the graph is // small — taffy resolves those against this frame's container, unlike @@ -34,29 +104,32 @@ impl RootView { let content_w = extent_w * zoom; let content_h = extent_h * zoom; - // Data for the paint closure. - // (id, parent id, centre x, centre y, half width, column). - let nodes: Vec<(String, String, f32, f32, f32, usize)> = self - .vm_graph - .iter() - .map(|node| { - ( - node.version.id.clone(), - node.parent_id.clone(), - node.x, - node.y, - node.half_w, - node.col, - ) - }) - .collect(); - let positions: std::collections::HashMap = nodes - .iter() - .map(|(id, _, x, y, half_w, col)| (id.clone(), (*x, *y, *half_w, *col))) - .collect(); + // Settings animation and slider drags repaint the background too. + // Share immutable geometry and cached ancestry mask instead of cloning + // every ID and rebuilding a map/set on every frame. + let graph_paint = self.graph_paint.clone(); let pan_active = self.graph_pan.as_ref().is_some_and(|pan| pan.moved); let gutters = self.vm_graph_placement.gutters.clone(); - let ancestors = self.ancestor_id_set(&self.vm_selected_id); + let ancestors = self.selected_ancestors(); + // Viewport bounds in content coordinates for culling off-screen node + // elements when the graph is large. + let scroll_bounds = self.graph_scroll.bounds(); + let scroll_offset = self.graph_scroll.offset(); + let vp_w = f32::from(scroll_bounds.size.width); + let vp_h = f32::from(scroll_bounds.size.height); + let cull_rect = if vp_w > 1.0 && vp_h > 1.0 { + let margin = 200.0; + let left = -f32::from(scroll_offset.x) - margin; + let top = -f32::from(scroll_offset.y) - margin; + Some(( + left, + top, + left + vp_w + 2.0 * margin, + top + vp_h + 2.0 * margin, + )) + } else { + None + }; div() .flex_1() @@ -202,6 +275,21 @@ impl RootView { let visible_bottom = (f32::from(mask.bottom()) - f32::from(origin.y)) .min(height); + // Opaque modal rectangle in canvas-local + // coordinates, so dots/links hidden behind + // the Settings panel are not painted. + let occ = occluder.map(|rect| { + ( + f32::from(rect.left()) + - f32::from(origin.x), + f32::from(rect.top()) + - f32::from(origin.y), + f32::from(rect.right()) + - f32::from(origin.x), + f32::from(rect.bottom()) + - f32::from(origin.y), + ) + }); // Only dots that fit whole: one clipped by the // pane's edge would show as a half dot along // the border. @@ -216,7 +304,24 @@ impl RootView { .ceil() .max(0.0) * grid_step; + let x_in_occ = occ.is_some_and( + |(ol, _, or, _)| { + gx - dot_radius >= ol + && gx + dot_radius <= or + }, + ); while gy + dot_radius <= visible_bottom { + if x_in_occ + && occ.is_some_and( + |(_, ot, _, ob)| { + gy - dot_radius >= ot + && gy + dot_radius <= ob + }, + ) + { + gy += grid_step; + continue; + } // Snapped in absolute window space, so // the canvas's own fractional origin // does not put every dot half a pixel @@ -228,7 +333,7 @@ impl RootView { f32::from(origin.y) + gy - dot_radius, ) / scale; window.paint_quad( - fill( + gpui::PaintQuad::new( gpui::Bounds::new( point(px(left), px(top)), size( @@ -236,8 +341,8 @@ impl RootView { px(dot_size), ), ), - grid_color, ) + .background(grid_color) .corner_radii(px(dot_radius)), ); gy += grid_step; @@ -245,34 +350,56 @@ impl RootView { gx += grid_step; } - // Orthogonal parent->child links. - for (id, parent_id, cx_, cy_, c_half, _) in - &nodes + // Orthogonal parent->child links (viewport-culled). + for (index, node) in + graph_paint.nodes.iter().enumerate() { - if parent_id.is_empty() { - continue; - } - let Some((px_, py_, p_half, p_col)) = - positions.get(parent_id) + let Some(parent_index) = node.parent_index else { continue; }; - let highlighted = ancestors - .contains(parent_id) - && ancestors.contains(id); - let x1 = (px_ + p_half) * zoom; - let y1 = *py_ * zoom; - let x2 = (cx_ - c_half) * zoom; - let y2 = *cy_ * zoom; + let parent = + &graph_paint.nodes[parent_index]; + let x1 = (parent.x + parent.half_w) * zoom; + let y1 = parent.y * zoom; + let x2 = (node.x - node.half_w) * zoom; + let y2 = node.y * zoom; // Descend through the column gutter, so a // parent's trunk stays straight whatever // widths its children have. let mid_x = gutters - .get(*p_col) + .get(parent.col) .copied() - .unwrap_or((px_ + cx_) * 0.5) + .unwrap_or((parent.x + node.x) * 0.5) * zoom; + let link_min_x = x1.min(x2).min(mid_x) - 12.0; + let link_max_x = x1.max(x2).max(mid_x) + 12.0; + let link_min_y = y1.min(y2) - 12.0; + let link_max_y = y1.max(y2) + 12.0; + if link_max_x < visible_left + || link_min_x > visible_right + || link_max_y < visible_top + || link_min_y > visible_bottom + || occ.is_some_and(|(ol, ot, or, ob)| { + link_min_x >= ol + && link_max_x <= or + && link_min_y >= ot + && link_max_y <= ob + }) + { + continue; + } + + let highlighted = ancestors + .get(parent_index) + .copied() + .unwrap_or(false) + && ancestors + .get(index) + .copied() + .unwrap_or(false); + let stroke_width = (if highlighted { 2.0 } else { 1.5 }) * zoom.clamp(0.7, 1.5); @@ -303,7 +430,7 @@ impl RootView { if w <= 0.0 || h <= 0.0 { return; } - window.paint_quad(fill( + window.paint_quad(gpui::PaintQuad::new( gpui::Bounds::new( point( origin.x + px(snap(x)), @@ -311,8 +438,7 @@ impl RootView { ), size(px(snap(w)), px(snap(h))), ), - color, - )); + ).background(color)); }; if radius <= 1.0 { // Same row: a single straight run. @@ -386,10 +512,23 @@ impl RootView { .absolute() .size_full(), ) - // Nodes. - .children(self.vm_graph.iter().enumerate().map( + // Nodes (viewport-culled when the pane bounds are known). + .children(self.vm_graph.iter().enumerate().filter_map( |(index, node)| { - self.render_graph_node(index, node, zoom, cx) + if let Some((cl, ct, cr, cb)) = cull_rect { + let left = (node.x - node.half_w) * zoom; + let right = (node.x + node.half_w) * zoom; + let top = (node.y - NODE_HALF_H) * zoom; + let bottom = (node.y + NODE_HALF_H) * zoom; + if right < cl + || left > cr + || bottom < ct + || top > cb + { + return None; + } + } + Some(self.render_graph_node(index, node, zoom, cx)) }, )), ), @@ -620,6 +759,12 @@ impl RootView { ) }), ) + .on_mouse_down(MouseButton::Right, { + let id = version_id.clone(); + cx.listener(move |this, event: &MouseDownEvent, _window, cx| { + this.version_context_menu(&id, event, cx); + }) + }) // A press arms a click; the release selects, unless the pointer // travelled, in which case the press was the start of a pan (the // handler for that sits on the canvas beneath). Double-click @@ -715,9 +860,19 @@ impl RootView { ); }; - let home = std::env::var("HOME").ok().filter(|home| !home.is_empty()); - let path_display = match &home { - Some(home) if project_item.path.starts_with(home.as_str()) => { + let (detail_key_w, version_col_min_w) = { + let metrics = self.ensure_ui_metrics(window); + // Cap the version column's min width to ~45% of the viewport so + // columns 1 & 2 stay usable even on narrow windows; the button row + // wraps gracefully if it ever runs out of horizontal room. + let max_col_w = (f32::from(window.viewport_size().width) * 0.44).max(320.0); + ( + metrics.detail_key_width, + metrics.version_actions_min_width.min(max_col_w), + ) + }; + let path_display = match HOME_DIR.as_deref() { + Some(home) if project_item.path.starts_with(home) => { format!("~{}", &project_item.path[home.len()..]) } _ => project_item.path.clone(), @@ -749,6 +904,13 @@ impl RootView { .flex() .flex_col() .gap(px(8.0)) + .on_mouse_down(MouseButton::Right, { + let target = crate::ui::context_menus::Target::Project { path: self.backend.project_root_path(selected_index).unwrap_or_default().to_string(), file: project_item.file.clone() }; + cx.listener(move |this, event: &MouseDownEvent, _window, cx| { + this.show_context_menu(target.clone(), event.position, cx); + cx.stop_propagation(); + }) + }) // Fixed-height blocks: the column can run short of // room, and a shrinking text block clips to nothing. .child(caption(&theme, tr("versions.project"))) @@ -794,7 +956,7 @@ impl RootView { .flex() .items_center() .gap(px(8.0)) - .child(detail_key(&theme, tr("versions.file"))) + .child(detail_key(&theme, tr("versions.file"), detail_key_w)) .child(div().flex_1().min_w_0().child( self.render_combo( "primary-file", @@ -824,11 +986,22 @@ impl RootView { &theme, tr("versions.file"), project_item.file.clone(), + detail_key_w, )) } }) - .child(detail_row(&theme, tr("versions.path"), path_display)) - .child(detail_row(&theme, tr("versions.opened"), last_opened)), + .child(detail_row( + &theme, + tr("versions.path"), + path_display, + detail_key_w, + )) + .child(detail_row( + &theme, + tr("versions.opened"), + last_opened, + detail_key_w, + )), ), ) .child(divider()) @@ -858,7 +1031,7 @@ impl RootView { cx, )) .child(div().flex_none().flex().justify_end().child( - div().w(px(96.0)).child(panel_button( + div().flex_none().min_w(px(96.0)).child(panel_button( "save-project-note", tr("versions.save_note"), ButtonVariant::Soft, @@ -881,11 +1054,16 @@ impl RootView { .child( div() .flex_1() - .min_w_0() + .min_w(px(version_col_min_w)) .h_full() .flex() .flex_col() .gap(px(8.0)) + .on_mouse_down(MouseButton::Right, cx.listener(|this, event: &MouseDownEvent, _window, cx| { + if !this.vm_selected_id.is_empty() { + this.version_context_menu(&this.vm_selected_id.clone(), event, cx); + } + })) .child( div() .h(px(15.0)) @@ -957,10 +1135,11 @@ impl RootView { .child( div() .flex() + .flex_wrap() .items_center() .flex_none() .gap(px(8.0)) - .child(div().w(px(76.0)).child(panel_button( + .child(div().flex_none().min_w(px(72.0)).child(panel_button( "delete-version", tr("versions.delete"), ButtonVariant::Danger, @@ -975,8 +1154,8 @@ impl RootView { cx.notify(); }, ))) - .child(div().flex_1()) - .child(div().w(px(100.0)).child(panel_button( + .child(div().flex_1().min_w(px(4.0))) + .child(div().flex_none().min_w(px(96.0)).child(panel_button( "save-version-note", tr("versions.save_note"), ButtonVariant::Soft, @@ -992,7 +1171,7 @@ impl RootView { cx.notify(); }, ))) - .child(div().w(px(118.0)).child(panel_button( + .child(div().flex_none().min_w(px(104.0)).child(panel_button( "open-version", tr("versions.open"), ButtonVariant::Primary, @@ -1013,16 +1192,16 @@ impl RootView { } } -/// One line of the project inspector: a muted key in a fixed column and +/// One line of the project inspector: a muted key in a measured column and /// its value. -fn detail_row(theme: &Theme, key: &str, value: String) -> impl IntoElement { +fn detail_row(theme: &Theme, key: &str, value: String, key_width: f32) -> impl IntoElement { div() // Same height as the file picker, so the rows share one rhythm. .h(px(CONTROL_HEIGHT)) .flex() .items_center() .gap(px(8.0)) - .child(detail_key(theme, key)) + .child(detail_key(theme, key, key_width)) .child( div() .flex_1() @@ -1034,12 +1213,76 @@ fn detail_row(theme: &Theme, key: &str, value: String) -> impl IntoElement { ) } -/// Key column of the inspector rows. -fn detail_key(theme: &Theme, key: &str) -> impl IntoElement { +/// Key column of the inspector rows, sized to the active language's widest key. +fn detail_key(theme: &Theme, key: &str, width: f32) -> impl IntoElement { div() - .w(px(52.0)) + .w(px(width)) .flex_none() .text_size(px(12.0)) .text_color(theme.vm_text_meta) + .whitespace_nowrap() .child(SharedString::from(key.to_string())) } + +#[cfg(test)] +mod paint_cache_tests { + use super::*; + use musit_core::backend::{VersionEntry, VersionGraphNode}; + + #[test] + fn ancestor_lookup_terminates_on_cycles_and_missing_parents() { + let graph = GraphPaintData { + nodes: vec![ + PaintNode { + parent_index: Some(1), + x: 0.0, + y: 0.0, + half_w: 0.0, + col: 0, + }, + PaintNode { + parent_index: Some(0), + x: 0.0, + y: 0.0, + half_w: 0.0, + col: 0, + }, + ], + index_by_id: [("child".into(), 0), ("parent".into(), 1)].into(), + }; + assert_eq!(graph.ancestors_mask("child"), vec![true, true]); + assert_eq!(graph.ancestors_mask("missing"), vec![false, false]); + assert_eq!(graph.ancestors_mask(""), vec![false, false]); + } + + #[test] + fn geometry_tracks_relayout_and_replacement() { + let parent = GraphNode::from(VersionGraphNode { + version: VersionEntry { + id: "parent".into(), + ..VersionEntry::default() + }, + parent_id: String::new(), + depth: 0, + }); + let mut child = GraphNode::from(VersionGraphNode { + version: VersionEntry { + id: "child".into(), + ..VersionEntry::default() + }, + parent_id: "parent".into(), + depth: 1, + }); + child.x = 42.0; + let old = GraphPaintData::new(&[parent.clone(), child.clone()]); + child.x = 84.0; + let updated = GraphPaintData::new(&[parent, child]); + assert_eq!(old.nodes[1].parent_index, Some(0)); + assert_eq!(old.nodes[1].x, 42.0); + assert_eq!(updated.nodes[1].x, 84.0); + assert_eq!(updated.ancestors_mask("child"), vec![true, true]); + let cleared = GraphPaintData::new(&[]); + assert!(cleared.nodes.is_empty()); + assert!(cleared.ancestors_mask("child").is_empty()); + } +} diff --git a/crates/immersion/src/updater/manifest.rs b/crates/immersion/src/updater/manifest.rs index 57ac521..5e547f8 100644 --- a/crates/immersion/src/updater/manifest.rs +++ b/crates/immersion/src/updater/manifest.rs @@ -6,7 +6,7 @@ use semver::Version; use serde::{Deserialize, Serialize}; use sha2::{Digest, Sha256}; use std::fs::File; -use std::io::{self, Read}; +use std::io::Read; use std::path::Path; pub const MAX_MANIFEST: u64 = 16 * 1024; @@ -89,14 +89,32 @@ impl Manifest { pub fn verify_installer(&self, reader: impl Read) -> Result<()> { let mut reader = reader.take(self.size + 1); let mut hash = Sha256::new(); - let size = io::copy(&mut reader, &mut hash)?; - if size != self.size || format!("{:x}", hash.finalize()) != self.sha256 { + let mut buf = [0u8; 64 * 1024]; + let mut size = 0u64; + loop { + let n = reader.read(&mut buf)?; + if n == 0 { + break; + } + size += n as u64; + hash.update(&buf[..n]); + } + if size != self.size || hex_lower(&hash.finalize()) != self.sha256 { return Err("update installer size or checksum mismatch".into()); } Ok(()) } } +fn hex_lower(bytes: &[u8]) -> String { + let mut out = String::with_capacity(bytes.len() * 2); + for byte in bytes { + use std::fmt::Write; + let _ = write!(&mut out, "{byte:02x}"); + } + out +} + #[cfg(test)] mod tests { use super::*; @@ -106,7 +124,7 @@ mod tests { Manifest { version: "0.2.6".into(), target: "windows-x64".into(), url: "https://github.com/404oops/immersion/releases/download/v0.2.6/ImmersionSetup-0.2.6-windows-x64.exe".into(), - size: 3, sha256: format!("{:x}", Sha256::digest(b"exe")), + size: 3, sha256: hex_lower(&Sha256::digest(b"exe")), } } diff --git a/crates/musit-core/Cargo.toml b/crates/musit-core/Cargo.toml index 44bd073..3727c0c 100644 --- a/crates/musit-core/Cargo.toml +++ b/crates/musit-core/Cargo.toml @@ -10,7 +10,6 @@ serde_json.workspace = true sha2.workspace = true flate2.workspace = true regex.workspace = true -once_cell.workspace = true chrono.workspace = true dirs.workspace = true notify.workspace = true diff --git a/crates/musit-core/src/backend.rs b/crates/musit-core/src/backend.rs index ed8813f..74d0b9e 100644 --- a/crates/musit-core/src/backend.rs +++ b/crates/musit-core/src/backend.rs @@ -21,8 +21,8 @@ use crate::path_cleanup::{ }; use crate::project_discovery::{self, DiscoveredProject}; use crate::project_registry::{ - AppSettings, DEFAULT_THEME_SATURATION, ProjectRegistry, app_config_directory, - clamp_theme_saturation, + AppSettings, DEFAULT_STORAGE_SAVER_KEEP, DEFAULT_THEME_SATURATION, MAX_STORAGE_SAVER_KEEP, + MIN_STORAGE_SAVER_KEEP, ProjectRegistry, app_config_directory, clamp_theme_saturation, }; use crate::snapshot_service::SnapshotNotice; use crate::version_id; @@ -400,7 +400,7 @@ pub(crate) fn sha256_file_hex(file_path: &str) -> String { } } let digest = hasher.finalize(); - digest.iter().map(|b| format!("{b:02x}")).collect() + crate::object_store::hex_lower(&digest) } /// Marks the version whose files match what is on disk, using `hash_of` to @@ -640,6 +640,9 @@ fn artifact_set_contains(artifacts: &HashSet, candidate: &str) -> bool { const FILE_HASH_CACHE_CAP: usize = 4096; /// Parsed-log entries hold a project's whole version list, so far fewer fit. const PARSED_LOG_CACHE_CAP: usize = 16; +/// Max project version lists kept in RAM on the backend; older non-selected +/// projects are evicted as the user browses across many projects. +const VERSIONS_CACHE_CAP: usize = 16; /// A cached value validated by the source file's (mtime, len), aged by a /// shared use counter so stale projects fall out of the bounded caches. @@ -900,8 +903,7 @@ pub struct AppBackend { selected_project_key: String, projects: Vec, activity: Vec, - activity_all: Vec, - activity_levels: Vec, + activity_all: std::collections::VecDeque<(LogLevel, String)>, log_level: LogLevel, search_text: String, sort_mode: SortMode, @@ -915,6 +917,10 @@ pub struct AppBackend { launch_at_startup: bool, snapshot_retention: i32, notifications_enabled: bool, + show_tab_close_buttons: bool, + storage_saver_enabled: bool, + storage_saver_keep: i32, + storage_saved_bytes: u64, color_scheme_mode: ColorSchemeMode, language: String, @@ -1017,8 +1023,7 @@ impl AppBackend { project_root: String::new(), projects: Vec::new(), activity: Vec::new(), - activity_all: Vec::new(), - activity_levels: Vec::new(), + activity_all: std::collections::VecDeque::new(), log_level: LogLevel::Info, search_text: String::new(), sort_mode: SortMode::Name, @@ -1032,6 +1037,10 @@ impl AppBackend { launch_at_startup: false, snapshot_retention: UNCOMPRESSED_RECENT_VERSIONS, notifications_enabled: true, + show_tab_close_buttons: false, + storage_saver_enabled: false, + storage_saver_keep: DEFAULT_STORAGE_SAVER_KEEP, + storage_saved_bytes: 0, color_scheme_mode: ColorSchemeMode::System, language: "en".to_string(), visible_project_indexes: Vec::new(), @@ -1083,6 +1092,12 @@ impl AppBackend { MAX_UNCOMPRESSED_RECENT_VERSIONS, ); backend.notifications_enabled = saved_settings.notifications_enabled; + backend.show_tab_close_buttons = saved_settings.show_tab_close_buttons; + backend.storage_saver_enabled = saved_settings.storage_saver_enabled; + backend.storage_saver_keep = saved_settings + .storage_saver_keep + .clamp(MIN_STORAGE_SAVER_KEEP, MAX_STORAGE_SAVER_KEEP); + backend.storage_saved_bytes = saved_settings.storage_saved_bytes; backend.color_scheme_mode = color_scheme_mode_from_string(if saved_settings.color_scheme_mode.is_empty() { strings::COLOR_SCHEME_SYSTEM @@ -1399,8 +1414,13 @@ impl AppBackend { /// Drains queued cross-thread messages (discovery progress, watcher /// events, snapshot notices) and due timers. Call this regularly. - pub fn process_pending(&mut self) { + /// Drains cross-thread work and due timers. Returns whether anything is + /// in progress, so the host can poll quickly while busy and back off to + /// a slow cadence when idle (a background app should not wake the CPU). + pub fn process_pending(&mut self) -> bool { + let mut busy = false; while let Ok(msg) = self.msg_rx.try_recv() { + busy = true; self.handle_msg(msg); } @@ -1424,6 +1444,14 @@ impl AppBackend { } self.advance_monitoring_init(); + + busy || !self.events.is_empty() + || self.monitoring_init_in_flight.is_some() + || !self.monitoring_init_queue.is_empty() + || !self.version_loads_in_flight.is_empty() + || self.is_scanning_projects() + || self.theme_hue_persist_deadline.is_some() + || self.theme_saturation_persist_deadline.is_some() } /// Persists any debounced settings immediately; call on app shutdown, @@ -1539,6 +1567,9 @@ impl AppBackend { version_id, relative_path, } => { + if self.storage_saver_enabled { + self.auto_prune_after_save(&project_root, &relative_path, &version_id); + } let project_name = file_name(&project_root).to_string(); self.push_event(BackendEvent::ProjectSaveRecorded { project_name, @@ -1664,6 +1695,19 @@ impl AppBackend { .versions_by_project .get(&key) .is_none_or(|existing| existing != &versions); + if !self.versions_by_project.contains_key(&key) + && self.versions_by_project.len() >= VERSIONS_CACHE_CAP + { + let selected = self.selected_project_key.as_str(); + if let Some(evict_key) = self + .versions_by_project + .keys() + .find(|candidate| candidate.as_str() != selected) + .cloned() + { + self.versions_by_project.remove(&evict_key); + } + } self.versions_by_project.insert(key.clone(), versions); if changed && key == self.selected_project_key { self.push_event(BackendEvent::SelectedProjectVersionGraphChanged); @@ -1857,6 +1901,48 @@ impl AppBackend { self.push_event(BackendEvent::SnapshotRetentionChanged); } + pub fn show_tab_close_buttons(&self) -> bool { + self.show_tab_close_buttons + } + + pub fn set_show_tab_close_buttons(&mut self, value: bool) { + if self.show_tab_close_buttons != value { + self.show_tab_close_buttons = value; + self.persist_app_settings(); + } + } + + pub fn storage_saver_enabled(&self) -> bool { + self.storage_saver_enabled + } + + pub fn set_storage_saver_enabled(&mut self, value: bool) { + if self.storage_saver_enabled != value { + self.storage_saver_enabled = value; + self.persist_app_settings(); + self.log_config_change(&format!( + "storage saver {}", + if value { "enabled" } else { "disabled" } + )); + } + } + + pub fn storage_saver_keep(&self) -> i32 { + self.storage_saver_keep + } + + pub fn set_storage_saver_keep(&mut self, value: i32) { + let clamped = value.clamp(MIN_STORAGE_SAVER_KEEP, MAX_STORAGE_SAVER_KEEP); + if self.storage_saver_keep != clamped { + self.storage_saver_keep = clamped; + self.persist_app_settings(); + } + } + + pub fn storage_saved_bytes(&self) -> u64 { + self.storage_saved_bytes + } + pub fn notifications_enabled(&self) -> bool { self.notifications_enabled } @@ -2016,6 +2102,12 @@ impl AppBackend { self.push_event(BackendEvent::SelectedProjectVersionGraphChanged); } + /// Actual project directory for an action; list rows display its parent instead. + pub fn project_root_path(&self, visible_index: i32) -> Option<&str> { + self.visible_project(visible_index) + .map(|project| project.root_path.as_str()) + } + pub fn selected_project_files(&self) -> Vec { self.visible_project(self.selected_project_index) .map(|project| project.project_files.clone()) @@ -2866,57 +2958,35 @@ impl AppBackend { return Vec::new(); } - let versions = self - .versions_by_project - .get(&self.selected_project_key) - .cloned() - .unwrap_or_default(); + let Some(versions) = self.versions_by_project.get(&self.selected_project_key) else { + return Vec::new(); + }; if versions.is_empty() { return Vec::new(); } - let mut node_by_id: HashMap = HashMap::new(); - let mut parent_of: HashMap = HashMap::new(); - for version in &versions { - if version.id.is_empty() { - continue; - } - node_by_id.insert(version.id.clone(), version.clone()); - parent_of.insert(version.id.clone(), version.parent.clone()); - } - - let mut children_by_parent: HashMap> = HashMap::new(); - let mut resolved_parent: HashMap = HashMap::new(); - for (id, parent_id) in &parent_of { - let mut parent_id = parent_id.clone(); - // Treat nodes whose parent no longer exists (e.g. deleted by - // older app versions) as roots instead of silently dropping - // their subtree. - if !parent_id.is_empty() && !node_by_id.contains_key(&parent_id) { - parent_id.clear(); + let mut node_by_id: HashMap<&str, &VersionEntry> = HashMap::with_capacity(versions.len()); + for version in versions { + if !version.id.is_empty() { + node_by_id.insert(version.id.as_str(), version); } - resolved_parent.insert(id.clone(), parent_id.clone()); - children_by_parent - .entry(parent_id) - .or_default() - .push(id.clone()); } - let mut graph: Vec = Vec::new(); + let mut children_by_parent: HashMap<&str, Vec<&str>> = HashMap::new(); + let mut resolved_parent: HashMap<&str, &str> = HashMap::with_capacity(node_by_id.len()); + for (&id, &version) in &node_by_id { + let parent_id = + if !version.parent.is_empty() && node_by_id.contains_key(version.parent.as_str()) { + version.parent.as_str() + } else { + "" + }; + resolved_parent.insert(id, parent_id); + children_by_parent.entry(parent_id).or_default().push(id); + } - fn append_children( - parent_id: &str, - depth: i32, - graph: &mut Vec, - children_by_parent: &HashMap>, - node_by_id: &HashMap, - resolved_parent: &HashMap, - ) { - let mut children = children_by_parent - .get(parent_id) - .cloned() - .unwrap_or_default(); - children.sort_by(|a, b| { + for children in children_by_parent.values_mut() { + children.sort_unstable_by(|a, b| { if version_id::less_than(a, b) { std::cmp::Ordering::Less } else if version_id::less_than(b, a) { @@ -2925,17 +2995,36 @@ impl AppBackend { std::cmp::Ordering::Equal } }); - for child_id in children { - let Some(version) = node_by_id.get(&child_id) else { + } + + let mut graph: Vec = Vec::with_capacity(node_by_id.len()); + + fn append_children<'a>( + parent_id: &str, + depth: i32, + graph: &mut Vec, + children_by_parent: &HashMap<&'a str, Vec<&'a str>>, + node_by_id: &HashMap<&'a str, &'a VersionEntry>, + resolved_parent: &HashMap<&'a str, &'a str>, + ) { + let Some(children) = children_by_parent.get(parent_id) else { + return; + }; + for &child_id in children { + let Some(&version) = node_by_id.get(child_id) else { continue; }; graph.push(VersionGraphNode { version: version.clone(), - parent_id: resolved_parent.get(&child_id).cloned().unwrap_or_default(), + parent_id: resolved_parent + .get(child_id) + .copied() + .unwrap_or_default() + .to_string(), depth, }); append_children( - &child_id, + child_id, depth + 1, graph, children_by_parent, @@ -2983,7 +3072,22 @@ impl AppBackend { return false; } - let versions = self.get_project_versions(self.selected_project_index); + // Use the already-loaded version list when it contains the requested + // version; otherwise parse the log directly (without hashing disk + // files on the UI thread) so a newly recorded save whose async graph + // refresh is still in flight can still be restored immediately. + let fallback_versions; + let versions: &[VersionEntry] = + match self.versions_by_project.get(&self.selected_project_key) { + Some(cached) if cached.iter().any(|v| v.id == version_id_str) => cached.as_slice(), + _ => { + let log_path = + join_path(&project.root_path, strings::MUSIT_VERSION_LOG_RELATIVE_PATH); + fallback_versions = + self.parsed_versions_for(&log_path, &project.primary_project_file); + fallback_versions.as_slice() + } + }; let Some(mut version) = versions.iter().find(|v| v.id == version_id_str).cloned() else { return false; }; @@ -2993,7 +3097,7 @@ impl AppBackend { // full state as of that version: the newest entry for each file up to // and including it. let mut state_at_version: Vec = Vec::new(); - for candidate in &versions { + for candidate in versions { for file in &candidate.files { match state_at_version .iter_mut() @@ -3247,6 +3351,257 @@ impl AppBackend { true } + /// Atomically prunes all versions in `delete_ids` from the selected + /// project's version log, reparenting surviving descendants onto their + /// nearest surviving ancestor, and deleting freed staged copies and + /// unreferenced content-addressed objects. Returns the number of pruned + /// versions. + pub fn prune_selected_project_versions(&mut self, delete_ids: &HashSet) -> usize { + if delete_ids.is_empty() { + return 0; + } + let Some(project) = self.visible_project(self.selected_project_index).cloned() else { + return 0; + }; + let (pruned_count, freed_bytes) = prune_artifact_versions( + &project.root_path, + &project.primary_project_file, + delete_ids, + ); + if pruned_count > 0 { + if freed_bytes > 0 { + self.storage_saved_bytes = self.storage_saved_bytes.saturating_add(freed_bytes); + self.persist_app_settings(); + } + self.append_activity(&format!( + "[{}] pruned {} version(s) for {} (freed {})", + now_human(), + pruned_count, + project.name, + format_bytes(freed_bytes), + )); + self.request_selected_versions(); + } + pruned_count + } + + fn auto_prune_after_save( + &mut self, + project_root: &str, + relative_path: &str, + current_version_id: &str, + ) { + let keep_limit = self.storage_saver_keep.max(1) as usize; + let artifact = { + let candidate = backup_template::artifact_for_path(relative_path); + if candidate.is_empty() { + relative_path.to_string() + } else { + candidate + } + }; + if artifact.is_empty() { + return; + } + let log_path = join_path(project_root, strings::MUSIT_VERSION_LOG_RELATIVE_PATH); + let mut versions = parse_versions_from_log(&log_path, &artifact); + if versions.len() <= keep_limit { + return; + } + for version in &mut versions { + version.is_current = version.id == current_version_id; + } + let nodes: Vec = versions + .into_iter() + .map(|version| VersionGraphNode { + parent_id: version.parent.clone(), + version, + depth: 0, + }) + .collect(); + let keep_ids = select_versions_to_keep(&nodes, keep_limit); + let delete_ids: HashSet = nodes + .iter() + .filter(|n| !keep_ids.contains(&n.version.id)) + .map(|n| n.version.id.clone()) + .collect(); + if delete_ids.is_empty() { + return; + } + let (pruned_count, freed_bytes) = + prune_artifact_versions(project_root, &artifact, &delete_ids); + if pruned_count > 0 { + if freed_bytes > 0 { + self.storage_saved_bytes = self.storage_saved_bytes.saturating_add(freed_bytes); + self.persist_app_settings(); + } + self.versions_by_project.clear(); + self.append_activity(&format!( + "[{}] storage saver pruned {} version(s) for {} (freed {})", + now_human(), + pruned_count, + artifact, + format_bytes(freed_bytes), + )); + if path_equals(project_root, &self.project_root) { + self.request_selected_versions(); + } + } + } + + /// Measures staged and compressed object sizes for the selected project + /// once so the per-project Version Pruner modal can show exact before/after + /// storage and savings as the user adjusts the keep count. + pub fn selected_project_storage_snapshot(&self) -> ProjectStorageSnapshot { + let Some(project) = self.visible_project(self.selected_project_index) else { + return ProjectStorageSnapshot::default(); + }; + scan_project_storage_snapshot(&project.root_path, &project.primary_project_file) + } + + /// Scans all discovered projects across every watched folder once and + /// returns per-project artifact version sizes so the Global Pruner / + /// Storage Saver UI can preview any keep limit and estimated storage + /// savings in memory with zero disk I/O. + pub fn global_prune_snapshot(&self) -> GlobalPruneSnapshot { + let mut stats_by_root: HashMap = HashMap::new(); + let mut seen_projects: HashSet<(String, String)> = HashSet::new(); + let mut per_project_artifacts: Vec>> = Vec::new(); + let mut total_storage_bytes = 0u64; + + for workspace in &self.workspaces { + for project in &workspace.discovered_projects { + let root_norm = normalize_folder_path(&project.root_path); + let dedup_key = ( + root_norm.clone(), + normalize_artifact_key(&project.primary_project_file), + ); + if !seen_projects.insert(dedup_key) { + continue; + } + if !stats_by_root.contains_key(&root_norm) { + let stats = scan_root_storage_stats(&project.root_path); + total_storage_bytes = total_storage_bytes.saturating_add(stats.total_bytes); + stats_by_root.insert(root_norm.clone(), stats); + } + let root_stats = &stats_by_root[&root_norm]; + let artifacts = project_tracked_artifacts(project); + let mut artifact_sizes = Vec::with_capacity(artifacts.len()); + for artifact in artifacts { + let key = normalize_artifact_key(artifact); + artifact_sizes.push( + root_stats + .version_reclaimable_bytes_by_artifact + .get(&key) + .cloned() + .unwrap_or_default(), + ); + } + per_project_artifacts.push(artifact_sizes); + } + } + + GlobalPruneSnapshot { + total_storage_bytes, + per_project_artifacts, + } + } + + /// Prunes every discovered project across all watched folders down to at + /// most `keep_count` versions per tracked artifact, always protecting each + /// project's current on-disk version. + pub fn prune_all_projects(&mut self, keep_count: usize) -> GlobalPruneResult { + let keep_limit = keep_count.max(1); + let mut targets: Vec<(String, Vec)> = Vec::new(); + let mut seen_projects: HashSet<(String, String)> = HashSet::new(); + + for workspace in &self.workspaces { + for project in &workspace.discovered_projects { + let dedup_key = ( + normalize_folder_path(&project.root_path), + normalize_artifact_key(&project.primary_project_file), + ); + if !seen_projects.insert(dedup_key) { + continue; + } + let artifacts: Vec = project_tracked_artifacts(project) + .into_iter() + .map(str::to_string) + .collect(); + targets.push((project.root_path.clone(), artifacts)); + } + } + + let mut pruned_versions = 0usize; + let mut pruned_projects = 0usize; + let mut freed_bytes = 0u64; + + for (root_path, artifacts) in targets { + let log_path = join_path(&root_path, strings::MUSIT_VERSION_LOG_RELATIVE_PATH); + let mut project_pruned = false; + for artifact in artifacts { + let mut versions = parse_versions_from_log(&log_path, &artifact); + if versions.len() <= keep_limit { + continue; + } + let pseudo_project = DiscoveredProject { + root_path: root_path.clone(), + primary_project_file: artifact.clone(), + ..DiscoveredProject::default() + }; + self.mark_current_version(&pseudo_project, &mut versions); + let nodes: Vec = versions + .into_iter() + .map(|version| VersionGraphNode { + parent_id: version.parent.clone(), + version, + depth: 0, + }) + .collect(); + let keep_ids = select_versions_to_keep(&nodes, keep_limit); + let delete_ids: HashSet = nodes + .iter() + .filter(|n| !keep_ids.contains(&n.version.id)) + .map(|n| n.version.id.clone()) + .collect(); + if delete_ids.is_empty() { + continue; + } + let (removed, bytes) = prune_artifact_versions(&root_path, &artifact, &delete_ids); + if removed > 0 { + pruned_versions += removed; + freed_bytes = freed_bytes.saturating_add(bytes); + project_pruned = true; + } + } + if project_pruned { + pruned_projects += 1; + } + } + + if pruned_versions > 0 { + if freed_bytes > 0 { + self.storage_saved_bytes = self.storage_saved_bytes.saturating_add(freed_bytes); + self.persist_app_settings(); + } + self.versions_by_project.clear(); + self.append_activity(&format!( + "[{}] global prune: removed {} version(s) across {} project(s) (freed {})", + now_human(), + pruned_versions, + pruned_projects, + format_bytes(freed_bytes), + )); + self.request_selected_versions(); + } + + GlobalPruneResult { + pruned_versions, + pruned_projects, + freed_bytes, + } + } + // ---- Config / activity --------------------------------------------------- pub fn reset_config(&mut self) -> bool { @@ -3273,7 +3628,6 @@ impl AppBackend { self.projects.clear(); self.activity_all.clear(); self.activity.clear(); - self.activity_levels.clear(); self.search_text.clear(); self.selected_project_index = -1; self.selected_project_note.clear(); @@ -3281,6 +3635,8 @@ impl AppBackend { self.project_notes.clear(); self.project_primary_files.clear(); self.last_opened_at_by_project.clear(); + self.versions_by_project.clear(); + self.version_loads_in_flight.clear(); self.file_hash_cache.borrow_mut().clear(); self.parsed_log_cache.borrow_mut().clear(); @@ -3292,6 +3648,10 @@ impl AppBackend { self.log_level = LogLevel::Info; self.snapshot_retention = UNCOMPRESSED_RECENT_VERSIONS; self.notifications_enabled = true; + self.show_tab_close_buttons = false; + self.storage_saver_enabled = false; + self.storage_saver_keep = DEFAULT_STORAGE_SAVER_KEEP; + self.storage_saved_bytes = 0; self.color_scheme_mode = ColorSchemeMode::System; self.language = "en".to_string(); self.launch_at_startup = false; @@ -3337,7 +3697,7 @@ impl AppBackend { } let mut contents = String::new(); - for line in &self.activity_all { + for (_, line) in &self.activity_all { contents.push_str(line); contents.push('\n'); } @@ -3375,6 +3735,10 @@ impl AppBackend { log_level: self.log_level().to_string(), snapshot_retention: self.snapshot_retention, notifications_enabled: self.notifications_enabled, + show_tab_close_buttons: self.show_tab_close_buttons, + storage_saver_enabled: self.storage_saver_enabled, + storage_saver_keep: self.storage_saver_keep, + storage_saved_bytes: self.storage_saved_bytes, // The updater can change this independently of backend settings. auto_updates_enabled: self .project_registry @@ -3401,40 +3765,34 @@ impl AppBackend { } fn append_activity_with_level(&mut self, line: &str, level: LogLevel) { - self.activity_all.push(line.to_string()); - self.activity_levels.push(level); - let trimmed = self.trim_activity_log(); - let visible = !(self.log_level == LogLevel::Info && level == LogLevel::Debug); - if trimmed { - self.rebuild_visible_activity(); - } else if visible { - // Append incrementally instead of re-cloning the filtered list. + let is_visible = + |lvl: LogLevel, filter: LogLevel| !(filter == LogLevel::Info && lvl == LogLevel::Debug); + self.activity_all.push_back((level, line.to_string())); + let mut visible_changed = false; + while self.activity_all.len() > MAX_ACTIVITY_LINES { + if let Some((popped_level, _)) = self.activity_all.pop_front() + && is_visible(popped_level, self.log_level) + && !self.activity.is_empty() + { + self.activity.remove(0); + visible_changed = true; + } + } + if is_visible(level, self.log_level) { self.activity.push(line.to_string()); - self.push_event(BackendEvent::ActivityChanged); + visible_changed = true; } // A filtered-out debug line changes nothing user-visible: no event, // so idle watcher chatter doesn't force re-renders. + if visible_changed { + self.push_event(BackendEvent::ActivityChanged); + } } fn log_config_change(&mut self, detail: &str) { self.append_debug_activity(&format!("[{}] config: {}", now_human(), detail)); } - fn trim_activity_log(&mut self) -> bool { - if self.activity_all.len() <= MAX_ACTIVITY_LINES { - return false; - } - - let excess = self.activity_all.len() - MAX_ACTIVITY_LINES; - self.activity_all.drain(..excess); - if self.activity_levels.len() > excess { - self.activity_levels.drain(..excess); - } else { - self.activity_levels.clear(); - } - true - } - fn append_activity(&mut self, line: &str) { self.append_activity_with_level(line, LogLevel::Info); } @@ -3445,13 +3803,8 @@ impl AppBackend { fn rebuild_visible_activity(&mut self) { let mut filtered: Vec = Vec::with_capacity(self.activity_all.len()); - for (i, line) in self.activity_all.iter().enumerate() { - let level = self - .activity_levels - .get(i) - .copied() - .unwrap_or(LogLevel::Info); - if self.log_level == LogLevel::Info && level == LogLevel::Debug { + for (level, line) in &self.activity_all { + if self.log_level == LogLevel::Info && *level == LogLevel::Debug { continue; } filtered.push(line.clone()); @@ -3567,20 +3920,24 @@ impl AppBackend { fn rebuild_visible_projects(&mut self) { let query = self.search_text.trim().to_lowercase(); + let active_idx = usize::try_from(self.active_workspace).ok(); + let projects: &[DiscoveredProject] = active_idx + .and_then(|i| self.workspaces.get(i)) + .map(|w| w.discovered_projects.as_slice()) + .unwrap_or(&[]); - let projects: Vec = self.active_projects().to_vec(); let mut visible: Vec = Vec::with_capacity(projects.len()); for (i, project) in projects.iter().enumerate() { if !query.is_empty() { - let haystack = format!( - "{} {} {} {}", - project.name, - project.primary_project_file, - project.root_path, - project.kind.to_display_string() - ) - .to_lowercase(); - if !haystack.contains(&query) { + let matches = project.name.to_lowercase().contains(&query) + || project.primary_project_file.to_lowercase().contains(&query) + || project.root_path.to_lowercase().contains(&query) + || project + .kind + .to_display_string() + .to_lowercase() + .contains(&query); + if !matches { continue; } } @@ -3588,19 +3945,25 @@ impl AppBackend { } let sort_mode = self.sort_mode; - // No filesystem access here: modified times came with the scan and - // the watcher keeps them current, so rebuilding the list is free - // even when the folder sits on a slow share. - let opened: Vec> = projects + // Precompute sort keys once (O(N)) instead of allocating 4x lowercase + // Strings per comparison inside `sort_by`. + let sort_keys: Vec<(Option, String, String)> = projects .iter() - .map(|project| self.effective_last_opened(project)) + .map(|project| { + ( + self.effective_last_opened(project), + project.name.to_lowercase(), + project.root_path.to_lowercase(), + ) + }) .collect(); - visible.sort_by(|&left, &right| { - let l = &projects[left]; - let r = &projects[right]; + + visible.sort_unstable_by(|&left, &right| { + let (lo, ref l_name, ref l_root) = sort_keys[left]; + let (ro, ref r_name, ref r_root) = sort_keys[right]; if sort_mode == SortMode::LastOpened { - match (opened[left], opened[right]) { + match (lo, ro) { (Some(_), None) => return std::cmp::Ordering::Less, (None, Some(_)) => return std::cmp::Ordering::Greater, (Some(lo), Some(ro)) if lo != ro => return ro.cmp(&lo), @@ -3608,40 +3971,31 @@ impl AppBackend { } } - let by_name = l.name.to_lowercase().cmp(&r.name.to_lowercase()); + let by_name = l_name.cmp(r_name); if by_name != std::cmp::Ordering::Equal { return by_name; } - l.root_path.to_lowercase().cmp(&r.root_path.to_lowercase()) + l_root.cmp(r_root) }); - self.visible_project_indexes = visible; - - // The selected index points into the visible list, so remap it - // whenever that list changes; otherwise operations act on the wrong - // project. - if !self.selected_project_key.is_empty() { - let mut new_index = -1i32; - for (i, &discovered_index) in self.visible_project_indexes.iter().enumerate() { - if project_key_of(&projects[discovered_index]) == self.selected_project_key { - new_index = i as i32; - break; - } - } - if new_index != self.selected_project_index { - self.selected_project_index = new_index; - self.push_event(BackendEvent::SelectedProjectIndexChanged); - } - } else if self.selected_project_index != -1 { - self.selected_project_index = -1; - self.push_event(BackendEvent::SelectedProjectIndexChanged); - } + // Compute the remapped selection index and ProjectListItems while still + // borrowing `projects` without cloning `DiscoveredProject`s. + let new_selected_index = if !self.selected_project_key.is_empty() { + visible + .iter() + .position(|&discovered_index| { + project_key_of(&projects[discovered_index]) == self.selected_project_key + }) + .map(|i| i as i32) + .unwrap_or(-1) + } else { + -1 + }; - let mut items: Vec = - Vec::with_capacity(self.visible_project_indexes.len()); - for &index in &self.visible_project_indexes { + let mut items: Vec = Vec::with_capacity(visible.len()); + for &index in &visible { let project = &projects[index]; - let effective_last_opened = opened[index]; + let effective_last_opened = sort_keys[index].0; let parent = parent_path(&project.root_path); items.push(ProjectListItem { name: project.name.clone(), @@ -3656,6 +4010,12 @@ impl AppBackend { }); } + self.visible_project_indexes = visible; + if new_selected_index != self.selected_project_index { + self.selected_project_index = new_selected_index; + self.push_event(BackendEvent::SelectedProjectIndexChanged); + } + self.projects = items; self.push_event(BackendEvent::ProjectsChanged); } @@ -3727,6 +4087,11 @@ impl AppBackend { .map(|(key, _)| key.clone()) .collect(); for key in doomed { + let prefix = format!("{key}\u{0}"); + self.versions_by_project + .retain(|proj_key, _| !proj_key.starts_with(&prefix)); + self.version_loads_in_flight + .retain(|proj_key| !proj_key.starts_with(&prefix)); self.canonical_root_by_key.remove(&key); self.folder_by_root_key.remove(&key); } @@ -3878,6 +4243,16 @@ impl AppBackend { } } + /// Stops watchers and snapshot services before a user-requested filesystem operation. + /// Wait for the returned receiver off the UI thread before changing files. + /// Call `load_projects_from_folder` afterwards to rediscover files and resume monitoring. + pub fn pause_folder_monitoring(&mut self, folder_root: &str) -> std::sync::mpsc::Receiver<()> { + self.stop_monitoring_for_folder(folder_root); + let (done, ready) = std::sync::mpsc::channel(); + self.versioning.send(VersioningJob::Barrier(done)); + ready + } + fn stop_monitoring_for_folder(&mut self, folder_root: &str) { if let Some(index) = self.workspace_index_by_root(folder_root) { if let Some(watcher) = self.workspaces[index].watcher.take() { @@ -4152,3 +4527,809 @@ fn color_scheme_mode_to_string(mode: ColorSchemeMode) -> &'static str { ColorSchemeMode::System => strings::COLOR_SCHEME_SYSTEM, } } + +/// Chooses which `keep_count` versions to retain when pruning `nodes`: keeps +/// the newest versions by `(timestamp, version_id)` and always protects the +/// `is_current` version (swapping out the oldest kept version if needed so the +/// kept count still matches `keep_count`). +pub fn select_versions_to_keep(nodes: &[VersionGraphNode], keep_count: usize) -> HashSet { + if keep_count == 0 || nodes.is_empty() { + return HashSet::new(); + } + if keep_count >= nodes.len() { + return nodes.iter().map(|n| n.version.id.clone()).collect(); + } + + let mut ranked: Vec = (0..nodes.len()).collect(); + // Newest first: timestamp descending, then version_id descending. + ranked.sort_unstable_by(|&a, &b| { + let va = &nodes[a].version; + let vb = &nodes[b].version; + vb.timestamp.cmp(&va.timestamp).then_with(|| { + if version_id::less_than(&va.id, &vb.id) { + std::cmp::Ordering::Greater + } else if version_id::less_than(&vb.id, &va.id) { + std::cmp::Ordering::Less + } else { + std::cmp::Ordering::Equal + } + }) + }); + + let mut kept_indices: Vec = ranked[..keep_count].to_vec(); + if let Some(current_idx) = nodes.iter().position(|n| n.version.is_current) + && !kept_indices.contains(¤t_idx) + && let Some(last) = kept_indices.last_mut() + { + *last = current_idx; + } + + kept_indices + .into_iter() + .map(|i| nodes[i].version.id.clone()) + .collect() +} + +/// Computes the exact post-prune version graph for `keep_ids`, reparenting any +/// surviving node whose parent was pruned onto its nearest surviving ancestor +/// and ordering in depth-first display order. +pub fn preview_pruned_graph( + nodes: &[VersionGraphNode], + keep_ids: &HashSet, +) -> Vec { + if nodes.is_empty() || keep_ids.is_empty() { + return Vec::new(); + } + + let mut parent_of: HashMap<&str, &str> = HashMap::with_capacity(nodes.len()); + let mut node_by_id: HashMap<&str, &VersionGraphNode> = HashMap::with_capacity(keep_ids.len()); + for node in nodes { + let id = node.version.id.as_str(); + parent_of.insert(id, node.parent_id.as_str()); + if keep_ids.contains(id) { + node_by_id.insert(id, node); + } + } + + fn resolve_parent<'a>( + start: &'a str, + node_by_id: &HashMap<&'a str, &'a VersionGraphNode>, + parent_of: &HashMap<&'a str, &'a str>, + ) -> &'a str { + let mut visited: HashSet<&'a str> = HashSet::new(); + let mut candidate = start; + while !candidate.is_empty() && visited.insert(candidate) { + if node_by_id.contains_key(candidate) { + return candidate; + } + candidate = parent_of.get(candidate).copied().unwrap_or(""); + } + "" + } + + let mut children_by_parent: HashMap<&str, Vec<&str>> = HashMap::new(); + let mut resolved_parent: HashMap<&str, &str> = HashMap::with_capacity(node_by_id.len()); + for (&id, &node) in &node_by_id { + let parent = resolve_parent(node.parent_id.as_str(), &node_by_id, &parent_of); + resolved_parent.insert(id, parent); + children_by_parent.entry(parent).or_default().push(id); + } + for children in children_by_parent.values_mut() { + children.sort_unstable_by(|a, b| { + if version_id::less_than(a, b) { + std::cmp::Ordering::Less + } else if version_id::less_than(b, a) { + std::cmp::Ordering::Greater + } else { + std::cmp::Ordering::Equal + } + }); + } + + let mut out = Vec::with_capacity(node_by_id.len()); + fn append<'a>( + parent: &str, + depth: i32, + out: &mut Vec, + children_by_parent: &HashMap<&'a str, Vec<&'a str>>, + node_by_id: &HashMap<&'a str, &'a VersionGraphNode>, + resolved_parent: &HashMap<&'a str, &'a str>, + ) { + let Some(children) = children_by_parent.get(parent) else { + return; + }; + for &child in children { + let Some(&node) = node_by_id.get(child) else { + continue; + }; + let mut version = node.version.clone(); + let new_parent = resolved_parent + .get(child) + .copied() + .unwrap_or("") + .to_string(); + version.parent = new_parent.clone(); + out.push(VersionGraphNode { + version, + parent_id: new_parent, + depth, + }); + append( + child, + depth + 1, + out, + children_by_parent, + node_by_id, + resolved_parent, + ); + } + } + + append( + "", + 0, + &mut out, + &children_by_parent, + &node_by_id, + &resolved_parent, + ); + out +} + +#[derive(Clone, Debug, Default, PartialEq, Eq)] +pub struct ProjectStorageSnapshot { + pub total_bytes: u64, + version_staged_bytes: HashMap, + version_object_hashes: HashMap>, + object_sizes: HashMap, + external_object_hashes: HashSet, +} + +impl ProjectStorageSnapshot { + /// Returns `(after_bytes, saved_bytes)` if only `keep_ids` are kept. + pub fn preview_after(&self, keep_ids: &HashSet) -> (u64, u64) { + let mut freed_staged = 0u64; + let mut kept_objects: HashSet<&str> = HashSet::new(); + let mut deleted_objects: HashSet<&str> = HashSet::new(); + + for (id, &staged_bytes) in &self.version_staged_bytes { + let kept = keep_ids.contains(id); + if !kept { + freed_staged = freed_staged.saturating_add(staged_bytes); + } + if let Some(hashes) = self.version_object_hashes.get(id) { + for hash in hashes { + if kept { + kept_objects.insert(hash.as_str()); + } else { + deleted_objects.insert(hash.as_str()); + } + } + } + } + + let mut freed_objects = 0u64; + for hash in deleted_objects { + if kept_objects.contains(hash) || self.external_object_hashes.contains(hash) { + continue; + } + if let Some(&size) = self.object_sizes.get(hash) { + freed_objects = freed_objects.saturating_add(size); + } + } + + let saved = freed_staged.saturating_add(freed_objects); + let after = self.total_bytes.saturating_sub(saved); + (after, saved) + } +} + +fn scan_project_storage_snapshot(root_path: &str, artifact: &str) -> ProjectStorageSnapshot { + let log_path = join_path(root_path, strings::MUSIT_VERSION_LOG_RELATIVE_PATH); + let Ok(file) = fs::File::open(&log_path) else { + return ProjectStorageSnapshot::default(); + }; + let mut reader = std::io::BufReader::new(file); + let mut ordinal = 0i64; + let mut version_staged_bytes: HashMap = HashMap::new(); + let mut version_object_hashes: HashMap> = HashMap::new(); + let mut project_object_hashes: HashSet = HashSet::new(); + let mut external_object_hashes: HashSet = HashSet::new(); + let mut seen_staged: HashSet = HashSet::new(); + let mut raw: Vec = Vec::new(); + + loop { + raw.clear(); + match std::io::BufRead::read_until(&mut reader, b'\n', &mut raw) { + Ok(0) => break, + Ok(_) => {} + Err(_) => return ProjectStorageSnapshot::default(), + } + let Some(obj) = parse_log_line(&raw) else { + continue; + }; + let staged_rel = json_str(&obj, "staged"); + if staged_rel.is_empty() { + continue; + } + let object_hash = json_str(&obj, "object").to_lowercase(); + if !artifact_equals(&artifact_of_log_line(&obj), artifact) { + if !object_hash.is_empty() { + external_object_hashes.insert(object_hash); + } + continue; + } + ordinal += 1; + let version_id = { + let v = json_str(&obj, "version"); + if v.is_empty() { + ordinal.to_string() + } else { + v.to_string() + } + }; + let staged_entry = version_staged_bytes.entry(version_id.clone()).or_insert(0); + let staged_abs = resolve_staged_path(root_path, staged_rel); + if seen_staged.insert(staged_abs.clone()) { + let size = fs::metadata(&staged_abs).map(|m| m.len()).unwrap_or(0); + *staged_entry = staged_entry.saturating_add(size); + } + if !object_hash.is_empty() { + project_object_hashes.insert(object_hash.clone()); + version_object_hashes + .entry(version_id) + .or_default() + .push(object_hash); + } + } + + let musit_root = join_path(root_path, ".musit"); + let object_store = ObjectStore::new(musit_root); + let mut object_sizes: HashMap = + HashMap::with_capacity(project_object_hashes.len()); + let mut total_bytes: u64 = version_staged_bytes + .values() + .copied() + .fold(0u64, u64::saturating_add); + for hash in project_object_hashes { + let size = object_store + .object_path_for_hash(&hash) + .and_then(|p| fs::metadata(&p).ok()) + .map(|m| m.len()) + .unwrap_or(0); + total_bytes = total_bytes.saturating_add(size); + object_sizes.insert(hash, size); + } + + ProjectStorageSnapshot { + total_bytes, + version_staged_bytes, + version_object_hashes, + object_sizes, + external_object_hashes, + } +} + +#[derive(Clone, Debug, Default, PartialEq, Eq)] +pub struct GlobalPrunePreview { + pub total_projects: usize, + pub affected_projects: usize, + pub total_versions: usize, + pub keep_versions: usize, + pub remove_versions: usize, + pub total_storage_bytes: u64, + pub estimated_freed_bytes: u64, +} + +/// Per-project/artifact version sizes gathered once across all watched folders +/// so adjusting the Global Pruner / Storage Saver spinbox previews counts and +/// estimated storage savings in O(V) with zero disk I/O. +#[derive(Clone, Debug, Default, PartialEq, Eq)] +pub struct GlobalPruneSnapshot { + total_storage_bytes: u64, + /// Outer: projects; middle: artifacts per project; inner: oldest-first + /// estimated reclaimable bytes per version. + per_project_artifacts: Vec>>, +} + +impl GlobalPruneSnapshot { + pub fn preview(&self, keep_count: usize) -> GlobalPrunePreview { + let keep_limit = keep_count.max(1); + let mut out = GlobalPrunePreview { + total_projects: self.per_project_artifacts.len(), + total_storage_bytes: self.total_storage_bytes, + ..GlobalPrunePreview::default() + }; + for artifacts in &self.per_project_artifacts { + let mut project_affected = false; + for version_sizes in artifacts { + let count = version_sizes.len(); + let kept = count.min(keep_limit); + let removed = count.saturating_sub(kept); + out.total_versions += count; + out.keep_versions += kept; + out.remove_versions += removed; + if removed > 0 { + project_affected = true; + let freed: u64 = version_sizes + .iter() + .take(removed) + .copied() + .fold(0u64, u64::saturating_add); + out.estimated_freed_bytes = out.estimated_freed_bytes.saturating_add(freed); + } + } + if project_affected { + out.affected_projects += 1; + } + } + out + } +} + +#[derive(Clone, Debug, Default, PartialEq, Eq)] +pub struct GlobalPruneResult { + pub pruned_versions: usize, + pub pruned_projects: usize, + pub freed_bytes: u64, +} + +/// Formats a byte count into a compact human-readable string (e.g. `14.2 MB`). +pub fn format_bytes(bytes: u64) -> String { + const KB: f64 = 1024.0; + const MB: f64 = 1024.0 * 1024.0; + const GB: f64 = 1024.0 * 1024.0 * 1024.0; + let b = bytes as f64; + if b >= GB { + format!("{:.2} GB", b / GB) + } else if b >= MB { + format!("{:.1} MB", b / MB) + } else if b >= KB { + format!("{:.1} KB", b / KB) + } else { + format!("{bytes} B") + } +} + +fn normalize_artifact_key(artifact: &str) -> String { + let cleaned = artifact.replace('\\', "/"); + let trimmed = cleaned.trim(); + if cfg!(any(windows, target_os = "macos")) { + trimmed.to_lowercase() + } else { + trimmed.to_string() + } +} + +fn project_tracked_artifacts(project: &DiscoveredProject) -> Vec<&str> { + if project.project_files.is_empty() { + if project.primary_project_file.is_empty() { + Vec::new() + } else { + vec![project.primary_project_file.as_str()] + } + } else { + let mut seen: HashSet = HashSet::new(); + let mut out: Vec<&str> = Vec::with_capacity(project.project_files.len()); + for file in &project.project_files { + if !file.is_empty() && seen.insert(normalize_artifact_key(file)) { + out.push(file.as_str()); + } + } + if !project.primary_project_file.is_empty() + && seen.insert(normalize_artifact_key(&project.primary_project_file)) + { + out.push(project.primary_project_file.as_str()); + } + out + } +} + +#[derive(Default)] +struct RootStorageStats { + total_bytes: u64, + version_reclaimable_bytes_by_artifact: HashMap>, +} + +#[derive(Default)] +struct VersionFilesAcc { + staged_paths: Vec, + object_hashes: Vec, +} + +/// Streams a single `.musit/versions.jsonl` file once, folding multi-file +/// bundle saves identically to `parse_versions_from_log`, and measures both +/// total backup disk usage and oldest-first reclaimable bytes per version. +fn scan_root_storage_stats(root_path: &str) -> RootStorageStats { + let log_path = join_path(root_path, strings::MUSIT_VERSION_LOG_RELATIVE_PATH); + let Ok(file) = fs::File::open(&log_path) else { + return RootStorageStats::default(); + }; + let mut reader = std::io::BufReader::new(file); + let mut ordinals: HashMap = HashMap::new(); + let mut versions_by_artifact: HashMap> = HashMap::new(); + let mut version_idx_by_artifact: HashMap> = HashMap::new(); + let mut object_ref_counts: HashMap = HashMap::new(); + let mut seen_staged: HashSet = HashSet::new(); + let mut raw: Vec = Vec::new(); + + loop { + raw.clear(); + match std::io::BufRead::read_until(&mut reader, b'\n', &mut raw) { + Ok(0) => break, + Ok(_) => {} + Err(_) => return RootStorageStats::default(), + } + let Some(obj) = parse_log_line(&raw) else { + continue; + }; + let staged_rel = json_str(&obj, "staged"); + if staged_rel.is_empty() { + continue; + } + let key = normalize_artifact_key(&artifact_of_log_line(&obj)); + let ordinal = ordinals.entry(key.clone()).or_insert(0); + *ordinal += 1; + let version_id = { + let v = json_str(&obj, "version"); + if v.is_empty() { + ordinal.to_string() + } else { + v.to_string() + } + }; + + let idx_map = version_idx_by_artifact.entry(key.clone()).or_default(); + let list = versions_by_artifact.entry(key).or_default(); + let idx = *idx_map.entry(version_id).or_insert_with(|| { + list.push(VersionFilesAcc::default()); + list.len() - 1 + }); + let acc = &mut list[idx]; + + let staged_abs = resolve_staged_path(root_path, staged_rel); + if seen_staged.insert(staged_abs.clone()) { + acc.staged_paths.push(staged_abs); + } + let object_hash = json_str(&obj, "object").to_lowercase(); + if !object_hash.is_empty() { + *object_ref_counts.entry(object_hash.clone()).or_insert(0) += 1; + acc.object_hashes.push(object_hash); + } + } + + let musit_root = join_path(root_path, ".musit"); + let object_store = ObjectStore::new(musit_root); + let mut object_sizes: HashMap = HashMap::with_capacity(object_ref_counts.len()); + let mut total_bytes = 0u64; + for hash in object_ref_counts.keys() { + let size = object_store + .object_path_for_hash(hash) + .and_then(|p| fs::metadata(&p).ok()) + .map(|m| m.len()) + .unwrap_or(0); + total_bytes = total_bytes.saturating_add(size); + object_sizes.insert(hash.clone(), size); + } + + let mut remaining_refs = object_ref_counts; + let mut version_reclaimable_bytes_by_artifact: HashMap> = + HashMap::with_capacity(versions_by_artifact.len()); + + for (artifact, versions) in versions_by_artifact { + let mut reclaimable = Vec::with_capacity(versions.len()); + for v in versions { + let mut version_bytes = 0u64; + for staged in &v.staged_paths { + let size = fs::metadata(staged).map(|m| m.len()).unwrap_or(0); + total_bytes = total_bytes.saturating_add(size); + version_bytes = version_bytes.saturating_add(size); + } + for hash in &v.object_hashes { + if let Some(count) = remaining_refs.get_mut(hash) { + *count = count.saturating_sub(1); + if *count == 0 { + let size = object_sizes.get(hash).copied().unwrap_or(0); + version_bytes = version_bytes.saturating_add(size); + } + } + } + reclaimable.push(version_bytes); + } + version_reclaimable_bytes_by_artifact.insert(artifact, reclaimable); + } + + RootStorageStats { + total_bytes, + version_reclaimable_bytes_by_artifact, + } +} + +fn prune_artifact_versions( + root_path: &str, + artifact: &str, + delete_ids: &HashSet, +) -> (usize, u64) { + if delete_ids.is_empty() { + return (0, 0); + } + let log_path = join_path(root_path, strings::MUSIT_VERSION_LOG_RELATIVE_PATH); + + let _log_guard = crate::metadata_store::log_write_guard(); + let Some(original_lines) = read_log_raw_lines(&log_path) else { + return (0, 0); + }; + + let mut parsed_lines: Vec>> = + Vec::with_capacity(original_lines.len()); + let mut parent_of: HashMap = HashMap::new(); + let mut deleted_staged_paths: Vec = Vec::new(); + let mut deleted_object_hashes: HashSet = HashSet::new(); + let mut deleted_line_indexes: HashSet = HashSet::new(); + let mut pruned_version_ids: HashSet = HashSet::new(); + let mut count = 0i64; + + for (i, raw_line) in original_lines.iter().enumerate() { + let parsed = parse_log_line(raw_line); + if let Some(obj) = &parsed { + let obj_staged_path = json_str(obj, "staged"); + if artifact_equals(&artifact_of_log_line(obj), artifact) && !obj_staged_path.is_empty() + { + count += 1; + let line_version = { + let v = json_str(obj, "version"); + if v.is_empty() { + count.to_string() + } else { + v.to_string() + } + }; + parent_of + .entry(line_version.clone()) + .or_insert_with(|| json_str(obj, "parent").to_string()); + if delete_ids.contains(&line_version) { + deleted_staged_paths.push(resolve_staged_path(root_path, obj_staged_path)); + let object_hash = json_str(obj, "object"); + if !object_hash.is_empty() { + deleted_object_hashes.insert(object_hash.to_lowercase()); + } + deleted_line_indexes.insert(i); + pruned_version_ids.insert(line_version); + } + } + } + parsed_lines.push(parsed); + } + + if deleted_line_indexes.is_empty() { + return (0, 0); + } + + let resolve_surviving_parent = |start: &str| -> String { + let mut visited: HashSet = HashSet::new(); + let mut candidate = start.to_string(); + while !candidate.is_empty() && visited.insert(candidate.clone()) { + if !pruned_version_ids.contains(&candidate) { + return candidate; + } + candidate = parent_of.get(&candidate).cloned().unwrap_or_default(); + } + String::new() + }; + + let mut kept_lines: Vec> = + Vec::with_capacity(original_lines.len() - deleted_line_indexes.len()); + let mut still_referenced_hashes: HashSet = HashSet::new(); + for (i, raw_line) in original_lines.iter().enumerate() { + if deleted_line_indexes.contains(&i) { + continue; + } + let Some(obj) = &parsed_lines[i] else { + kept_lines.push(raw_line.clone()); + continue; + }; + + let mut rewritten_line: Option> = None; + if artifact_equals(&artifact_of_log_line(obj), artifact) { + let current_parent = json_str(obj, "parent"); + if !current_parent.is_empty() && pruned_version_ids.contains(current_parent) { + let mut updated = obj.clone(); + let next_parent = resolve_surviving_parent(current_parent); + if next_parent.is_empty() { + updated.remove("parent"); + } else { + updated.insert("parent".to_string(), Value::String(next_parent)); + } + rewritten_line = Some(compact_json_line(&updated)); + } + } + + let object_hash = json_str(obj, "object").to_lowercase(); + if deleted_object_hashes.contains(&object_hash) { + still_referenced_hashes.insert(object_hash); + } + + kept_lines.push(rewritten_line.unwrap_or_else(|| raw_line.clone())); + } + + if !write_lines_atomically(&log_path, &kept_lines) { + return (0, 0); + } + + let mut freed_bytes = 0u64; + let musit_root = join_path(root_path, ".musit"); + let staged_root = join_path(root_path, strings::MUSIT_STAGING_RELATIVE_PATH); + for staged_path in &deleted_staged_paths { + if crate::object_store::is_staged_file(&musit_root, staged_path) { + let size = fs::metadata(staged_path).map(|m| m.len()).unwrap_or(0); + if fs::remove_file(staged_path).is_ok() { + freed_bytes = freed_bytes.saturating_add(size); + remove_empty_parent_dirs(&parent_path(staged_path), &staged_root); + } + } + } + + let object_store = ObjectStore::new(musit_root); + for object_hash in &deleted_object_hashes { + if still_referenced_hashes.contains(object_hash) { + continue; + } + if let Some(object_path) = object_store.object_path_for_hash(object_hash) + && Path::new(&object_path).exists() + { + let size = fs::metadata(&object_path).map(|m| m.len()).unwrap_or(0); + if fs::remove_file(&object_path).is_ok() { + freed_bytes = freed_bytes.saturating_add(size); + } + } + } + + (pruned_version_ids.len(), freed_bytes) +} + +#[cfg(test)] +mod prune_tests { + use super::*; + + fn make_node(id: &str, parent: &str, ts: &str, is_current: bool) -> VersionGraphNode { + VersionGraphNode { + version: VersionEntry { + id: id.to_string(), + label: version_label_from_id(id), + full_label: format!("v{id}"), + timestamp: ts.to_string(), + parent: parent.to_string(), + is_current, + ..VersionEntry::default() + }, + parent_id: parent.to_string(), + depth: 0, + } + } + + #[test] + fn select_keeps_newest_and_protects_current_version() { + let nodes = vec![ + make_node("1", "", "2026-01-01 10:00:00", true), + make_node("2", "", "2026-01-02 10:00:00", false), + make_node("3", "", "2026-01-03 10:00:00", false), + make_node("4", "", "2026-01-04 10:00:00", false), + ]; + let kept = select_versions_to_keep(&nodes, 2); + assert_eq!(kept.len(), 2); + assert!(kept.contains("1"), "current version must be protected"); + assert!(kept.contains("4"), "newest version must be kept"); + } + + #[test] + fn preview_reparents_surviving_descendants_across_pruned_ancestors() { + let nodes = vec![ + make_node("1", "", "2026-01-01 10:00:00", true), + make_node("1.1", "1", "2026-01-02 10:00:00", false), + make_node("1.1.1", "1.1", "2026-01-03 10:00:00", false), + ]; + let keep: HashSet = ["1".to_string(), "1.1.1".to_string()].into(); + let after = preview_pruned_graph(&nodes, &keep); + assert_eq!(after.len(), 2); + assert_eq!(after[0].version.id, "1"); + assert_eq!(after[0].parent_id, ""); + assert_eq!(after[1].version.id, "1.1.1"); + assert_eq!(after[1].parent_id, "1"); + assert_eq!(after[1].depth, 1); + } + + #[test] + fn global_prune_snapshot_preview_counts_projects_and_estimated_bytes() { + let snapshot = GlobalPruneSnapshot { + total_storage_bytes: 29_000, + per_project_artifacts: vec![ + vec![vec![1_000; 12]], // loose project: 12 -> keep 5, remove 7 (7000 B) + vec![vec![1_000; 3]], // loose project: 3 -> keep 3, remove 0 + vec![vec![1_000; 6], vec![1_000; 8]], // bundle with 2 artifacts: remove 1+3 = 4 (4000 B) + ], + }; + let preview = snapshot.preview(5); + assert_eq!(preview.total_projects, 3); + assert_eq!(preview.affected_projects, 2); + assert_eq!(preview.total_versions, 29); + assert_eq!(preview.keep_versions, 18); + assert_eq!(preview.remove_versions, 11); + assert_eq!(preview.total_storage_bytes, 29_000); + assert_eq!(preview.estimated_freed_bytes, 11_000); + } + + #[test] + fn scan_root_storage_stats_folds_bundle_saves_and_measures_staged_bytes() { + let dir = tempfile::tempdir().expect("tempdir"); + let root = dir.path().to_string_lossy().replace('\\', "/"); + let log_dir = dir.path().join(".musit/versions"); + let staged_dir = dir.path().join(".musit/staging"); + fs::create_dir_all(&log_dir).unwrap(); + fs::create_dir_all(&staged_dir).unwrap(); + fs::write(staged_dir.join("1a"), vec![0u8; 400]).unwrap(); + fs::write(staged_dir.join("1b"), vec![0u8; 600]).unwrap(); + fs::write(staged_dir.join("2a"), vec![0u8; 500]).unwrap(); + fs::write(staged_dir.join("b1"), vec![0u8; 300]).unwrap(); + let lines = [ + r#"{"artifact":"Song.logicx","path":"Song.logicx/a","staged":".musit/staging/1a","version":"1"}"#, + r#"{"artifact":"Song.logicx","path":"Song.logicx/b","staged":".musit/staging/1b","version":"1"}"#, + r#"{"artifact":"Song.logicx","path":"Song.logicx/a","staged":".musit/staging/2a","version":"2"}"#, + r#"{"artifact":"Beat.als","path":"Beat.als","staged":".musit/staging/b1","version":"1"}"#, + ] + .join("\n"); + fs::write(log_dir.join("log.jsonl"), lines).unwrap(); + + let stats = scan_root_storage_stats(&root); + assert_eq!(stats.total_bytes, 1800); + assert_eq!( + stats + .version_reclaimable_bytes_by_artifact + .get(&normalize_artifact_key("Song.logicx")), + Some(&vec![1000, 500]) + ); + assert_eq!( + stats + .version_reclaimable_bytes_by_artifact + .get(&normalize_artifact_key("Beat.als")), + Some(&vec![300]) + ); + } + + #[test] + fn format_bytes_scales_units_cleanly() { + assert_eq!(format_bytes(0), "0 B"); + assert_eq!(format_bytes(512), "512 B"); + assert_eq!(format_bytes(1536), "1.5 KB"); + assert_eq!(format_bytes(2 * 1024 * 1024), "2.0 MB"); + } + + #[test] + fn project_storage_snapshot_respects_shared_objects() { + let snapshot = ProjectStorageSnapshot { + total_bytes: 2_500, + version_staged_bytes: [ + ("1".to_string(), 500), + ("2".to_string(), 600), + ("3".to_string(), 400), + ] + .into(), + version_object_hashes: [ + ("1".to_string(), vec!["obj_old".to_string()]), + ("2".to_string(), vec!["obj_shared".to_string()]), + ("3".to_string(), vec!["obj_shared".to_string()]), + ] + .into(), + object_sizes: [ + ("obj_old".to_string(), 300), + ("obj_shared".to_string(), 700), + ] + .into(), + external_object_hashes: HashSet::new(), + }; + // Keeping only v3 frees v1 (500 + 300) and v2 staged (600), NOT obj_shared! + let keep: HashSet = ["3".to_string()].into(); + let (after, saved) = snapshot.preview_after(&keep); + assert_eq!(saved, 1_400); + assert_eq!(after, 1_100); + } +} diff --git a/crates/musit-core/src/backup_template.rs b/crates/musit-core/src/backup_template.rs index a8ef16f..428c259 100644 --- a/crates/musit-core/src/backup_template.rs +++ b/crates/musit-core/src/backup_template.rs @@ -10,10 +10,9 @@ //! `?` matches one non-'/' character use crate::path_cleanup::parent_path; -use once_cell::sync::Lazy; -use regex::Regex; +use regex::RegexSet; use std::collections::{HashMap, HashSet}; -use std::sync::Mutex; +use std::sync::LazyLock; #[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash, PartialOrd, Ord)] pub enum ProjectKind { @@ -227,7 +226,7 @@ macro_rules! tpl { }; } -static TEMPLATES: Lazy> = Lazy::new(|| { +static TEMPLATES: LazyLock> = LazyLock::new(|| { use BackupCategory as C; use ProjectKind as K; const NONE: [&str; 0] = []; @@ -829,7 +828,7 @@ pub fn all() -> &'static [BackupTemplate] { &TEMPLATES } -static GLOBALLY_EXCLUDED_EXTENSIONS: Lazy> = Lazy::new(|| { +static GLOBALLY_EXCLUDED_EXTENSIONS: LazyLock> = LazyLock::new(|| { [ // Audio "wav", "aif", "aiff", "aifc", "mp3", "flac", "ogg", "m4a", "wma", "aac", @@ -858,8 +857,8 @@ fn base_name_of(lower_path: &str) -> &str { } } -fn compile_pattern(pattern: &str) -> Regex { - let mut regex = String::from("^"); +fn glob_to_regex_source(pattern: &str) -> String { + let mut regex = String::from("(?i)^"); let chars: Vec = pattern.chars().collect(); let mut i = 0; while i < chars.len() { @@ -879,24 +878,67 @@ fn compile_pattern(pattern: &str) -> Regex { i += 1; } regex.push('$'); - Regex::new(&format!("(?i){regex}")).expect("glob-derived regex is always valid") + regex } -static PATTERN_CACHE: Lazy>> = - Lazy::new(|| Mutex::new(HashMap::new())); +static EXCLUDE_REGEX_SET: LazyLock = LazyLock::new(|| { + let patterns = all() + .iter() + .flat_map(|tpl| tpl.exclude_patterns.iter()) + .map(|pattern| glob_to_regex_source(pattern)); + RegexSet::new(patterns).expect("exclude glob regexes are valid") +}); + +static INCLUDE_REGEX_SET: LazyLock = LazyLock::new(|| { + let patterns = all() + .iter() + .flat_map(|tpl| tpl.include_patterns.iter()) + .map(|pattern| glob_to_regex_source(pattern)); + RegexSet::new(patterns).expect("include glob regexes are valid") +}); -fn matches_any_pattern(normalized_lower_path: &str, patterns: &[&'static str]) -> bool { - let mut cache = PATTERN_CACHE.lock().expect("pattern cache poisoned"); - for pattern in patterns { - let regex = cache - .entry(pattern) - .or_insert_with(|| compile_pattern(pattern)); - if regex.is_match(normalized_lower_path) { - return true; +struct TemplateLookup { + marker_base_to_kind: HashMap, + marker_path_to_kind: HashMap, + extension_to_kind: HashMap, + non_bundle_extensions: HashSet<&'static str>, + bundle_suffixes: Vec, +} + +static TEMPLATE_LOOKUP: LazyLock = LazyLock::new(|| { + let mut marker_base_to_kind = HashMap::new(); + let mut marker_path_to_kind = HashMap::new(); + let mut extension_to_kind = HashMap::new(); + let mut non_bundle_extensions = HashSet::new(); + let mut bundle_suffixes = Vec::new(); + + for tpl in all() { + for marker in tpl.project_root_markers { + let norm = normalize_lower(marker); + let base = base_name_of(&norm).to_string(); + marker_base_to_kind.entry(base).or_insert(tpl.kind); + marker_path_to_kind.entry(norm).or_insert(tpl.kind); + } + for extension in tpl.project_file_extensions { + extension_to_kind + .entry(extension.to_lowercase()) + .or_insert(tpl.kind); + if tpl.project_file_is_bundle { + bundle_suffixes.push(format!(".{}", extension.to_lowercase())); + } else { + non_bundle_extensions.insert(*extension); + } } } - false -} + + TemplateLookup { + marker_base_to_kind, + marker_path_to_kind, + extension_to_kind, + non_bundle_extensions, + bundle_suffixes, + } +}); fn normalize_lower(relative_path: &str) -> String { relative_path.replace('\\', "/").to_lowercase() @@ -915,14 +957,23 @@ pub fn kind_for_file_name(file_name: &str) -> ProjectKind { let lower_name = file_name.to_lowercase(); let base_name = base_name_of(&lower_name); + if let Some(&kind) = TEMPLATE_LOOKUP.marker_base_to_kind.get(base_name) { + return kind; + } + let ext = extension_of(base_name); + if !ext.is_empty() + && let Some(&kind) = TEMPLATE_LOOKUP.extension_to_kind.get(ext) + { + return kind; + } + // Multi-dot extensions (if any) fall back to suffix matching only when needed. for tpl in all() { - for marker in tpl.project_root_markers { - if base_name == base_name_of(&normalize_lower(marker)) { - return tpl.kind; - } - } for extension in tpl.project_file_extensions { - if lower_name.ends_with(&format!(".{extension}")) { + if extension.contains('.') + && lower_name.len() > extension.len() + && lower_name.ends_with(extension) + && lower_name.as_bytes()[lower_name.len() - extension.len() - 1] == b'.' + { return tpl.kind; } } @@ -932,14 +983,11 @@ pub fn kind_for_file_name(file_name: &str) -> ProjectKind { pub fn kind_for_root_marker_path(relative_path: &str) -> ProjectKind { let normalized = normalize_lower(relative_path); - for tpl in all() { - for marker in tpl.project_root_markers { - if normalized == normalize_lower(marker) { - return tpl.kind; - } - } - } - ProjectKind::Unknown + TEMPLATE_LOOKUP + .marker_path_to_kind + .get(&normalized) + .copied() + .unwrap_or(ProjectKind::Unknown) } /// Given a marker pattern (e.g. "ProjectSettings/ProjectVersion.txt") and the @@ -980,53 +1028,32 @@ pub fn should_track_path(relative_path: &str) -> bool { let normalized = normalize_lower(relative_path); - if GLOBALLY_EXCLUDED_EXTENSIONS.contains(extension_of(&normalized)) { + let extension = extension_of(&normalized); + if GLOBALLY_EXCLUDED_EXTENSIONS.contains(extension) { return false; } - for tpl in all() { - if matches_any_pattern(&normalized, tpl.exclude_patterns) { - return false; - } + if EXCLUDE_REGEX_SET.is_match(&normalized) { + return false; } let base_name = base_name_of(&normalized); - for tpl in all() { - for marker in tpl.project_root_markers { - if base_name == base_name_of(&normalize_lower(marker)) { - return true; - } - } + if TEMPLATE_LOOKUP.marker_base_to_kind.contains_key(base_name) { + return true; } - let extension = extension_of(&normalized); - for tpl in all() { - if !tpl.project_file_is_bundle && tpl.project_file_extensions.contains(&extension) { - return true; - } - } - - for tpl in all() { - if matches_any_pattern(&normalized, tpl.include_patterns) { - return true; - } + if TEMPLATE_LOOKUP.non_bundle_extensions.contains(extension) { + return true; } - false + INCLUDE_REGEX_SET.is_match(&normalized) } /// Maps a tracked path to its artifact id: the bundle root when the path is /// inside a directory bundle (e.g. "Song.logicx/…" -> "Song.logicx"), /// otherwise the path itself. pub fn artifact_for_path(relative_path: &str) -> String { - let mut bundle_suffixes: Vec = Vec::new(); - for tpl in all() { - if tpl.project_file_is_bundle { - for extension in tpl.project_file_extensions { - bundle_suffixes.push(format!(".{extension}")); - } - } - } + let bundle_suffixes = &TEMPLATE_LOOKUP.bundle_suffixes; // Walk segments of the original string and lowercase per segment: // lowercasing can change byte length (e.g. 'İ' 2->3 bytes), so indices @@ -1038,7 +1065,7 @@ pub fn artifact_for_path(relative_path: &str) -> String { continue; } let segment = relative_path[segment_start..i].to_lowercase(); - for suffix in &bundle_suffixes { + for suffix in bundle_suffixes { if segment.ends_with(suffix.as_str()) { return relative_path[..i].to_string(); } diff --git a/crates/musit-core/src/object_store.rs b/crates/musit-core/src/object_store.rs index beec9fa..a62cd90 100644 --- a/crates/musit-core/src/object_store.rs +++ b/crates/musit-core/src/object_store.rs @@ -104,10 +104,12 @@ fn object_file_matches_hash(object_path: &str, hash_hex: &str) -> bool { hex_lower(&hasher.finalize()) == hash_hex } -fn hex_lower(bytes: &[u8]) -> String { +pub(crate) fn hex_lower(bytes: &[u8]) -> String { + const HEX: &[u8; 16] = b"0123456789abcdef"; let mut out = String::with_capacity(bytes.len() * 2); - for b in bytes { - out.push_str(&format!("{b:02x}")); + for &b in bytes { + out.push(HEX[(b >> 4) as usize] as char); + out.push(HEX[(b & 0x0f) as usize] as char); } out } diff --git a/crates/musit-core/src/project_config.rs b/crates/musit-core/src/project_config.rs index 3f16de6..f2317ad 100644 --- a/crates/musit-core/src/project_config.rs +++ b/crates/musit-core/src/project_config.rs @@ -3,10 +3,10 @@ use crate::backup_template; use crate::path_cleanup::{clean_path, join_path}; -use once_cell::sync::Lazy; use std::collections::HashSet; +use std::sync::LazyLock; -static IGNORED_DIRECTORIES: Lazy> = Lazy::new(|| { +static IGNORED_DIRECTORIES: LazyLock> = LazyLock::new(|| { [ ".musit", ".git", diff --git a/crates/musit-core/src/project_discovery.rs b/crates/musit-core/src/project_discovery.rs index 5707ce9..a9e8263 100644 --- a/crates/musit-core/src/project_discovery.rs +++ b/crates/musit-core/src/project_discovery.rs @@ -7,11 +7,11 @@ use crate::path_cleanup::{ relative_file_path, }; use crate::project_config::{self, ProjectConfig}; -use once_cell::sync::Lazy; use regex::Regex; use std::collections::HashMap; use std::fs; use std::path::Path; +use std::sync::LazyLock; use std::sync::atomic::{AtomicBool, Ordering}; use std::time::SystemTime; @@ -136,8 +136,9 @@ fn register_marker_project(root_folder: &str, marker_file: &EntryInfo, state: &m .insert(name, marker_file.clone()); } -static VERSION_REGEX: Lazy = - Lazy::new(|| Regex::new(r"(?i)(?:^|[ _-])v(\d+)(?:$|[ _.-])").expect("version regex is valid")); +static VERSION_REGEX: LazyLock = LazyLock::new(|| { + Regex::new(r"(?i)(?:^|[ _-])v(\d+)(?:$|[ _.-])").expect("version regex is valid") +}); fn extract_version_number(file_name_str: &str) -> i32 { let stem = complete_base_name(file_name_str); diff --git a/crates/musit-core/src/project_registry.rs b/crates/musit-core/src/project_registry.rs index ca9fd27..37b6626 100644 --- a/crates/musit-core/src/project_registry.rs +++ b/crates/musit-core/src/project_registry.rs @@ -52,6 +52,10 @@ pub struct AppSettings { pub log_level: String, pub snapshot_retention: i32, pub notifications_enabled: bool, + pub show_tab_close_buttons: bool, + pub storage_saver_enabled: bool, + pub storage_saver_keep: i32, + pub storage_saved_bytes: u64, pub auto_updates_enabled: bool, pub color_scheme_mode: String, pub language: String, @@ -67,6 +71,10 @@ impl Default for AppSettings { log_level: String::new(), snapshot_retention: UNCOMPRESSED_RECENT_VERSIONS, notifications_enabled: true, + show_tab_close_buttons: false, + storage_saver_enabled: false, + storage_saver_keep: DEFAULT_STORAGE_SAVER_KEEP, + storage_saved_bytes: 0, auto_updates_enabled: true, color_scheme_mode: String::new(), language: "en".to_string(), @@ -76,8 +84,12 @@ impl Default for AppSettings { /// The saturation the palette was designed at. pub const DEFAULT_THEME_SATURATION: f64 = 1.0; -/// Twice the designed chroma; the toolkit clips anything past sRGB. -pub const MAX_THEME_SATURATION: f64 = 2.0; + +pub const MIN_STORAGE_SAVER_KEEP: i32 = 1; +pub const MAX_STORAGE_SAVER_KEEP: i32 = 500; +pub const DEFAULT_STORAGE_SAVER_KEEP: i32 = 10; +/// Maximum saturation supported by Vampir 0.4. +pub const MAX_THEME_SATURATION: f64 = 3.0; /// `theme_saturation` as the config accepts it: clamped to the range, with /// a NaN (a hand-edited file) falling back to the default. @@ -182,8 +194,7 @@ fn migrate_legacy_config_if_needed(canonical_dir: &str) { } } -static CONFIG_DIR_OVERRIDE: once_cell::sync::Lazy>> = - once_cell::sync::Lazy::new(|| std::sync::Mutex::new(None)); +static CONFIG_DIR_OVERRIDE: std::sync::Mutex> = std::sync::Mutex::new(None); /// Test hook: point app config at a temp directory instead of the user's /// real `~/Library/Application Support/musit/musit`. @@ -639,6 +650,19 @@ impl ProjectRegistry { MAX_UNCOMPRESSED_RECENT_VERSIONS, ); } + if let Some(value) = root.get("show_tab_close_buttons").and_then(|v| v.as_bool()) { + settings.show_tab_close_buttons = value; + } + if let Some(value) = root.get("storage_saver_enabled").and_then(|v| v.as_bool()) { + settings.storage_saver_enabled = value; + } + if let Some(value) = root.get("storage_saver_keep").and_then(|v| v.as_i64()) { + settings.storage_saver_keep = + (value as i32).clamp(MIN_STORAGE_SAVER_KEEP, MAX_STORAGE_SAVER_KEEP); + } + if let Some(value) = root.get("storage_saved_bytes").and_then(|v| v.as_u64()) { + settings.storage_saved_bytes = value; + } if let Some(value) = root.get("notifications_enabled").and_then(|v| v.as_bool()) { settings.notifications_enabled = value; } @@ -697,6 +721,26 @@ impl ProjectRegistry { "snapshot_retention".to_string(), json!(settings.snapshot_retention), ); + root.insert( + "show_tab_close_buttons".to_string(), + json!(settings.show_tab_close_buttons), + ); + root.insert( + "storage_saver_enabled".to_string(), + json!(settings.storage_saver_enabled), + ); + root.insert( + "storage_saver_keep".to_string(), + json!( + settings + .storage_saver_keep + .clamp(MIN_STORAGE_SAVER_KEEP, MAX_STORAGE_SAVER_KEEP) + ), + ); + root.insert( + "storage_saved_bytes".to_string(), + json!(settings.storage_saved_bytes), + ); root.insert( "notifications_enabled".to_string(), json!(settings.notifications_enabled), diff --git a/crates/musit-core/src/versioning.rs b/crates/musit-core/src/versioning.rs index a8f2d8f..61c42a0 100644 --- a/crates/musit-core/src/versioning.rs +++ b/crates/musit-core/src/versioning.rs @@ -76,6 +76,8 @@ pub enum Job { folder_root: String, }, DropAll, + /// Acknowledge completion of all previously queued work. + Barrier(Sender<()>), } /// What the thread reports back. @@ -252,6 +254,9 @@ impl State { self.folders.remove(&key); } } + Job::Barrier(done) => { + let _ = done.send(()); + } Job::DropAll => { self.services.clear(); self.roots.clear(); diff --git a/crates/musit-core/src/watcher.rs b/crates/musit-core/src/watcher.rs index 6cbbdad..acdc44f 100644 --- a/crates/musit-core/src/watcher.rs +++ b/crates/musit-core/src/watcher.rs @@ -17,7 +17,12 @@ use std::thread::JoinHandle; use std::time::{Duration, Instant, UNIX_EPOCH}; const DEBOUNCE: Duration = Duration::from_millis(400); -const SAFETY_SCAN: Duration = Duration::from_millis(5000); +/// Full-tree safety scan interval when the OS watcher (FSEvents / +/// ReadDirectoryChangesW / inotify) is active: a low-overhead backstop for +/// missed OS events without waking the disk every few seconds. +const SAFETY_SCAN_WITH_OS_WATCHER: Duration = Duration::from_secs(60); +/// Full-tree polling interval when no OS watcher is available. +const SAFETY_SCAN_FALLBACK: Duration = Duration::from_secs(5); /// How soon an incomplete baseline is taken again, and how many times. A /// folder that stays unreadable (no permission) is then left out, as the /// safety scan leaves it out, rather than holding monitoring back forever. @@ -74,13 +79,25 @@ fn scan_tree_state( current: &str, config: &ProjectConfig, out: &mut HashMap, +) -> bool { + let rel_prefix = relative_file_path(root, current); + if rel_prefix.starts_with("..") { + return false; + } + scan_tree_state_inner(Path::new(current), &rel_prefix, config, out) +} + +fn scan_tree_state_inner( + current: &Path, + rel_prefix: &str, + config: &ProjectConfig, + out: &mut HashMap, ) -> bool { let Ok(entries) = fs::read_dir(current) else { return false; }; let mut complete = true; for entry in entries.flatten() { - let name = entry.file_name().to_string_lossy().to_string(); let Ok(file_type) = entry.file_type() else { continue; }; @@ -88,15 +105,25 @@ fn scan_tree_state( if file_type.is_symlink() { continue; } - let absolute = clean_path(&entry.path().to_string_lossy()); + let name = entry.file_name(); + let name = name.to_string_lossy(); if file_type.is_dir() { if project_config::is_ignored_directory_name(&name) { continue; } - complete &= scan_tree_state(root, &absolute, config, out); + let child_rel = if rel_prefix.is_empty() { + name.into_owned() + } else { + format!("{rel_prefix}/{name}") + }; + complete &= scan_tree_state_inner(&entry.path(), &child_rel, config, out); continue; } - let relative = relative_file_path(root, &absolute); + let relative = if rel_prefix.is_empty() { + name.into_owned() + } else { + format!("{rel_prefix}/{name}") + }; // Only tracked files are worth remembering: `mark_dirty_relative` // gates every event on `should_track`, so an untracked entry can // never produce output — it would only hold memory (a projects @@ -155,6 +182,7 @@ struct WorkerState { baseline_attempts: u32, debounce_deadline: Option, safety_deadline: Option, + safety_scan_interval: Duration, on_event: EventFn, log_scan: Option, on_ready: ReadyFn, @@ -199,7 +227,7 @@ impl WorkerState { self.safety_deadline = Some( Instant::now() + if self.baseline_complete { - SAFETY_SCAN + self.safety_scan_interval } else { BASELINE_RETRY }, @@ -342,7 +370,7 @@ impl WorkerState { let before_dirty = self.dirty_relative.len(); self.queue_full_tree_reconcile(); self.log("safety", before_dirty, timer.elapsed().as_millis()); - self.safety_deadline = Some(Instant::now() + SAFETY_SCAN); + self.safety_deadline = Some(Instant::now() + self.safety_scan_interval); } /// Takes the baseline again after a partial one. Files it could not see @@ -389,7 +417,7 @@ impl WorkerState { } self.baseline_complete = true; - self.safety_deadline = Some(Instant::now() + SAFETY_SCAN); + self.safety_deadline = Some(Instant::now() + self.safety_scan_interval); self.report_ready(); } @@ -574,6 +602,7 @@ impl HybridFileWatcher { baseline_attempts: 0, debounce_deadline: None, safety_deadline: None, + safety_scan_interval: SAFETY_SCAN_FALLBACK, on_event: Box::new(on_event), log_scan, on_ready, @@ -611,9 +640,22 @@ impl HybridFileWatcher { }, ) .ok(); - if let Some(watcher) = created.as_mut() { - let _ = watcher - .watch(Path::new(&state.root_path), RecursiveMode::Recursive); + let mut os_watcher_active = false; + if let Some(watcher) = created.as_mut() + && watcher + .watch(Path::new(&state.root_path), RecursiveMode::Recursive) + .is_ok() + { + os_watcher_active = true; + } + state.safety_scan_interval = if os_watcher_active { + SAFETY_SCAN_WITH_OS_WATCHER + } else { + SAFETY_SCAN_FALLBACK + }; + if state.baseline_complete { + state.safety_deadline = + Some(Instant::now() + state.safety_scan_interval); } os_watcher = created; if state.baseline_complete { @@ -718,6 +760,7 @@ mod tests { } /// A worker that records what it reports instead of sending it. + #[cfg(unix)] fn recording_worker() -> ( WorkerState, std::sync::Arc>>, @@ -741,6 +784,7 @@ mod tests { baseline_attempts: 0, debounce_deadline: None, safety_deadline: None, + safety_scan_interval: SAFETY_SCAN_FALLBACK, on_event: Box::new(move |event| { seen.lock().unwrap().push(event.relative_path); }), diff --git a/crates/musit-core/tests/e2e_backup.rs b/crates/musit-core/tests/e2e_backup.rs index 52bd2f5..58b1f2d 100644 --- a/crates/musit-core/tests/e2e_backup.rs +++ b/crates/musit-core/tests/e2e_backup.rs @@ -457,7 +457,7 @@ fn e2e_backup() { "layout: rapid switch back to Bundles still discovers projects" ); - let file_url = format!("file://{projects_root}"); + let file_url = format!("file:///{}", projects_root.trim_start_matches('/')); backend.confirm_projects_folder(&file_url, "Files"); backend.confirm_projects_folder(&file_url, "Bundles"); assert!( diff --git a/crates/musit-core/tests/folder_session.rs b/crates/musit-core/tests/folder_session.rs index 294af86..c014ce0 100644 --- a/crates/musit-core/tests/folder_session.rs +++ b/crates/musit-core/tests/folder_session.rs @@ -58,10 +58,24 @@ fn folder_session_survives_removal_and_re_adding() { "the folder becomes a tab" ); + assert!(wait_for(&mut backend, Duration::from_secs(20), |backend| { + !backend.projects().is_empty() + })); + assert_eq!( + backend.project_root_path(0).unwrap(), + format!("{root}/Song Project") + ); + assert_eq!( + backend.projects()[0].path, + root, + "displayed parent differs from the actionable project root" + ); + assert!(!backend.show_tab_close_buttons()); + backend.set_show_tab_close_buttons(true); backend.rename_projects_folder(0, "Late Night Beats"); backend.set_theme_hue(212.0); // Saturation is app-wide, not the folder's: it goes to the app config. - backend.set_theme_saturation(0.6); + backend.set_theme_saturation(2.75); // The theme writes are debounced; shutdown flushes them. backend.flush_pending_persist(); @@ -78,6 +92,11 @@ fn folder_session_survives_removal_and_re_adding() { ); assert_eq!(saved.hue, Some(212.0), "colour is saved in the folder"); + let ready = backend.pause_folder_monitoring(&root); + ready + .recv_timeout(Duration::from_secs(20)) + .expect("snapshot worker is idle before filesystem changes"); + // ---- Remove the tab: the folder is forgotten by the app ---- backend.remove_projects_folder(0); assert!( @@ -94,9 +113,13 @@ fn folder_session_survives_removal_and_re_adding() { ); assert_eq!( backend.theme_saturation(), - 0.6, + 2.75, "saturation comes back from the app config" ); + assert!( + backend.show_tab_close_buttons(), + "close-button preference survives restart" + ); // A different colour is in play before the folder is re-added. backend.set_theme_hue(30.0); diff --git a/crates/musit-core/tests/loose_projects.rs b/crates/musit-core/tests/loose_projects.rs index ece48e7..29848ae 100644 --- a/crates/musit-core/tests/loose_projects.rs +++ b/crates/musit-core/tests/loose_projects.rs @@ -26,6 +26,11 @@ fn wait_for(backend: &mut AppBackend, mut done: impl FnMut(&mut AppBackend) -> b #[test] fn loose_projects_in_one_folder_keep_their_own_selection_and_note() { + let fake_config = tempfile::tempdir().expect("temp config dir"); + musit_core::project_registry::set_app_config_directory_override(Some( + fake_config.path().to_string_lossy().to_string(), + )); + let dir = tempfile::tempdir().expect("temp dir"); let root = dir.path().to_string_lossy().to_string(); fs::write(dir.path().join("Alpha.flp"), b"alpha v1").expect("write alpha"); diff --git a/packaging/linux/io.github._404oops.immersion.metainfo.xml b/packaging/linux/io.github._404oops.immersion.metainfo.xml index 686a481..7221972 100644 --- a/packaging/linux/io.github._404oops.immersion.metainfo.xml +++ b/packaging/linux/io.github._404oops.immersion.metainfo.xml @@ -14,6 +14,7 @@ io.github._404oops.immersion.desktop + diff --git a/wiki/Development.md b/wiki/Development.md index 1bb5266..a44ae60 100644 --- a/wiki/Development.md +++ b/wiki/Development.md @@ -112,3 +112,28 @@ native end-to-end testing before release. ## Contributing Open an [issue](https://github.com/404oops/immersion/issues) with a reproducible bug or a focused feature proposal. For code changes, keep platform differences explicit, run formatting and relevant tests, and explain any change to the `.musit` data format or restore behavior. Documentation for the GitHub Wiki is authored in this repository's `wiki/` directory. Code is licensed under [GPLv3](https://github.com/404oops/immersion/blob/main/LICENSE). + +### Vampir 0.4 integration + +Right-click folder tabs, project rows, and version nodes for their available actions, +including **Manage Versions…** (the side-by-side version pruner) on projects and versions. +**Options** (formerly Settings) also includes a **Global version pruner** to trim older +versions across all watched folders. +Folder-tab close buttons are hidden by default and can be enabled in Options. +Options and Manage Versions close when clicking outside their modal panels. +Project deletion moves files to the system Trash after confirmation. In Bundles +layout this moves the project directory; in Files layout it moves only the selected +project file, preserving sibling projects and shared history. Folder-tab Delete +stops monitoring the folder and preserves its files. + +Filesystem deletion uses the `trash` crate (MIT). Snapshot work is drained on the +background worker before moving files, then the affected folder is rediscovered. + +The workspace uses `vampir` 0.4.2 and pins Vampir's GPUI 0.3 patches together, +including its macOS startup deadlock fix. No command bar is enabled. See the +[Vampir 0.4 release notes](https://blog.404oops.com/vampir-0-4). + +Graph paint geometry is shared across frames using dense node indices and rebuilt +during graph layout, with viewport culling and modal occlusion culling behind the +opaque Settings panel. Ancestor highlighting uses a cached bitset rather than +repeatedly scanning the full graph. diff --git a/wiki/Home.md b/wiki/Home.md index 523e9fd..f500be4 100644 --- a/wiki/Home.md +++ b/wiki/Home.md @@ -1,6 +1,6 @@ # Immersion user manual -Immersion watches your project folders and saves earlier copies of supported project files as you work. You can see those saved versions in a graph and return to one if needed. This manual covers Immersion 0.2.5. +Immersion watches your project folders and saves earlier copies of supported project files as you work. You can see those saved versions in a graph and return to one if needed. This manual covers Immersion 0.3.0. ![Immersion with illustrative music projects and a branched version history](images/immersion-music.png) @@ -16,6 +16,7 @@ Immersion watches your project folders and saves earlier copies of supported pro ## Reference - [Settings, storage, and background behavior](Settings-and-Storage.md) +- [Translating Immersion](Translations.md) - [Supported projects and folder layouts](Supported-Projects.md) - [Troubleshooting and frequently asked questions](Troubleshooting.md) - [Building and contributing](Development.md) diff --git a/wiki/Interface.md b/wiki/Interface.md index 16127e7..cccd34a 100644 --- a/wiki/Interface.md +++ b/wiki/Interface.md @@ -9,12 +9,13 @@ The window has folder tabs across the top, a project list on the left, a version - Select a tab to see that folder's projects. Immersion keeps watching your other folders too. A tab may show when its folder is being scanned or is waiting to be scanned. - Select **+** to add a folder. A new folder asks for its layout; an existing configured folder reuses its saved layout. - Double-click a tab name to rename it. Press **Enter** to save or **Escape** to cancel. Drag tabs to reorder them. -- Use a tab's remove control to stop watching it. Confirming removal leaves its `.musit` version history on disk, so you can add the folder again later. -- Select **Settings** for folder and app preferences. +- Right-click a tab to **Change Name**, **Open Enclosing Folder**, or **Delete** it. Tab close buttons are hidden by default and can be enabled in **Options → Show folder tab close buttons**. Confirming removal stops watching the folder and leaves its `.musit` version history on disk, so you can add the folder again later. +- Select **Options** for folder and app preferences, maintenance tools, and the activity log. Click outside the Options panel or press **Escape** to close it. ## Project list - Click a project to select it; double-click to open its main file in the usual app. +- Right-click a project for **Open Project**, **Open Enclosing Folder**, **Manage Versions…**, or **Delete Project**. Deleting a project asks before moving it to the system Trash (the project directory in Bundles mode, or only that project file in Files mode). - Type in **Search projects…** to narrow the visible list. - Use **Sort by** to choose **Name** or **Last Opened**. If you opened a project through Immersion since starting the app, Last Opened uses that time. Otherwise, it uses the last time the main project file changed. You can also set the sort order in Settings. - The list shows the project type and main file. If a project is missing, check its file type and folder layout in [Supported projects](Supported-Projects.md). @@ -23,6 +24,7 @@ The window has folder tabs across the top, a project list on the left, a version - Click a version in the graph to select it. Lines show how versions are connected, including new paths made after you restore an older version. **Current** means the files saved in that version match what is on disk now. It does not check every file or linked media item in the project folder. - Double-click a version to restore it. The **Open version** button in the details panel does the same thing. +- Right-click a version node for **Open version**, **Open Enclosing Folder**, **Manage Versions…**, or **Delete Version**. - Drag or scroll to move around the graph. Use **−** and **+** to zoom, or select the percentage to return to 100%. Command/Control plus the mouse wheel also zooms. - A dashed border means Immersion has removed that version's quick copy to save space. You can still restore it if its compressed copy is available. diff --git a/wiki/Settings-and-Storage.md b/wiki/Settings-and-Storage.md index 7f33287..528c50c 100644 --- a/wiki/Settings-and-Storage.md +++ b/wiki/Settings-and-Storage.md @@ -1,18 +1,23 @@ # Settings, storage, and background behavior -Open **Settings** from the main window. If you change a folder's Bundles or Files setting, Immersion scans that folder again. +Open **Options** from the main window. Click outside the panel or press **Escape** to close it. If you change a folder's Bundles or Files setting, Immersion scans that folder again. -| Setting | What it does | +| Option | What it does | | --- | --- | +| **Language** | Choose the interface language (English, Serbian Cyrillic, French, Spanish, Greek, or German). Takes effect immediately. | | **Projects folder** | Shows the folder selected now. You can add more folders and Immersion will watch them all. | | **Folder layout** | Choose **Bundles** or **Files** for this folder. Immersion saves the choice in `.immersion/settings.json` inside it. | | **Launch at login** | Starts Immersion when you sign in, where available. On macOS 13 or later, you may need to allow the packaged app in System Settings. On Linux, this adds a startup entry. This setting is unavailable in the Flatpak build. | +| **Automatic updates** | Check for and download signed stable updates automatically on Windows and writable macOS app bundles. Prepared updates may still install when Immersion closes. | | **Default sort mode** | Show projects by **Name** or **Last Opened**. Last Opened uses the time you opened a project through Immersion since starting the app. Otherwise, it uses when the main file last changed. | | **Activity log level** | **Info** shows normal activity. **Debug** adds details about scanning, file changes, and saved versions. | | **Snapshot retention** | Keep fast copies of the 1–50 most recent versions per file; default 5. Older versions still have compressed copies. | | **Save notifications** | Show a notification after a new version is saved on macOS or Linux, if the desktop permits it. On macOS, use the packaged app. Windows does not currently show these notifications. | +| **Show folder tab close buttons** | Show or hide close buttons directly on folder tabs (hidden by default; right-click a tab and choose **Delete** to remove it at any time). | | **Appearance** | Follow the system, use Light, or use Dark. | | **Theme hue / saturation** | Adjust the app's accent color. | +| **Storage saver** | Automatically prune older saved versions after each save using the keep limit below, always protecting the current version. | +| **Global version pruner** | Preview estimated space freed and permanently trim older saved versions across all watched folders, keeping the newest backups and the current version for each project. Also shows current backup storage used and total space saved by pruning. | | **Export Activity Log** | Save the full log to a file for troubleshooting. | | **Reset Configuration** | Clears app settings, the list of watched folders, and project notes. It does not delete `.musit` version history. | diff --git a/wiki/Translations.md b/wiki/Translations.md index d5d2686..65e46d4 100644 --- a/wiki/Translations.md +++ b/wiki/Translations.md @@ -1,6 +1,6 @@ # Translating Immersion -Immersion has interface catalogs for English (`en`), Serbian in Cyrillic (`sr`), French (`fr`), Spanish (`es`), Greek (`el`), and German (`de`). Users can choose a language on the first onboarding screen or in **Settings → Language**. The choice is stored as `language` in the app settings and takes effect immediately. +Immersion has interface catalogs for English (`en`), Serbian in Cyrillic (`sr`), French (`fr`), Spanish (`es`), Greek (`el`), and German (`de`). Users can choose a language on the first onboarding screen or in **Options → Language**. The choice is stored as `language` in the app settings and takes effect immediately. ## Edit a translation diff --git a/wiki/Troubleshooting.md b/wiki/Troubleshooting.md index f1de326..43ca95a 100644 --- a/wiki/Troubleshooting.md +++ b/wiki/Troubleshooting.md @@ -2,7 +2,7 @@ ## No projects were found -Check that the folder contains a [supported project file](Supported-Projects.md) and that you chose the right layout. **Bundles** groups files in one folder as a project. **Files** shows each supported file separately, but skips folder-like projects such as `.logicx`. Select **Try Other Layout** during setup, or **Settings → Change Folder Layout** later. If projects still do not appear, check that Immersion can read the folder and look at the activity log in Settings. +Check that the folder contains a [supported project file](Supported-Projects.md) and that you chose the right layout. **Bundles** groups files in one folder as a project. **Files** shows each supported file separately, but skips folder-like projects such as `.logicx`. Select **Try Other Layout** during setup, or **Options → Change Folder Layout** later. If projects still do not appear, check that Immersion can read the folder and look at the activity log in Options. ## A project appears but new versions do not @@ -28,7 +28,7 @@ Immersion removed that version's quick copy to save space. You can still restore ## Can I remove or reset without losing history? -Removing a folder tab stops Immersion from watching that folder, but does not delete its saved versions or folder settings. **Reset Configuration** clears app settings, the watched-folder list, and project notes. It also leaves saved versions and folder settings on disk, so adding the folder again can bring back its layout and tab name. **Delete** on a selected version permanently removes that version. +Removing a folder tab stops Immersion from watching that folder, but does not delete its saved versions or folder settings. **Reset Configuration** clears app settings, the watched-folder list, and project notes. It also leaves saved versions and folder settings on disk, so adding the folder again can bring back its layout and tab name. **Delete** on a selected version (or pruning in **Manage Versions…**) permanently removes those saved versions. **Delete Project** from a project's right-click menu moves the project to the system Trash after confirmation. ## Where can I report a problem? diff --git a/wiki/Versions-and-Restoring.md b/wiki/Versions-and-Restoring.md index 0bc4e42..9066b9f 100644 --- a/wiki/Versions-and-Restoring.md +++ b/wiki/Versions-and-Restoring.md @@ -31,11 +31,21 @@ Immersion gets all the files from the chosen version ready before replacing anyt ## Delete a version -Select a version, choose **Delete**, and confirm. This permanently removes that saved version. You cannot undo it in Immersion. The other versions remain in the graph. Removing a watched folder is different: it leaves its version history on disk. +Select a version, choose **Delete** in the details panel (or right-click the version node and choose **Delete Version**), and confirm. This permanently removes that saved version. You cannot undo it in Immersion. The other versions remain in the graph. Removing a watched folder is different: it leaves its version history on disk. + +## Manage versions + +Right-click a project in the project list or a node in the version graph and choose **Manage Versions…** to trim older backups in bulk. + +The **Manage Versions** window shows two side-by-side graph previews: **Before** on the left and **After** on the right, with the backup counts and storage sizes underneath each pane (including how much space will be freed). Adjust **Backups to keep** to see how many versions will stay and how many older versions will be removed. The current version is always kept. Select **Prune** to permanently delete the older versions (this cannot be undone), or choose **Cancel**, click outside the window, or press **Escape** to close without making changes. + +![Manage Versions modal showing side-by-side Before and After version graphs with backup counts and storage savings](images/immersion-pruner.png) + +To prune older backups across all watched folders at once, open **Options → Global version pruner**, set how many backups to keep per project, review the preview counts and estimated storage freed, and confirm. You can also turn on **Options → Storage saver** to automatically prune older versions after each new save using that same keep limit while tracking total space saved. ## Snapshot retention -**Settings → Snapshot retention** sets how many recent versions keep an extra copy for faster restoring. The default is five per file; you can choose 1–50. When Immersion removes an older quick copy, it keeps the compressed copy. A dashed border in the graph marks a version without a quick copy. You can still restore it if the compressed copy is available. Lowering the setting can remove quick copies that already exist. +**Options → Snapshot retention** sets how many recent versions keep an extra copy for faster restoring. The default is five per file; you can choose 1–50. When Immersion removes an older quick copy, it keeps the compressed copy. A dashed border in the graph marks a version without a quick copy. You can still restore it if the compressed copy is available. Lowering the setting can remove quick copies that already exist. ## What is covered diff --git a/wiki/images/immersion-music.png b/wiki/images/immersion-music.png index 84c8f30..25de6a2 100644 Binary files a/wiki/images/immersion-music.png and b/wiki/images/immersion-music.png differ diff --git a/wiki/images/immersion-pruner.png b/wiki/images/immersion-pruner.png new file mode 100644 index 0000000..27a6841 Binary files /dev/null and b/wiki/images/immersion-pruner.png differ diff --git a/wiki/images/immersion-version-notes.png b/wiki/images/immersion-version-notes.png index d2d6270..683b5f4 100644 Binary files a/wiki/images/immersion-version-notes.png and b/wiki/images/immersion-version-notes.png differ diff --git a/wiki/images/immersion-visual.png b/wiki/images/immersion-visual.png index 2c52b7b..d0a417e 100644 Binary files a/wiki/images/immersion-visual.png and b/wiki/images/immersion-visual.png differ