mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-14 02:50:51 +08:00
Repos need not carry a `xyz.radicle.project` payload; the default branch can come from `xyz.radicle.crefs` alone. Such repos got no counts and no default branch, and failed schema validation in explorer, which broke the parse of a whole listing. httpd: - Add top-level `cobs` with issue, patch and bucketed release counts - Add top-level `defaultBranch`, qualified like the crefs payload - Omit a count the node cannot determine instead of reporting zero - Drop `head`: the tip is `refs[defaultBranch]` - Keep counts in the project payload for older clients until a major release - Keep the project payload when a COB read fails - Keep `meta.releases` a single count: delegate + other - Log and skip canonical ref rules and refs that fail to read, so one bad ref doesn't drop the default branch tip explorer: - Model `cobs` and `defaultBranch`, adapting older nodes to one shape - Resolve the default branch from the crefs HEAD on older nodes - Collect the shims for older httpd in http-client/lib/compat.ts, each naming the httpd release that the client can drop it with - Add `defaultBranchTip`, replacing `head`, with a fallback to the legacy `meta.head` - Make the project payload and its legacy meta optional - Fall back to the RID for the repo name, and show a placeholder for a missing name in repo cards and the header - Hide a counter instead of reading a missing count as zero - Fall back to a full-page check for "More" without counts - Add a `repo.sourceUnavailable` route for repos without a default branch or tip - Browse explicit revisions and offer the branch selector without a default branch - List these repos in repo grids and on the landing page - Say the node is older or built without releases - Scope release pages in the client, so views never call the shims - Read OG worker repos through the same compat shims - Share the repo name and default branch helpers with the OG worker CI: - Add check:open-graph, a wrangler deploy dry run - Run it in GitHub CI, Buildkite and check:ci - Install explorer's dependencies first: the worker resolves compat.ts imports, such as zod, from there Tests: - Test that a build without releases omits the count - Test that one failing rule keeps the others - Test the repo shape across httpd versions and the release shims - Test `hasMorePages` and `repoName` - Test repos without a project payload end to end
61 lines
1.8 KiB
YAML
61 lines
1.8 KiB
YAML
name: explorer-build
|
|
# Only explorer, shared/ui and root npm changes, or changes to this workflow,
|
|
# run it. Rust-only changes don't affect the web app: its tests run against a
|
|
# pinned, pre-built radicle-httpd.
|
|
on:
|
|
push:
|
|
paths:
|
|
- "explorer/**"
|
|
- "shared/**"
|
|
- "package.json"
|
|
- "package-lock.json"
|
|
- ".npmrc"
|
|
- ".nvmrc"
|
|
- "!explorer/crates/**"
|
|
- "!explorer/Cargo.toml"
|
|
- "!explorer/Cargo.lock"
|
|
- "!explorer/rust-toolchain"
|
|
- "!explorer/.cargo/**"
|
|
- ".github/workflows/explorer-build.yml"
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
|
|
|
|
defaults:
|
|
run:
|
|
working-directory: explorer
|
|
|
|
jobs:
|
|
build:
|
|
timeout-minutes: 30
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- uses: actions/setup-node@v6
|
|
with:
|
|
node-version-file: ".nvmrc"
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
- name: Install Playwright Browsers
|
|
run: npx playwright install chromium
|
|
- name: Build app
|
|
run: npm run build
|
|
- name: Run Playwright build smoke test
|
|
run: npm run test:e2e -- --project chromium --config playwright.buildSmoke.config.ts
|
|
# The worker resolves compat.ts imports, such as zod, from explorer's
|
|
# node_modules, so it needs both installs.
|
|
- name: Install Open Graph worker dependencies
|
|
run: npm ci --prefix workers/open-graph
|
|
- name: Bundle Open Graph worker
|
|
run: npm run check:open-graph
|
|
- name: Upload artifacts
|
|
uses: actions/upload-artifact@v7
|
|
if: always()
|
|
with:
|
|
name: test-artifacts-${{ runner.os }}
|
|
retention-days: 30
|
|
if-no-files-found: "ignore"
|
|
path: |
|
|
explorer/tests/artifacts/**/*
|