Skip to content

refactor: rename dashboard-provider-mock to dashboard-data-provider#184

Merged
eliteprox merged 5 commits into
mainfrom
refactor/rename-dashboard-plugin
Mar 4, 2026
Merged

refactor: rename dashboard-provider-mock to dashboard-data-provider#184
eliteprox merged 5 commits into
mainfrom
refactor/rename-dashboard-plugin

Conversation

@eliteprox
Copy link
Copy Markdown
Contributor

@eliteprox eliteprox commented Mar 4, 2026

Summary

Changes

  • Plugin directory: plugins/dashboard-provider-mockplugins/dashboard-data-provider
  • plugin.json: name, displayName, description, entry path, keywords
  • package.json: @naap/plugin-dashboard-data-provider-frontend
  • vite.config.ts: NaapPluginDashboardDataProvider global name
  • Exported function: registerMockDashboardProviderregisterDashboardProvider
  • App.tsx, mount.tsx, provider.ts, README.md: updated names/references
  • prisma/seed.ts: dashboardDataProvider camelCase name, updated metadata
  • BackgroundPluginLoader, plugin-discovery, cleanup script, docs: comment/reference updates
  • CDN serve tests: updated kebab-case test expectations

Screenshots

image

Breaking Changes

Plugin renamedashboard-provider-mock is now dashboard-data-provider. The DB seed uses dashboardDataProvider as the camelCase name. Existing installations will need a re-seed or manual DB update.

registerMockDashboardProviderregisterDashboardProvider — the exported function name changed.

Test Plan

  • SDK tests pass (273/273)
  • No remaining references to old dashboard-provider-mock name
  • Verify plugin loads correctly under new name after re-seed

Summary by CodeRabbit

  • Refactor

    • Renamed "Dashboard Provider (Mock)" to "Dashboard Data Provider" across the app and plugin surfaces; behavior unchanged.
    • Replaced the old provider plugin manifest with the new Dashboard Data Provider manifest.
  • Documentation

    • Updated guides, README, and quick-start instructions to use the new plugin name and paths.
  • Tests

    • Test expectations updated to reflect the renamed plugin key.
  • Chore

    • Made an example auth helper function available for external use.

The plugin now serves as the primary dashboard data provider, making
the "mock" name misleading. Rename the plugin directory, package name,
global name, exported function, and all references across the codebase.

- Rename plugins/dashboard-provider-mock → plugins/dashboard-data-provider
- Rename registerMockDashboardProvider → registerDashboardProvider
- Update plugin.json (name, displayName, description, entry, keywords)
- Update package.json (@naap/plugin-dashboard-data-provider-frontend)
- Update vite.config.ts (NaapPluginDashboardDataProvider)
- Update App.tsx, mount.tsx, provider.ts, README.md
- Update prisma/seed.ts (dashboardDataProvider)
- Update BackgroundPluginLoader, plugin-discovery, cleanup script, docs
- Update CDN serve tests for new kebab-case name

Made-with: Cursor
@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Mar 4, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
naap-platform Ready Ready Preview, Comment Mar 4, 2026 8:48pm

Request Review

@github-actions github-actions Bot added scope/shell Shell app changes scope/packages Shared package changes scope/infra Infrastructure changes size/L Large PR (201-500 lines) labels Mar 4, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 4, 2026

⚠️ This PR is large (220 lines changed). Consider splitting it into smaller PRs for easier review.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 4, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: c0d7e911-2928-43e3-bf1e-dc6923cd7921

📥 Commits

Reviewing files that changed from the base of the PR and between c68f8d2 and eb788a2.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json, !package-lock.json
📒 Files selected for processing (1)
  • examples/daydream-video/frontend/src/lib/api.ts

📝 Walkthrough

Walkthrough

Renames the plugin from dashboardProviderMock/dashboard-provider-mock to dashboardDataProvider/dashboard-data-provider across manifests, frontend code, tests, docs, seed data, and build config; adds new plugin manifest and Vite config for the renamed plugin and removes corresponding files for the old mock plugin.

Changes

Cohort / File(s) Summary
Seed & CDN tests
apps/web-next/prisma/seed.ts, apps/web-next/src/app/cdn/plugins/__tests__/cdn-serve.test.ts, bin/cleanup-moved-plugins.ts
Updated seed data, test expectations, and cleanup list to reference dashboardDataProvider / dashboard-data-provider.
Docs & Comments
apps/web-next/src/components/plugin/BackgroundPluginLoader.tsx, apps/web-next/src/content/docs/guides/dashboard-data-provider.mdx, packages/database/src/plugin-discovery.ts, plugins/dashboard-data-provider/README.md
Rewrote examples, inline comments, and documentation to use the new plugin name/path.
Frontend package & app init
plugins/dashboard-data-provider/frontend/package.json, plugins/dashboard-data-provider/frontend/src/App.tsx
Renamed npm package and plugin name in App initialization to the data-provider identifiers.
Provider API & tests
plugins/dashboard-data-provider/frontend/src/provider.ts, plugins/dashboard-data-provider/frontend/src/__tests__/provider.test.ts
Renamed exported function registerMockDashboardProviderregisterDashboardProvider and updated tests accordingly (signature preserved aside from name).
Mount, build, manifest (new plugin)
plugins/dashboard-data-provider/frontend/src/mount.tsx, plugins/dashboard-data-provider/frontend/vite.config.ts, plugins/dashboard-data-provider/plugin.json
Added plugin manifest and Vite config for dashboard-data-provider; updated mount metadata and global name.
Removed mock plugin config & manifest
plugins/dashboard-provider-mock/frontend/vite.config.ts, plugins/dashboard-provider-mock/plugin.json
Deleted Vite config and plugin manifest for the deprecated dashboard-provider-mock plugin.
Example export change
examples/daydream-video/frontend/src/lib/api.ts
Exported getAuthToken (made public).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested labels

plugin/community

Suggested reviewers

  • seanhanca
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately describes the main change: renaming the dashboard-provider-mock plugin to dashboard-data-provider, which is the primary and most important change throughout the changeset.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch refactor/rename-dashboard-plugin

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (2)
apps/web-next/src/app/cdn/plugins/__tests__/cdn-serve.test.ts (1)

160-167: Test expectations are correct, but there's duplicate coverage.

The toKebabCase('dashboardDataProvider')'dashboard-data-provider' conversion is correct. However, lines 162 and 166 test the exact same input/output pair in two different test cases ("handles unknown/new plugin names" and "handles triple-word camelCase"). Consider consolidating or differentiating these tests.

♻️ Suggested differentiation
   it('handles unknown/new plugin names without a map entry', () => {
     expect(toKebabCase('someNewPlugin')).toBe('some-new-plugin');
-    expect(toKebabCase('dashboardDataProvider')).toBe('dashboard-data-provider');
+    expect(toKebabCase('customAnalytics')).toBe('custom-analytics');
   });

   it('handles triple-word camelCase', () => {
     expect(toKebabCase('dashboardDataProvider')).toBe('dashboard-data-provider');
+    expect(toKebabCase('networkStatusMonitor')).toBe('network-status-monitor');
   });
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/web-next/src/app/cdn/plugins/__tests__/cdn-serve.test.ts` around lines
160 - 167, The tests duplicate the same assertion for
toKebabCase('dashboardDataProvider') in two different it blocks; either
consolidate them into a single focused test or change the second test to a
distinct triple-word example (e.g., call toKebabCase with a different camelCase
like 'veryLongPluginName' or 'analyticsDataProvider') and assert its expected
kebab-case output, updating the it description accordingly so each case covers
unique behavior.
apps/web-next/src/content/docs/guides/dashboard-data-provider.mdx (1)

21-21: Consider standardizing the sample destination plugin name across docs.

Line 21 uses plugins/my-network-provider, while the plugin README example uses plugins/my-dashboard-provider. Picking one convention across docs would reduce copy/paste confusion.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/web-next/src/content/docs/guides/dashboard-data-provider.mdx` at line
21, The sample destination plugin name is inconsistent; change the command
string "plugins/my-network-provider" to the canonical
"plugins/my-dashboard-provider" in the docs (the line containing cp -r
plugins/dashboard-data-provider plugins/my-network-provider) and then search
other docs/README examples for "my-network-provider" or "my-dashboard-provider"
to make them all use the same "plugins/my-dashboard-provider" name for
consistency.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@apps/web-next/src/app/cdn/plugins/__tests__/cdn-serve.test.ts`:
- Around line 160-167: The tests duplicate the same assertion for
toKebabCase('dashboardDataProvider') in two different it blocks; either
consolidate them into a single focused test or change the second test to a
distinct triple-word example (e.g., call toKebabCase with a different camelCase
like 'veryLongPluginName' or 'analyticsDataProvider') and assert its expected
kebab-case output, updating the it description accordingly so each case covers
unique behavior.

In `@apps/web-next/src/content/docs/guides/dashboard-data-provider.mdx`:
- Line 21: The sample destination plugin name is inconsistent; change the
command string "plugins/my-network-provider" to the canonical
"plugins/my-dashboard-provider" in the docs (the line containing cp -r
plugins/dashboard-data-provider plugins/my-network-provider) and then search
other docs/README examples for "my-network-provider" or "my-dashboard-provider"
to make them all use the same "plugins/my-dashboard-provider" name for
consistency.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 1a190c6e-930a-4a22-8717-0762fe491bd0

📥 Commits

Reviewing files that changed from the base of the PR and between fda907e and c68f8d2.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json, !package-lock.json
📒 Files selected for processing (30)
  • apps/web-next/prisma/seed.ts
  • apps/web-next/src/app/cdn/plugins/__tests__/cdn-serve.test.ts
  • apps/web-next/src/components/plugin/BackgroundPluginLoader.tsx
  • apps/web-next/src/content/docs/guides/dashboard-data-provider.mdx
  • bin/cleanup-moved-plugins.ts
  • packages/database/src/plugin-discovery.ts
  • plugins/dashboard-data-provider/README.md
  • plugins/dashboard-data-provider/frontend/index.html
  • plugins/dashboard-data-provider/frontend/package.json
  • plugins/dashboard-data-provider/frontend/src/App.tsx
  • plugins/dashboard-data-provider/frontend/src/__tests__/provider.test.ts
  • plugins/dashboard-data-provider/frontend/src/data/index.ts
  • plugins/dashboard-data-provider/frontend/src/data/mock-fees.ts
  • plugins/dashboard-data-provider/frontend/src/data/mock-gpu.ts
  • plugins/dashboard-data-provider/frontend/src/data/mock-jobs.ts
  • plugins/dashboard-data-provider/frontend/src/data/mock-kpi.ts
  • plugins/dashboard-data-provider/frontend/src/data/mock-pipelines.ts
  • plugins/dashboard-data-provider/frontend/src/data/mock-pricing.ts
  • plugins/dashboard-data-provider/frontend/src/data/mock-protocol.ts
  • plugins/dashboard-data-provider/frontend/src/globals.css
  • plugins/dashboard-data-provider/frontend/src/job-feed-emitter.ts
  • plugins/dashboard-data-provider/frontend/src/main.tsx
  • plugins/dashboard-data-provider/frontend/src/mount.tsx
  • plugins/dashboard-data-provider/frontend/src/provider.ts
  • plugins/dashboard-data-provider/frontend/tailwind.config.js
  • plugins/dashboard-data-provider/frontend/tsconfig.json
  • plugins/dashboard-data-provider/frontend/vite.config.ts
  • plugins/dashboard-data-provider/plugin.json
  • plugins/dashboard-provider-mock/frontend/vite.config.ts
  • plugins/dashboard-provider-mock/plugin.json
💤 Files with no reviewable changes (2)
  • plugins/dashboard-provider-mock/frontend/vite.config.ts
  • plugins/dashboard-provider-mock/plugin.json

coderabbitai[bot]
coderabbitai Bot previously approved these changes Mar 4, 2026
…encies to resolve EBADPLATFORM issues on non-macOS CI runners
coderabbitai[bot]
coderabbitai Bot previously approved these changes Mar 4, 2026
The useWHIP hook imports getAuthToken from api.ts but the function
was not exported, causing the plugin build to fail with:
"getAuthToken is not exported by src/lib/api.ts"

Made-with: Cursor
@eliteprox eliteprox merged commit daad065 into main Mar 4, 2026
28 checks passed
@eliteprox eliteprox deleted the refactor/rename-dashboard-plugin branch March 4, 2026 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope/infra Infrastructure changes scope/packages Shared package changes scope/shell Shell app changes size/L Large PR (201-500 lines)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant