Skip to content

Release 0.2.21 - #126

Merged
rezailmi merged 21 commits into
mainfrom
release/0.2.21
Jun 12, 2026
Merged

Release 0.2.21#126
rezailmi merged 21 commits into
mainfrom
release/0.2.21

Conversation

@rezailmi

Copy link
Copy Markdown
Owner

Summary

Merges the advisor fixes (plans 001–009) and bumps the version to 0.2.21 for an npm release.

Highlights:

  • fix: guard global Cmd+Z undo shortcut when edit mode is inactive
  • fix: compose existing element transform during drag
  • fix: skip data-direct-edit-source injection in production builds
  • perf: rebuild preload fiber index lazily on first lookup
  • fix: resolve component names through memo/forwardRef wrappers
  • feat: persistent send-failure feedback with reason and per-item indicators
  • fix: agent availability under StrictMode and network-failure classification
  • chore: bump version to 0.2.21

After merge, run the Publish workflow (task=release) to publish to npm.

rezailmi added 21 commits June 12, 2026 15:09
Gate babel/index.cjs behind api.env('development') so source-file paths are
never stamped onto host elements in production bundles or consumer test runs.
Adds four unit tests and documents the behavior in docs/cli.md.
Preserve an element's CSS transform (inline or class-based) while dragging:
prepend the drag translate to the original transform instead of overwriting it.
For class-based transforms (e.g. Tailwind rotate-45), snapshot getComputedStyle
at drag start; restore contract remains inline-only so stylesheet rules re-apply
on drop. Adds three regression tests and removes the completed TODOS entry.
Add editModeActive guard before preventDefault in the undo branch of
handleKeyDown, so made-refine no longer steals the host app's undo
shortcut while the editor is closed. Also add the isInputFocused() guard
so panel/host inputs keep native undo while edit mode is on.

Regression tests added: one verifies the shortcut is a no-op when edit
mode is off (style change is preserved), another locks in that undo still
works correctly when edit mode is active.
Replace eager rebuildIndex() calls on every React commit with a dirty
flag. Both onCommitFiberRoot paths (createHook and wrapHook) now set
indexDirty = true instead of immediately walking the fiber tree.
getFiberForElement rebuilds the index on first read after a commit.

Adds src/preload.test.ts with 5 tests: 4 characterization tests that
verify the existing contract (lookup, unknown element, re-commit
freshness, wrapHook passthrough) and 1 laziness test that asserts
the tree walk does not happen on commit, only on lookup.

Also adds `export {}` to preload.ts so TypeScript treats it as an ES
module (no runtime effect; esbuild still emits the IIFE correctly).
Delivers plans/006-output-session-lifecycle-design.md — the design spike
for surviving React remounts in the session-edit map. Covers:

- Store keying: Option B (parallel locator index, element-keyed map unchanged)
- Reattachment protocol with 7-rule confidence checklist
- Stale state transitions and popover UI states
- Edge-case ledger: undo stack, move anchors, multi-select, mid-edit remount,
  two-edit collision, comments
- jsdom spike results: 77.8% overall precision → 100% with Rule 7 (no
  reattachment for purely positional nth-of-type selectors)
- Numbered 9-step implementation plan

No production code modified.
…ators

- Add SendFailure type to use-agent-comms with reason/failedEditElements/failedCommentIds/at
- Track per-item failure identities in sendAllSessionItemsToAgent batch loop
- Classify failures: thrown/network → 'unreachable', result.ok===false → 'rejected'
- Clear lastSendFailure at the start of every new send attempt
- Expose lastSendFailure + clearSendFailure through provider context (additive only)
- panel-footer.tsx: remove 2s auto-reset on failure branch; persist 'offline' until
  next send or element selection change; status-aware Tip label with retry wording
- toolbar.tsx: same split — scheduleApplyReset only on 'sent'; 'offline' persists
  until next handleApplyAll or totalItemCount change; status-aware tooltip
- edits-popover.tsx: accept sendFailure prop; render 'Failed' badge next to item
  badge for each failed edit element or comment id
- Tests: 4 new provider tests (unreachable/rejected classification, batch partial
  failure, clear-on-retry) + 2 toolbar tests (offline persists past 2s, success
  auto-resets after 2s)
@rezailmi
rezailmi merged commit c1687d9 into main Jun 12, 2026
3 checks 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.

1 participant