Merge from upstream - #39
Open
yumin-chen wants to merge 227 commits into
Open
Conversation
1. When `git archive` errors, do not require an exit code, but just use
the `ExitStatus` we already have. This requires less unwrapping.
Also, the previous default of 0 was misleading, since 0 is returned
upon successful termination.
2. Use "refname" instead of "refspec" as these are different concepts.
Refer to <https://git-scm.com/docs/git-check-ref-format> and in
particular
<https://git-scm.com/docs/git-check-ref-format#Documentation/git-check-ref-format.txt---refspec-pattern>.
3. Only allow appending ".tar.gz" to commit IDs, not to refnames,
because refnames may contain the suffix ".tar.gz". It might look
weird, but it is not forbidden to do `git branch foo.tar.gz`.
4. `char::is_ascii` does not help sanitize refnames to file names. In
particular we have `'/'.is_ascii() == true`. Replace forward slashes
with two underscores.
To allow some very basic hyperlinking in commit descriptions we can replace fully specified urls with a valid scheme into `radicle-external-link` components.
Based on the work done in commit `a73c5490b160435a0ef5408b54185c9f698cb73f` there are a few places that make the app not load in case dom storage aka localStorage is disabled.
The `-c` argument (and its corresponding value) must come *before* the first subcommand to be effective. This error was introduced in commit 5f22e1b.
Instead of hardcoding the version of the Rust alpine file, introduce an `ARG` in the `Dockerfile`. In `build/build`, we determine the version by inspecting `rust-toolchain.toml`, and pass this value in. This ensures that the binaries are built using the same toolchain that we develop with. Co-authored-by: Fintan Halpenny <fintan.halpenny@gmail.com>
Don't run prettier on a rust crate
So the header and history stop fetching full tree stats just for the commit count. Falls back to the previous behaviour when the backend doesn't serve the new endpoint.
The patch badge only needs insertions/deletions, but the full diff endpoint builds every hunk and loads every changed blob. This favours speed over exactness: `git diff --numstat` does not do the rename/copy detection radicle-surf does, so on patches with copied or renamed files the badge can diverge slightly from the full diff view. In return it is roughly 6x faster on small diffs and 15x on large ones.
So the badges stop fetching the full diff just for insertions and deletions; the patch view did it on every load. Falls back to the full diff when the backend doesn't serve the new endpoint.
An unoptimised build is slow enough on large repositories to get in the way of local development.
The cache only stored resolved values, so callers asking for the same key while a request was still in flight each issued their own. The peer selector makes this easy to hit: Source and History render their own Header, so switching tabs while the remote listing loads fires a second copy of a request that takes seconds. Cache the promise instead, evicting it on rejection so failures still retry.
Listing remotes verifies signed refs for every peer and took seconds on large repositories, blocking navigation. Resolve revisions from the canonical refs already on the repo object, fetching a single remote when the route names a peer, and load the full listing after render. Tags living only on a remote no longer resolve as bare revisions.
The pipelines are supposed to be a drop-in replacement for the current github actions pipelines. The github workflows have been restructured into 4 pipelines to take advantage of the buildkite caching mechanism.
Reports of incompatibility with clients that require version 2 of the Git protocol, were reported, see <https://radicle.zulipchat.com/#narrow/channel/570942-Garden/topic/preserve.20.60Git-Protocol.60.20header/near/616710464>. Version negotiation depends on the `Git-Protocol` header, which may be passed via the environment variable `GIT_PROTOCOL` as documented in `man:git-http-backend(1)` (see sections "Environment" and "Examples").
Image URLs pointing at a GitHub "blob" page, such as https://github.com/<owner>/<repo>/blob/<ref>/<path>, serve an HTML page rather than the raw image bytes, so they render as broken images in markdown. Add a canonicalizeGithubImageUrl helper that appends ?raw=true to such URLs, which makes GitHub redirect to the raw content. URLs already pointing at the raw content, via ?raw=true or raw.githubusercontent.com, are left unchanged, as are non-GitHub and non-URL sources. Wire the helper into the markdown image loop so external image URLs are canonicalized while relative paths keep resolving against the repo's raw endpoint.
The installed-app home-screen label (short_name) in the web app manifest was the full "Radicle Explorer". Shorten it to "Radicle" so it reads well as an app label, while keeping name as "Radicle Explorer", the project's full name.
The markdown sanitizer's allowlist did not include the <details> and <summary> tags, so GitHub-style collapsible sections were stripped and their contents rendered flat. Add both tags to ALLOWED_TAGS and the "open" attribute to ALLOWED_ATTR, so collapsible sections render and <details open> starts expanded. Closes 390f3f295881bfc418eafd3532ea326fe365c7a2
The FAQ shipped here was a verbatim copy of the one on radicle.dev, carrying a canonical tag that already pointed search engines at that original. Drop the duplicate and redirect /faq to radicle.dev/faq so existing links still reach the content.
Cloudflare's single-page-application fallback percent-encodes the path on a fresh load or reload, so `rad:z4V1...` arrives as `rad%3Az4V1...` and leaks into links and the seed command. Only identifiers are decoded: revision and path segments stay encoded, because branch and tag lookups are keyed on the encoded name. The seed command needs a second fix: the repo path segment is an alias when one was used, and `rad seed <alias>` is not valid, the `rad seed` command only supports RIDs and not aliases. Co-Authored-By: Guillaume <guillaume.alabre@gmail.com>
Closes c639643a8e008a56a1ec6acd1ff32f24bd747364
- Add twemoji as npm dependency instead of build download - Package build assets with a Vite plugin instead of scripts - Keep the eslint and prettier caches in one directory
- Add release read API to httpd as cargo feature enabled by default - Add Releases and Release views to the UI - Filter out redacted artifacts and mark delegate authors - Degrade releases UI gracefully with older radicle-httpd versions - Hide fully redacted releases - Skip releases in the list endpoint when every artifact was redacted by its author or a delegate, so no empty release entries are shown - Keep them reachable with showRedacted=true and by release id - Add e2e tests for the release routes Co-Authored-By: Rūdolfs Ošiņš <rudolfs@osins.org>
Heartwood's `MergeTarget` gained a `Branch` variant, so `target` can be an object now. One such patch failed the parse for the whole patch list.
Resolve the merge target from `target` and the project payload, and name it in the byline next to the patch ID. Co-Authored-By: Brandon Oxendine <brandon.oxendine@gmail.com>
The diff endpoint walked back from the head commit and stopped at the first commit equal to `base`. `surf::History` is an unhidden revwalk in commit-date order, so a head that merges the target branch in reaches `base` through one of its parents and truncates the walk there, dropping every commit the other parent contributes. A patch whose head is such a merge showed a single commit no matter how many it really carried.
- Show delegate badge for releases - Hide filters if all artifacts are non-delegate - Decide release filter visibility once per route to avoid layout shift when loading more - Say "No releases by delegates" when all holds some
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.