Skip to content

feat(dashboard): consume persisted settings#101

Merged
pratyush618 merged 3 commits intomasterfrom
feat/dashboard-consume-settings
May 1, 2026
Merged

feat(dashboard): consume persisted settings#101
pratyush618 merged 3 commits intomasterfrom
feat/dashboard-consume-settings

Conversation

@pratyush618
Copy link
Copy Markdown
Collaborator

Summary

Wire up the three settings categories that landed in #99 so the values actually drive the UI:

  • BrandinguseBranding() resolves the dashboard title (sidebar header + mobile menu); useApplyAccent() sets the --color-accent CSS variable on <html> and derives --color-accent-dim via color-mix() so badges and hover states stay coherent. Invalid colors are silently ignored.
  • External links — A new "Links" group appears in the sidebar and mobile menu when dashboard.external_links is non-empty, rendering each as <a target="_blank" rel="noreferrer noopener">.
  • Integration deep-links — When Grafana / Sentry / OTel URLs are configured, the job detail Overview tab shows an "Integrations" card with one button per configured URL. URLs may include a {job_id} placeholder which is substituted (URL-encoded) when the link is opened.

All settings parsing/derivation lives in features/settings/derived.ts so consumers don't reimplement JSON parsing or null-handling. useSettings() is shared via TanStack Query — first consumer triggers the fetch, everyone else reads from cache.

Test plan

  • pnpm exec biome check
  • pnpm exec tsc --noEmit
  • pnpm test (34 vitest passed)
  • pnpm build (clean)
  • Manual: configure title, accent (#6366f1), a link, and Grafana URL with {job_id} — verify all surface correctly and clearing each value reverts to default

Renders Open in Grafana / Sentry / OTel buttons when those integration URLs are configured. The {job_id} placeholder is substituted into the template so users can deep-link into pre-filtered dashboards.
@pratyush618 pratyush618 merged commit 2ab87e9 into master May 1, 2026
13 checks passed
@pratyush618 pratyush618 deleted the feat/dashboard-consume-settings branch May 2, 2026 05:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant