fix(compose,web): unblock Living Wiki for fresh hub installs#41
Merged
fix(compose,web): unblock Living Wiki for fresh hub installs#41
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Phase 1 — Compose cache path fix: Both
docker-compose.hub.ymlanddocker-compose.ymlnow setSOURCEBRIDGE_STORAGE_REPO_CACHE_PATH=/data/repo-cacheon the API service. Without this, the default./repo-cacheresolves to/repo-cache(root-owned) inside the container; the API runs assourcebr(UID 1000) and hitspermission deniedbefore anyaddRepositorygit clone can start./datais alreadysourcebr-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 querieslivingWikiSettingsand shows a muted info banner ("Living Wiki is globally disabled on this server. Enable it in Settings → Living Wiki.") whenenabledisfalseandkillSwitchActiveisfalse. The repo detail page already had this State 0 banner insidewiki-settings-panel.tsx; this surfaces the same nudge earlier so users don't have to open a specific repo to discover it. Banner usesrole=status/aria-live=politeto match the established pattern.cli/serve.goTODO: Added a comment at the dispatcher gate (line ~692) documenting the option-D follow-up (defaultenabled=trueon fresh installs) with a summary of blockers, per the brief.Test plan
docker compose -p sb-local -f docker-compose.hub.yml down -vthenupwith the patched file —addRepositorywith a git URL should succeed past the prior permission error (docker exec sb-local-sourcebridge-1 ls -la /data/repo-cacheshould show asourcebr-owned directory after the API touches it)lw_settingsrow:/repositoriespage shows the "Living Wiki is globally disabled" banner; clicking the link goes to/settings/living-wiki/repositoriesgo 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 inImproveLabelsButton.tsx, nothing in touched filesVerification (done locally)
go build ./...: cleannpm run build: clean (31 static pages, 0 type errors on my changes)npm run lint: 1 pre-existing warning inImproveLabelsButton.tsx(not in scope)Commit:
cb5e947Fixes: fresh-install
addRepositorypermission denied + no LW onboarding guidance at list level.🤖 Generated with Claude Code