Slack Coder
ed9900b5ac
cli: Support patch commenting
...
Allow commenting on a patch as well an issue.
Signed-off-by: Slack Coder <slackcoder@server.ky>
2023-02-07 11:16:59 +01:00
Sebastian Martinez
af3ea6a11a
httpd: Add issue endpoints
...
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
2023-02-06 14:14:06 +01:00
xphoniex
4552c1f296
httpd: Add routes for patch ops
...
Signed-off-by: xphoniex <dj.2dixx@gmail.com>
2023-02-04 13:22:09 +00:00
Alexis Sellier
88ffc02c5e
Use string format for `OpId` JSON
2023-02-04 12:37:58 +01:00
Slack Coder
1cb8986830
Add Op ID string formatting
...
To help users, create an Op ID string format of the form `<actor-id>/<lamport>`.
Signed-off-by: Slack Coder <slackcoder@server.ky>
2023-02-04 12:29:50 +01:00
Alexis Sellier
5e955d39d0
cob: Add 'description' to `Revision`
...
Simplifies the code a little.
2023-01-26 17:37:58 +01:00
Alexis Sellier
bb3787258a
cob: Refactor `Thread` methods
2023-01-26 16:20:22 +01:00
Alexis Sellier
67f9c3554d
cob: Start testing history permutations
...
Signed-off-by: Alexis Sellier <self@cloudhead.io>
2023-01-03 14:26:25 +01:00
Alexis Sellier
139f095d51
cob: Consolidate `from_history` impls
...
By implementing `FromHistory::apply`, COBs don't need to implement
`from_history`.
Signed-off-by: Alexis Sellier <self@cloudhead.io>
2023-01-03 14:25:47 +01:00
Alexis Sellier
2f42bc942c
cob: Make it easy to build histories
...
Signed-off-by: Alexis Sellier <self@cloudhead.io>
2023-01-03 14:23:47 +01:00
Alexis Sellier
5ee1f42b6a
cob: Have clock value for empty COB state
...
By using `0` as the clock value for an empty state (without operations),
we simplify transaction code. Previously, there was no clock value for
empty states, which meant that we had to sometimes use an `Option`.
2023-01-01 18:29:47 +01:00
Alexis Sellier
c568feb700
cob: Merge issue tags
...
Signed-off-by: Alexis Sellier <self@cloudhead.io>
2022-12-31 09:58:51 +01:00
Alexis Sellier
911c194fb3
cob: Create proper `OpId` type
...
To still access a comment's author, we add a new `author` field.
2022-12-31 09:58:51 +01:00
Alexis Sellier
bf22cea014
cob: Fix typos
...
Signed-off-by: Alexis Sellier <self@cloudhead.io>
2022-12-30 12:59:11 +01:00
Slack Coder
946d6ac675
cli: assign and unassign issues
...
Allow assigning an issue to one or more people via a new subcommand.
rad assign <issue> <peer>
To unassign:
rad unassign <issue> <peer>
To support testing and documentation, create an example for maintaining
issues for a project.
Signed-off-by: Slack Coder <slackcoder@server.ky>
2022-12-26 15:38:39 +01:00
Alexis Sellier
4307478718
Test comment editing
...
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-12-16 12:32:28 +01:00
Alexis Sellier
f1217713af
Add edits to thread test generator
...
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-12-16 12:32:23 +01:00
Alexis Sellier
e47d7ca2aa
cob: Implement comment edit action
...
This implementation intentionally preserves all edits such that
they may be displayed in an application as an edit history.
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-12-16 12:32:20 +01:00
Alexis Sellier
c68a5a8857
Move `thread` COB to test module
...
Threads are only intended to be used as part of other COBs.
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-12-16 12:26:16 +01:00
Alexis Sellier
b32ae984ce
Start adding support for replies in COBs
...
This makes a change to comments, such that all comments require a
parent, except the "root" comment, which is created with the COB.
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-12-15 14:43:40 +01:00
Alexis Sellier
909b99bb7c
Refactor using `NonEmpty::try_map`
...
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-12-13 10:16:18 +01:00
Alexis Sellier
f90f714fcf
Rename issue action to match patch
...
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-12-13 10:16:18 +01:00
Alexis Sellier
24f1de980e
Remove redundant `apply_one` function
...
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-12-13 10:16:18 +01:00
Alexis Sellier
0b3a32627b
Use transactions for issue COB
...
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-12-13 10:16:18 +01:00
Alexis Sellier
90f20f447a
Make `Transaction` generic, move to `store`
...
This allows us to use the transaction logic for any COB.
2022-12-13 10:16:18 +01:00
Alexis Sellier
036442af87
Use operation bundle for patch creation
...
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-12-13 10:16:18 +01:00
Alexis Sellier
e5e1ba583f
Bundle patch CRDT operations
...
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-12-13 10:16:18 +01:00
Alexis Sellier
b37fef9f22
Re-organize identity types and modules
...
The new hierarchy should be much more correct, and cleaner:
* `identity` (`Identity`)
* `identity::did` (`Did`)
* `identity::doc` (`Doc`, `Payload`)
* `identity::doc::id` (`Id`)
* `identity::project` (`Project`)
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-12-09 22:06:20 +01:00
xphoniex
d4d40b1492
radicle: Remove redundant map in issue cob
...
Signed-off-by: xphoniex <dj.2dixx@gmail.com>
2022-12-09 10:49:28 +01:00
Alexis Sellier
5d2be57cd9
Rename patch/issue "status"
...
This reverts to the previous naming, since after serialization
we would otherwise end up with `{ status: { status: closed } }`.
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-12-09 10:44:59 +01:00
Alexis Sellier
de0e54a186
cob: Consistently name these 'ops'
...
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-12-08 16:37:44 +01:00
Alexis Sellier
56f9af650e
crdt: Remove some `Semilattice` instances
...
These instances were not safe to have around, as they allow
removal of items in a non-commutative way.
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-12-08 16:37:44 +01:00
Alexis Sellier
06d658dba4
Remove `tag.rs` file that wasn't used
...
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-12-08 16:37:44 +01:00
Fintan Halpenny
5f80ee9671
cobs: allow for batched operations
...
Sometimes it is more efficient to perform multiple operations at once
and store those in the collaborative object graph together.
Change the contents to be a non-empty sequence of byte sequences,
i.e. NonEmpty<Vec<u8>>. These are stored as blobs in a git tree in
order by their index in the non-empty sequence. They are, in turn,
retrieved in order of their original index.
Change the conversion of an `EntryWithClock` to return a non-empty
sequence of `Op`s, which are in turn used to apply many changes in
each `from_history` implementation.
Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2022-12-07 17:11:40 +01:00
Alexis Sellier
ca69fdc4fa
cob: Make json serialization consistent
...
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-12-05 18:06:45 +01:00
Alexis Sellier
f9c81ab382
Replace `quickcheck` with `qcheck`
...
The latter is a fork of the former, which adds const generics
and a bunch of other quality of life improvements that aren't
in the original crate due to it being unmaintained.
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-12-04 20:40:54 +01:00
Alexis Sellier
cc24699232
cob: Rename `Change` to `Op`
...
Helps with the confusion with `radicle_cob::Change` and matches the
name for this object in common literature.
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-12-02 14:21:50 +01:00
Alexis Sellier
fa3c155865
cob: Unify change decoding
...
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-12-02 14:21:50 +01:00
Alexis Sellier
4e0efa4690
cob: Return error on wrong history type
...
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-12-02 14:21:50 +01:00
Alexis Sellier
81a1ee5cc2
cob: Implement `Store::remove`
...
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-12-02 14:21:50 +01:00
Alexis Sellier
6c0c7b2969
cob: Delete redundant functions
...
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-12-02 14:21:50 +01:00
Alexis Sellier
e8a2432f9d
Move `Change` from `radicle-crdt` to `radicle`
...
Where it belongs.
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-12-02 14:21:50 +01:00
Alexis Sellier
d6467fe4f1
patch: Use `GMap` to simplify code
...
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-12-02 14:21:50 +01:00
Alexis Sellier
eb92ac9036
patch: Fix bug where revisions can be replaced
...
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-12-02 14:21:50 +01:00
Alexis Sellier
ce11d69f23
cob: Move tags out of `Thread`
...
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-12-02 14:21:50 +01:00
Alexis Sellier
64ce15dbe2
crdt: Include timestamp in `Change`
...
We can then use the real change timestamp for our COBs.
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-12-02 14:19:25 +01:00
Alexis Sellier
15f183ac7d
patch: Implement redacted revisions
...
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-12-01 12:05:44 +01:00
Alexis Sellier
b3faba715b
patch: Correctly merge review edits
...
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-12-01 12:05:44 +01:00
Alexis Sellier
919e36ab1f
crdt: Rely on causal ordering of events
...
Since the underlying DAG guarantees causal event delivery,
we can rely on this to simplify the code.
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-12-01 12:05:44 +01:00
Alexis Sellier
dd7052926a
cob: Remove `author` from `Entry`
...
It was no longer used.
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-12-01 12:05:44 +01:00
Alexis Sellier
5a47023ac0
cob: Change history type to a string
...
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-12-01 12:05:44 +01:00
Alexis Sellier
0dc34dc15d
Implement patches with radicle CRDTs
...
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-12-01 12:05:44 +01:00
Alexis Sellier
b82e1864b5
cob: Update issues and threads
...
Updates these COBs to work with the implicit DAG clock.
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-12-01 12:05:44 +01:00
Alexis Sellier
b015b29f34
cob: Add timestamp to comment state
...
Since the timestamp is to be retrieved from the commit,
we don't add it to the action.
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-12-01 12:05:44 +01:00
Alexis Sellier
63614e9c94
cob: Make sure we generate all thread variants
...
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-12-01 12:05:44 +01:00
Alexis Sellier
09a8b46f34
cob: Move clock out of `Issue`
...
The clock shouldn't be part of the issue state, but rather
the local "actor" state.
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-12-01 12:05:44 +01:00
xphoniex
dea7082a6f
Migrate `/projects`: `root`, `project`, `commit`, `activity` handlers
...
Signed-off-by: xphoniex <dj.2dixx@gmail.com>
2022-11-30 13:06:03 +00:00
Alexis Sellier
a79c95283b
Minor doc and instance changes
...
Signed-off-by: Alexis Sellier<alexis@radicle.xyz>
2022-11-26 17:51:07 +01:00
Alexis Sellier
fee0296910
Rename `LClock` to `Lamport`
...
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-11-26 17:48:50 +01:00
Alexis Sellier
b79e2f5b56
crdt: Remove redundant `Author` type
...
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-11-26 17:44:18 +01:00
Alexis Sellier
171b5a45f7
Implement issues using radicle CRDTs
...
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-11-26 17:41:37 +01:00
Alexis Sellier
cc33d04a7b
crdt: Require `LWWReg` value to be `Semilattice`
...
* Also derive instances of `Semilattice` for built-in types.
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-11-26 17:13:22 +01:00
Alexis Sellier
cc64c1d80b
cob: Use semilattice rules for commenting
...
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-11-26 17:13:22 +01:00
Alexis Sellier
fa9a89caa3
Start integrating new CRDTs into `radicle` crate
...
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-11-26 17:13:22 +01:00
Alexis Sellier
01ad0fb31d
cob: Split generic code from automerge-specific
2022-11-26 17:13:18 +01:00
Alexis Sellier
5526eceea0
cob: Add new history type, simplify `Content`
...
Keep the history type in the manifest, but no need to specify it
for all individual changes.
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-11-24 13:41:24 +01:00
Alexis Sellier
35f061746c
Add `radicle-crdt` crate
...
Explorations with CRDTs.
2022-11-23 19:52:18 +01:00
xphoniex
89bdf59e8e
Add `rad-issue` command
...
Signed-off-by: xphoniex <dj.2dixx@gmail.com>
2022-11-16 16:28:31 +01:00
Alexis Sellier
47d20003c0
Implement `rad-patch`
...
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-11-16 12:07:19 +01:00
Alexis Sellier
12988da089
Add `Patch`, `Issue`, `Label` COBs
...
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-11-14 12:40:00 +01:00