Commit Graph

68 Commits

Author SHA1 Message Date
Alexis Sellier 3bd5589b1a
cob: Stabilize formats
> I'm going to be making a set of breaking changes to COBs in order to
stabilize the data formats. This is hopefully a one-time change that
bundles various breaking changes.

All COBs have been reworked: issue, patch, id.

The changes included are:

* Revise the assign and tag actions to take a single list of
  assignees/tags to set, instead of an "add" and a "remove" list. This
  makes API usage simpler when editing issues, and simplifies the apply
  function
* Rename "tags" to "labels", and the tag action to label. This is
  because tag is confusing in the context of git, as it could mean a git
  tag. Using label removes that confusion.
* Use DIDs instead of PublicKeys for assignees -- this is more
  future-proof
* Modify the manifest file format in the COB tree. Mainly, remove the
  `history_type` key which is redundant, and use camelCase for keys
* Flatten the `Thread` actions into the parent action type
* Ensure that operations on redacted objects do not fail, since
  redactions could have happened concurrently
* Use a consistent naming scheme for actions, using `.` as separator
* Consolidate comment types and remove `CodeComment`, by adding an
  optional `location` field to `Comment`
* Add many placeholder actions that are not yet implemented

To preserve backwards compatibility, a `legacy` module is created with
the old `apply` function. When loading the manifest, we check whether it
is a legacy COB or a "stable" COB, and in the legacy case, use the
legacy code to materialize the state and then convert the object into
the stable type. Eventually, we'll delete the legacy code.
2023-08-07 11:05:14 +02:00
Alexis Sellier f639192dc6
cob: Remove CRDTs from COB state
It turns out that the CRDT formed by the union of Git DAGs
is enough to guarantee everything we need for COBs.

This changes the following things:
* COB operations no longer need to be commutative
* COB histories are traversed in the same deterministic order on all
  replicas
* It's now possible to implement RSMs on top of COBs, eg. scripting
* Lamport clocks have been removed
* `radicle-crdt` is no longer a dependency of `radicle`
* COBs are no longer instances of `Semilattice`
* The `Ops` type was removed in favor of having `Op` contain multiple
  actions
2023-07-25 15:29:27 +02:00
Vincenzo Palazzo b1f174817c
tui: Fix code format issue
During the testing of my CI proposal code, I discovered that our current
master branch is not building correctly.

Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2023-07-25 12:55:05 +02:00
xphoniex 4869fe26e2
Add `-h` flag to binaries
Signed-off-by: xphoniex <dj.2dixx@gmail.com>
2023-07-25 11:58:39 +02:00
Erik Kundt f24590afe2
tui: Implement container focus on issue page 2023-07-22 22:36:24 +02:00
Erik Kundt 3a7cef8cea
tui: Support container focus 2023-07-22 22:36:24 +02:00
Erik Kundt dcfd481424
tui: Sort issues by time and state 2023-07-22 22:34:51 +02:00
Erik Kundt 2d84791402
tui: Add app header to issue page 2023-07-22 22:32:38 +02:00
Erik Kundt 21950e1cae
tui: Improve application header 2023-07-22 22:32:38 +02:00
Erik Kundt 8811fa97d4
tui: Fix cargo doc 2023-07-22 22:30:34 +02:00
Alexis Sellier 45ccbde226
Update `radicle-surf` and `git-ref-format` 2023-07-14 16:57:55 +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 e700608095
Update `radicle-surf` 2023-06-22 11:15: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 4652f309b4
Update to Rust 1.70 2023-06-02 14:40:44 +02:00
Erik Kundt 474d21741e
tui: Fix global navigation subscriptions 2023-06-01 13:55:49 +02:00
Erik Kundt 21533f37eb tui: Add issue page with placeholder 2023-05-30 22:02:44 +02:00
Erik Kundt 56a61b61c9 tui: List issues 2023-05-30 21:30:19 +02:00
Erik Kundt 0361ca3818 tui: Use table model in patch browser 2023-05-30 15:03:12 +02:00
Erik Kundt 0a673bc552 tui: Remove page state for patches 2023-05-30 15:03:12 +02:00
Erik Kundt d01028502e tui: Use table model for labeled container 2023-05-30 15:03:12 +02:00
Erik Kundt de6bb8fdb0 tui: Implement table item patches 2023-05-30 15:03:09 +02:00
Erik Kundt 5d7bf9f663 tui: Introduce table item and table model 2023-05-30 14:39:52 +02:00
Erik Kundt a4be8f4fa9
tui: Consolidate widgets and components 2023-05-29 22:07:10 +02:00
Alexis Sellier e6baeab0c9
cob: Guarantee there is always a latest revision
We change `Patch::latest` to always return something, because a patch is
malformed if it doesn't have at least one revision, and thus would not
load in the first place.

This also implies that there is a latest revision in the face of
concurrent updates.

Note that currently, traversal order for concurrent updates is still random.
This will be fixed in another patch.
2023-05-26 10:31:00 +02:00
Erik Kundt 376adde1f9
tui: Redraw on resize 2023-05-23 12:33:31 +02:00
Erik Kundt 4142d85178
tui: Implement page stack and page state 2023-05-12 14:35:03 +02:00
Erik Kundt a5d85a0d24
tui: Use default colors in theme 2023-05-10 17:20:13 +02:00
Erik Kundt 362f26a0c8
tui: Update navigation design 2023-04-28 11:41:33 +02:00
Erik Kundt e757750398
tui: Fix clippy warnings 2023-04-28 10:27:37 +02:00
Erik Kundt 7c7379c733
tui: Implement new table design for patches 2023-04-28 10:22:58 +02:00
Erik Kundt b1c92f4a0d
tui: New labeled container design 2023-04-28 10:22:58 +02:00
Erik Kundt e268e75280
tui: Add custom block implementation 2023-04-28 10:22:58 +02:00
Erik Kundt 1fa49796ff
tui: Remove obsolete event handling 2023-04-28 10:22:58 +02:00
Erik Kundt fed4e84dd7
tui: Reorganize component modules 2023-04-24 17:49:56 +02:00
Erik Kundt a2da673c31
tui: Split application into separate modules 2023-04-24 17:49:56 +02:00
Erik Kundt 969219c51d
tui: Split widgets into separate modules 2023-04-24 17:49:56 +02:00
Erik Kundt e13bf0b75b
tui: Move shortcuts to root widget 2023-04-19 10:40:05 +02:00
Erik Kundt 95b0029267
tui: Add dashboard widget 2023-04-19 10:40:05 +02:00
Erik Kundt 38c9f0a1c0
tui: Re-render only if message received
Signed-off-by: Erik Kundt <erik@zirkular.io>
2023-04-19 10:40:05 +02:00
Erik Kundt 1bde528a1b
tui: Add placeholder for issue browser
Signed-off-by: Erik Kundt <erik@zirkular.io>
2023-04-19 10:40:05 +02:00
Alexis Sellier f7799e1474
tui: Fix clippy warnings 2023-04-19 10:37:39 +02:00