feat(designs): drop react-ui.json from the Design Studio preview path (#3859) - #4104
Open
kevinthelago wants to merge 2 commits into
Open
feat(designs): drop react-ui.json from the Design Studio preview path (#3859)#4104kevinthelago wants to merge 2 commits into
kevinthelago wants to merge 2 commits into
Conversation
…#3859) App-graph records (kitId === base-studio-code, the app's own pages/panels migrated by epic #3604) now preview LIVE through the runtime loader (GraphComponent) instead of the sandboxed esbuild-in-iframe path -- the same "preview ISOLATES vs runtime loader CONNECTS" split componentLoader.ts already draws, and the same path Fleet/Settings/Skills/Security/MCP/GitHub/ Automations already mount their pages with. - ComponentPreviewFrame.tsx: routes by comp.kitId. Third-party / harvested / user-authored components are unaffected -- same sandboxed build, now with a reusable EMPTY_ARTIFACT (componentPreview.ts) instead of the raw react-ui.json import. - useComponentScan/componentScan.ts: scannableComponents skips app-graph records entirely -- they no longer esbuild-build+run in a hidden iframe on every Studio visit. - graphHealth.ts: the no-implementation check for an app-graph record now gates on previewBuildFailures (the registry + kit-siblings resolution its live host actually uses), not the retired artifact. Every other record's buildability check is unchanged except EMPTY_ARTIFACT. - No @data/components/react-ui.json import remains under src/features/designs/. Closes #3859. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DPwsgtzLe9WfKAQPWvr4iu
…l store (#3910) emit_component_writes_a_stamped_alias_free_closure asserted the emitted Card.tsx is stamped "// vendored from bsc/react-ui@..." -- true only when emit_kit() (#3720) falls back to the packaged artifact. Since #3720, that function prefers the LIVE component store (BSC_COMPONENT_DIR, default ~/.base-studio-code/components/) whenever it's reachable and non-empty, in which case the stamp is "bsc/studio@..." (EmitKit::from_store's merged-view id) instead -- so the test was asserting on the developer's local library contents, not the code, and failed on develop for exactly that reason. Fixed by pointing BSC_COMPONENT_DIR at an empty scratch dir for the duration of the test, under a shared COMPONENT_DIR_ENV_LOCK (promoted from release_add_from_store_assembles_a_non_empty_artifact's previously-local FROM_STORE_ENV_LOCK, since both tests mutate the same process-global env var and must serialize against each other, not just against themselves). An empty store makes load_store_components() return [], so emit_kit() takes its documented packaged-artifact fallback deterministically. The other pre-existing failure the issue named (harvest_is_in_the_help_catalog's <repo-dir> needle) was already fixed on this branch via #3907. cargo test -p bsc-ui: 137/137 green. cargo clippy -p bsc-ui --all-targets: clean. Closes #3910. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DPwsgtzLe9WfKAQPWvr4iu
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.
Summary
kitId === base-studio-code, the app's own pages/panels migrated by epic Epic: load the app's UI from the graph at runtime #3604) now preview live through the runtime loader (GraphComponent) instead of the sandboxed esbuild-in-iframe path -- the same ISOLATES-vs-CONNECTS splitcomponentLoader.tsalready draws, and the same path Fleet/Settings/Skills/Security/MCP/GitHub/Automations already mount their pages with.useComponentScan/scannableComponentsskip app-graph records entirely -- no more esbuild-build+run in a hidden iframe on every Studio visit for records that no longer preview that way.graphHealth.ts's no-implementation check for an app-graph record now gates onpreviewBuildFailures(registry + kit-siblings resolution -- the same resolution its live host actually uses), not the retired packaged artifact.@data/components/react-ui.jsonimport remains undersrc/features/designs/.Closes #3859.
Test plan
npm run typecheck-- cleannpm run lint-- 0 errors (pre-existing warning baseline unchanged)npx vitest run(full repo) -- 6033 passed, 2 pre-existing failures inreactUiKit.gen.test.ts(verified viagit stashagainst the unmodified baseline -- the committedreact-ui.jsonartifact is already stale vs. current source, unrelated to this PR; that's the artifact-rot Epic: retire react-ui.json from the app's own UI path — the platform registry already replaced it #3856's epic describes, left for Re-home react-ui.json as the emit-only distribution kit (and stop calling it a seed) #3861's re-home)ComponentPreviewFrame.test.tsx(routing),componentScan.test.ts(app-graph records excluded from the scan),graphHealth.test.ts(registry+siblings resolution for app-graph records, both the clean and genuinely-unresolvable cases)Co-Authored-By: Claude Sonnet 5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01DPwsgtzLe9WfKAQPWvr4iu