Skip to content

Add config-driven extension hook for sidebar#288

Open
msykes wants to merge 1 commit into
NateBJones-Projects:mainfrom
msykes:contrib/msykes/dashboard-extension-hook
Open

Add config-driven extension hook for sidebar#288
msykes wants to merge 1 commit into
NateBJones-Projects:mainfrom
msykes:contrib/msykes/dashboard-extension-hook

Conversation

@msykes
Copy link
Copy Markdown

@msykes msykes commented May 13, 2026

Contribution Type

  • Recipe (/recipes)
  • Schema (/schemas)
  • Dashboard (/dashboards)
  • Integration (/integrations)
  • Skill (/skills)
  • Repo improvement (docs, CI, templates)

What does this do?

Adds a small drop-in extension surface so dashboard add-ons can register a new route + sidebar entry without touching core files:

  • extensions.config.ts: typed registry, empty by default
  • components/Sidebar.tsx: splits nav into core + extensions + trailing, resolves icon keys via a registry; adds clock/folder/plug/sparkles
  • lib/api.ts: exports apiFetch so extension pages can reuse the authenticated JSON fetch + error plumbing
  • EXTENSIONS.md: convention doc (folder layout, auth, icon registry, sidecar vs in-tree REST routes)

After this change, future extensions touch only their own folder under app// and a single entry in extensions.config.ts.

Requirements

No new dependencies. No new external services. Compatible with the existing
Next.js App Router stack already in open-brain-dashboard-next. Does not
depend on any canonical skill or primitive — this is an in-tree convention
for the dashboard itself.

Checklist

  • I've read CONTRIBUTING.md
  • [N/A] My contribution has a README.md with prerequisites, step-by-step instructions, and expected outcome
  • [N/A] My metadata.json has all required fields
  • [N/A] If my contribution depends on a skill or primitive, I declared it in metadata.json and linked it in the README
  • I tested this on my own Open Brain instance
  • No credentials, API keys, or secrets are included

Note on the N/A items: This PR modifies an existing contribution
(dashboards/open-brain-dashboard-next) rather than adding a new one,
so the README / metadata.json checklist items don't apply in the usual
sense — the existing dashboard's README + metadata.json continue to
cover it. The new convention doc is EXTENSIONS.md inside the dashboard
folder, sibling to its existing README.

Adds a small drop-in extension surface so dashboard add-ons can register
a new route + sidebar entry without touching core files:

  - extensions.config.ts: typed registry, empty by default
  - components/Sidebar.tsx: splits nav into core + extensions + trailing,
    resolves icon keys via a registry; adds clock/folder/plug/sparkles
  - lib/api.ts: exports apiFetch so extension pages can reuse the
    authenticated JSON fetch + error plumbing
  - EXTENSIONS.md: convention doc (folder layout, auth, icon registry,
    sidecar vs in-tree REST routes)

After this change, future extensions touch only their own folder under
app/<route>/ and a single entry in extensions.config.ts.

https://claude.ai/code/session_01AvZANjBLBpEh3eFzPzzGGH
@github-actions
Copy link
Copy Markdown

Hey @msykes — welcome to Open Brain Source! 👋

Thanks for submitting your first PR. The automated review will run shortly and check things like metadata, folder structure, and README completeness. If anything needs fixing, the review comment will tell you exactly what.

Once the automated checks pass, a human admin will review for quality and clarity. Expect a response within a few days.

If you have questions, check out CONTRIBUTING.md or open an issue.

@github-actions github-actions Bot added the dashboard Contribution: frontend template label May 13, 2026
@alanshurafa alanshurafa added area: dashboard Review area: dashboard/frontend review: ready-for-maintainer Community reviewer recommends maintainer review alan-reviewed Reviewed by Alan Shurafa in Community Reviewer role labels May 20, 2026
@alanshurafa
Copy link
Copy Markdown
Collaborator

Thanks for the contribution, and welcome. This is a clean extensibility hook — the config-driven approach (extensions.config.ts plus a Sidebar.tsx that reads it) lets dashboard extensions add a route and nav entry without touching core dashboard files, which is the right design for keeping the core stable. EXTENSIONS.md documents the pattern clearly.

The change is almost entirely additive (+181/-2). I reviewed it structurally rather than running the dashboard. Recommend maintainer review.

— Alan (community reviewer; non-binding)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

alan-reviewed Reviewed by Alan Shurafa in Community Reviewer role area: dashboard Review area: dashboard/frontend dashboard Contribution: frontend template review: ready-for-maintainer Community reviewer recommends maintainer review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants