Repository navigation
Export the gutter defaults from @nimblebrain/synapse/host (0.39.0) - #137
Merged
Merged
Conversation
Contributor
Author
QA Review: PR #137Scope: 12 files, +57/−17 · prepared review worktree; creation and dependency installation skipped as requested · reviewed: ec38e73 · CI: pending Critical (must fix)None. Fix in-PRNone. SuggestionsNone. What Looks Good
Body claims
machine record{
"kind": "review",
"pr": 137,
"round": 1,
"reviewed": "ec38e7346443e45f887a7a793e5f8d98f5bae361",
"delta_base": null,
"ci": "pending",
"risk": "LOW",
"stop_gate": "n/a",
"verdict": "No findings; eligible for qa-reviewed once CI is green.",
"label": "eligible-on-green",
"findings": []
}Reviewer: Codex (pr-loop round 1). |
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.
What
Exports
GUTTER_DEFAULT,GUTTER_NARROW_DEFAULTandGUTTER_NARROW_BREAKPOINTfrom@nimblebrain/synapse/hostas well as/ui. Version goes to 0.39.0 (minor, additive).src/ui/tokens.tsintosrc/theme-defaults.ts. That module has no React dependency and already holds the token contract's defaults, whichsrc/connect.tsandsrc/host/theme.tsshare.src/ui/tokens.tsimportsGUTTER_DEFAULTfortokens.gutterand re-exports all three, so/ui's public API does not change.AppFramestill imports them from../tokens.js.src/host/index.tsre-exports them. Its header comment now says a host may import them to match the kit's breakpoint and values./hostrow to the export table. Docs:appframe.mdxandtokens.mdxsay the constants come from/uiand also, without React, from/host.## [0.39.0]. The 0.38.0 entry is already released (v0.38.0is tagged and published), so it stays as written, and 0.39.0 records the correction: 0.38.0 said a host could test its values against these constants, but only/uiexported them, and that entry imports React.package.json,package-lock.jsonandpython/nimblebrain_synapse/__init__.py(__client_version__) are set to 0.39.0.Why
0.38.0's CHANGELOG says "A host that supplies its own values can test them against these." A host without React could not do that, because
/ui's index re-exports React components./hostis the React-free cross-host client, so that is where the constants go. This PR adds no new subpath.Build checks
React in
dist/host/: none. Afternpm run buildI followed every relative import fromdist/host/index.{js,cjs,d.ts,d.cts}, transitively: 6 runtime chunks,detect-*.d.{ts,cts}, andtheme-defaults-*.d.{ts,cts}.grep -il reactacross that set matches no file, and none of those files has a bare (package) import.@modelcontextprotocolshows up only in a doc comment indetect-*.d.ts("This layer intentionally has ZERO dependency on@modelcontextprotocol/*"). No file in the set imports it.IIFEs.
src/host/iife.tsis unchanged.dist/connect.iife.global.jsis byte-identical to the build frommain.dist/synapse-ui.iife.global.jsis unchanged in content but differs in bytes. Both builds have 3139 tokens, and the only differences are a consistent one-to-one renaming of minified identifiers, the re-mangling the kit's guide describes when a module in the bundle gains exports. The gutter constants do not appear in it (tree-shaken). The vendored copypython/nimblebrain_synapse/_assets/synapse-ui.iife.jsis re-copied from the build, as the guide requires. The constants sit at the end oftheme-defaults.ts. Placed among the existing exports, they also changed theconnectIIFE's bytes.Test
npm run ci(lint, typecheck, build, size, test): passes, 39 files, 660 tests.uv run pytestinpython/: 30 passed.src/__tests__/ui/layouts.test.tsx: the existing test that the three constants are exported from/uistill passes. A new test checks the same values from/host.Out of scope
/tokenssubpath. Not added, because it would be a new permanent export surface for three constants./host's type output and@modelcontextprotocol/*: no file imports it (see above), so nothing to change here.