Skip to content

Dev toolbar app: site identity, workspace awareness, and a control surface - #768

Open
jamiefolsom wants to merge 6 commits into
developfrom
feat/fds-dev-toolbar
Open

Dev toolbar app: site identity, workspace awareness, and a control surface#768
jamiefolsom wants to merge 6 commits into
developfrom
feat/fds-dev-toolbar

Conversation

@jamiefolsom

Copy link
Copy Markdown
Member

Adds an Astro dev toolbar app for FairData Sites local development. It exists only under astro dev — never in builds, static or SSR.

The panel shows the session's identity on every page: the linked site and environment, with a persistent red badge and toolbar-icon dot when the environment is production-tier (local Tina edits write to production data); the git ref and the FairData Sites framework version in play (nearest version tag plus commit); the content repo and the FairData endpoints as the site knows them; and links to the Tina admin, the public domain, and the Netlify site. State updates live — the server half watches .fds-dev.json and .git/HEAD and pushes changes to the panel.

It also reads the pstudio workspace ledger: the workspace's home folder, the content clone's uncommitted-edit count (with the reminder that pushing content is publishing), the Tina datalayer port and whether it is isolated per workspace (#767) or shared, and a section listing the machine's other workspaces with a link to each one whose dev server is running.

One action works today: Stop (two-click, delegating to pstudio fds dev stop, which owns the cleanup). The other buttons are visible stubs with hover text; integrations/fds-toolbar/PLAN.md describes the intended control surface — rebuild content, trigger a staging rebuild, reindex search, clear the cache, and a static-preview section.

The identity panel was verified live against a running site, and the workspace state collector against a machine with six workspaces. The rendered v4 panel additions have not had a visual pass yet — worth one during review.

An FDS panel in Astro's dev toolbar: which site and env this dev server
serves, started how and on what ref, with links to the Tina admin and
the public domain. Production-tier envs get a red badge in the panel
and a persistent notification dot on the toolbar icon — the --prod
guardrail's warning, visible all session instead of scrolling away at
boot.

Site identity comes from the .fds-dev.json state dhtools writes,
falling back to the Netlify link and injected env; degrades to
'unknown' when the server was started by hand. Dev-only: no production
footprint.
The dev server now watches .fds-dev.json and .git/HEAD through Vite's
watcher and pushes fresh state to the panel — a new fds dev session or
a branch switch shows up by itself, no refresh. New rows: Output
(static/server), Content (the content repo and branch, linked), FairData
(the Core Data instance and project ids from config.json), and both
domains (public + ADMIN_DOMAIN). A two-click Stop button hands shutdown
to dhtools fds dev stop, which owns the cleanup; it renders only for
fds dev sessions.
Two action groups: THIS DEV SERVER (Stop live; Rebuild content and
Clear cache stubbed) and STAGING (Trigger rebuild and Reindex search
stubbed). Stubs are disabled buttons whose hover titles say what each
will do, so the surface is reviewable before the wiring exists.
The toolbar now reads the pstudio workspace ledger and shows what the
recent CLI work established. The panel gains the FairData Sites (FDS)
framework version in play, the workspace's home folder, the content
clone's uncommitted-edit count with the reminder that pushing publishes,
and the Tina datalayer port with whether it is isolated per workspace or
shared. A new section lists the machine's other workspaces, with a link
for each one whose dev server is running. The Stop button calls pstudio,
which replaced the old dhtools name.
@netlify

netlify Bot commented Jul 29, 2026

Copy link
Copy Markdown

Deploy Preview for pss-scavenger-hunt ready!

Name Link
🔨 Latest commit 1600492
🔍 Latest deploy log https://app.netlify.com/projects/pss-scavenger-hunt/deploys/6a6a4aeb4a83b00008d33036
😎 Deploy Preview https://deploy-preview-768--pss-scavenger-hunt.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Jul 29, 2026

Copy link
Copy Markdown

Deploy Preview for padp-staging ready!

Name Link
🔨 Latest commit 1600492
🔍 Latest deploy log https://app.netlify.com/projects/padp-staging/deploys/6a6a4aebeccdd30009a97bcc
😎 Deploy Preview https://deploy-preview-768--padp-staging.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Jul 29, 2026

Copy link
Copy Markdown

Deploy Preview for marronage-staging ready!

Name Link
🔨 Latest commit 1600492
🔍 Latest deploy log https://app.netlify.com/projects/marronage-staging/deploys/6a6a4aebd45ccc00081c002e
😎 Deploy Preview https://deploy-preview-768--marronage-staging.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Jul 29, 2026

Copy link
Copy Markdown

Deploy Preview for relnet-staging ready!

Name Link
🔨 Latest commit 1600492
🔍 Latest deploy log https://app.netlify.com/projects/relnet-staging/deploys/6a6a4aeb9af68a000883c79d
😎 Deploy Preview https://deploy-preview-768--relnet-staging.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

The other-workspaces dots trusted the pid in each workspace's state
file, and a recycled pid made a stopped site show green. The server now
probes each workspace's URL (any HTTP response within 400ms counts),
which is the same truth fds dev status uses. Stopped workspaces show a
gray dot instead of a dimmed circle.
@jamiefolsom
jamiefolsom requested a review from ajolipa July 30, 2026 14:37
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