The source and commit views hit the /raw archive endpoint with a
HEAD request on every page load to decide whether to show the
download UI. That endpoint runs `git archive` server-side.
Move detection to user interaction: the clone popover probes when
the Download tab is opened, and the commit view checks on click,
navigating on success or showing a message on failure.
Cache only successful results per URL so transient or moving-ref 404s
aren't latched for the session.
The result of `git archive` is written to memory and only then sent off
via the network.
Instead of buffering potentially large archives, stream the response
body.
Co-authored-by: Rūdolfs Ošiņš <rudolfs@osins.org>
`git archive` is executed for HEAD requests, even though the resulting
archive is never sent to the client.
Resolve this by taking the HTTP method as an argument an only producing
the archive if the request method is not HEAD.
The non-local path leaves EXTRA_ENV as an empty array, and expanding
"${EXTRA_ENV[@]}" under `set -u` errors with "unbound variable" on
bash 3.2 (the version shipped on macOS), aborting before the suite
runs. Guard the expansion with ${EXTRA_ENV[@]+...} so an empty array
expands to nothing instead.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The same run can appear under multiple job COBs at a commit,
causing an each_key_duplicate crash. Keep one view per runId,
letting a terminal status override a stale "started" one.
Public seeds return `"agent": null` because their deployed httpd
binaries can't parse i2p/onion rows that newer nodes write to the
address table — `AddressStore::get` fails and the handler falls back
to `None`. Allow null in the zod schema and hide the user-agent row
in the UI when it's missing.
Workaround until heartwood ships `StoreExt::agent_of` (reads only
the `agent` column, no address hydration) and httpd adopts it.
This prevents flakes in the visual test suite due to stack frame naming
mismatches in the command copy code box.
E.g.
```diff
-{"stack":"Error: Response error\n at Dx.fet
+{"stack":"Error: Response error\n at wx.fet
```
When mermaid.render fails, suppress mermaid's "Syntax error"
overlay and show our own small warning above the original code
block so the source stays visible. Subsequent diagrams in the
same document still render.
Hoist the dynamic import and initialize() into a
module-scoped promise. Previous code re-ran initialize()
on every afterUpdate that had a mermaid block.
Switch to a dynamic import in afterUpdate and drop
manualChunks so Rolldown auto-splits the lazy chunk.
Eager bundle drops from 1.3 MB to 610 KB gzipped.
Replace global setConfig with an exported sanitizeConfig passed
inline. The global config leaked into mermaid's internal
strict-mode sanitization, stripping valid SVG diagrams.
To allow some very basic hyperlinking in commit descriptions we can
replace fully specified urls with a valid scheme into
`radicle-external-link` components within patches and git history.
GitHub and GitLab will prefix archive payloads with the name of the repo
and the refspec. This patch naively applies a prefix in similar fashion.
The refspec might contain filesystem path separators, like a forward
slash (`/`). GitHub and GitLab replace that with a hyphen (`-`). This
patch applies that same replacement.
The file name that is suggested to browsers (via the HTTP header
`Content-Disposition`) is changed to match the prefix.
The additional archive formats `tar` and `zip` are now supported as
well.
Users that relied on the archive *not* carrying the prefix introduced
here, may pass the query `?prefix=false` to get the old behavior.
This does not affect the `Content-Disposition` header, though. Users
who relied on the downloaded file be named in a certain way after,
and also used the file name from `Content-Disposition` for the name,
cannot get back the old behavior, but must instead rename the file.
Co-authored-by: Lorenz Leutgeb <lorenz.leutgeb@radicle.dev>