Commit Graph

273 Commits

Author SHA1 Message Date
Lorenz Leutgeb 766e281d39 radicle: Allow creating bare clones 2025-09-15 10:21:09 +01:00
Lorenz Leutgeb e528c40a07 radicle-cli: Test initializing from bare repos 2025-09-15 10:21:09 +01:00
Lorenz Leutgeb 354565c579 radicle: Handle `GIT_DIR` more uniformly
Pull specification of the working directory into `radicle::git::run`,
to unify how higher level wrappers pass it down.
2025-09-15 10:21:09 +01:00
Erik Kundt 153a8f9fbe node: Remove `SyncWriter` in favor of `PaintTarget` 2025-09-15 11:17:35 +02:00
Lorenz Leutgeb a0f6cbf5f1 radicle: Move interpretation of output to binary
`radicle::git::run` interprets the `Output` returned by the `git`
process. However, depending on the application we have different
requirements for interpreting the output, e.g., how to handle errors.

Make `radicle::git::run` not interpret `Output`, but move this
logic to the respective binary crates (`radicle-remote-helper` and
`radicle-cli`).
2025-09-11 16:59:12 +01:00
Lorenz Leutgeb 0a8317c35f remote-helper: Interpret verbosity option
The `verbosity` option is ignored, which makes it more difficult to
obtain debugging information if the "internal" push, i.e., the
`git push` invocation by `git-remote-rad` fails.

Provide two types for verbosity, and wire them up.
2025-09-11 16:59:12 +01:00
Matthias Beyer 646d4360e7 cli/node: Replace manual pushing with Table::extend()
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2025-09-10 21:29:47 +02:00
Matthias Beyer 2f28232676 cli/issue: Replace manual pushing with Table::extend()
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2025-09-10 21:29:36 +02:00
Matthias Beyer 8554e996b8 cli/diff: Replace manual pushing with Table::extend()
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2025-09-10 21:28:53 +02:00
Matthias Beyer fbef60eed6 cli/sync: Replace manual pushing with Table::extend()
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2025-09-10 21:27:59 +02:00
Matthias Beyer 370ae3643a cli/patch: Replace manual iterator partitioning with Itertools::partition_result()
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2025-09-10 21:23:40 +02:00
Matthias Beyer 3f489354b6 cli: Add itertools dependency
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2025-09-10 21:23:30 +02:00
Matthias Beyer 9c2f97abe1 cli/remote: Replace manual building table from iterator
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2025-09-10 21:23:30 +02:00
Matthias Beyer 4bd45cdabd cli/inbox: Replace manual building table from iterator
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2025-09-10 21:23:30 +02:00
Matthias Beyer fb458537b4 cli/patch: Replace manual building table from iterator
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2025-09-10 21:23:30 +02:00
Matthias Beyer ff021d5889 cli: Rewrite `#[path="…"]` module declarations
Rewrite module declarations that use the `#[path="…"]` annotation
to the more idomatic `pub mod …` + `pub use …` forms.

For the "self" module, that is not possible because `self` is an
identifier in Rust, and also `r#self` is not admissable as a raw
identifier, so stick to `rad_self`.

Files in submodules were patched as appropriate.
2025-09-10 21:09:29 +02:00
Lorenz Leutgeb f00d1d6743 cli/self: Stop printing information about the node
To get to a point of separating the users' identity from the node, then the `rad
self` command should not display information related to the node so prominently.

The relation between `rad` and `radicle-node` is really similar to that between
`rad` and SSH Agent. They communicate via socket. So, when this connection is
successful, it is printed, but not more.

There may be some re-learning for users here, but it is worth the improvement.

Note that the information being removed here is available via `rad node status`
(see previous commit).
2025-09-04 17:12:19 +03:00
Lorenz Leutgeb e1af550a09 cli/node: Print Node ID
If we ever want to disentangle the users' identity from the node, then
the `rad node` commands must learn to print the information related to
the node, so here we go.
2025-09-04 17:12:19 +03:00
Lorenz Leutgeb e2c476a387 radicle/test: Don't hard-code "radicle.xyz" 2025-09-04 16:44:05 +03:00
Lorenz Leutgeb 2127782b74 term: Remove dependency on `anyhow`
As a library crate, it is bad to return such generic errors.

To get there, errors from `inquire` are downcasted.

This allowed to clean up the public interface of `radicle-term`, so that
it does also not leak the `inquire::InquireError` in its public API.
2025-09-04 16:28:20 +03:00
Fintan Halpenny bbd1e2cff6 crates: 1.4.0 release
Update crate versions for the 1.4.0 release
2025-08-27 10:30:28 +01:00
Lorenz Leutgeb 119a124897 radicle: the great Canonical rewrite
This change was inspired by the a story as old as time:

    𝕃𝕖𝕥 𝕦𝕤 𝕞𝕚𝕩 𝕠𝕦𝕣 𝕓𝕦𝕤𝕚𝕟𝕖𝕤𝕤 𝕝𝕠𝕘𝕚𝕔 𝕨𝕚𝕥𝕙 𝕠𝕦𝕣 𝕀𝕆!

It was motivated by the fact that the canonical quorum logic was spread across
two modules and also two different repositories (in the API sense). The
`radicle-remote-helper` contained special logic for computing the quorum, and
also relied on the logic with `radicle` itself. It would also mix using the
Radicle storage repository and the working copy repository – resulting in issues
where objects could exist in one and not the other.

The change begins by separating away the IO away from any of the business logic
in the `git::canonical` module. To follow along, there are two important submodules:

1. `voting` captures the different type of voting processes for commits and tags
  a. Tags are simple, where one `Oid` means one vote
  b. Commits are slightly more complicated. They begin with one `Oid` means one
     vote, but then it is expected that merge bases are calculated for pairs of
     commits. These merge bases are used to increase a vote for an `Oid` if it
     is the merge base of another commit.
2. `quorum` builds on top of `voting` and uses the voting processes as well as
    the `threshold` to find the quorum for the tag or commit reference.
  a. For tags, the first past the threshold wins, but if multiple pass then it
     is an error.
  b. For commits, the merge base process should be used to increase the votes,
     until the caller is ready to find the quorum. At this point, the commits
     that pass the `threshold` are then compared to find the commit that is the
     child-most commit of all other candidates. If they diverge, then an error
     is returned.

There is also a `convergence` module that captures the logic that is required
for the `radicle-remote-helper`. It essentially checks if a candidate object
matches the expected objects, tags or commits, and performs the necessary
convergence logic – checking that the candidate commit is converging with
at least of the other `Did`s.

These two quorum processes, and the convergence process, essentially act as
state machines and can be driven by the use of a Git repository for finding the
merge bases. This is where the `effects` module comes in. The `effects` capture
the necessary traits that are required to drive the state machines of the quorum
processes. It is expected that a Git repository implements these, and in fact, a
`git2::Repository` implementation is provided. The traits are useful, since it
means that a `git2::Repository` can be swapped out and the logic would stay the
same.

This all culminates into the new and improved `Canonical` and
`CanonicalWithConvergence`. Both of which have methods `find_quorum` for
performing the quorum process using a *single* provided repository.

This resulted in the semantic change of requiring that the
`radicle-remote-helper` pushes the candidate commit, irregardless of whether it
will be a fast-forward. For now, this is something that will be accepted while
the UX can be improved in the future by providing detailed warnings of the
divergence and ways to fix it. The benefit is that the tooling will never stop
someone from diverging if that is in fact what they want to do.
2025-08-25 18:57:50 +02:00
Lorenz Leutgeb 192cc993a8 radicle: Fix panic when reading from SQLite database fails
I was greeted by `rad patch redact` with

    called `Result::unwrap()` on an `Err` value:

      Error { code: None, message: Some("failed to convert") }

    stack backtrace:

    […]
       3: core::result::Result<T,E>::unwrap
             at …/rust-1.88.0/lib/rustlib/src/rust/library/core/src/result.rs:1137:23
       4: sqlite::cursor::Row::read
             at …/index.crates.io-1949cf8c6b5b557f/sqlite-0.32.0/src/cursor.rs:136:9
       5: radicle::cob::patch::cache::query::find_by_revision
             at ./crates/radicle/src/cob/patch/cache.rs:624:65
       6: <… as radicle::cob::patch::cache::Patches>::find_by_revision
             at ./crates/radicle/src/cob/patch/cache.rs:553:9
       7: radicle_cli::commands::rad_patch::redact::run
             at ./crates/radicle-cli/src/commands/patch/redact.rs:23:9
       8: radicle_cli::commands::rad_patch::run
             at ./crates/radicle-cli/src/commands/patch.rs:1026:13
    […]

It turns out that `sqlite::cursor::Row::read` is the panicky version of
`sqlite::cursor::Row::try_read` (which returns a `Result`).

While it is somewhat rare that SQLite reads fail, it is not unheard of.
In `radicle-cli` it might not be critical, but also `radicle-protocol`
and `radicle-fetch` are affected, and they could potentially panic a
`radicle-node` process.

Use `try_read` instead, and propagate down the error handling.
2025-08-25 17:05:21 +01:00
Lorenz Leutgeb 5229fb8a59 fix: Normalize filesystem paths with `dunce`
Microsoft Windows has Universal Naming Convention (UNC) paths, see
<https://learn.microsoft.com/en-us/dotnet/standard/io/file-path-formats#unc-paths>

The Rust standard library normalizes paths to this form when calling
`std::fs::canonicalize`, see
<https://doc.rust-lang.org/std/fs/fn.canonicalize.html>

However, some programs, do not parse these paths correctly, including
our ally `git`:

    $ git clone \\?\C:\Users\lorenz\tmp
    Cloning into 'tmp'...
    ssh: Could not resolve hostname \\\\?\\c: No such host is known.
    fatal: Could not read from remote repository.

    Please make sure you have the correct access rights
    and the repository exists.

The `dunce` crate solves the problem of having to deal with
normalization and avoiding weird UNC paths for us. Note that on
non-Windows platforms, it *behaves exactly like*
`std::fs::canonicalize`!
2025-08-22 15:11:43 +01:00
Lorenz Leutgeb 31039bbceb radicle-fetch: More fine-grained errors
The `fn io_other` disguises all sorts of errors as I/O errors, making
errors in the transport component of `radicle-fetch` harder to
understand.

Instead, expose a new error type that allows to discriminate.
2025-08-22 14:56:03 +02:00
Sebastian Martinez 1d7478cd90 radicle: introduce `cob::common::Title`
This patch adds the `cob::common::Title` struct, this allows instead of
using `std::str::String` or generics and traits for it, to define more
precisely what a title should be.
It trims the provided string and makes sure it contains no carriage
return or new line characters.

Where a `std::str::String` makes more sense so it's easier to mutate it,
we keep the code as is.

Co-authored-by: Fintan Halpenny <fintan.halpenny@gmail.com>
2025-08-19 17:05:33 +02:00
Fintan Halpenny 2a0f6fd3c5 cli: extend `rad cob log` behaviour
Use the COB stream behaviour for implementing `rad cob log` and introducing the
from and until options.
2025-08-19 15:01:26 +01:00
Matthias Beyer 8953ec4c87 cli/inbox: Clearify "clear" behaviour
This patch clearifies (in the help message of the command) how the
"clear" subcommand behaves when passing ids.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2025-08-19 12:46:07 +01:00
Lorenz Leutgeb 9a7c22536b radicle/config/node: Use newtypes 2025-08-19 13:16:19 +02:00
Matthias Beyer 9486e751f2 Simplify impl of Display for some types
Micro-optimization, I know. ;-D

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2025-08-19 10:57:37 +01:00
Matthias Beyer 787cb3a872 Collapse nested if
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2025-08-19 10:57:37 +01:00
Matthias Beyer b0af48aa03 To not allocate in good case
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2025-08-19 10:57:37 +01:00
Lorenz Leutgeb 0200e84aea bootstrap: Add IPv6, IPv4, Onion addresses
This should allow bootstrapping when DNS is not available or a
connection via Tor is desired.
2025-08-18 17:39:20 +02:00
Matthias Beyer 6a1b13bb66 cli: Use human-panic
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2025-08-17 20:53:53 +02:00
Matthias Beyer f6f3be437b cli/issue: Optimize how the issues are collected
This patch optimizes how the issues are collected.
Before, the issues where pushed to a new instance of `Vec`, which was
not preallocated to the size of the iterator.
This could be slow when a large number of issues is returned by the
iterator.

With the `Iterator::collect` function, the `FromIterator` implementation
of `Vec` is used, which makes use of `Iterator::size_hint` for
optimizing how much space is preallocated when collecting into the
`Vec`.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2025-08-17 20:22:56 +02:00
Matthias Beyer 1e66c57643 refactor: Replace return Err(anyhow!()) with anyhow::bail!()
This is equivalent to before, but reduces cognitive load when browsing
the source.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2025-08-17 20:17:11 +02:00
Fintan Halpenny 01bed73a60 cli: fix error formatting
Missed using `format!` to actually emit the error when the sync fails.
2025-08-15 11:40:25 +01:00
Lorenz Leutgeb ed5b2659c8 cli: Gracefully handle failure to link log file
Not linking `node.log` is not ideal, but also not a critical failure.
It's better to swallow that instead of crashing.
2025-08-15 10:13:51 +01:00
Lorenz Leutgeb de78cf7874 cli: Add verbose printing of authors
To allow users to see the full DID of authors of issues, introduce a
boolean to the `Author` struct and wire it through.

While doing that, also remove `--debug` options from `rad issue` and
`rad patch` as they have been obsolete since the introduction of `rad
cob [log|show]` for quite some time.

See:
 - https://radicle.zulipchat.com/#narrow/channel/369873-support/topic/help.20with.20seeing.20full.20nid/with/531390047
2025-08-14 16:15:19 +01:00
Lorenz Leutgeb c8b6a13d64 cli/sync/status: Refactor output table
A new table style that is more narrow, and follows the recent change
to `rad node status`.
2025-08-13 13:45:22 +01:00
Lorenz Leutgeb c089727e90 term, cli, remote-helper: Status Symbols
Symbols signaling status of a process and similar are duplicated in
three different crates. Also two different symbols to signal success are
used:

  1. ✓ (      Check Mark, U+2713)
  2. ✔ (Heavy Check Mark, U+2714)

Work against that by referring to `radicle-term` from the other crates.
2025-08-13 13:45:21 +01:00
Fintan Halpenny 8a6e55502c radicle: Announcer can exit on preferred seeds or replication factor
The `Announcer` logic was subtly different to the fetching logic, where the
preferred seeds need to be announced to *and* the replication factor had to be
reached.

This patch relaxes that constraint, and allows it to hit either targets before
exiting.

This also surfaced an issue with the with the `Progress` calculation, where
calculating the `unsynced` used the `synced` value to subtract. However, this
was not required because `to_sync` is mutated, so the value is simply
`to_sync.len()`. A test case was added to ensure this is correct by checking
that invariant that the total between synced and unsynced nodes always matches
the total of synced and unsynced progress.
2025-08-13 11:09:49 +02:00
Fintan Halpenny 0e48723b41 release: prepare crates
The `radicle` crate required a bump `0.16.1 -> 0.17`.

Due to this, all its dependents are also bumped
- `radicle-cli`: `0.14.0` -> `0.15.0`
- `radicle-fetch`: `0.12.0` -> `0.13.0`
- `radicle-node`: `0.12.0` -> `0.13.0`
- `radicle-remote-helper`: `0.11.0` -> `0.12.0`
- `radicle-schemars`: `0.1.0` -> `0.2.0`

The following also required upgrading:
- `radicle-ssh`: `0.9.0` -> `0.10.0`
- `radicle-systemd`: `0.9.0` -> `0.10.0`
- `radicle-term`: `0.13.0` -> `0.14.0`
2025-08-12 12:13:49 +02:00
Lorenz Leutgeb d7b48b9e29 radicle: Move logging setup calls to binaries 2025-08-07 08:30:59 +01:00
Lorenz Leutgeb 5d467418be term: Revert using inquire to spawn editor
This is morally a revert of 70fb0d3fef
while additionally getting to compile
`crates/radicle-term/src/editor.rs` on Windows.

To get the changes that were made on top of the revert, check

  git diff 70fb0d3fef~1 <this commit> -- crates/radicle-term/src/editor.rs

There were reports of the inquire editor being unrealiable.
2025-08-05 15:09:43 +02:00
Lorenz Leutgeb 4934473b86 cli/node: Improve log rotation
Only the latest log was kept as `node.log.old`. Now, log files are
numbered (`node.log.1`, `node.log.2` and so on). Also `node.log` is now
a hard link to the current log file. `rad node stop` will delete
`node.log` (note that `node.log.x` stays intact) and `rad node start`
will delete `node.log` before it creates `node.log.y` in case the node
crashed.

Also, when running in foreground mode, now a log file is created. It
just contains the hint that the node was started in foreground mode,
just to avoid confusion.

The implementation is split into a sans I/O part as `struct LogRotator`,
while the I/O counterpart is captured by `struct LogRotatorFileSystem`.
2025-08-04 17:13:11 +02:00
Lorenz Leutgeb 3d352f23e6 canonical: Support Annotated Tags
The logic for computing canonical references conflated the semantics of
annotated and lighweight tags, yielding confusing/wrong results. The
main culprit was the call to `peel_to_commit` in
`impl ReadRepository for Repository`, peeling tag objects away.

To resolve this, we separate out quroum computation per object type: one
implementation for commits, and one for tags.

Also move  move canonical error types and methods into their own
module to have a cleaner file structure for the main logic.

Capture the `BTreeMap<Oid, u8>` type into a `Votes` struct, with its own API.

We were getting the objects from the repository twice – once in `Canonical::new`
and once again in `ensure_commit_or_tag` – so the latter was removed.

Use an `enum CanonicalObject` to specify which object types the canonical
process supports.

During `converges`, separate commits and tags, and ensure that we are only
looking at objects of one type. Note, that Fintan think this is actually the
*wrong* place to do it because we already filter the objects – so we should
keep track of that information higher up the callstack.

Co-authored-by: Fintan Halpenny <fintan.halpenny@gmail.com>
2025-08-04 17:00:54 +02:00
Fintan Halpenny 0aaa81f82a cli: mention binary names as part of unknown
When we fail to get the info for the binary names of `radicle-node` and
`git-remote-rad`, we still mention the binary name which is usually a part of
their output.
2025-07-28 11:38:24 +01:00
Lorenz Leutgeb 9068033789 chore: Automated fixes generated by clippy 2025-07-25 11:25:05 +02:00
Fintan Halpenny 2a47bc0c7d term: provide default HELP message
Provide a default message that informs the user of the `(e)`, `(enter)`, and
`(esc)` functionality.

Unfortunately, it is not possible to provide any message that is better
customised to each case, due to `inquire` requiring a `'a` lifetime on all its
inputs – this rules out providing any kind of `String` input.

The first paramter of `Editor::new` can already be used to provide more
contextual information. The second parameter is left configurable, but for now
`Editor::HELP` is used everywhere.
2025-07-23 10:31:15 +02:00
Lorenz Leutgeb 009436efac ssh: Use winpipe for SSH agent on Windows
The trait `radicle_ssh::agent::client::ClientStream` trait was
simplified, because `winpipe::WinStream` is so similar to
`std::os::unix::net::UnixStream` that we can just use the same
implementation for both platforms.

However, obtaining the process identifier of the SSH agent process is
not common on Windows, so we instead track the path that we used to
connect to the agent. This is also helpful on Unix. In some cases, the
path will even contain the process identifier. The path is printed by
`rad self`.

Errors are cleaned up, and error messages are improved.
2025-07-23 10:31:15 +02:00
Lorenz Leutgeb 70fb0d3fef term: Use inquire for spawning the editor
`radicle-term` includes quite a lot of rather "low-level" logic to spawn
the preferred editor of the user. In particular, this logic is
platform-dependent and only works on Unix-like platforms.

Also, `radicle-term` already depends on `inquire` which features an
editor prompt. It is a cross-platform solution to spawn the editor.
This commit changes the implementation of `Editor` to be a wrapper of
`inquire::Editor`, keeping the interface mostly intact.

Downsides:
 - We cannot edit a file "in place" this way, instead we have to read
   it, as `inquire` only supports editing temporary files. This can also
   be viewed as a benefit, as we lessen the risk of corruption of these
   files.
 - `inquire::Editor` contains borrows, so it is quite cumbersome to
   extend it with a custom mechanism for looking up the preferred
   editor. The lookup logic was kept, but needs to be invoked by the
   caller. In the future we might consider just using the logic provided
   by `inquire` or requesting a change to `inquire`.
 - The prompt is a bit strange. It does not show the current state of
   the output, see <https://github.com/mikaelmello/inquire/issues/280>
   and <https://github.com/mikaelmello/inquire/pull/271>.
2025-07-23 10:30:33 +02:00
Sekhat Temporus 37ea81766e cli: improve default branch pick
When using `rad init` the default branch for the project can be predetermined by
inspecting the working copy repository.

To improve the experience, it will first check `init.defaultBranch` in the Git
configuration file.

If it does not find this, it falls back to choosing the default head of the
repository at the time. This may be HEAD, and in this case it will error and
provide helpful information.

The repository may also not have any default head at the time, and this also
results in an error and hint.
2025-07-23 07:43:27 +01:00
Tobias Hunger 7c4b71ab82 radicle: Keep pinned repos ordered in config
Do not return them in a random order in radicle-httpd,
so that we can have them in a defined order in
radicle-explorer.
2025-07-19 12:59:02 +01:00
Fintan Halpenny 1fa30e2e88 cli: test missing commits for canonical quorum
Test the scenario where 2 delegates are collaborating, where one delegate is
missing the other's commit while pushing to the default branch.
2025-07-19 12:32:45 +01:00
Fintan Halpenny afe64d5175 remote-helper: improve canonical handling
This set of changes refactors the canonical handling by isolating the business
logic into another type, `Canonical`.

The functionality remains the same, but certain error scenarios are better
handled. Primarily, the commits of the inner `Canonical` type are checked to see
if they exist in the working copy, and if not, provide a more useful message
about which commit was missing or invalid for which DID.
2025-07-19 12:32:31 +01:00
Lorenz Leutgeb 0e3f3f03d2 cli: Improve formatting of Node IDs and addresses
Pay more attention to when a Node ID is displayed in compact form. As
this was sometimes used to save space, e.g. in `rad node status` in
combination with long node addresses (like .onion names), also implement
a compact format for node addresses and use that instead in some cases.
Progress notifications in spinners keep the short form.
2025-07-18 21:44:06 +01:00
Lorenz Leutgeb 1c20f64a26 node, protocol: Refactor
Mostly changes of `use`s and moving components to `radicle-protocol`,
with the goal of just getting `radicle-node` to work on top of the new
`radicle-protocol` crate.
2025-07-16 21:15:52 +02:00
Fintan Halpenny 8201225166 cli: test canonical tags
Add a test to exercise adding canonical reference rules and pushing new
canonical tags.

A change in `rad id` was required to allow adding a new payload to the document,
i.e. one that does not already exist.

Adding rules is also documented in the man page for `rad id`.
2025-07-16 16:54:43 +02:00
Fintan Halpenny a69397386a cli: extract document update logic
The business logic of modifying the identity document should not live in the CLI
code for updating said document.

Instead, we extract out that logic into separate update functions and these are
using from the CLI instead.
2025-07-16 16:41:16 +02:00
Fintan Halpenny 7f646666bc radicle: canonical references payload 2025-07-16 16:41:16 +02:00
Fintan Halpenny b77809ae9d chore: prepare crates release
Prepare the crates for releasing to crates.io:
- radicle-remote-helper: 0.10 -> 0.11
- radicle-term: 0.12 -> 0.13
- radicle-cli: 0.13 -> 0.14
- radicle-node: 0.11 -> 0.12
- radicle-fetch: 0.11 -> 0.12
- radicle: 0.15 -> 0.16

It was also necessary to specify the `version` in the workspace Cargo.toml file,
since this is required for publishing to crates.io.
2025-07-14 15:38:09 +01:00
Lorenz Leutgeb 5a840983a8 node, cli: Refactor test environment 2025-07-09 11:47:50 +01:00
Johannes Kühlewindt 895ca5d025 cli: rad node connect using only NodeId
Allow the `rad node connect` command to use only a `NodeId` when connecting.

The `NodeId` is used to connect to known addresses, and will stop at the first
address that is connected to.
2025-07-03 12:13:49 +01:00
Fintan Halpenny 76e00a34ea cli: change link direction symbols
The symbols used for [inbound] and [outbound] are part of the [Supplementary
Multilingual Plane](smp) (or Plane 1). This set of symbols are not as well
supported by font sets, as discovered by many reports of the characters missing.

There are two other arrow characters: [south east] and [north east] that serve
the same style and are part of the [Basic Multilingual Plane](bmp) (or Plane 0).
This set of characters is more widely supported.

[inbound]: https://www.compart.com/en/unicode/U+1F866
[outbound]: https://www.compart.com/en/unicode/U+1F865
[smp]: https://en.wikipedia.org/wiki/Plane_(Unicode)#Supplementary_Multilingual_Plane
[bmp]: https://en.wikipedia.org/wiki/Plane_(Unicode)#Basic_Multilingual_Plane
[north east]: https://www.compart.com/en/unicode/U+2197
[south east]: https://www.compart.com/en/unicode/U+2198
2025-07-02 11:10:09 +01:00
Lorenz Leutgeb ec47566cb0 radicle-term: Remove custom pager
I learned that there is an implementation of a pager in
`crates/radicle-term/src/pager.rs`. It does not make sense to me to
maintain a pager in `heartwood`, this is too far from the core of what
we are trying to achieve and adds unnecessary maintenance burden. We can
allow ourselves to defer to the paging done by `git` or just call the
user's `$PAGER`. Even though falling back to unpaged output might not be
the nicest thing, I still prefer that over maintaining the pager.

It also was frustrating to me that the pager does not support things
like search (like `less` does).

This also significantly decreases our dependence on `termion`.

The pager was originally implemented by cloudhead in

  40f4383bbc

and integrated into `rad diff` in

  6dd52c94fb

This commit restores the behaviour introduced in

  84a95848b0

(before there was a custom pager implementation).
2025-06-27 15:35:19 +02:00
Fintan Halpenny 6f34124d43 radicle: improve config errors
Improve the granularity of config errors mentioning the path location where the
configuration is expected to be loading from or saving to.
2025-06-24 13:51:55 +02:00
Lorenz Leutgeb 78ba263d0a radicle-cli/issue: Improve comment templating
Writing a comment, only the most recent comment replied to is shown.
Editing a comment, current contents are not prepared. Manual copy required.

To improve:
 - Chase all replies to the root and quote them. Gracefully handle if
   this proces fails, i.e. a comment in the chain cannot be resolved.
 - If editing, copy the current contents.
2025-06-19 13:12:46 +02:00
Lorenz Leutgeb af35e6f4d0 radicle-cli: Warn when using old names of nodes 2025-06-18 16:21:21 +02:00
Lorenz Leutgeb 727e4e72c7 radicle-cli/debug: Use `BTreeMap` for consistent ordering
A `HashMap` does not guarantee a consistent iteration order. It is
desirable that all environment variables are printed in a consistent
order.

Use a `BTreeMap` which guarantees a consistent iteration order.
2025-06-18 15:55:54 +02:00
Lorenz Leutgeb a354686bbc chore: Remove `seed.radicle.xyz`
The team node is not really special, remove occurrences.
2025-06-18 14:45:54 +02:00
Jakob Kirsch e30e66e009
radicle: add .external_template(false) to all other libgit2 calls
This complements 9d4aa59a12.
2025-06-14 00:28:06 +02:00
Lorenz Leutgeb 5bc2dc677b repo: Move workspace crates into `crates` subdirectory
This keeps the top level of the repo cleaner, e.g.
<https://github.com/radicle-dev/heartwood> scrolls less and
<https://app.radicle.xyz/nodes/rosa.radicle.xyz/rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5/>
might show more files at the top level.

This way we also don't have to explicitly name all crates in
`Cargo.toml`.
2025-06-09 15:09:21 +02:00