Sync stale Dock/PixelTransition registry and prevent future drift#166
Open
Gazoon007 wants to merge 3 commits into
Open
Sync stale Dock/PixelTransition registry and prevent future drift#166Gazoon007 wants to merge 3 commits into
Gazoon007 wants to merge 3 commits into
Conversation
The committed source for these components had drifted from their generated registry files (Dock: background #120F17 -> DavidHDev#111; PixelTransition: import 'type CSSProperties'), but `pnpm build:registry` was never re-run. Regenerate so the registry matches the source on main.
- dev now runs the registry build in --watch mode alongside Vite (via run-p), mirroring react-bits, so editing a component regenerates public/r/*.json and componentDependencies.ts automatically — no need to remember build:registry. - The componentDependencies generator now formats its output with the repo's Prettier config, so every path (build, --watch, CI) emits the committed 2-space style instead of tabs. Fixes the spurious diff that appeared just from running dev.
Rebuilds the registry on every PR/push and fails if public/r or componentDependencies.ts drifted from the component sources. Enforcement backstop so a stale registry is caught automatically, not by a reviewer.
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.
Motivation
This started with the review on #164, where the note was to run
pnpm build:registryby hand so the new component's registry file gets generated:That manual step is easy to forget, and it is exactly why the Dock and PixelTransition entries drifted out of sync here. Instead of leaning on everyone remembering it, or a reviewer having to flag it every single time, this PR makes the registry rebuild itself during normal development and adds a CI check so it cannot silently fall behind again.
What this does
Keeps the generated jsrepo registry in sync with the components, in two parts:
public/r/Dock.jsonandpublic/r/PixelTransition.jsonmatch their current source.Why it was out of sync
The
public/r/*.jsonfiles are generated bypnpm build:registrybut committed to the repo, so they go stale whenever a component is edited without rerunning the build.The registry was last regenerated back in #163 (Revamp 2026), commit
9509966. Two later commits then changed the source without rebuilding it:b69cd0e("small fixes") set the Dock background from#120F17to#111de00bda("type fixes") switched the PixelTransition import totype CSSPropertiesSo the source moved on and the registry stayed behind. A clean rebuild confirms these were the only two files affected.
Preventing it from happening again
react-bits already handles this by running the registry build in watch mode alongside Vite, so edits regenerate the registry automatically. This PR wires the same thing into
dev, reusing therun-pdependency that is already in the project:Two changes back that up:
dev.