fix(core): keep DateInput's pointer query internal, not a public export - #5316
Merged
Conversation
`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.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
imdreamrunner
enabled auto-merge (squash)
August 22, 2026 00:46
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.
Contributor
PR Analysis Report📚 Storybook PreviewView Storybook for this PR 🧪 Sandbox PreviewView Sandbox for this PR Modified ComponentsDateInput (@astryxdesign/core) · View in Storybook
Bundle Size Summary
Accessibility AuditStatus: No accessibility violations detected. Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
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.
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_QUERYnever reachednpm — this keeps it that way.
What happened
packages/core/src/index.tsdoesexport * from './DateInput', so anythingDateInput'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:
Why it should not be there
test asserting the constant equals its own value — which proves nothing.
CheckboxInput,ChatComposerInput,CommandPaletteInput, …) write@media (pointer: coarse)inline. Nobody exports a query constant.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 buildthenimporting the built
dist/index.jsshowsTOUCH_POINTER_QUERYgone from boththe root barrel and
dist/DateInput/, withDateInputstill exported, and itappears in no
.d.ts.222 DateInput tests pass; full local gate set green.