Commit Graph
85 Commits
Author SHA1 Message Date
Sebastian Martinez 74bb631381 Fix inbox pagination cursor and sorting 2025-04-08 17:53:04 +02:00
Rūdolfs OšiņšandFintan Halpenny 0702896ea3 Optimise patch list command
So we don't materialize the whole list multiple times especially when
paginating. Mostly written by Finto, I was just driving.

Co-authored-by: Fintan Halpenny <fintan.halpenny@gmail.com>
2025-04-07 18:35:15 +02:00
Rūdolfs Ošiņš 1a4dba2065 Deduplicate the diff/cob Stats type 2025-04-01 17:16:03 +02:00
Rūdolfs Ošiņš 7c0da906a8 Cache content-addressed API calls on the frontend 2025-04-01 17:16:03 +02:00
Rūdolfs Ošiņš 83390aed59 Implement issue and patch list fuzzy finder 2025-04-01 17:16:03 +02:00
Rūdolfs Ošiņš 5c5685d560 Sort projects by name on the home screen 2025-03-27 15:41:36 +01:00
Sebastian Martinez 08a2b01f7d Update crate dependencies 2025-03-19 09:36:38 -06:00
Sebastian Martinez efe3c51d05 Add identity and repo creation flow 2025-03-18 23:01:07 +01:00
Sebastian Martinez dfed3287c6 Reduce tauri log verbosity
Instead of logging to stdout everything, just do so until `Info` level
2025-03-18 21:21:02 +01:00
Sebastian Martinez c730e82187 Convert cob actions into customized desktop actions
This commit allows us to e.g. convert the Set of DIDs we obtain from
assignee actions on cobs into a Set of Authors with their Aliases.

Also it introduces the `FromRadicleAction` trait which can be
implemented for any type of enum we get from the `radicle` create to
convert into a type which is better suited for us.

Removes also any calling the `alias` command in the `PatchTimeline` or
`IssueTimeline` since we already get the alias from the backend the
first time now.
2025-03-18 13:10:26 -06:00
Sebastian Martinez b1bf3c510d Change some eprintln statements for log::error 2025-03-18 13:06:59 -06:00
Sebastian Martinez 038457ea60 Remove unused logging statements 2025-03-18 13:06:59 -06:00
Rūdolfs Ošiņš 2274a9c79b Refactor patch loading 2025-03-17 21:49:11 -06:00
Sebastian Martinez 7cf21972cd Set replyTo and location fields in Comment to null 2025-03-13 08:02:02 +01:00
Rūdolfs Ošiņš 83554dc4ec Update stale Action typings
We forgot to update them when we changed it in the backend. This also
fixes a bug in the front-end.
2025-02-21 08:28:28 -06:00
Sebastian Martinez e82e333cc5 Refactor the tauri setup hook into individual commands
This allows us for onboarding to e.g. fail if there is no profile around
and guide new users through identity creation.

Also it makes the tauri run function easier to understand
2025-02-20 09:06:35 +01:00
Sebastian Martinez 89a26663e4 Update rust dependencies 2025-02-20 09:06:35 +01:00
Sebastian Martinez e7f0c4921d Update rust toolchain to 1.84 2025-02-20 09:06:35 +01:00
Rūdolfs Ošiņš 5e6fd19a6d Add discussion section to reviews 2025-02-19 15:25:50 -06:00
Rūdolfs Ošiņš 4add00d682 Add review page 2025-02-18 12:06:03 -06:00
Sebastian Martinez 365674bc58 Provide a sync_status store
The `sync_status` would update every 10 seconds with the latest state of
all repos, to be displayed in the repo where needed.
2025-02-10 11:55:14 -06:00
Sebastian Martinez 450f6d6f0c Remove usage of DraftStore
@fintan:
The API of the DraftStore needs some improvement and it can be easy to
do the wrong thing when trying to publish the changes to the published
cob reference

Based on this PSA we should apply any changes to the patch revisions
directly, instead of using the `DraftStore`
2025-02-06 13:14:23 +01:00
Sebastian Martinez 9c021345dd Delete cobs/patch module 2025-02-06 13:08:31 +01:00
Rūdolfs Ošiņš 014a3e9eee Add revision commit list 2025-02-04 15:49:00 -06:00
Sebastian Martinez f34522b689 Implement a custom list_patches method to read directly from cache 2025-02-03 14:25:39 +01:00
Sebastian Martinez 5dd75959a0 Cleanup img-src attributes in the CSP directive
By restricting `img-src` in our CSP, we weren't allowing images from
e.g. https://github.com like CI badges to display.

With this change we allow users to add images from any `https`, `data`
or `blob` source, which is more user friendly.
2025-01-31 15:17:47 -06:00
Sebastian Martinez 19fdd17f99 Fix repo listing not displaying all repos
`Show::All` which is the default value should return all values obtained
from `storage.repositories()`.
This commit adds a `Show::Contributor` enum variant to only get repos
that the user has forked, initialized or contributed in some way.
2025-01-27 13:19:42 +01:00
Sebastian Martinez d5632ed534 Add global inbox 2025-01-23 22:28:00 +01:00
Sebastian Martinez dc87d3fa84 Adding Service and Storage traits for the inbox logic
To start making the backend codebase more future proof, I started
introducing the hexagonal architecture concept, of having `Service`
traits that is the public API and inner traits like `Storage`,
`Metrics`, etc. that can be implemented by different adapters like
`Sqlite`.

This is a first development in this direction.
2025-01-23 22:23:44 +01:00
Sebastian Martinez 62bdbc37d9 Fix creation of draft review in tauri command 2025-01-23 15:00:12 -06:00
Sebastian Martinez 84572389a9 Fix function param for creating reviews 2025-01-23 15:00:12 -06:00
Sebastian Martinez 6da4ffe344 Remove optional argument from review comments 2025-01-23 20:03:00 +01:00
Sebastian Martinez 3419b62194 Strongly type patch review verdict
Instead of typing a review verdict as `string | null` we should do
`"accept" | "reject" | null`
2025-01-23 20:02:42 +01:00
Sebastian Martinez 432db1ce5b Make Operation generic, and handle patch operations
So far we only supported issue operations on the `activity_by_id`
command.

With this commit we separate the commands into a `activity_by_issue` and
`activity_by_patch` command that calls a generic `activity_by_id` trait
implementation.

`Operation` now takes as a generic either `cob/issue/Action.ts` or
`cob/patch/Action.ts`.

Also `Operation` now stores the array of all `Action` that happened on
said operation. I'm not entirely sure if this will help us in the
future, but it represents more closely the state of the relation between
an `Operation` and the cob `Actions`.
2025-01-10 10:33:32 -06:00
Sebastian Martinez 2ac0c54a85 Add heartwood stream module
Introducing the `stream` module from the `heartwood` repo from patch
`40a8d72`, for our global inbox
2025-01-09 11:10:07 +01:00
Sebastian Martinez 153331f2e3 Infer file type for embeds for previews 2024-12-19 20:55:30 +01:00
Sebastian Martinez 4647cea062 Fix syntax highlighting for languages with multiple injections 2024-12-19 13:54:25 +01:00
Sebastian Martinez ca4d9d13fd Add embeds to the Textarea 2024-12-13 12:26:51 +01:00
Sebastian Martinez 3b0daefec4 Add alias tauri command
Returns either `null` or `string` for a lookup of an alias.
2024-12-09 16:20:37 +01:00
Sebastian Martinez 4f046343f3 Add syntax highlighting for diffs 2024-12-09 14:53:17 +01:00
Sebastian Martinez ece9ee1eb0 Avoid announcing changes when node is stopped
Also in the edge case that the front-end didn't update and the node just
stopped in between we fallback gracefully instead of returning an error
on the back-end.
2024-12-06 10:06:45 +01:00
Sebastian Martinez 653cf9a48d Sort repos by activity 2024-12-05 13:56:12 +01:00
Sebastian Martinez 5c8844db1c Fix radicle crate at 0.14.0
Also update `heartwood-release` to a pre-release to get the tests to
pass
2024-12-02 17:06:42 +01:00
Sebastian Martinez e093a5bc29 Let ts_rs run formatting types instead of prettier 2024-12-02 16:34:12 +01:00
Sebastian Martinez 1f779a8a1b Add tests for list_commits unit test 2024-12-02 16:34:12 +01:00
Sebastian Martinez 70ee53e859 Add unit tests for radicle-types crate 2024-12-02 16:34:12 +01:00
Sebastian Martinez b7b71ccb11 Move AppState to radicle-types 2024-12-02 16:30:54 +01:00
Sebastian Martinez f5d559158b Add list_commits tauri command
Returns all commits for a specific repo.

Takes a `parent` argument as starting point for the git history.
Uses the `head` field of the project payload if not provided.

Instead of since and until timestamps uses cursor and take params to
paginate the commit history.
2024-12-02 16:30:54 +01:00
Sebastian Martinez a2776c27a4 Remove migrate argument since not used anymore 2024-12-02 16:30:54 +01:00
Sebastian Martinez 4670370562 Use Into::into instead of a closure in radicle-types 2024-11-22 11:15:05 +01:00