Commit Graph
2316 Commits
Author SHA1 Message Date
Fintan Halpenny 17a39d2582 httpd: improve error message for missing browser
If `open` or `xdg-open` fail the error is:

    No such file or directory (os error 2)

This generally means that the command could not open the browser on
the OS. To provide better help, improve the error message by informing
the user what went wrong and that they can run `rad web --no-open`
instead, while still printing the URL to visit.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2024-03-08 23:58:34 +01:00
Thomas Scholtes 0f6026e126 httpd: Mark immutable response as such with Cache-Control header
For responses to requests for content that is content-addressed with Git
object IDs and consequently immutable, we add a Cache-Control HTTP
header that marks the responses as public, immutable and instructs
clients to cache the response for up to 7 days.
2024-03-08 23:31:43 +01:00
Alexis Sellier ee95b90999 node: Add connection limits
The limits are roughly modeled after the Bitcoin network.
2024-03-08 23:24:34 +01:00
Sebastian Martinez 3834213ca0 httpd: Add author alias to reactions 2024-03-08 23:20:38 +01:00
Fintan Halpenny c21c36049c nix: add radicle-full
To allow Nix users to install radicle with all tools and helpers.
2024-03-08 23:19:15 +01:00
Sebastian Martinez 5329d45d72 httpd: Add author information to assignees 2024-03-08 23:15:34 +01:00
Sebastian Martinez b755d36ddb Hide device icon in collapsed sidebar 2024-03-08 12:25:36 +01:00
Rūdolfs Ošiņš 0b56f31dad Flip settings and radicle.xyz in the footer
In the sidebar layout we also show settings on the left-hand-side of the
screen.
2024-03-07 14:30:26 +01:00
Sebastian Martinez acbad456fd Fix local node tooltip in the Sidebar
Also changes the ContextHelp from Device to Local node, seems more
explicit.
2024-03-07 14:16:53 +01:00
Sebastian Martinez 63122094df Show edited label only if there is at least 1 edit 2024-03-07 14:10:16 +01:00
Sebastian Martinez 1ad85ac2c3 Remove HomepageSection height animations 2024-03-07 10:55:03 +01:00
Sebastian Martinez 192524fe90 Add experimental switch in settings
Hide all read/write functionality behind this setting.
2024-03-07 10:35:21 +01:00
Sebastian Martinez 273dff2da4 Add target="_blank" attribute to external markdown links 2024-03-06 15:34:22 +01:00
Rūdolfs Ošiņš 45479ddf47 Show full SHAs in breadcrumbs 2024-03-06 09:44:01 +01:00
Thomas Scholtes 67e16ea7dd Consolidate and optimize data fetching for ProjectCard
We consolidate the code that fetches the data for `ProjectCard` in one
module, adjacent to the `ProjectCard` component. We also consolidate all
the data into one interface to simplify the component API.

With the data loading in one place we can eliminate duplicate code and a
handful of helper functions.

The consolidation also allows us to discover some optimizations to
fetching: We parallelize requests and we use the commit detail endpoint
instead of the commit list endpoint. For the latter to pay off, we need
to deploy caching to the API.
2024-03-05 10:49:25 +01:00
Sebastian Martinez d315380e01 Add visual test for code clipboard icon on hover 2024-03-04 22:08:57 +01:00
Sebastian Martinez caf2cf0ae2 Update dependencies 2024-03-04 22:08:57 +01:00
Sebastian Martinez 6340501bd8 Make all text fields 2rem high 2024-03-04 17:43:53 +01:00
Sebastian Martinez 6cfbfbf665 Fix some pending design issues
- Wrap long patch and issue titles
- Patch state, author information sans-serif
2024-03-04 17:29:04 +01:00
Sebastian Martinez 9c45fe4576 Update nix flake 2024-03-04 16:52:46 +01:00
Sebastian Martinez 9b425e534b Update heartwood version 2024-03-04 16:52:46 +01:00
Sebastian Martinez 16e858bd7a Update footnote regex to handle footnotes with spaces 2024-03-04 16:35:22 +01:00
Michael Raitza 18ef797f41 Fixes scripts/update-flake
Avoid using BASE64 characters for separating substitution patterns.
2024-03-04 16:01:48 +01:00
Sebastian Martinez 4bb0e72841 Remove hash routing
Since we don't have or want any deployments on IPFS, and we don't have
much use for hash routing else, we can clean up some code and remove
some tests.
2024-03-04 14:39:36 +01:00
Thomas Scholtes 69429cb08f Re-use project-level data when browsing source code
We make source code browsing faster by re-using project-level data when
navigating between files. This comes at a cost: Project info (like the
issue counter), remotes and branches are only updated when the page is
hard-refreshed or the user navigates away from the source code view.
2024-02-28 14:15:58 +00:00
Sebastian Martinez dcced2e06d Fix visual test on preview toggle 2024-02-28 14:06:42 +00:00
Rūdolfs Ošiņš 0906593854 Don't query the /profile endpoint on every project load
We load the preferred seed config value on demand when the user clicks
the share button.
2024-02-28 14:03:15 +00:00
Thomas Scholtes 7ba9429afb Cache requests for blob and tree objects 2024-02-28 10:59:06 +01:00
Sebastian Martinezanddnlklmn eb0013ef9c Switch toggle styles
Co-authored-by: dnlklmn <pelicansinberlin@gmail.com>
2024-02-27 16:59:07 +00:00
Sebastian Martinez add8a9ad94 Display images in source browser and diffs, enable preview for svgs 2024-02-27 16:59:07 +00:00
Sebastian Martinez 481e25dca1 Enable branch selector even if no delegate is selected 2024-02-27 14:41:10 +01:00
dnlklmn 3f07650bcc Allow preview issue description if title is empty 2024-02-27 10:22:52 +01:00
dnlklmn 1ef7be3974 Fix disabled buttons in light mode 2024-02-27 10:16:00 +01:00
dnlklmn d18086d2a6 Align alias button contents 2024-02-27 10:05:59 +01:00
Sebastian Martinez 8a3864b19b Update codeLocationSchema with required Oid
We where missing an update for CodeLocation introduced in heartwood
commit 2dea54c6eeb7bf3a177fac77ae04fd4aeadd772d
2024-02-26 15:53:02 +00:00
Rūdolfs Ošiņš 4a5e67dd2b Improve authentication error modal
We tell users to check their firewall and ad blocker settings in case
they bump into authentication problems. This also separates out the
modal to be only used by the session view.
2024-02-26 13:03:44 +00:00
Rūdolfs Ošiņš 41435951c1 Refactor BaseUrl string conversion
We're only using this as a string, so no need to convert it to an URL.
2024-02-23 15:46:28 +00:00
Fintan Halpenny 02fb9397e8 radicle: implement caching for issues and patches
Implement caching for the `Issue` and `Patch` COB. This is achieved by
having the `Transaction::initial` and `Transaction::commit` methods
take a cache which can update the newly created/updated object. The
`Store::remove` method also takes the cache for removing the object
from the cache, as well as the repository.

This meant that the `*Mut` types for the respective COBs are required
to carry a cache alongside the repository store. Identities will not
be cached, and so this is always set to `NoCache` -- which performs no
caching, and always succeeds.

To perform cache reading for issues and patches, the `cache::Issues`
and `cache::Patches` traits are introduced. They capture the minimal
amount of methods that are needed for the `rad issue` and `rad patch`
CLI commands.

The implementor for each of these traits is there respective `Cache`
types, which combines their backing repository store and the SQLite
database. They both provide convenience methods:
- `create` (and `draft` for patches)
- `get_mut`
- `remove`
which can be used instead of their repository store counterparts.

All uses of the repository stores (where needed) are replaced with
`Cache` types.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2024-02-23 16:03:21 +01:00
Fintan Halpenny 67e46952b6 radicle: rename resolved to is_resolved
The standard in the codebase for boolean methods is to prefix them
with `is_`.

Change `resolved` to `is_resolved`.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2024-02-23 13:56:19 +01:00
Rūdolfs Ošiņš 8f43a57984 Remove Radworks from app
It's already on the radicle.xyz webpage, no need to repeat it in the
app.
2024-02-23 12:15:29 +00:00
Rūdolfs Ošiņš ea91dc800b Fix canonical branch popover width 2024-02-23 11:46:52 +00:00
Rūdolfs Ošiņš 3cfddf8647 Show seed policy and scope in "online" button 2024-02-23 11:37:01 +00:00
cloudhead 87077d5155 cob: Properly authorize root actions
Previously, authorization was only checked for ops after the root op.
We also avoid creating empty actions for `assign` and `label`, which
was needed for non-authorized users to be able to create issues/patches.
2024-02-23 12:31:13 +01:00
Sebastian Martinez 1471fb1709 Add edited label to patches 2024-02-23 07:53:48 -03:00
Rūdolfs Ošiņš 703fb3845f Hide git clone behind a tab in the Clone button 2024-02-22 14:00:32 +00:00
Rūdolfs Ošiņš 975d1823a2 Show only pinned projects on node view
And style them visually similar to the landing page.
2024-02-22 05:33:36 +00:00
Rūdolfs Ošiņš 693f8991a0 Fix HoverPopover positioning
The popover would not stay fixed relative to its parent when the page
was being scrolled. We wrap it in a container that is positioned
relative similar to how we do it in the Popover component. This allows
us to position it more precisely while making it retain its position
relative to its parent when scrolled.
2024-02-21 17:39:59 +00:00
Rūdolfs Ošiņš d86ff1952a Allow only delegates to add labels and assignees to new issues 2024-02-20 16:34:33 +00:00
Rūdolfs Ošiņš d4b246c72d Tweak issue/patch validation rules
Patches - title: mandatory, body: optional.
Issues - title and body: mandatory.
2024-02-20 16:34:33 +00:00
Rūdolfs Ošiņš 6ff0d52165 Fix bug where changing the issue title would reset the body 2024-02-20 14:48:33 +00:00