Skip to content

refactor(primitives): forward @tangle-network/ui/primitives with export *, deprecate the subpath - #448

Merged
drewstone merged 3 commits into
mainfrom
collapse/ui-sandbox-reexports
Oct 25, 2026
Merged

drewstone merged 3 commits into
mainfrom
collapse/ui-sandbox-reexports

Conversation

@drewstone

Copy link
Copy Markdown
Contributor

Problem. src/primitives/index.ts and src/index.ts each re-export about 240 @tangle-network/ui/primitives names through hand-typed lists. They are copies of ui's own export list (dotfiles census xrepo rank 3, brand~sandbox-ui), and they drift on every ui release: MISSING_EXPORT on ui 11.40, and the names ui 11.42.0 added (MetricChart, series helpers; HoverCard/Breadcrumb at root) are absent until someone types them in (#447 adds 48 lines for that).

Change.

  • ./primitives is export * from "@tangle-network/ui/primitives" plus Sandbox's own Logo, TangleKnot, LogoProps, HeadingProps, SectionTitle, SectionTitleProps. A named export takes precedence over the star, so these shadow ui's exactly as before.
  • Root is export * from "./primitives" plus export type { TerminalLine } from "./workspace", which keeps the root TerminalLine the workspace type (it was the one collision).
  • No public name removed. Added: series/MetricChart names on ./primitives and root; Breadcrumb*, HoverCard*, TerminalInput, TerminalCursor on root.
  • ./primitives is documented as a deprecated compatibility re-export (README, file header, changeset); new code imports @tangle-network/ui/primitives. agent-container has 0 importers; 11 org repos still import it, so every name stays.
  • ui-export-parity.test.ts: the primitives parity case and the root omission pin checked the hand lists; a star subpath is complete by construction, so those assertions are retired. Shadow checks stay.

Why long-term right. One owner of the primitive export list (ui); sandbox-ui stops shipping a copy that needs a PR per ui release.

Proof. Beelink gate: pnpm typecheck && pnpm build && pnpm test && pnpm test:package && pnpm test:bridge (bridge = built-bundle identity of forwarded bindings; package = packed consumer importing ./primitives and root, scripts/presentation-consumer.tsx). Receipt posted below.

Cost. Minor release; additive.

Overlap. #447 edits the same two lists (adds the 11.42.0 names). This PR makes those edits unnecessary; whichever lands second takes this side of src/index.ts and src/primitives/index.ts.

Run ID: run_9600d4f3ec2a3cd6b350309083c935e5

…rt *, deprecate the subpath

./primitives and the root entry re-exported ui's primitives through two
hand-typed lists of ~240 names each, copies of ui's own export list that
drifted on every ui release (MISSING_EXPORT on 11.40, new names absent on
11.42). Both now forward ui with export *; Sandbox's Logo, TangleKnot,
LogoProps, HeadingProps and SectionTitle shadow ui's by explicit export,
and the root keeps the workspace TerminalLine type by name.

No public name is removed. The parity test's primitives case and the root
omission pin checked the hand lists; a star subpath is complete by
construction, so those assertions are retired.

./primitives is now documented as a deprecated compatibility re-export.
@drewstone

Copy link
Copy Markdown
Contributor Author

Independent review (read-only, export graph resolved against @tangle-network/ui@11.42.0 at 294232c): SHIP.

  • No ambiguous star export at the root. ArtifactPane/ArtifactPaneProps reach the same binding through both stars. TerminalLine is resolved by the explicit export type at src/index.ts:15.
  • No removed names: every name in main's two lists is in ui 11.42.0 or local.
  • TerminalLine: the root never exported ui's runtime one, and ./primitives still does. No consumer imports it through the sandbox-ui root.
  • Removing the parity check and the ROOT_OMISSIONS pin is justified. re-export-identity still proves 39 names are ui's own objects.

The gate covers the open build risk: pnpm build && pnpm test && pnpm test:package && pnpm test:bridge checks the generated index.d.ts keeps the named overrides. Residual risk: a future ui primitive whose name collides with a local star export would silently drop that name. A clash-guard test is a follow-up, not a blocker.

…eexports

# Conflicts:
#	src/index.ts
#	src/primitives/index.ts
@drewstone
drewstone marked this pull request as ready for review October 25, 2026 11:44

@tangletools tangletools left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Auto-approved PR — e7bd20ee

Blanket team auto-approval is intentional. This is not a code review.
No automated review runs on this PR. This approval rests on the rule above alone.

tangletools · auto-approval · reason: blanket_auto_approve · 2026-10-25T11:45:17Z

@drewstone
drewstone merged commit edd99e4 into main Oct 25, 2026
@drewstone

Copy link
Copy Markdown
Contributor Author

Gate receipt: beelink2 beelink2-74dc2639534ca987b056843f59639734 exit 0 on e7bd20e (typecheck, build, test, test:package, test:bridge; before/after story screenshots under ~/reviews/collapse-receipts/2026-10-25-ui-xrepo-shots on drew-gtr-pro).

drewstone added a commit that referenced this pull request Oct 25, 2026
…declares (#449)

fix(release): Auto Release fails at startup; give the prepare call the ceiling its called file declares

**Problem.** Every Auto Release & Publish run since c16c5f9 (10-23) ends in `startup_failure` (runs on 1419d6b, edd99e4, 421586a). `package.json` on main says 0.137.0; npm latest is 0.136.1, so #447 and #448 never shipped.

Run ID: run_369e8dcc6188e337ad6eda9097f3a5e9
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.

2 participants