Skip to content

Add "Develop locally" affordance to the dashboard - #1208

Open
elemdos wants to merge 1 commit into
mainfrom
feature/dashboard-develop-locally
Open

Add "Develop locally" affordance to the dashboard#1208
elemdos wants to merge 1 commit into
mainfrom
feature/dashboard-develop-locally

Conversation

@elemdos

@elemdos elemdos commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

Adds a Develop locally button + dialog to the dashboard (/admin/dashboard/sites), giving editors an in-product path from the visual CMS to the file-based workflow.

What

  • Ghost-style Develop locally button in the header, next to Create Site.
  • Dialog with the pull → edit → push loop:
    1. Install the CLI — npm install -g primo-cli
    2. Pull the workspace — primo pull -s <server-url> (pre-filled with this server's origin; prompts for login on first run)
    3. Edit with a local agent or by hand — sites are plain files
    4. Push changes back — primo push
  • Each command has a click-to-copy row (Copy → Check, resets after ~1.5s).
  • View docs link in the footer → docs.primo.build installation guide.

Notes

  • Dashboard-only for now. A site-scoped "pull this site" action would need a --site flag on the CLI (the server's /api/primo/export/{siteId} already supports it) — deferred.
  • The pre-filled URL uses self.baseURL. In production frontend + server share one origin so it's correct; in the split-port dev setup it may show the Vite origin.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Added a “Develop locally” option to the sites dashboard.
    • Introduced a step-by-step dialog with local development instructions.
    • Added one-click command copying with visual confirmation.
    • Included links to relevant documentation and an option to close the dialog.

Editors have no in-product path from the CMS to the file-based workflow;
they had to already know the CLI exists. This surfaces the pull → edit →
push loop where they manage sites, pre-filled with the server URL.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 863336cd-ab32-4b48-b4b2-ab7f1f046645

📥 Commits

Reviewing files that changed from the base of the PR and between d8b6fea and 841a258.

📒 Files selected for processing (1)
  • src/routes/dashboard/sites/+page.svelte

📝 Walkthrough

Walkthrough

Adds a “Develop locally” dashboard action that opens step-by-step local-development instructions, generates commands using the server URL, and provides clipboard copying with temporary visual feedback.

Changes

Local Development UI

Layer / File(s) Summary
Local development state and commands
src/routes/dashboard/sites/+page.svelte
Adds dialog state, derives server_url, constructs ordered development steps, and copies commands with timeout-based feedback.
Dashboard entry point and dialog
src/routes/dashboard/sites/+page.svelte
Adds the header button and dialog with command controls, optional notes, documentation links, and an “Okay” close action.

Estimated code review effort: 3 (Moderate) | ~15–30 minutes

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant SitesDashboard
  participant DevelopLocallyDialog
  participant ClipboardAPI
  User->>SitesDashboard: Click Develop locally
  SitesDashboard->>DevelopLocallyDialog: Open dialog
  User->>DevelopLocallyDialog: Click command copy
  DevelopLocallyDialog->>ClipboardAPI: Write command
  ClipboardAPI-->>DevelopLocallyDialog: Confirm copy
  DevelopLocallyDialog-->>User: Show Check feedback
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is concise and accurately summarizes the new Develop locally button and dialog added to the dashboard.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/dashboard-develop-locally

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.

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