Skip to content

fix(redact): publish sidecar 0.2.2 with synthetic events that keep non-enumerable fields - #272

Merged
BleedingDev merged 1 commit into
main-ultramodernfrom
fix/redact-synthetic-event-20261030
Oct 30, 2026
Merged

BleedingDev merged 1 commit into
main-ultramodernfrom
fix/redact-synthetic-event-20261030

Conversation

@BleedingDev

@BleedingDev BleedingDev commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator

Why the change

Redact's synthetic events drop type, target and currentTarget under happy-dom, so OntOS's Shell unit tests still have to run on real React instead of Redact.

Special things to note

  • 0.2.1 is immutable, so the fixed sidecar is @bleedingdev/tanstack-redact@0.2.2: still upstream @tanstack/redact@0.2.1 plus our reviewed patch. The stream marker stays v1, as app-tools documents for a regenerated reviewed patch.
  • Until 0.2.2 is on npm, app-tools keeps the signed 0.2.1 through an explicit previousFork edge, which never accepts upstream Redact. CI candidates and packed test cohorts install the rebuilt 0.2.2 for that edge, so every consumer suite tests the bytes that will ship. Release staging is never rewritten, so a cohort stays blocked until app-tools declares 0.2.2.
  • Upstream fix: fix: copy non-enumerable Event fields into synthetic events TanStack/redact#113. Release order after merge: mode=sidecars sidecar_profile=tanstack-redact, then a PR that switches app-tools to 0.2.2 and deletes the edge, then the cohort.

Change outline

happy-dom 21.0.4
  for (k in mouseEvent)  -> detail, view, clientX, shiftKey, ...
  Event.prototype names  -> type, target, currentTarget, bubbles, composedPath   (non-enumerable, skipped)
 patches/@tanstack__redact@0.2.1.patch   (src + dist)
   createSyntheticEvent(native)
-    for (const key in native) copy(key)
+    for (let o = native; o; o = Object.getPrototypeOf(o))
+      for (const key of Object.getOwnPropertyNames(o)) copy(key)
 sidecars.json / sidecar-profiles / packed-redact-probe   tanstack-redact 0.2.1 -> 0.2.2
 verify-sidecars  unpublishedForkEdges
+  { app-tools, '@tanstack/redact', previousFork: '0.2.1' }      // exact fork alias only

 app-tools declares npm:@bleedingdev/tanstack-redact@0.2.1
   monorepo install            -> signed 0.2.1 from npm
   CI candidate (--tag ci)     -> rewritten to 0.2.2, served from the candidate registry
   packed test cohort edges    -> 0.2.1 spec, 0.2.2 tarball
   release staging             -> unchanged -> "pins 0.2.1 but sidecar stages 0.2.2"  (blocked)

🤖 Generated with Claude Code

@github-actions

Copy link
Copy Markdown

Rsdoctor Bundle Diff Analysis

📊 Quick Summary
Project Total Size Gzip Size Change Gzip Change
bundle-diff 533.8 KB 173.0 KB 0 0

Generated by Rsdoctor GitHub Action

@BleedingDev
BleedingDev force-pushed the fix/redact-synthetic-event-20261030 branch from d0c8f62 to aaca027 Compare October 30, 2026 01:30
…n-enumerable fields

Redact copies native event fields into its synthetic events with for…in,
which skips non-enumerable properties. happy-dom defines type, target,
currentTarget, bubbles and composedPath as class accessors, so under
happy-dom every handler saw them as undefined and controlled inputs never
read e.target.value. OntOS's Shell unit tests stay on real React because
of it.

The reviewed patch now walks the prototype chain instead
(TanStack/redact#113) in both src and dist. 0.2.1 is immutable, so the
sidecar recipe and its closed profile publish it as
@bleedingdev/tanstack-redact@0.2.2. The stream marker stays v1, as for
any regenerated reviewed patch.

The monorepo cannot install 0.2.2 before it is published, so app-tools
keeps the signed 0.2.1 sidecar through an explicit previousFork edge that
accepts only that exact alias, never upstream @tanstack/redact.
Non-publish CI candidates and packed test cohorts install the
reconstructed 0.2.2 for that edge, so every consumer suite qualifies the
bytes that will ship. Release staging is never rewritten: alias
consistency blocks a cohort until app-tools declares 0.2.2. The follow-up
that switches app-tools deletes the edge.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@BleedingDev
BleedingDev force-pushed the fix/redact-synthetic-event-20261030 branch from aaca027 to 4a15191 Compare October 30, 2026 01:35
@BleedingDev
BleedingDev merged commit 7bcac2e into main-ultramodern Oct 30, 2026
73 of 75 checks passed
@BleedingDev
BleedingDev deleted the fix/redact-synthetic-event-20261030 branch October 30, 2026 02:12
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