Skip to content

fix(web): Confluence creds stale cache + configured badges on settings disclosures#42

Merged
jstuart0 merged 1 commit intomainfrom
fix/confluence-stale-cache-and-badges
May 6, 2026
Merged

fix(web): Confluence creds stale cache + configured badges on settings disclosures#42
jstuart0 merged 1 commit intomainfrom
fix/confluence-stale-cache-and-badges

Conversation

@jstuart0
Copy link
Copy Markdown
Collaborator

@jstuart0 jstuart0 commented May 6, 2026

Summary

  • Bug A — stale Urql cache: Add requestPolicy: "network-only" to the useQuery(LIVING_WIKI_GLOBAL_SETTINGS_QUERY) call in wiki-settings-panel.tsx. The /settings/living-wiki page saves credentials via raw authFetch (no Urql mutation), so the document cache never gets invalidated. Without this change, a user who lands on a repo page before saving creds gets confluenceToken: null cached; returning after saving still gets the stale null from the cache, leaving the Confluence sink grayed out with "(credentials not configured)". network-only forces a fresh server fetch on every panel mount.

  • Bug B — no configured-state indicator: Extend the Disclosure component in settings/living-wiki/page.tsx with an optional configured?: boolean prop. When true, renders a green "Configured" pill beside the label; when false, a muted "Not configured" pill. Applied to all four credential groups (GitHub, GitLab, Confluence, Notion) using the respective token field as the indicator. The disclosure does not auto-open on save — only the badge changes, giving the user instant confirmation that save worked without disrupting their scroll position.

Test plan

  • cd web && npm run lint — clean (one pre-existing warning in ImproveLabelsButton.tsx only)
  • cd web && npm run build — clean
  • Settings page: with no creds set, all four disclosures show "Not configured" badge when collapsed. Enter and save GitHub token → badge changes to green "Configured" without expanding the disclosure.
  • Repo wiki settings panel: set Confluence creds on the settings page → navigate immediately to a repo → Confluence sink is enabled (not grayed out), confirming no stale cache served.

🤖 Generated with Claude Code

…tings disclosures

Bug A: add requestPolicy:"network-only" to the useQuery(LIVING_WIKI_GLOBAL_SETTINGS_QUERY)
call in wiki-settings-panel.tsx. The settings page saves creds via raw authFetch (no Urql
mutation), so the document cache never gets invalidated — network-only forces a fresh fetch
on every panel mount, ensuring hasConfluenceCreds reflects the actual server state.

Bug B: extend the Disclosure component in settings/living-wiki/page.tsx with an optional
configured prop. When true, renders a green "Configured" pill beside the label; when false,
a muted "Not configured" pill. Wired to all four credential groups (GitHub, GitLab,
Confluence, Notion) using the respective token field as the indicator (non-empty = configured).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@jstuart0 jstuart0 merged commit 5acb2e2 into main May 6, 2026
12 checks passed
@jstuart0 jstuart0 deleted the fix/confluence-stale-cache-and-badges branch May 6, 2026 05:52
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