Skip to content

feat(parser-react): portals & toasts (A9) — Gate 2 complete, Phase 2 done#17

Merged
officialCodeWork merged 1 commit into
developmentfrom
build/phase-2/step-2.5-portals
Jul 14, 2026
Merged

feat(parser-react): portals & toasts (A9) — Gate 2 complete, Phase 2 done#17
officialCodeWork merged 1 commit into
developmentfrom
build/phase-2/step-2.5-portals

Conversation

@officialCodeWork

Copy link
Copy Markdown
Owner

Summary

TRACKER Step 2.5 — failure mode A9, and the close of Phase 2 (Gate 2).

What's in it

  • Portal components flaggedcreatePortal users get flags: ["portal"]: a screenshot of the dialog shows nothing from its trigger's DOM subtree, and agents should know the DOM position won't match the render tree. Matching already surfaces both sides: the modal's text → ConfirmDialog, whose instance list points at the OrdersToolbar trigger site.
  • Toast text belongs to the callertoast("Order deleted") (react-hot-toast, notistack enqueueSnackbar, antd message.*): the string exists only as a call argument, rendered by a <Toaster/> mounted elsewhere. It now becomes a renderedText entry with source: "portal" on the calling component — a screenshot of the toast matches its trigger.
  • Prop-flow correction the fixture forced — function-valued props (onConfirm={handleConfirm}) and on[A-Z] attributes are callbacks, not data: the fetch inside the callback no longer emits provides-data. The DELETE still reaches the dialog's lineage the right way — through the 2.3 handler chain (onClick:onConfirm --triggers--> DELETE /api/orders/selected). Data-in vs. effect-out stays distinguishable in the graph.

Gate 2 (from docs/testing-strategy.md)

Instance attribution accuracy = 1.0 on C1 fixtures; B1 handler resolution ≥ 0.85 at ≤ 4 levels; C6 store-writer linking green

Passed — plus A9: scorecard 137 pass / 0 fail / 0 xfail · precision 1.000 · recall 1.000 · match accuracy 1.000.

Test plan

  • 88 unit tests green (3 new: portal flag, modal→trigger surfacing, toast provenance)
  • pnpm eval gate OK; schema regenerated (portal text source), drift gate green

Documentation

  • TRACKER.md — 2.5 done, Gate 2 recorded, Status → Phase 3 (journey graph), step 3.1

🤖 Generated with Claude Code

…done

Step 2.5 (TRACKER). Failure mode A9; closes Phase 2:

- createPortal components flagged 'portal': the screenshot's DOM position
  won't match the render tree, but matching already surfaces both the modal
  (its text) and the trigger site (its instance list).
- Toast adapters (react-hot-toast toast/toast.*, notistack enqueueSnackbar,
  antd message.*): string arguments become renderedText entries with
  source 'portal' on the CALLING component — 'Order deleted' exists only as
  a call argument, and now matches its trigger.
- Prop-flow correction the fixture forced: function-valued props and on[A-Z]
  attributes are callbacks, not data — the fetch inside onConfirm no longer
  emits provides-data. The DELETE still reaches the dialog's lineage the
  RIGHT way: through the 2.3 handler chain (onClick:onConfirm --triggers-->
  DELETE /api/orders/selected).
- Scorecard: 137 pass / 0 fail; precision/recall 1.000. 88 unit tests.
  GATE 2 PASSES — Phase 2 (instance graph & cross-file data flow) complete.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@officialCodeWork
officialCodeWork merged commit 3776287 into development Jul 14, 2026
1 check passed
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