Skip to content

fix(web): FG-8 app shell, resilience, hosting and mobile chrome - #152

Merged
PastaPastaPasta merged 17 commits into
masterfrom
fix/fg8-shell-resilience
Sep 29, 2026
Merged

PastaPastaPasta merged 17 commits into
masterfrom
fix/fg8-shell-resilience

Conversation

@PastaPastaPasta

Copy link
Copy Markdown
Owner

Fix group FG-8 from the dash showcase real-browser QA ledger (dash-forge-qa/evidence/dash-ux/LEDGER.md): app shell, resilience, hosting and mobile chrome. Fixes L-10, L-11, L-55, L-56, L-57, L-58, L-59, L-60, L-61, L-62, L-66, L-73, L-81, L-82, L-84, L-85, L-86. (L-54 belongs to the perf agent; L-87 is a Cloudflare dashboard setting, see below.)

L-10 (S2): a network drop is no longer a tampering alarm

BrowseReader (lib/browse/reader.ts) now classifies every failed read three ways (ReadFailure):

  • transport: nothing answered. The source marks the error (FetchFailure with no HTTP answer, or a PackUnavailableError that isn't corrupt), isUnreachableError matches it, or the browser is offline. The read gets no verdict, and the view reads again once the connection is back.
  • content: bytes arrived and were wrong. That means a hash mismatch, undecodable bytes, or a sealed pack failing authentication (PackError.corrupt). Only this reports failed. A range past an unauthenticated sealed header is remapped to sealedPackCorrupt. noKey stays Unreadable(NoKey) per the private-repos spec §5.3.
  • other: no verdict and no automatic retry. Examples are a pack a partial clone never loaded, a locked session, or a missing REF base, which now uses the same MissingObjectError as a direct read.

Recovery is bounded:

  • One outage note per repo per burst.
  • Re-reads re-run the view without dropping the browse context.
  • Backoff is 2 s to 60 s with ±30% jitter.
  • After 3 re-reads that each hit another outage, the page shows Try again instead of retrying.
  • The recovery state resets per repo.
  • A mirror is marked dead only when its host actually answered, so it is retried after reconnecting.
  • History walks share the page reader's object memos.

Offline state (L-56)

  • Plain offline state. A read that nothing answered shows "You're offline" or "Couldn't reach Dash Platform", with Try now and a backoff auto-retry. The raw gRPC text sits behind Details (components/ui/states.tsx).
  • Offline navigation is held. A link clicked while offline no longer lands on the browser's own error page. It is held, a toast says so, and the page opens when the connection is back (hooks/use-offline-navigation.ts). Same-page anchors are left alone, and the base path is stripped.
  • Error boundaries. app/error.tsx catches a chunk that failed to load and reloads it (at most 2 automatic reloads per 5 minutes, and online only for a ChunkLoadError). app/global-error.tsx covers the root layout.

Shell and mobile

  • L-59: every page gets its own <title>, e.g. Issues · owner/name · Dash Forge. The owner is shown by DPNS name once resolved. A private repo's title is the repo name alone.
  • L-60: the repo's owner/name is the page's h1 wherever the view has no heading of its own. repo-home-content.tsx is untouched.
  • L-57: below lg, a menu button opens a drawer with Explore, New repository, the mirror guide, Notifications and Settings.
  • L-58:
    • Identity chips stay on one line and ellipsize.
    • The PR tabs use the repo tabs' scroll fades (the shared components/ui/tab-strip.tsx).
  • L-61: "Repo not found" lists repos with the same name, with mirrors of github.com/<owner>/<name> first, plus a search button.
  • L-55 / L-82:
    • Copy link keeps a ?repo= pin (the 404 shim carries the query through).
    • It falls back to the canonical route when a repo has no short form.
    • DPNS-form owners (alice.dash) expand.
    • GitHub Pages still answers a short path with HTTP 404 plus the shim, which is a static-host limit. Unfurls stay generic.
  • L-66: the theme follows the OS (prefers-color-scheme) until the user picks one, and an explicit choice persists. The toggle cycles system → dark → light.
  • L-81: the summary reads "N objects checked this session". The hosting note names the host that served the code; on forge.dashhq.org that's "GitHub Pages, behind Cloudflare".
  • L-84: the About card links the mirror's source, taken from the owner-written description with no extra read, and shows when a ref last changed ("last updated"). The storage badge's tooltip is now plain language. Topics stay unlinked, because there is no topic index to link to.
  • L-85 / L-86:
    • Card issue counts say "total".
    • A profile's own repos come with star and issue counts, from one composite read.
    • The cards no longer repeat the owner's own chip.
    • Explore's fixture-heavy lists are devnet data; nothing was filtered.

Sign-in prompts (L-62, L-73)

  • Named action and cost. Signed-out Star, Watch, Fork, Follow, New issue, comments, new PR and new repo open "Sign in to star this repo", with that write's previewed cost.
  • Cost figures.
    • The stale 62M "per issue or push" figure is replaced by the New issue form's own preview for a newcomer (about 0.0012 DASH).
    • The push figure is now the measured range (0.002–0.003).
  • Wallet tile. It is dimmed (still reachable) where released wallets can't answer.
  • Subtitle. The new-issue subtitle shows the owner's DPNS name instead of a raw id.

L-11: install without a release

  • install.sh tells a missing release (an HTTP 404 probe with a 20 s timeout, or a missing file:// path) apart from a network failure.
  • With no release, it says so, prints the cargo install route, and explains that a pre-release has to be pinned with DASH_FORGE_VERSION.
  • docs/INSTALL.md opens with the same note, Windows included.
  • The web install sheet leads with building from source.

What a tag push produces. release.yml already builds all six targets (Linux gnu x86_64/aarch64, musl, macOS x86_64/aarch64, Windows) on a v* tag. It also runs install.sh against the built archives, writes SHA256SUMS, and attests and publishes. The latest master dry run built every target green.

For a working release:

  1. Bump version under [workspace.package] in Cargo.toml (it is 0.0.0 today; a tag must equal it or the plan job fails), and merge that to master.
  2. Push v<that version> on the merge commit.
  3. Approve the release environment gate (required reviewer: PastaPastaPasta).

Pushing v0.1.0 after bumping to 0.1.0 gives a normal release that latest picks up. v0.1.0-rc.1 gives a pre-release that the default install.sh skips.

L-87 (not code)

The CSP error comes from Cloudflare Web Analytics auto-injection on the zone. Turning it off in the Cloudflare dashboard is the fix. Allowing static.cloudflareinsights.com in the CSP would be a one-line change, but it would contradict the zero-backend claim (and e2e zero-backend.spec.ts), so it is not done.

Tests

  • Unit:
    • Reader classification: offline mid-read, all copies dropped, a drop plus wrong bytes, marked transport, "other", corrupt sealed, a delta-base drop, and recovery only on transport.
    • A sealed range past an unauthenticated header.
    • Dead-mirror marking (answered vs network).
    • Reconnect backoff and jitter, and the debounced outage notes.
    • The auto-reload budget, and the offline-navigation target.
    • Page titles, short URLs and DPNS permalinks.
    • The issue cost figure, and install.sh (no release, and an unpublished pinned version).
  • Playwright against moutai (read-only, fixture repo), on a local build verified by SHA:
    • e2e/shell-resilience.spec.ts: offline mid-load stays Verified and recovers with no reload; the offline tab and list states; titles and h1; Repo-not-found suggestions; Copy link; the named sign-in.
    • keyboard-theme.spec.ts: the OS-following default.
    • mobile.spec.ts: iPhone SE and Pixel 7 drawer and one-line chip; offline on a phone.
    • Regression runs of v2-home, discovery-urls and a11y (both themes) passed.

Before/after screenshots, from master and this branch built and served locally and checked by SHA, are in dash-forge-qa/evidence/impl/fix-fg8-shell-resilience/.

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 27 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 1781da07-dcb2-405a-abfb-11955465d3d7

📥 Commits

Reviewing files that changed from the base of the PR and between 1dd319f and 0f08f04.

📒 Files selected for processing (78)
  • docs/INSTALL.md
  • forge-web/app/error.tsx
  • forge-web/app/global-error.tsx
  • forge-web/app/new/page.tsx
  • forge-web/components/app-header.tsx
  • forge-web/components/app-shell.tsx
  • forge-web/components/auth/create-identity-flow.tsx
  • forge-web/components/author.tsx
  • forge-web/components/login-modal.tsx
  • forge-web/components/profile-content.tsx
  • forge-web/components/providers.tsx
  • forge-web/components/repo-card.tsx
  • forge-web/components/repo/browse-boundary.tsx
  • forge-web/components/repo/clone-box.tsx
  • forge-web/components/repo/fork-button.tsx
  • forge-web/components/repo/issue-content.tsx
  • forge-web/components/repo/issues-content.tsx
  • forge-web/components/repo/new-pull-content.tsx
  • forge-web/components/repo/permalink.test.ts
  • forge-web/components/repo/pull-content.tsx
  • forge-web/components/repo/repo-header.tsx
  • forge-web/components/repo/repo-not-found.tsx
  • forge-web/components/repo/repo-rail.tsx
  • forge-web/components/repo/repo-scaffold.tsx
  • forge-web/components/repo/repo-shell-header.tsx
  • forge-web/components/repo/reviewers-card.tsx
  • forge-web/components/repo/star-button.tsx
  • forge-web/components/repo/target-rail.tsx
  • forge-web/components/repo/watch-button.tsx
  • forge-web/components/theme-toggle.tsx
  • forge-web/components/ui/backend-badge.tsx
  • forge-web/components/ui/copy-link.tsx
  • forge-web/components/ui/identity-pill.tsx
  • forge-web/components/ui/states.tsx
  • forge-web/components/ui/tab-strip.tsx
  • forge-web/components/ui/trust-panel.tsx
  • forge-web/e2e/keyboard-theme.spec.ts
  • forge-web/e2e/mobile.spec.ts
  • forge-web/e2e/prehydration.spec.ts
  • forge-web/e2e/shell-resilience.spec.ts
  • forge-web/e2e/v2-home.spec.ts
  • forge-web/hooks/use-dpns-name.ts
  • forge-web/hooks/use-offline-navigation.test.ts
  • forge-web/hooks/use-offline-navigation.ts
  • forge-web/hooks/use-ui-store.ts
  • forge-web/hooks/use-write-guard.ts
  • forge-web/lib/auth/create-identity.ts
  • forge-web/lib/auto-reload.test.ts
  • forge-web/lib/auto-reload.ts
  • forge-web/lib/browse/browse.test.ts
  • forge-web/lib/browse/index.ts
  • forge-web/lib/browse/reader.ts
  • forge-web/lib/online.ts
  • forge-web/lib/page-title.test.ts
  • forge-web/lib/page-title.ts
  • forge-web/lib/private/pack.ts
  • forge-web/lib/private/private.test.ts
  • forge-web/lib/sdk/contract-missing.test.ts
  • forge-web/lib/sdk/cost.test.ts
  • forge-web/lib/sdk/cost.ts
  • forge-web/lib/sdk/index.ts
  • forge-web/lib/sdk/service.test.ts
  • forge-web/lib/sdk/service.ts
  • forge-web/lib/sdk/unreachable.ts
  • forge-web/lib/short-url.test.ts
  • forge-web/lib/short-url.ts
  • forge-web/lib/utils.ts
  • forge-web/lib/view/browse-fallback.test.ts
  • forge-web/lib/view/browse-source.ts
  • forge-web/lib/view/discovery.ts
  • forge-web/lib/view/issue-query.ts
  • forge-web/lib/view/jump.ts
  • forge-web/lib/view/reconnect.test.ts
  • forge-web/lib/view/reconnect.ts
  • forge-web/lib/view/trust.test.ts
  • forge-web/lib/view/trust.ts
  • install.sh
  • tests/install/test-install.sh

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

PastaPastaPasta and others added 17 commits September 29, 2026 12:32
…L-10)

The browse reader tags every pack-source rejection as a source failure and reports an object failed only when bytes arrived and were wrong (a hash mismatch, undecodable bytes, or a sealed pack that fails authentication). A read that never got its bytes throws with no verdict, so the Verification card no longer claims tampering after going offline.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
… back (L-10, L-56)

A read that nothing answered shows a plain offline or unreachable state with Try now and the raw error behind Details, and retries by itself: on the online event, else with backoff. A browse read that got no bytes re-reads the view once the connection returns, and a mirror is not marked dead while the browser is offline.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…this session's (L-66, L-81)

The default theme is system (prefers-color-scheme) and an explicit choice is kept; the toggle cycles system, dark, light. The Verification summary reads 'N objects checked this session', and the hosting note names the host that served the code (GitHub Pages behind Cloudflare on forge.dashhq.org).

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…name chips and working short links (L-55, L-57, L-58, L-59, L-60, L-61, L-82)

document.title follows the route (Issues · owner/name, a file at a ref, a profile), with sealed private paths left out. The repo header's owner/name is the page's h1 where the view has none. Below lg a menu button opens a drawer with Explore, New repository, the mirror guide, Notifications and Settings. Identity chips stay on one line and ellipsize; the PR tabs get the repo tabs' scroll fades. Repo not found lists repos with that name, mirrors of github.com/<owner>/<name> first. Copy link keeps a ?repo= pin on the short URL, and owners written as full DPNS names (alice.dash) expand.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…t figure matches the form (L-62, L-73)

A signed-out Star, Watch, Fork, Follow, New issue, comment, new PR or new repo opens 'Sign in to star this repo' with the write's previewed cost. The stale 62M 'per issue or push' figure is replaced by the New issue form's own preview for a newcomer (about 0.0012 DASH) and the measured push range. The wallet tile is dimmed on networks where released wallets cannot answer, and the new-issue subtitle shows the owner's DPNS name rather than a raw id.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…, clearer counts (L-84, L-85, L-86)

The About card links a mirror's source repository (as the owner or a maintainer recorded it) and says when a ref last moved. The storage badge's tooltip is plain language. A profile's own repos are read with their star and issue counts in one composite and no longer repeat the owner's chip; card issue counts say they are totals.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…tead (L-11)

install.sh tells a missing release (HTTP 404, or a missing file:// path) from a network failure: with no release it says none is published, names a pinned version that is not, and prints the cargo install route. INSTALL.md opens with the same note, Windows included. The web install sheet leads with building from source and marks the prebuilt routes as needing a release; it also names dg completions correctly.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…6 and the group)

A page whose code could not be fetched because the connection dropped (a ChunkLoadError) showed Next's blank 'Application error'. app/error.tsx shows the plain offline state and reloads the page once the browser is back online. New Playwright specs cover offline mid-load and offline navigation recovery, titles and the h1, Repo not found suggestions, Copy link, the action-aware sign-in sheet, and on phones the menu drawer, one-line chips and the offline state.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…the browser's error page (L-56)

A link to a page this tab has no data for cannot render offline, and Next falls back to a full page load, which leaves the tab on the browser's 'no internet' page. The click is kept, a toast says the page opens when the connection is back, and it does.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
One isIdentityId (lib/utils) and one bareRoute; online status in lib/online with a useSyncExternalStore hook; reconnect internals private, with the backoff tested; the read-recovery hook keyed on the handled count; shared RetryNowButton and ErrorDetails; the drawer's external link inline; the page title reads Next's params directly; short-URL canonical routes merged; suggestions carry exact; the unreachable classifier imported from its own module.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
… retry (FG-8 review)

The reader reports a transport failure only for errors that say nothing answered (marked by the source, a network or node error, or offline); bytes that arrived and were wrong stay a failure; anything else gets no verdict and no recovery. A range past an unauthenticated sealed header is corrupt bytes. A mirror is marked dead only when its host answered. Automatic re-reads re-run the view without dropping the browse context, stop after three that met another outage (then Try again), start afresh per repo, and back off with jitter from one debounced outage note per burst. Error-boundary reloads are capped at two per five minutes, online only for a chunk that failed to load; app/global-error.tsx covers the root layout. Offline navigation lets same-page anchors through and strips the base path. The rail reads the mirror source from the description only and says 'last updated'. Private repos' titles are the name alone. install.sh's probe times out after 20 s and names DASH_FORGE_VERSION for a pre-release. The inbox keeps the plain repo read.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…-line owner, tab fades)

After rebasing on the repo shell header (#151): while the SDK loads, owner/name is the page's h1 and truncates on a phone, the owner label comes from the shared ownerLabel, and the tabs use the shared TabStrip. The rail's mirror provenance uses the byline Time element.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
… banner's does; pin the OS theme in the prehydration check

nr-3 finds the retry by 'Try again' wherever the outage surfaces, and the prehydration check assumed the old dark default: it now pins the OS to dark and also checks that no theme was stored.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@PastaPastaPasta
PastaPastaPasta merged commit 8a442e3 into master Sep 29, 2026
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant