Dev toolbar app: site identity, workspace awareness, and a control surface - #768
Open
jamiefolsom wants to merge 6 commits into
Open
Dev toolbar app: site identity, workspace awareness, and a control surface#768jamiefolsom wants to merge 6 commits into
jamiefolsom wants to merge 6 commits into
Conversation
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.
✅ Deploy Preview for pss-scavenger-hunt ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for padp-staging ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for marronage-staging ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for relnet-staging ready!
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.jsonand.git/HEADand 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.mddescribes 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.