Skip to content

refactor(react): collapse internal react-surface into @pretable/react - #66

Merged
blove merged 8 commits into
mainfrom
feat/collapse-react-surface
May 3, 2026
Merged

blove merged 8 commits into
mainfrom
feat/collapse-react-surface

Conversation

@blove

@blove blove commented May 3, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Collapses the private @pretable-internal/react-surface workspace package into the public @pretable/react. All grid components (<PretableSurface>, <InspectionGrid>, <LabeledGridSurface>) become public exports. The opinionated <Pretable> preset stays.

Spec: docs/superpowers/specs/2026-05-03-collapse-react-surface-design.md
Plan: docs/superpowers/plans/2026-05-03-collapse-react-surface.md

Why

  • The split was a hedge during npm publishing — keep the seam private until the shape is stable. After months of dogfooding (website hero grid, bench harness), the shape is stable.
  • Two packages = two builds, two lint:packaging targets, two typechecks, an extra dts pipeline. All for a private/public boundary that exists for no consumer reason.
  • npm consumers were stuck with the 115-line opinionated <Pretable> (hardcoded viewportHeight={320}, hardcoded cell renderers). The kitchen-sink components the website + bench use were locked away.
  • The "wedge integrity" claim ("what we measure is what you ship") relied on a private package and was harder to explain.

What changed

  • 8 source files moved from packages/react-surface/src/ → packages/react/src/ (via git mv, history preserved)
  • packages/react/src/index.ts now exports everything publicly (components, hooks, helpers, types)
  • packages/react-surface/ deleted
  • <PretableSurface>'s interactionState prop marked @experimental (bench-internal feature exposed for advanced consumers)
  • Consumers updated: apps/website, apps/bench, apps/streaming-demo now import from @pretable/react
  • Changeset added — @pretable/react minor bump (0.0.1 → 0.1.0)
  • Internal-only files (rendering.ts, styles.ts) live in packages/react/src/ but stay out of index.ts

Wedge integrity

Before: bench imports @pretable-internal/react-surface (workspace), npm consumers get a different surface (<Pretable> only).
After: bench, website, and npm consumers all import the same public components from @pretable/react. Honest dogfooding.

Verification

Gate Result
pnpm -r build ✓
pnpm typecheck ✓ 0 errors
pnpm lint ✓ 0 errors (2 pre-existing warnings)
pnpm format ✓ clean
pnpm test ✓ 73/73 across 26 files
pnpm build (root, includes website Next SSG) ✓ 19 static pages
lint:packaging (publint + attw) ✓ all green for @pretable/core, @pretable/react, @cacheplane/json-stream

Out of scope

  • No subpath exports (single entry, tree-shaking already works via ESM + sideEffects:false)
  • No renames of <Pretable> / <PretableSurface>
  • No behavioral changes to any component

Test plan

  • CI green
  • Vercel preview renders identically
  • Production smoke (chromium + webkit) post-merge

@vercel

vercel Bot commented May 3, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
pretable Ignored Ignored May 3, 2026 2:18pm

Request Review

@github-actions

github-actions Bot commented May 3, 2026

Copy link
Copy Markdown
Contributor

Vercel preview ready

Preview: https://pretable-ao0eani2o-cacheplane.vercel.app
Commit: 1d99f85633e6b67b431cb5fcf267cc7204a32645

Updated automatically by the deploy-preview job.

@blove
blove merged commit b7aea32 into main May 3, 2026
10 checks passed
@blove
blove deleted the feat/collapse-react-surface branch May 3, 2026 14:22
This was referenced May 3, 2026
blove added a commit that referenced this pull request May 3, 2026
- New /docs/grid/pretable-surface page documenting the kitchen-sink
  component made public in PR #66 (collapse react-surface). Covers full
  prop table, telemetry stability gotcha, streaming demo example, and
  when to use it vs <Pretable>.
- _nav: insert "<PretableSurface> component" between Pretable and Custom
  rendering.
- eventLog.ts:134: stale "p95=9.3ms" in fake metrics-flushed message
  updated to "p95=16ms" matching the bench median + ReceiptsBand.
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.

1 participant