Commit Graph

1170 Commits

Author SHA1 Message Date
Alexis Sellier 45e87a63b9
cob: Changes to patch code review CRDT
This patch incorporates several important changes to code review:

* Code review verdict is no longer editable
  * Made reviews redactable instead
* Renamed review top-level comment to "summary"
* Renamed inline comments to "comments"
* Made inline comments addressable by `EntryId`
  * This is to allow for editing
* Removed inline comments from review creation
  * Added a `CodeComment` action instead
* Removed `Semilattice` instance from `Review`
  * Added a `EditReview` action instead to have more control
* Made it valid for revisions to be redacted concurrently with a review/merge

Most of these changes are needed to support proper inline code comments.
2023-07-03 12:31:05 +02:00
Alexis Sellier e4ab523669
cob: Move comment reactions to comment
To simplify the code, we move comment reactions to the comment struct
itself.
2023-07-03 12:31:05 +02:00
Alexis Sellier 8b010c27a2
cob: Improvements to COB logic
There were a few subtle issues with the apply logic of certain COBs
that should be fixed now.

Note that the underlying store guarantees exactly-once delivery, and so
it does not make sense to test idempotence at the patch level.
2023-07-03 12:31:05 +02:00
Alexis Sellier 0f3212a1b2
cli: `rad self` improvements
* Add `--home` flag
* Organize the information better

Now looks like this:

    DID             did🔑z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi
    └╴Node ID (NID) z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi
    SSH             running (823)
    ├╴Key (hash)    SHA256:UIedaL6Cxm6OUErh9GQUzzglSk7VpQlVTI1TAFB/HWA
    └╴Key (full)    ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHahWSBEpuT1ESZbynOmBNkLBSnR32Ar4woZqSV2YNH1
    Home            [..]
    ├╴Storage       [..]/storage
    ├╴Keys          [..]/keys
    └╴Node          [..]/node
2023-06-30 14:41:00 +02:00
Alexis Sellier 613e3e5269
cli: Show logs after `rad node start`
When the node is started, we show the first few log lines.
2023-06-29 18:45:16 +02:00
Alexis Sellier 2e6c9827a9
cli: Show logs in `rad node status` 2023-06-29 18:01:49 +02:00
Alexis Sellier e32e28f8b4
cli: Implement `rad node stop` 2023-06-29 17:58:07 +02:00
Alexis Sellier 0d0d354d55
cli: Ask for passphrase upfront in `node start` 2023-06-29 15:02:08 +02:00
Alexis Sellier ba9c5997b7
cli: Add `rad node logs` sub-command
Prints the last `n` lines and follows the log.
2023-06-29 14:58:11 +02:00
Alexis Sellier e33661738c
Move unit files to `systemd` directory 2023-06-22 12:13:30 +02:00
Alexis Sellier 33870572d4
Improve unit files, add binary install to README
After going through the process of getting this working using the unit
files, I found a few issues that are fixed here.
2023-06-22 12:13:30 +02:00
Alexis Sellier 63ff4717dc
cli: Implement hunk-based code review
Review code with an interface similar to `git add -p`.
2023-06-22 11:15:42 +02:00
Alexis Sellier 22360f8c25
radicle: Change review data in patch COB
* `CodeLocation` had a `blob` and `commit` field. These are redundant,
  since the review lives under a revision.
  We also change the line range to be diff-compatible, with an old and
  new range. The ranges are optional to account for different scenarios
  like file deletion, move etc.
* `CodeComment` had redundant getters which were removed in favor of
  public fields. We also remove the `timestamp` field, as it will be
  the same as the review timestamp.
2023-06-22 11:15:42 +02:00
Alexis Sellier d4e073fe4e
cli-test: Add easy file creation syntax
Eg. the following will create `FILE.txt`:

``` ./FILE.txt
Some content...
```
2023-06-22 11:15:42 +02:00
Alexis Sellier e700608095
Update `radicle-surf` 2023-06-22 11:15:42 +02:00
Alexis Sellier e325fa8621
cli: Turn `patch update` into a plumbing command
Remove most of the user-friendly functionality and simplify this command
so that it is only used for scripting.

`git push rad` is now the proper way of updating patches.
2023-06-21 17:02:00 +02:00
Alexis Sellier b25c2e452b
cli: Setup tracking branch on `rad patch checkout`
Just like when opening a new patch, we setup a tracking branch on patch
checkout, so that patches can be updated via a push.
2023-06-21 17:01:56 +02:00
Alexis Sellier 1e948485be
cli: Make some UX improvements to `rad auth`
Better errors, messaging etc.
2023-06-20 16:05:35 +02:00
Alexis Sellier 074b0e55c1
cli: Add user alias to `rad auth`
We were outputting `(me)` previously.
2023-06-20 15:45:14 +02:00
Adam Szkoda 8c701dc908
ci: Move shell scripts into standalone files 2023-06-20 13:16:57 +02:00
Alexis Sellier 9418a20cae
term: Ensure `Editor` gets a TTY
Some text editors don't work correctly if `stdin` is not a TTY device.
2023-06-20 12:18:23 +02:00
Alexis Sellier bb099faa4f
node: Give useful thread names
For the purposes of debugging running nodes, it's useful to know which
threads are doing what. This allows tools like `htop` to reveal which
threads are running.
2023-06-20 11:18:14 +02:00
Alexis Sellier 765823c686
node: Add timeouts to daemon connection 2023-06-16 09:42:34 +02:00
Alexis Sellier cb576cf8c3
cli: Allow setting a different patch base on push
Using `-o patch.base=<oid>`, users can specify a different patch base,
when creating or updating a patch.
2023-06-15 10:25:32 +02:00
Alexis Sellier a6782ac2d6
cli: Add `-v` flag to `rad patch show`
With this flag, additional data such as the patch base is shown.
2023-06-13 13:17:07 +02:00
Alexis Sellier 48f44f4af5
cli: Fix ahead/behind and diff behavior
In certain cases, eg. after a rebase, or when patches are stacked, the
"ahead/behind" and/or the diff stats can be wrong.

This fixes it.
2023-06-13 13:16:00 +02:00
Alexis Sellier ec064891cd
cli: Setup tracking branch on `rad remote add` 2023-06-13 11:09:42 +02:00
Alexis Sellier e9ef0f4aa4
cli: Consolidate working copy remote setup
We consolidate the setup done by `rad checkout`, `rad clone` and `rad
remote add`, so that they all check for node aliases, and are all
capable of setting up tracking branches etc.
2023-06-13 11:09:42 +02:00
Alexis Sellier 5502676aa7
Fixes and improvements to alias handling
* Return the correct alias from a node announcement, stripping '\0'
  bytes.
* Accept `AliasStore` types as references and as owned.
* Store a `null` in the database if the alias received is empty.
2023-06-13 11:09:42 +02:00
Alexis Sellier 50a97d9add
cli: Add `--scope` flag to `rad init`
Defaults to `all`.
2023-06-13 11:09:42 +02:00
Alexis Sellier 06566dac6f
cli: Add `--scope` flag for `rad clone`
This allows for a scope to be specified when cloning.

We also change the default scope when cloning to 'all' to more closely
match user expectations.
2023-06-13 11:09:42 +02:00
Erik Kundt df5cf4023b tui: Add detail widget to issue page 2023-06-08 22:08:05 +02:00
Erik Kundt 3b88e13e91 tui: Implement larger list on issue page 2023-06-08 22:05:35 +02:00
Erik Kundt c2b6fefb8e tui: Select correct list item on issue page 2023-06-08 21:55:00 +02:00
Erik Kundt dd16ed780e tui: Implement larger list on issue page 2023-06-08 21:54:57 +02:00
Erik Kundt 8e7d53aa9a tui: Fire proper list selection messages 2023-06-08 21:51:09 +02:00
Erik Kundt a3077d5b15 tui: Improve cob retrieval 2023-06-08 21:47:26 +02:00
Erik Kundt 0d652d78e9 tui: Make patch and issue items sortable 2023-06-08 20:42:30 +02:00
Erik Kundt 78344f8a9f tui: Use application context in widgets 2023-06-08 20:42:30 +02:00
Erik Kundt 0eb37431ff tui: Move application context to separate module 2023-06-08 20:42:30 +02:00
Alexis Sellier 64708954ca
cli: Remove redundant newline in patch message
There was an extra newline in the patch creation message due to not
accounting for commit messages with newlines at the end.

This is fixed and the tests are updated to be more realistic.
2023-06-08 16:47:30 +02:00
Alexis Sellier a3f8305eb4
node: Reduce test flakiness
Most of the test flakiness was caused by the git-daemon not being able
to bind to a port. It seems like using an RNG was not a good enough
solution.

After this change, tests seem to be passing without issue.
2023-06-08 16:44:04 +02:00
Alexis Sellier 0319bbb903
remote-helper: Don't allow opening an empty patch
If the commit range is empty, return an error.
2023-06-08 16:42:14 +02:00
Vincenzo Palazzo 431a389944
radicle: Use "bundled" sqlite dependency
Our build was faking the inclusion of SQLite and dynamically
linking it in the 'radicle' crate and other components.

This patch solves the following error and requires reinstallation
of the `radicle-cli`, `radicle-node`, and, if used, the `radicle-httpd`

```
✗ Sync failed: internal error: malformed database schema (node-policies) - near "strict": syntax error (code 11): malformed database schema (node-policies) - near "strict": syntax error (code 11)
```

Tested-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2023-06-08 15:08:22 +02:00
Alexis Sellier 3d803b2498
cli: Remove `rad patch open`
Remove this command in favor of the `git push` flow.

We also remove the `rad/patches` remote configuration which wasn't
working properly with `git fetch --all`.
2023-06-07 15:57:11 +02:00
Alexis Sellier 547fdcc03b
remote-helper: Create patch drafts via `git push`
This is now possible via the `-o patch.draft` push option.
2023-06-07 15:02:05 +02:00
Slack Coder 6bbdc574f0
cli: Use clearer format for string literals
Update the string literals in `rad patch` to use an easier to read
format.
2023-06-07 12:11:36 +02:00
Slack Coder 92648f934e
cli: Patch message from all commits
Help the user when creating a patch by listing the messages of all
commits associated with the patch in almost the same format as git uses
for squashing.
2023-06-07 12:11:33 +02:00
Vincenzo Palazzo 520fb61230
cli: Fix another issue with unspecified editor
This commit includes a fix for another occurrence of
the missing `EDITOR` variable. This time, it was
inside the `rad edit` command.

The fix is trivial, as it simply returns the error to the caller.

Co-Developed-by: Slack Coder <slackcoder@server.ky>
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2023-06-07 11:58:15 +02:00
Michail Zampetakis 75139a6f02
cli: Fix help of the fork command 2023-06-07 11:52:46 +02:00