Fix #150: silent auxiliary fetches + key source #151
No reviewers
Labels
No labels
actions
bug
cli
duplicate
enhancement
fork
forum
git storage
help wanted
insights
invalid
issues
moderation
oidc
ownership transfer
packages
pr/merge protection rules
projects
pull requests
question
releases
sponsorships
tags
webhooks
wiki
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
crueber/walhub!151
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/issue-150"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #150 — owners page spammed
SOCIAL:<UPPERCASE-REPO> not foundtoasts.ROOT CAUSE (two halves, both verified live against a stack carrying the exact rows):
repos/<o>/<r>/fork.jsonBEFORE the child manifest exists (internal/pulls/merge.go runFork; manifest share is delegated/pending). The owners listing (repoRegistry.Reposincmd/walhub/serve.go) lists by prefix, so the child (o/r-fork,e2e/demo2-fork) appears as a row — while every manifest-gated read 404s (socialCountsviarepoAlive, commits, summary). Verified:GET /api/v1/owners/o/repos → [r, r-fork]butGET /o/r-fork/api/social → 404 not found: repo o/r-fork not found.useDatakey verbatim inside.chip, and.chipcarries Tailwinduppercase(web/src/ui.css), so keysocial:o/r-forkDISPLAYS asSOCIAL:O/R-FORK(verified: tray innerText uppercases a lowercase key). The key sharesfull()with the request URL and the backend 404 echoes the URL parts verbatim, so the fetch was always correctly-cased lowercase; no wrong-cased fetch exists to eliminate.FIX (frontend-only, amends the #137/#142 tray-on-error contract): 404 on an auxiliary per-row fetch is missing DATA, not a failure. New shared
tolerateMissing(promise, missing)helper inweb/src/lib/data.js(404 → missing value, everything else rethrows into the unchanged tray path).<StarCount>resolves 404 → null and hides the count (placeholder only while loading);<ActivityStamp>keeps its{commits: []}mapping through the same helper. Audit:<RepoRow>s two probes are the only per-row fetches on/and/:owner. No backend/SDK/styling change; no new deps.PROOF: pre-fix drive of / shows the 2 reported toasts; post-fix scratch stack seeded with the exact fork-leftover state (healthy
o/r+ ghosto/r-fork+e2e/demo2-fork) shows 0 toasts in dark AND light, ghost rows render hidden-count + no-commits-yet, healthy row renders count + stamp, zero JS exceptions.TESTS:
node --test web/test/unit/*.test.js→ 322 pass (newtolerate-missing.test.js: 404→missing incl. the real start() path with empty tray; 401/403/500/network passthrough; resolved passthrough). Doc decision appended to `docs/go/12_web_ui.md$.Owners page spammed social:{o}/{r} toasts for listed repos whose manifest-gated reads 404 (fork-provisioned prefixes without a child manifest). StarCount now resolves 404 to hidden via the shared tolerateMissing helper; ActivityStamp uses the same helper. Appends the FIXED decision incl. the uppercase-key root cause (CSS .chip uppercase, no wrong-cased fetch exists).