Skip to content

fix(core): keep DateInput's pointer query internal, not a public export - #5316

Merged
imdreamrunner merged 2 commits into
mainfrom
fix/drop-touch-pointer-query
Aug 22, 2026
Merged

fix(core): keep DateInput's pointer query internal, not a public export#5316
imdreamrunner merged 2 commits into
mainfrom
fix/drop-touch-pointer-query

Conversation

@imdreamrunner

@imdreamrunner imdreamrunner commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #5243, caught right after it merged. No release has consumed that
changeset yet (core is still 0.4.5), so TOUCH_POINTER_QUERY never reached
npm — this keeps it that way.

What happened

packages/core/src/index.ts does export * from './DateInput', so anything
DateInput's own barrel names lands on the package root and is public API
whether or not it was meant to be. Confirmed rather than assumed, by importing
the built dist:

root barrel  : (pointer: coarse)

Why it should not be there

  • Nothing consumes it. The only references were the component itself and a
    test asserting the constant equals its own value — which proves nothing.
  • No precedent. Six other core components (CheckboxInput,
    ChatComposerInput, CommandPaletteInput, …) write
    @media (pointer: coarse) inline. Nobody exports a query constant.
  • It contradicts the cull already done on this component. Two theme vars, a
    theme target and a forced-surface export were all pulled back before feat(core)!: DateInput fits the pointer — a touch picker on a finger, the text field on a mouse #5243
    went up for review, on the grounds that each was additive later and awkward
    to withdraw. This one is the same category and survived only because nobody
    looked at the barrel. The justification I wrote for it — "an app can ask the
    same question and lay out to match" — was speculative, not a real request.

The changeset is amended, not answered

#5243's changeset is edited in place rather than met with a second one. It has
not been released, so the CHANGELOG should simply never claim the export; a new
entry saying "removed" would land in the same release as the one saying
"added", which reads as churn that never happened.

With this, the touch surface publishes exactly six @astryx.dateInput.*
catalog keys and nothing else. No new props, no new exports.

Test

The test asserting the barrel's export list was dropped at review request. The
removal is still covered end to end: pnpm -F @astryxdesign/core build then
importing the built dist/index.js shows TOUCH_POINTER_QUERY gone from both
the root barrel and dist/DateInput/, with DateInput still exported, and it
appears in no .d.ts.

222 DateInput tests pass; full local gate set green.

`TOUCH_POINTER_QUERY` reached the package root by accident of the barrel:
`packages/core/src/index.ts` does `export * from './DateInput'`, so anything
DateInput's own barrel names is public API whether or not it was meant to be.
Confirmed by importing the built dist — it came back as `(pointer: coarse)`.

It should not be there. Nothing consumes it: the only references were the
component itself and a test asserting the constant equals its own value. There
is no precedent for it either — six other core components (CheckboxInput,
ChatComposerInput, CommandPaletteInput, ...) write `@media (pointer: coarse)`
inline rather than sharing a constant. And it contradicts the cull already
done on this component, where two theme vars, a theme target and a
forced-surface export were all pulled back before review on the grounds that
each was additive later and awkward to withdraw. This one was the same
category and survived only because nobody looked at the barrel.

The changeset that introduced it is amended rather than answered with a second
one. No release has consumed it (core is still 0.4.5), so the export never
reached npm and the CHANGELOG should simply never claim it — a new entry
saying "removed" would land in the SAME release as the one saying "added".

The replacement test asserts the barrel's whole export list rather than the
absence of one name, so the next internal that leaks fails too. Verified by
negative control both ways: re-adding TOUCH_POINTER_QUERY fails it, and so
does leaking an unrelated internal that has never been exported.
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Aug 22, 2026
@vercel

vercel Bot commented Aug 22, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
astryx Ready Ready Preview Aug 22, 2026 12:52am

Request Review

Removed at review request. The export removal and the amended changeset
stand on their own; the guard against a future leak does not need to ride
along with them.
@github-actions

github-actions Bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

PR Analysis Report

📚 Storybook Preview

View Storybook for this PR
GitHub Pages may take up to a minute to hydrate after deploy.

🧪 Sandbox Preview

View Sandbox for this PR
GitHub Pages may take up to a minute to hydrate after deploy.

Modified Components

DateInput (@astryxdesign/core) · View in Storybook
Metric Before After Delta
Bundle Size (ESM) N/A N/A N/A
Lines of Code N/A 2643 -
Complexity N/A Very High (268) -

Bundle Size Summary

Package Size (ESM) Size (CJS) Gzipped
@astryxdesign/core N/A 4.8KB 1.2KB

Accessibility Audit

Status: No accessibility violations detected.


Generated by PR Enrichment workflow | Storybook | Sandbox | View full report

@imdreamrunner
imdreamrunner merged commit 0472ec1 into main Aug 22, 2026
19 checks passed
github-actions Bot added a commit that referenced this pull request Aug 22, 2026
@github-actions
github-actions Bot deleted the fix/drop-touch-pointer-query branch August 22, 2026 06:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant