diff --git a/Cargo.lock b/Cargo.lock index dfd3028..3a151f1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -286,7 +286,7 @@ dependencies = [ [[package]] name = "assets" -version = "1.0.0" +version = "0.1.0-alpha" dependencies = [ "anyhow", "gpui", @@ -457,7 +457,7 @@ checksum = "82f6aeea286b8eb4dd3431a1be1b59d290ace00f5bfd8e2a159bc2a05e2c1667" dependencies = [ "proc-macro2", "quote", - "syn 3.0.4", + "syn 3.0.5", ] [[package]] @@ -729,7 +729,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6712f9c6fd6785b3b270884e57c441c403dc5d7e19ca45368c97c7a1de3000ec" dependencies = [ "bitcoin-internals", - "hex-conservative 1.2.0", + "hex-conservative 1.3.0", "serde", ] @@ -766,7 +766,7 @@ checksum = "5304e53726dbe5f93141535e102ed97b5bf4714fbecefdda8f9fb98d7fdaff0e" dependencies = [ "bitcoin-consensus-encoding", "bitcoin-internals", - "hex-conservative 1.2.0", + "hex-conservative 1.3.0", "serde", ] @@ -914,7 +914,7 @@ checksum = "fc0e56a716f1e132ff6bf4bdac1c944a3fcdc1cae65f70a4a2a1ac3b401d2d1f" dependencies = [ "proc-macro2", "quote", - "syn 3.0.4", + "syn 3.0.5", ] [[package]] @@ -1217,7 +1217,7 @@ dependencies = [ [[package]] name = "collections" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#b1a7ef0cf66dfbf9d7661170c96d97c7df916c68" +source = "git+https://github.com/zed-industries/zed#1870e269ad88802147f2baec3086abb67d17260a" dependencies = [ "gpui_util", "indexmap", @@ -1509,18 +1509,18 @@ dependencies = [ [[package]] name = "crossbeam-channel" -version = "0.5.16" +version = "0.5.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d85363c37faeca707aef026efa9f3b34d077bce547e48f770770625c6013679e" +checksum = "98b0cc327b5bc766e7fda9c9260cc0fa81b43a8e240440422dff70788e3f9ef1" dependencies = [ "crossbeam-utils", ] [[package]] name = "crossbeam-deque" -version = "0.8.7" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5181e0de7b61eb03a81e347d6dd8797bae9da5146707b51077e2d71a54ec0ceb" +checksum = "622f3fc73690be383c7214310406f28a90e6edeadc3cea882f9d71e495b9711a" dependencies = [ "crossbeam-epoch", "crossbeam-utils", @@ -1528,27 +1528,27 @@ dependencies = [ [[package]] name = "crossbeam-epoch" -version = "0.9.20" +version = "0.9.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d6914041f254d6e9176c01941b21115dcfb7089e55135a35411081bd106ef3f" +checksum = "dc74980687109a3b14c72fd458107bf0baa1da1a1a805e178d15501ba9b86d9d" dependencies = [ "crossbeam-utils", ] [[package]] name = "crossbeam-queue" -version = "0.3.13" +version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "803d13fb3b09d88be9f4dbc29062c66b19bf7170867ceb746d2a8689bf6c7a26" +checksum = "03e8bd762f7479489c70ed6c768ddca99d7296857de437a68dcb2a94365b3fae" dependencies = [ "crossbeam-utils", ] [[package]] name = "crossbeam-utils" -version = "0.8.22" +version = "0.8.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61803da095bee82a81bb1a452ecc25d3b2f1416d1897eb86430c6159ef717c17" +checksum = "a31eee39dddec8330830986fcd7625edb5a24ec90ea038215273bbc3adb08ac6" [[package]] name = "crunchy" @@ -1683,7 +1683,7 @@ dependencies = [ [[package]] name = "derive_refineable" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#b1a7ef0cf66dfbf9d7661170c96d97c7df916c68" +source = "git+https://github.com/zed-industries/zed#1870e269ad88802147f2baec3086abb67d17260a" dependencies = [ "proc-macro2", "quote", @@ -1760,7 +1760,7 @@ checksum = "c6232dd377dcc64799954cbd3a9bb882e9cdc1308ccd87b1c098f1fb2eaf82a8" dependencies = [ "proc-macro2", "quote", - "syn 3.0.4", + "syn 3.0.5", ] [[package]] @@ -1774,7 +1774,7 @@ dependencies = [ [[package]] name = "dock" -version = "1.0.0" +version = "0.1.0-alpha" dependencies = [ "gpui", "gpui-base", @@ -2097,9 +2097,9 @@ dependencies = [ [[package]] name = "find-msvc-tools" -version = "0.1.11" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d45db016d36b838f563236e9193d0ee6ce38f3f68b6c94e914b4929c96bbb890" +checksum = "3e0f1c7c3a72c66fd80abe965175f7523475c0489a87d3ff9d6e8c87d87a9d2d" [[package]] name = "fixedbitset" @@ -2255,7 +2255,7 @@ checksum = "ea5190182e6915eb873ddbc16e23b711b6eb1f9c00a0d0a3a91b5f6228475225" dependencies = [ "proc-macro2", "quote", - "syn 3.0.4", + "syn 3.0.5", ] [[package]] @@ -2391,7 +2391,7 @@ checksum = "9fb9654ba8355388abeb8dcb4fc62f511300867002afc858860463bdd9fe0c44" dependencies = [ "proc-macro2", "quote", - "syn 3.0.4", + "syn 3.0.5", ] [[package]] @@ -3463,7 +3463,7 @@ dependencies = [ [[package]] name = "gpui" version = "0.2.2" -source = "git+https://github.com/zed-industries/zed#b1a7ef0cf66dfbf9d7661170c96d97c7df916c68" +source = "git+https://github.com/zed-industries/zed#1870e269ad88802147f2baec3086abb67d17260a" dependencies = [ "accesskit", "anyhow", @@ -3535,7 +3535,7 @@ dependencies = [ [[package]] name = "gpui-base" version = "0.5.2" -source = "git+https://github.com/longbridge/gpui-component#18922d661e136bffbe154dbd34317d03692bde0b" +source = "git+https://github.com/longbridge/gpui-component?rev=39c2c86dbee7ad445591462f8675f74082e10828#39c2c86dbee7ad445591462f8675f74082e10828" dependencies = [ "aho-corasick", "anyhow", @@ -3571,7 +3571,7 @@ dependencies = [ [[package]] name = "gpui-component" version = "0.5.2" -source = "git+https://github.com/longbridge/gpui-component#18922d661e136bffbe154dbd34317d03692bde0b" +source = "git+https://github.com/longbridge/gpui-component?rev=39c2c86dbee7ad445591462f8675f74082e10828#39c2c86dbee7ad445591462f8675f74082e10828" dependencies = [ "anyhow", "chrono", @@ -3648,7 +3648,7 @@ dependencies = [ [[package]] name = "gpui-component-assets" version = "0.5.1" -source = "git+https://github.com/longbridge/gpui-component#18922d661e136bffbe154dbd34317d03692bde0b" +source = "git+https://github.com/longbridge/gpui-component?rev=39c2c86dbee7ad445591462f8675f74082e10828#39c2c86dbee7ad445591462f8675f74082e10828" dependencies = [ "anyhow", "gpui", @@ -3662,7 +3662,7 @@ dependencies = [ [[package]] name = "gpui-component-macros" version = "0.5.1" -source = "git+https://github.com/longbridge/gpui-component#18922d661e136bffbe154dbd34317d03692bde0b" +source = "git+https://github.com/longbridge/gpui-component?rev=39c2c86dbee7ad445591462f8675f74082e10828#39c2c86dbee7ad445591462f8675f74082e10828" dependencies = [ "proc-macro2", "quote", @@ -3672,21 +3672,21 @@ dependencies = [ [[package]] name = "gpui-fps" version = "0.1.0" -source = "git+https://github.com/longbridge/gpui-component#18922d661e136bffbe154dbd34317d03692bde0b" +source = "git+https://github.com/longbridge/gpui-component?rev=39c2c86dbee7ad445591462f8675f74082e10828#39c2c86dbee7ad445591462f8675f74082e10828" dependencies = [ "gpui", + "instant", "libc", "objc2-core-foundation", "objc2-io-kit", "sysinfo 0.37.2", - "web-time", "windows 0.58.0", ] [[package]] name = "gpui_apple" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#b1a7ef0cf66dfbf9d7661170c96d97c7df916c68" +source = "git+https://github.com/zed-industries/zed#1870e269ad88802147f2baec3086abb67d17260a" dependencies = [ "anyhow", "block", @@ -3709,7 +3709,7 @@ dependencies = [ [[package]] name = "gpui_linux" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#b1a7ef0cf66dfbf9d7661170c96d97c7df916c68" +source = "git+https://github.com/zed-industries/zed#1870e269ad88802147f2baec3086abb67d17260a" dependencies = [ "accesskit", "accesskit_unix", @@ -3755,7 +3755,7 @@ dependencies = [ [[package]] name = "gpui_macos" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#b1a7ef0cf66dfbf9d7661170c96d97c7df916c68" +source = "git+https://github.com/zed-industries/zed#1870e269ad88802147f2baec3086abb67d17260a" dependencies = [ "accesskit", "accesskit_macos", @@ -3801,7 +3801,7 @@ dependencies = [ [[package]] name = "gpui_macros" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#b1a7ef0cf66dfbf9d7661170c96d97c7df916c68" +source = "git+https://github.com/zed-industries/zed#1870e269ad88802147f2baec3086abb67d17260a" dependencies = [ "heck 0.5.0", "proc-macro2", @@ -3812,7 +3812,7 @@ dependencies = [ [[package]] name = "gpui_platform" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#b1a7ef0cf66dfbf9d7661170c96d97c7df916c68" +source = "git+https://github.com/zed-industries/zed#1870e269ad88802147f2baec3086abb67d17260a" dependencies = [ "console_error_panic_hook", "gpui", @@ -3825,7 +3825,7 @@ dependencies = [ [[package]] name = "gpui_shared_string" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#b1a7ef0cf66dfbf9d7661170c96d97c7df916c68" +source = "git+https://github.com/zed-industries/zed#1870e269ad88802147f2baec3086abb67d17260a" dependencies = [ "schemars", "serde", @@ -3835,7 +3835,7 @@ dependencies = [ [[package]] name = "gpui_util" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#b1a7ef0cf66dfbf9d7661170c96d97c7df916c68" +source = "git+https://github.com/zed-industries/zed#1870e269ad88802147f2baec3086abb67d17260a" dependencies = [ "anyhow", "log", @@ -3845,7 +3845,7 @@ dependencies = [ [[package]] name = "gpui_web" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#b1a7ef0cf66dfbf9d7661170c96d97c7df916c68" +source = "git+https://github.com/zed-industries/zed#1870e269ad88802147f2baec3086abb67d17260a" dependencies = [ "anyhow", "console_error_panic_hook", @@ -3869,7 +3869,7 @@ dependencies = [ [[package]] name = "gpui_wgpu" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#b1a7ef0cf66dfbf9d7661170c96d97c7df916c68" +source = "git+https://github.com/zed-industries/zed#1870e269ad88802147f2baec3086abb67d17260a" dependencies = [ "anyhow", "bytemuck", @@ -3895,7 +3895,7 @@ dependencies = [ [[package]] name = "gpui_windows" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#b1a7ef0cf66dfbf9d7661170c96d97c7df916c68" +source = "git+https://github.com/zed-industries/zed#1870e269ad88802147f2baec3086abb67d17260a" dependencies = [ "accesskit", "accesskit_windows", @@ -4119,9 +4119,9 @@ dependencies = [ [[package]] name = "hex-conservative" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35431185f361ccf3ffc58254628af5f1f5d5f28531da2e02e5d6c82bbc282a10" +checksum = "271e0d19bcb473b6675739a2b536076b24a082316cb5199ad918edce10c599e8" dependencies = [ "arrayvec", ] @@ -4209,7 +4209,7 @@ dependencies = [ [[package]] name = "http_client" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#b1a7ef0cf66dfbf9d7661170c96d97c7df916c68" +source = "git+https://github.com/zed-industries/zed#1870e269ad88802147f2baec3086abb67d17260a" dependencies = [ "anyhow", "async-compression", @@ -4229,7 +4229,7 @@ dependencies = [ [[package]] name = "http_client_tls" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#b1a7ef0cf66dfbf9d7661170c96d97c7df916c68" +source = "git+https://github.com/zed-industries/zed#1870e269ad88802147f2baec3086abb67d17260a" dependencies = [ "log", "rustls", @@ -4509,9 +4509,9 @@ checksum = "6e44b0a4eaa4c82f441d50a963f2d5f05a787240aeee097597033e72accfd22f" [[package]] name = "indexmap" -version = "2.14.1" +version = "2.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07aa2048142242915a31d35844fb311e0e53fcca590c3a0a40dcf1b841fa09eb" +checksum = "cc4e190f5d26ca7051642629da2c52fc03bde85a03197c99408dcd291734c855" dependencies = [ "equivalent", "hashbrown 0.17.1", @@ -4614,9 +4614,9 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.12.1" +version = "2.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a756c3fac73139e83f14c2d742155dd2b78d3ee56597b419a0579b7bdd6dd78" +checksum = "791930b43c0d5973160d90a8f3894509f2b273430f5c5c73b668636d0287c5c0" [[package]] name = "is-docker" @@ -4793,9 +4793,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.104" +version = "0.3.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e0c1080212aad755ea003d18543e8768dd432c48819efd73a7bf1e39b7a5a3a" +checksum = "ce57d20d1ea864ce2ac172ab472d409214f4fd359f0b2a2775abdf522e2af99e" dependencies = [ "cfg-if", "futures-util", @@ -5079,9 +5079,9 @@ dependencies = [ [[package]] name = "lyon_tessellation" -version = "1.0.21" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dabea159dc6eea9171a541b458134b70ca95e3162d068132b2b3b9bc01aad06e" +checksum = "43b8dcf906637ecef61b3c0740c7a4e7f27caeb31257cfac0cc579ce15be6005" dependencies = [ "float_next_after", "lyon_path", @@ -5185,7 +5185,7 @@ dependencies = [ [[package]] name = "media" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#b1a7ef0cf66dfbf9d7661170c96d97c7df916c68" +source = "git+https://github.com/zed-industries/zed#1870e269ad88802147f2baec3086abb67d17260a" dependencies = [ "anyhow", "bindgen", @@ -5410,7 +5410,7 @@ dependencies = [ [[package]] name = "nostr" version = "0.45.4" -source = "git+https://github.com/rust-nostr/nostr#472c8839ea3f532259435d0513bf155ddeb467ba" +source = "git+https://github.com/rust-nostr/nostr#0c6fad2ac8ce934747096953f6dba355e3532614" dependencies = [ "aes", "base64", @@ -5436,7 +5436,7 @@ dependencies = [ [[package]] name = "nostr-connect" version = "0.45.1" -source = "git+https://github.com/rust-nostr/nostr#472c8839ea3f532259435d0513bf155ddeb467ba" +source = "git+https://github.com/rust-nostr/nostr#0c6fad2ac8ce934747096953f6dba355e3532614" dependencies = [ "async-utility", "futures-core", @@ -5450,7 +5450,7 @@ dependencies = [ [[package]] name = "nostr-database" version = "0.45.1" -source = "git+https://github.com/rust-nostr/nostr#472c8839ea3f532259435d0513bf155ddeb467ba" +source = "git+https://github.com/rust-nostr/nostr#0c6fad2ac8ce934747096953f6dba355e3532614" dependencies = [ "nostr", "opaquerr", @@ -5459,7 +5459,7 @@ dependencies = [ [[package]] name = "nostr-gossip" version = "0.45.0" -source = "git+https://github.com/rust-nostr/nostr#472c8839ea3f532259435d0513bf155ddeb467ba" +source = "git+https://github.com/rust-nostr/nostr#0c6fad2ac8ce934747096953f6dba355e3532614" dependencies = [ "nostr", "opaquerr", @@ -5468,7 +5468,7 @@ dependencies = [ [[package]] name = "nostr-gossip-memory" version = "0.45.0" -source = "git+https://github.com/rust-nostr/nostr#472c8839ea3f532259435d0513bf155ddeb467ba" +source = "git+https://github.com/rust-nostr/nostr#0c6fad2ac8ce934747096953f6dba355e3532614" dependencies = [ "indexmap", "lru", @@ -5480,7 +5480,7 @@ dependencies = [ [[package]] name = "nostr-lmdb" version = "0.45.2" -source = "git+https://github.com/rust-nostr/nostr#472c8839ea3f532259435d0513bf155ddeb467ba" +source = "git+https://github.com/rust-nostr/nostr#0c6fad2ac8ce934747096953f6dba355e3532614" dependencies = [ "async-utility", "flatbuffers", @@ -5495,7 +5495,7 @@ dependencies = [ [[package]] name = "nostr-memory" version = "0.45.1" -source = "git+https://github.com/rust-nostr/nostr#472c8839ea3f532259435d0513bf155ddeb467ba" +source = "git+https://github.com/rust-nostr/nostr#0c6fad2ac8ce934747096953f6dba355e3532614" dependencies = [ "btreecap", "nostr", @@ -5506,7 +5506,7 @@ dependencies = [ [[package]] name = "nostr-sdk" version = "0.45.2" -source = "git+https://github.com/rust-nostr/nostr#472c8839ea3f532259435d0513bf155ddeb467ba" +source = "git+https://github.com/rust-nostr/nostr#0c6fad2ac8ce934747096953f6dba355e3532614" dependencies = [ "async-utility", "async-wsocket", @@ -6209,7 +6209,7 @@ dependencies = [ [[package]] name = "paths" -version = "1.0.0" +version = "0.1.0-alpha" dependencies = [ "dirs", ] @@ -6243,7 +6243,7 @@ checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" [[package]] name = "perf" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#b1a7ef0cf66dfbf9d7661170c96d97c7df916c68" +source = "git+https://github.com/zed-industries/zed#1870e269ad88802147f2baec3086abb67d17260a" dependencies = [ "collections", "serde", @@ -6474,9 +6474,9 @@ checksum = "05c8b63e8d9609db387f0324918f81d68fe27748f084ef092fb35954d0539a85" [[package]] name = "portable-atomic-util" -version = "0.2.7" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2a106d1259c23fac8e543272398ae0e3c0b8d33c88ed73d0cc71b0f1d902618" +checksum = "10ab3eb7f3becc3a1cbc4f2c6f20267996cfc1a6467a873763411b136a122715" dependencies = [ "portable-atomic", ] @@ -7025,13 +7025,13 @@ checksum = "92ecd8964f8453721699a1ed72037b0db49ce2f5a5138486ee89bed6f67cdf3a" dependencies = [ "proc-macro2", "quote", - "syn 3.0.4", + "syn 3.0.5", ] [[package]] name = "refineable" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#b1a7ef0cf66dfbf9d7661170c96d97c7df916c68" +source = "git+https://github.com/zed-industries/zed#1870e269ad88802147f2baec3086abb67d17260a" dependencies = [ "derive_refineable", ] @@ -7114,7 +7114,7 @@ dependencies = [ [[package]] name = "reqwest_client" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#b1a7ef0cf66dfbf9d7661170c96d97c7df916c68" +source = "git+https://github.com/zed-industries/zed#1870e269ad88802147f2baec3086abb67d17260a" dependencies = [ "anyhow", "bytes", @@ -7492,7 +7492,7 @@ dependencies = [ [[package]] name = "scheduler" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#b1a7ef0cf66dfbf9d7661170c96d97c7df916c68" +source = "git+https://github.com/zed-industries/zed#1870e269ad88802147f2baec3086abb67d17260a" dependencies = [ "async-task", "backtrace", @@ -7528,7 +7528,7 @@ dependencies = [ "proc-macro2", "quote", "serde_derive_internals", - "syn 3.0.4", + "syn 3.0.5", ] [[package]] @@ -7699,7 +7699,7 @@ checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348" dependencies = [ "proc-macro2", "quote", - "syn 3.0.4", + "syn 3.0.5", ] [[package]] @@ -7710,7 +7710,7 @@ checksum = "f852137cce035d6a4df67ccce505ff6b3e9fd3a10e3e52b24dc71e650bb1a9bd" dependencies = [ "proc-macro2", "quote", - "syn 3.0.4", + "syn 3.0.5", ] [[package]] @@ -7744,7 +7744,7 @@ checksum = "8d3b1629de253c70a0508c3899572da79ca359fdab27c7920ff00406df418906" dependencies = [ "proc-macro2", "quote", - "syn 3.0.4", + "syn 3.0.5", ] [[package]] @@ -7779,7 +7779,7 @@ dependencies = [ [[package]] name = "settings" -version = "1.0.0" +version = "0.1.0-alpha" dependencies = [ "anyhow", "gpui", @@ -7880,7 +7880,7 @@ dependencies = [ [[package]] name = "signed" -version = "1.0.0" +version = "0.1.0-alpha" dependencies = [ "assets", "dock", @@ -7898,14 +7898,14 @@ dependencies = [ [[package]] name = "signed_core" -version = "1.0.0" +version = "0.1.0-alpha" dependencies = [ "nostr", ] [[package]] name = "signed_git" -version = "1.0.0" +version = "0.1.0-alpha" dependencies = [ "anyhow", "gix", @@ -7916,7 +7916,7 @@ dependencies = [ [[package]] name = "signed_nostr" -version = "1.0.0" +version = "0.1.0-alpha" dependencies = [ "anyhow", "nostr-connect", @@ -7929,7 +7929,7 @@ dependencies = [ [[package]] name = "signed_state" -version = "1.0.0" +version = "0.1.0-alpha" dependencies = [ "anyhow", "bitcoin_hashes 1.2.0", @@ -7951,7 +7951,7 @@ dependencies = [ [[package]] name = "signed_ui" -version = "1.0.0" +version = "0.1.0-alpha" dependencies = [ "assets", "futures", @@ -8201,7 +8201,7 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "sum_tree" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#b1a7ef0cf66dfbf9d7661170c96d97c7df916c68" +source = "git+https://github.com/zed-industries/zed#1870e269ad88802147f2baec3086abb67d17260a" dependencies = [ "heapless 0.9.3", "log", @@ -8339,9 +8339,9 @@ dependencies = [ [[package]] name = "syn" -version = "3.0.4" +version = "3.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6275cddf4610d1775e6d1fe9469b2e77d0f39fd98fb7450901b821e0c53649f" +checksum = "12df2e0110f65b775f769bb17ef989067a1d931b2eb822bd4346631eeada89f9" dependencies = [ "proc-macro2", "quote", @@ -8569,7 +8569,7 @@ checksum = "bc04cd3e1236dd4a98afca4569f2deb3f120e5422a4023be2cb683f8486292af" dependencies = [ "proc-macro2", "quote", - "syn 3.0.4", + "syn 3.0.5", ] [[package]] @@ -8661,9 +8661,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.12.0" +version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb4ebadaa0af04fab11ae01eb5f9fdb5f9c5b875506e210e71c07873528baa7f" +checksum = "4cf0ded5c4e56918d8f8a339e1bb67d038d3bc6d144ac407904015ba2e4cde9b" dependencies = [ "tinyvec_macros", ] @@ -8706,14 +8706,14 @@ checksum = "78773a2a397f451582ce068015985c33193cf6dea8b74d2a639fe457b2f07b0e" dependencies = [ "proc-macro2", "quote", - "syn 3.0.4", + "syn 3.0.5", ] [[package]] name = "tokio-rustls" -version = "0.26.4" +version = "0.26.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1729aa945f29d91ba541258c8df89027d5792d85a8841fb65e8bf0f4ede4ef61" +checksum = "b0c85f2c3ef0b1cd58b36682f4b17aaa995f0e5db534d85692b4903abce21f67" dependencies = [ "rustls", "tokio", @@ -9599,7 +9599,7 @@ checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" [[package]] name = "util_macros" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#b1a7ef0cf66dfbf9d7661170c96d97c7df916c68" +source = "git+https://github.com/zed-industries/zed#1870e269ad88802147f2baec3086abb67d17260a" dependencies = [ "perf", "quote", @@ -9608,7 +9608,7 @@ dependencies = [ [[package]] name = "utils" -version = "1.0.0" +version = "0.1.0-alpha" dependencies = [ "nostr", ] @@ -9756,9 +9756,9 @@ dependencies = [ [[package]] name = "wasm-bindgen" -version = "0.2.127" +version = "0.2.128" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b70935747edd64d89de3efa29d73789b806c15798f8e7dca4d8ac356b50ce70" +checksum = "aecb87a33d3b0c5e3b7aa46336eaf486cffafbd281b195e4c8b80d50df2351bf" dependencies = [ "cfg-if", "once_cell", @@ -9769,9 +9769,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.77" +version = "0.4.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b7777d5cc23d0e91404e53ce2d5e8ec7acae3026b16233dba62cd3246457950" +checksum = "6ef4c5d3d2cdf5c54f4231181768f5510842e350db025faf1f7163b1030ed928" dependencies = [ "js-sys", "wasm-bindgen", @@ -9779,9 +9779,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.127" +version = "0.2.128" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77775f8f3f7217702089053b94958f8f54061a3f663417df76e19cbdcca29bc1" +checksum = "a690d511e3c1a8b3a55e33511e3c2c00c78415cd23650f32b808627f5696b9ed" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -9789,22 +9789,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.127" +version = "0.2.128" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e11d33f857dc2fb11b8bc75aee111aa9cbeb12cd9f25efd3d4c2a3dd4e235284" +checksum = "411e4887f0071ef2d2164a9d5fdf2d20efbef78fccd3a78b0c10a1dc5295e48a" dependencies = [ "bumpalo", "proc-macro2", "quote", - "syn 2.0.119", + "syn 3.0.5", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.127" +version = "0.2.128" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ef64dbcc55df09c7e5a46182d181c2cfa3e925f3da937ea764728b4bbb9dcbf" +checksum = "81941cd78d0c92026c33e5e01312845a4cb1e9af3407f9134b100dd03144103e" dependencies = [ "unicode-ident", ] @@ -9934,9 +9934,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.104" +version = "0.3.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c435338968042f4f59a557f690a253676d47ce13ceb55d70100e7facf6620a30" +checksum = "9fbddc4a036f00ec4f18c83445bd3115cb306a91da554919a099d9222fe4a7f8" dependencies = [ "js-sys", "wasm-bindgen", @@ -10789,7 +10789,7 @@ checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e" [[package]] name = "workspace" -version = "1.0.0" +version = "0.1.0-alpha" dependencies = [ "anyhow", "assets", @@ -11052,7 +11052,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 3.0.4", + "syn 3.0.5", "zbus_names", "zvariant", "zvariant_utils", @@ -11355,7 +11355,7 @@ checksum = "34df6fc39dbd26ddc9c10e6a2984476e13acce22e64e4487636ef494369225da" dependencies = [ "proc-macro2", "quote", - "syn 3.0.4", + "syn 3.0.5", ] [[package]] @@ -11367,7 +11367,7 @@ checksum = "34b31d188d9d685a4f9c7b46d6e36631b07058d2cfe190267adce54dc230bf12" [[package]] name = "zlog" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#b1a7ef0cf66dfbf9d7661170c96d97c7df916c68" +source = "git+https://github.com/zed-industries/zed#1870e269ad88802147f2baec3086abb67d17260a" dependencies = [ "anyhow", "chrono", @@ -11384,7 +11384,7 @@ checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b" [[package]] name = "ztracing" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#b1a7ef0cf66dfbf9d7661170c96d97c7df916c68" +source = "git+https://github.com/zed-industries/zed#1870e269ad88802147f2baec3086abb67d17260a" dependencies = [ "tracing", "tracing-subscriber", @@ -11395,7 +11395,7 @@ dependencies = [ [[package]] name = "ztracing_macro" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#b1a7ef0cf66dfbf9d7661170c96d97c7df916c68" +source = "git+https://github.com/zed-industries/zed#1870e269ad88802147f2baec3086abb67d17260a" [[package]] name = "zune-core" @@ -11461,7 +11461,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 3.0.4", + "syn 3.0.5", "zvariant_utils", ] @@ -11474,7 +11474,7 @@ dependencies = [ "proc-macro2", "quote", "serde", - "syn 3.0.4", + "syn 3.0.5", "winnow 1.0.4", ] diff --git a/Cargo.toml b/Cargo.toml index 336d9e7..fe36016 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ members = ["crates/*", "desktop"] default-members = ["desktop"] [workspace.package] -version = "1.0.0" +version = "0.1.0-alpha" edition = "2024" publish = false @@ -15,11 +15,10 @@ gpui_platform = { git = "https://github.com/zed-industries/zed", features = ["fo gpui_tokio = { git = "https://github.com/zed-industries/zed" } reqwest_client = { git = "https://github.com/zed-industries/zed" } -# `tree-sitter-languages` enables syntax highlighting for the TextView -# code preview (fenced code blocks are highlighted with tree-sitter). -gpui-component = { git = "https://github.com/longbridge/gpui-component", features = ["tree-sitter-languages"] } -gpui-base = { git = "https://github.com/longbridge/gpui-component" } -gpui-fps = { git = "https://github.com/longbridge/gpui-component" } +# GPUI Kit +gpui-component = { git = "https://github.com/longbridge/gpui-component", rev = "39c2c86dbee7ad445591462f8675f74082e10828", features = ["tree-sitter-languages"], } +gpui-base = { git = "https://github.com/longbridge/gpui-component", rev = "39c2c86dbee7ad445591462f8675f74082e10828" } +gpui-fps = { git = "https://github.com/longbridge/gpui-component", rev = "39c2c86dbee7ad445591462f8675f74082e10828" } dock = { path = "crates/dock" } settings = { path = "crates/settings" } diff --git a/docs/.keep b/docs/.keep new file mode 100644 index 0000000..e69de29 diff --git a/docs/GRASP_PUSH_FIX.md b/docs/GRASP_PUSH_FIX.md deleted file mode 100644 index bac9554..0000000 --- a/docs/GRASP_PUSH_FIX.md +++ /dev/null @@ -1,298 +0,0 @@ -# Plan: reliable pushes to multiple grasp servers - -Status: implemented (2026-09-07), see the change summary below. - -A push to a repo announced with several grasp servers sometimes reaches only -one of them. The grasp server on `relay.ngit.dev` rejected the git push with -`remote: ERR authorisation failed: No state events in purgatory`, while -`gitnostr.com` accepted it. The push still reported success because the app -counts an operation as pushed when at least one grasp server accepted; -individual failures only hit the log as `WARN grasp push failed: ...`. The -failed server silently stays behind until something pushes to it again. - -## Background: how a grasp push is authorized - -A push to a GRASP server is a two-stage transaction, not a plain git push: - -1. The client publishes a NIP-34 kind-30618 *state event* listing the refs it - is about to push (`refs/heads/main -> ` etc.). -2. The client git-pushes the objects to `https:////.git`. - -The grasp server does not trust the git push on its own. State events it -accepts are held in an in-memory **purgatory** - accepted but not served, -"until git data arrives" - and the git push is authorized **only against -purgatory state events**, never against the database (the database is the -current state; purgatory holds the intended future state). When a push arrives -and purgatory holds no state event for that repo id, the server rejects with -`No state events in purgatory` (ngit-grasp `git/authorization.rs`), surfaced to -the client through the git protocol as the `remote: ERR authorisation failed: -...` line above. Parked events that are never matched by git data are discarded -after ~30 minutes. - -The relay and the git server of a grasp entry share a host: `wss://gitnostr.com` -and `wss://relay.ngit.dev` are relay URLs, and the git URL is derived with -`grasp_base_url` (`https:////.git`). The grasp learns about -state events from its own relay. A relay accept for a state event parks it in -purgatory before the grasp sends its OK, and the nostr-sdk default ack policy -(`AckPolicy::all`) waits for that OK - so a confirmed stage means the state is -in place to authorize the push. - -## Root causes in the app - -| # | Problem | Consequence | -|---|---|---| -| 1 | State event is published to the whole relay pool, then git is pushed to every grasp server - no per-server staging, no confirmation that the target grasp's own relay accepted it | a push can reach a grasp whose purgatory is still empty | -| 2 | No retry for that denial class | a self-resolving race permanently leaves one server behind | -| 3 | `push_to_grasp_servers` returns `Ok` when >= 1 server accepts; failures only `log::warn!` | UI shows success; the failed grasp silently out of sync | -| 4 | When a grasp's relay is down, the client still fires a doomed git push | confusing git-level `ERR` instead of a clear "state not accepted by relay" | - -Relevant code (`crates/signed_state/src/backend.rs`): - -- `push_repo_from` (L752-834): broadcast the state event to the whole pool, - then `push_to_grasp_servers`. -- `push_to_grasp_servers` (L1536-1570): sequential git pushes, `Ok` when at - least one server accepted, `warn!` per failure. -- `broadcast_event` (L1336-1350): whole-pool `client.send_event`, errors only - when no relay accepted. -- `send` / `publish_task` (L1239-1292): sign, broadcast, store locally (the - client saves accepted events), emit `BackendEvent::Published`. -- `create_repository` (L554-575) and `publish_local_repo` (L692-708): direct - `push_to_grasp_servers` calls; retract announcement+state when zero servers - accept. - -The fix mirrors ngit's own client (its `state_transaction.rs` stages the state -event on the grasp relays, gates which servers are pushed, and fans the state -out to other relays only after a git server accepted) and adds retries, because -the app must also cope with a denial after a relay ack. - -## Target flow: staged push with retries - -```mermaid -sequenceDiagram - participant App as signed app - participant R1 as gitnostr.com relay+grasp - participant R2 as relay.ngit.dev relay+grasp - participant O as other relays - - Note over App: build state event S0 from local refs - App->>R1: stage S0 to grasp relay only (.to(url)) - App->>R2: stage S0 to grasp relay only (.to(url)) - R1-->>App: OK (parked in purgatory) -> eligible - R2-->>App: OK (parked in purgatory) -> eligible - App->>R1: git push - R1-->>App: authorized by S0 in purgatory - App->>R2: git push - R2-->>App: ERR ... No state events in purgatory (transient) - Note over App: retry: stage a fresh S1 to R2, wait ~1s, git push again - App->>R2: stage fresh S1 (new event id) - App->>R2: git push - R2-->>App: authorized - Note over App: >= 1 server ok -> fan out state to the pool - App->>O: broadcast state (only after a git server holds it) -``` - -Retries stage a **fresh** state event (new `created_at` -> new id) rather than -resending the same one: a grasp relay treats a same-id event as a duplicate and -will not re-run its policy, so a lost purgatory entry (e.g. a server restart -without its state file) cannot be re-parked by a resend. A fresh id re-runs -validation and re-parks. Superseded parked events expire server-side after 30 -minutes, so the residue is bounded. - -## Changes - -Implemented: - -- `crates/signed_state/src/backend.rs`: `push_to_grasp_servers` replaced by the - staged orchestration `push_staged_to_grasps` plus `stage_event_on_relay`, - `sign_state_event`, `is_transient_grasp_denial`, and the `GraspServerResult` / - `PushOutcome` result types. `create_repository`, `publish_local_repo` and - `push_repo_from` (repo push and checkout push) all push through it and fan the - state out to the relay pool only after at least one git server accepted. -- `crates/signed_state/src/repo.rs`: push outcomes surface partial failures as - `RepoStore::last_push_warning`. -- `crates/workspace/src/views/repo_detail/mod.rs`: a warning banner with a - Republish action shows when a push did not reach every grasp server. -- Unit tests for the denial classifier and the outcome reporting. - -Decisions taken while implementing: - -- State events are no longer broadcast before any git data exists. They are - staged per grasp relay, and only fanned out to the relay pool after a git - server accepted. A total push failure therefore leaves nothing served to - retract except the announcement (create/publish flows retract that, as - before). Staged-but-unmatched state events expire in the grasp's purgatory - after ~30 minutes. -- Servers whose relay rejects the state event are **skipped**, not pushed - (the eligibility gate): a doomed git push would only produce the same - denial. -- **Stale-ref races are retried and verified.** The grasp server runs its own - background sync that aligns repository refs to parked state events as soon - as the git objects are present - including objects an earlier denied attempt - of this same push already uploaded. `git receive-pack` then rejects the ref - update against its stale advertisement with `cannot lock ref ... is at ... - but expected ...` / `incorrect old value provided`. Such rejections are - retried against a fresh advertisement *and* probed for convergence: when - the sync already aligned the refs to this push's target (`git ls-remote` - matches, `signed_git::remote_has_refs`), the server is counted as accepted - even though the push's compare-and-swap never returned `Ok` - because the - data is already there. The sync can land a moment after the retry window, so - the probe is what makes these pushes succeed without a manual republish. -- Create/publish partial failures (some servers accepted, some not) stay - `Ok` and are logged, matching the pre-existing contract; the repo-push - paths additionally set `last_push_warning` so the failure is visible and - one-click republishable. -- The push warning lives in a dedicated `RepoStore::last_push_warning` so it - never collides with the PR-flow `last_warning` on the shared store. - -### Staged orchestration (`crates/signed_state/src/backend.rs`) - -1. **Per-relay publish helper** (`stage_event_on_relay`). Publishes only to - one relay and verifies its acceptance, using the pinned nostr-sdk 0.45 API - (`send_event_to` is deprecated at 0.45): - - ```rust - // client.send_event(event).to([relay.clone()]).await - // -> Ok only when the relay is in the output's success map - ``` - - The relay is added and connected first (reusing the `add_relay` pattern); - a failed connect is a staged failure with a clear reason. - -2. **Transient-denial classifier** (`is_transient_grasp_denial`, pure, - unit-tested). Two retry families: - - - **Purgatory denials** (ngit-grasp `git/authorization.rs`): - - `No state events in purgatory` (the originally reported failure) - - `no matching state event found in purgatory` - - `in purgatory ... doesn't match push` - - `none from authorized publishers` - - `No repository announcement found` (new repos whose announcement is - still propagating) - - **Stale-ref races** (git receive-pack compare-and-swap against the - advertised value, when the grasp's background sync moved the ref): - - `cannot lock ref` - - `incorrect old value provided` - - Stale-ref race rejections are additionally probed for convergence with - `git ls-remote`; a server that already advertises the pushed refs counts as - accepted (`remote_has_refs` in `signed_git`). - - Everything else - HTTP auth rejection, not a maintainer, a genuine - non-fast-forward divergence, network failure - is permanent for that - attempt. Only the transient classes are retried. - -3. **Orchestration** (`push_staged_to_grasps`, replaces `push_to_grasp_servers`): - - ```rust - pub struct GraspServerResult { relay: RelayUrl, git_url: String, reason: Option } - pub struct PushOutcome { servers: Vec, state_event: Option } - - async fn push_staged_to_grasps( - client: &Client, - signer: &UniversalSigner, - repo_id: &str, - refs: &[(String, String)], - head: Option<&str>, - path: &Path, - owner: &str, - servers: &[RelayUrl], - push: fn(&Path, &str, &str, &str) -> Result<(), Error>, - ) -> PushOutcome - ``` - - Per server, in `servers` order: - - - **Stage**: publish the state event to that relay (one retry for a connect - blip). Not accepted => record the reason and skip the git push (the - eligibility gate - no doomed push). - - **Push**: git push; on a transient denial, stage a **fresh** state event - (see below), back off ~1s, and retry. Budget: three attempts total. - - Permanent git error => record it and stop for that server. - - Retries stage a fresh event (new `created_at` -> new id) rather than - resending the same one: a grasp relay treats a same-id event as a duplicate - and will not re-run its policy, so a lost purgatory entry (e.g. a server - restart without its state file) cannot be re-parked by a resend. When a - retry would fall in the same wall-clock second, `sign_state_event` nudges - `created_at` forward by one second so the event id differs. Superseded - parked events expire server-side after 30 minutes. - -4. **Reorder `push_repo_from`**: replace the pre-push whole-pool `send(state)` - with staging + push through `push_staged_to_grasps`, then, after at least - one server accepted, fan the state out to the pool (`broadcast_event`) and - emit `BackendEvent::Published` once. Moving the fan-out after the first git - success also closes today's leak where state is broadcast before any server - holds the objects (ngit made the same change). - -5. **Other callers updated** (`create_repository`, `publish_local_repo`): same - orchestration. Their announcement broadcast stays first - grasps park - brand-new announcements in announcement purgatory until the first git data, - so there is no leak - and "zero servers accepted => retract announcement" is - preserved. An empty repository (no refs) is announced without staging or - pushing anything. - -### Outcome plumbing (`crates/signed_state/src/repo.rs`) - -- `RepoStore::push_repository` / `push_checkout` (L1075-1150) gain - - ```rust - last_push_warning: Option - ``` - - populated from `PushOutcome::partial_warning()` (a one-line summary naming - the rejected servers and reasons). `last_error` (zero-success hard failure) - and the PR-flow `last_warning` are unchanged. - -### UI (`crates/workspace/src/views/repo_detail/mod.rs`) - -- When `store.last_push_warning` is set, `render_push_warning_banner` shows a - warning banner above the header: - - > Pushed to 1 of 2 grasp servers: wss://relay.ngit.dev: remote: ERR - > authorisation failed: No state events in purgatory fatal: ... Republish to - > sync. - -- The banner's Republish action reuses `push_repository` (an idempotent - re-push of every announced server - the simplest catch-up for any drifted - server); a dismiss control clears the warning. -- Zero-success failures continue through the existing error banner (`self.error` - / `store.last_error`, rendered in `render`). - -### Tests - -- Unit (backend tests module): the classifier (both retry families - the - reported purgatory stderr line and the reported `cannot lock ref` race are - transient; HTTP 403, not-a-maintainer and a non-fast-forward divergence are - not), the outcome reporting (partial warnings are single-line and name the - failing servers, an all-ok outcome has no warning) and `flatten_whitespace`. - All `cargo test -p signed_state` tests pass. -- The staged orchestration itself is exercised against live grasps by manual - validation; the pure decision helpers are unit-tested. - -### Manual validation - -- Create and push a repo with both `gitnostr.com` and `relay.ngit.dev`; after - each push, `git ls-remote https:////.git` against **both** - hosts to confirm convergence; repeat over several commits to shake out the - race. Then repeat with `relay.ngit.dev` temporarily unreachable to exercise - the banner and the Retry action. - -## Behavior decisions - -- At least one server accepted => the operation succeeds (existing contract), - but partial failure is explicit and retryable (warning banner + Republish). -- Announcement publishing stays first; state fan-out moves after the first git - success (fixes the state-before-data leak). -- No wire-protocol changes; error text stays user-readable in the banner. - -## Open questions (status) - -1. **Auto-retry** after a partial success: not implemented - retries happen - inside the push (up to 3 attempts per server for transient denials), and a - residual failure stays visible with a manual Republish. A delayed - background re-push of failed servers could be added later. -2. **Post-push verification** (`git ls-remote` per grasp after a successful - push to confirm the refs are advertised): not implemented; could catch - ack-but-not-promoted cases at the cost of one extra round-trip per server. -3. **Scope**: the create, publish-local and repo/checkout push paths were all - converted in one change. diff --git a/docs/PR_FLOW.md b/docs/PR_FLOW.md deleted file mode 100644 index 10e8e0f..0000000 --- a/docs/PR_FLOW.md +++ /dev/null @@ -1,173 +0,0 @@ -# Pull request flow - -How a pull request moves through Signed from creation to merge. A PR is a -kind-1618 root event whose content is the markdown description; its changes -live in a NIP-10-chained series of kind-1617 patch events (one per commit), -whose root the PR references via an `e` tag. Revisions publish new patch -events plus kind-1619 updates; statuses (kind 1630-1633) resolve the PR's -state. - -## Whole lifecycle - -```mermaid -graph TD - A["New pull request panel"] --> B{"Compare source"} - B -->|"Local checkout"| C["Pick folder (or auto-prefilled from remembered checkouts)"] - B -->|"Announced fork"| D["Pick fork repo + branch"] - D --> D1["Ensure base mirror (GitCache), fetch origin"] - D1 --> D2["Import fork heads as refs/fork/<owner>/<id>/*"] - C --> E["Defaults: target = announced HEAD, source = current branch / fork main"] - E --> F["merge-base + commits + diff of target..source (Files/Commits tabs)"] - F --> H["Submit: format-patch base..tip at publish time"] - H --> I["split_patch_series: one part per commit"] - I --> J{"Any part over 60 KB?"} - J -->|"Yes"| K["Refuse with message"] - J -->|"No"| L["tip = last part's From commit"] - L --> M["Publish kind-1617 patch series: first has t root, later parts e-reply chained"] - M --> N["Build kind-1618 PR event: c = tip, e = root patch, branch-name, merge-base, clone"] - N --> O["Sign early - learn the event id"] - O --> P["Push tip to refs/nostr/event-id: author /prs/ grasp servers first, then the announced servers"] - P -->|"All rejected"| Q["last_warning banner in PR list"] - P --> R["Publish kind-1618 PR event"] - Q --> R - R --> S{"Draft?"} - S -->|"Yes"| T["Publish kind-1633 draft status"] - S -->|"No"| U["PR open"] - T --> U - U --> V{"Author updates?"} - V -->|"Yes"| W["Publish revision patch series: first has t root-revision and e-replies to the original root"] - W --> X["Publish kind-1619 update: E/P NIP-22 tags, c = new tip"] - X --> U - V -->|"No"| Y{"Repository author merges?"} - Y -->|"Yes"| Z["Apply the series with git am on the mirror clone"] - Z --> AA["applied = rev-list previous-head..HEAD"] - AA --> AB["Publish kind-1631 applied status: applied-as-commits plus r per commit, q plus e-reply per patch event"] - AB --> AC["PR merged"] - Y -->|"Close instead"| AD["Publish kind-1632 closed status"] - AD --> AE["PR closed"] -``` - -Key points of the write side: - -- **Compare sources** (NIP-34 / GRASP-06 native, no fork identity on the - wire): - - *Local checkout*: both branch selectors list a picked folder's - branches; all git ops run in that folder. Checkouts of the target repo - are remembered (folder pick + app clones) and matched implicitly - (origin URL or EUC against the announcement), so the panel prefills the - freshest one - no folder dialog for the common case. - - *Announced fork*: the fork's heads are fetched into the target repo's - GitCache mirror under `refs/fork///*` (private - namespace; the browser never sees them). "Merge Into" lists the - mirror's `refs/remotes/origin/*`, "Pull From" the imported fork - branches, and every git op - merge-base, range diff/commits, - format-patch, tip push - runs in the mirror, which holds both - histories. Fork candidates are announcements related to the target by - `u` tag or shared EUC, own forks first, without `clone` URLs excluded. -- **GRASP-06 hosting**: the tip is pushed under `refs/nostr/` - (nak's convention) to the *author's* grasp servers first - - `https:///prs//.git`, resolved from the - author's kind-10317 grasp list, falling back to the settings defaults - - then to the base repository's announced grasp servers. The `clone` tag - lists those `/prs/` URLs first, then the announced clone URLs (fixed - before signing; dead URLs are inert, the patches stay the source of - truth). Contributing therefore never depends on the other project's - servers accepting a push. -- **Patch series**: each commit becomes its own kind-1617 event so no event - grows past NIP-34's 60 KB guidance; the PR's `c` tag carries the *last* - commit of the series (the tip), and each part carries its own - `commit`/`r` tags. -- **Push before publish**: failure is non-fatal - the patch events remain - the source of truth - and surfaces as a `last_warning` banner. -- **1619 updates are paste-only today** (no repo path holds the new tip's - objects), so updates are not pushed; hosting them is deferred until the - update dialog gains a local-checkout source. - -## Creating a pull request - event ordering - -```mermaid -sequenceDiagram - participant User - participant P as Base mirror (GitCache) - participant F as Fork grasp server - participant A as Author grasp (GRASP-06 /prs/) - participant B as Base repo grasps - participant R as Nostr relays - - User->>P: ensure mirror (fork mode) / pick local checkout - P-->>F: fetch fork heads -> refs/fork/... (fork mode) - User->>P: merge-base, range commits, range diff - User->>P: submit: format-patch base..compare-ref - loop each patch of the series - User->>R: publish kind-1617 (first: t root, later: e reply) - end - User->>User: build and sign kind-1618 (clone = /prs/ URLs + announced) - User->>A: push tip to refs/nostr/event-id (author servers, first) - User->>B: push tip to refs/nostr/event-id (best-effort) - A-->>User: accepted or rejected (all rejected -> warning) - User->>R: publish kind-1618 PR event - opt draft - User->>R: publish kind-1633 draft status - end -``` - -## Ready to contribute (suggestions) - -Local checkouts are matched to announced repositories (remembered records -freshest-first ∪ scanned matches by origin URL or EUC). While a repository's -detail panel is open, each associated checkout is checked off the main -thread: current branch vs its base (announced HEAD, else `main`, else the -first branch), commits ahead, dirty worktrees excluded. A banner in the -repository panel then offers a prefilled New PR panel for the first branch -that is ahead with **no open PR by you** proposing it (`branch-name` tag, -falling back to the `c` tip tag) - NIP-34-native dedupe, refreshed -periodically and whenever the checkouts/announcements change. The panel -never submits anything on its own; suggestions only navigate and prefill. - -## Updating and merging - -```mermaid -sequenceDiagram - participant Author - participant Relays as Nostr relays - participant Maintainer - participant Clone as Mirror clone - - Note over Author,Relays: Update - PR author only (paste flow, no push yet) - Author->>Relays: publish revision patch series (t root-revision, e reply to original root) - Author->>Relays: publish kind-1619 update (E/P tags, c = new tip) - - Note over Maintainer,Clone: Merge - repository author only (store-only today) - Maintainer->>Clone: git am the patch series - Clone-->>Maintainer: applied commits (rev-list previous-head..HEAD) - Maintainer->>Relays: publish kind-1631 applied status - Note over Relays: applied-as-commits and r per commit, q and e-reply per applied patch event -``` - -## Reading side - -```mermaid -graph TD - A["PR root kind-1618"] --> B{"Newest status event by author or maintainer?"} - B -->|"1633"| C["Draft"] - B -->|"1631"| D["Applied / merged"] - B -->|"1632"| E["Closed"] - B -->|"1630 or none"| F["Open"] - A --> G{"Newest kind-1619 update by PR author?"} - G -->|"Yes"| H["tip = update's c tag"] - G -->|"No"| I["tip = root's c tag"] - A --> J{"Patch set present?"} - J -->|"Yes"| K["Root patch via e tag, follow reply chain (newest wins per revision)"] - J -->|"No"| L["Diff merge-base..tip from the git clone"] -``` - -Reader rules that keep the flow consistent: - -- **Status**: only status events by the root author or a repository - maintainer count; the newest wins, `Open` is the default. -- **Tip**: only kind-1619 updates by the PR author move the tip - a - stranger's update is ignored. -- **Diff**: the patch set is preferred (NIP-34 `e`-linked chain); PRs from - other clients without patch events fall back to diffing - `merge-base..tip` in the local clone. Fetching tips from `clone` URLs - (ngit `pr checkout` analog) is not implemented yet.