Skip to content

fix(compose,web): unblock Living Wiki for fresh hub installs#41

Merged
jstuart0 merged 1 commit intomainfrom
fix/living-wiki-dispatch-and-cache-path
May 6, 2026
Merged

fix(compose,web): unblock Living Wiki for fresh hub installs#41
jstuart0 merged 1 commit intomainfrom
fix/living-wiki-dispatch-and-cache-path

Conversation

@jstuart0
Copy link
Copy Markdown
Collaborator

@jstuart0 jstuart0 commented May 6, 2026

Summary

  • Phase 1 — Compose cache path fix: Both docker-compose.hub.yml and docker-compose.yml now set SOURCEBRIDGE_STORAGE_REPO_CACHE_PATH=/data/repo-cache on the API service. Without this, the default ./repo-cache resolves to /repo-cache (root-owned) inside the container; the API runs as sourcebr (UID 1000) and hits permission denied before any addRepository git clone can start. /data is already sourcebr-owned. The cache is ephemeral (rebuildable from git); operators who want persistence can add a named volume mount for /data/repo-cache.

  • Phase 2 — LW onboarding banner on repositories list: The repositories list page (/repositories) now queries livingWikiSettings and shows a muted info banner ("Living Wiki is globally disabled on this server. Enable it in Settings → Living Wiki.") when enabled is false and killSwitchActive is false. The repo detail page already had this State 0 banner inside wiki-settings-panel.tsx; this surfaces the same nudge earlier so users don't have to open a specific repo to discover it. Banner uses role=status / aria-live=polite to match the established pattern.

  • cli/serve.go TODO: Added a comment at the dispatcher gate (line ~692) documenting the option-D follow-up (default enabled=true on fresh installs) with a summary of blockers, per the brief.

Test plan

  • docker compose -p sb-local -f docker-compose.hub.yml down -v then up with the patched file — addRepository with a git URL should succeed past the prior permission error (docker exec sb-local-sourcebridge-1 ls -la /data/repo-cache should show a sourcebr-owned directory after the API touches it)
  • Fresh install with no lw_settings row: /repositories page shows the "Living Wiki is globally disabled" banner; clicking the link goes to /settings/living-wiki
  • After enabling LW globally in settings, banner disappears on return to /repositories
  • go build ./... — passes (no Go logic changed beyond a comment)
  • cd web && npm run build — passes (verified locally, 0 new errors/warnings on touched files)
  • cd web && npm run lint — only pre-existing warning in ImproveLabelsButton.tsx, nothing in touched files

Verification (done locally)

  • go build ./...: clean
  • npm run build: clean (31 static pages, 0 type errors on my changes)
  • npm run lint: 1 pre-existing warning in ImproveLabelsButton.tsx (not in scope)

Commit: cb5e947

Fixes: fresh-install addRepository permission denied + no LW onboarding guidance at list level.

🤖 Generated with Claude Code

…ath + onboarding banner)

Phase 1 — Compose fix (cache path blocker):
Add SOURCEBRIDGE_STORAGE_REPO_CACHE_PATH=/data/repo-cache to the API
service env block in both docker-compose.hub.yml and docker-compose.yml.
The default ./repo-cache resolves to /repo-cache (root-owned) inside the
API container; the container runs as sourcebr (UID 1000), so mkdir fails
with permission denied before any git clone can start. /data is sourcebr-
owned and writable. Cache is ephemeral (rebuildable from git); add a named
volume mount for /data/repo-cache if persistence is needed.

Phase 2 — Onboarding banner (LW dispatcher gate):
Show a 'Living Wiki is globally disabled' info banner on the repositories
list page when livingWikiSettings.enabled is false. Matches the State 0
info-row aesthetic already in wiki-settings-panel.tsx (muted border/bg,
role=status, aria-live=polite, link to /settings/living-wiki). The panel
already handles State 0 on the repo detail page; this surfaces the nudge
earlier, at the list level. Banner is suppressed when lwSettings is null
(data not yet loaded) or when killSwitchActive is true (separate state).

Also adds a TODO comment at cli/serve.go:692 pointing at the open option-D
question (default enabled=true on fresh installs) with a summary of the
blockers, per the brief.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@jstuart0 jstuart0 merged commit 2f2b65a into main May 6, 2026
12 checks passed
@jstuart0 jstuart0 deleted the fix/living-wiki-dispatch-and-cache-path branch May 6, 2026 05:48
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