Repository navigation
Show what Morphlex keeps and how it's tested in the README - #211
joeldrapper merged 9 commits into
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 82ac3eeec9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2af2880c74
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fb38395a30
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
430be93 to
2305458
Compare
ed0af93 to
62711a1
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 62711a1c96
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HxDH8sJ8nynfYRK86fm3V4
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HxDH8sJ8nynfYRK86fm3V4
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HxDH8sJ8nynfYRK86fm3V4
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HxDH8sJ8nynfYRK86fm3V4
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HxDH8sJ8nynfYRK86fm3V4
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HxDH8sJ8nynfYRK86fm3V4
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HxDH8sJ8nynfYRK86fm3V4
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HxDH8sJ8nynfYRK86fm3V4
26f6243 to
37756e0
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 37756e0f8b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HxDH8sJ8nynfYRK86fm3V4
Requested by Joel · project thread
Stacked on #212 (contenteditable edits kept after blur), since the README now describes that behaviour.
Before: the README opened with a list of implementation details (LIS,
moveBefore,isEqualNode, id sets). WhatpreserveChangeskeeps, how Morphlex is tested, and why some form controls are replaced were buried further down or missing.After: the README opens with "It keeps what the user did", a worked example (a select pick and a typed note in an unkeyed list both survive a re-render that adds an option and a row before them, with focus and caret kept), and a list of what
preserveChangeskeeps, including text typed into acontenteditableafter it loses focus. "It's correct" says what the morph guarantees, then "How it's tested" describes the testing architecture: real-browser tests through Vitest browser mode and Playwright; examples, exhaustive small-tree tests and property fuzzers; CI running everything in Chromium, Firefox and WebKit with fresh fuzz seeds every run, a 100% coverage gate and 50,000 nightly seeds per fuzzer. A table from the October 2026 comparison of 33 scenarios against seven other morphers follows (Morphlex 32, others 14 to 21). The old list stays as "How it changes the DOM".A new section, "Form controls need a
nameorid", explains a rule the README only hinted at. When matching children, Morphlex tells that a form control in the new markup is the same field by itsid, or else itsname. A control with neither can only be compared by its markup, so when anything about it changes, even a class, it could be a different field in the same spot. Morphlex assumes it is and inserts a fresh control, so what the user typed into one field never turns up in another. The same goes for a control whosenamechanges without anid, one whoseidchanges, and an<input>whosetypechanges. A replaced control loses its typed value and focus even withpreserveChanges, so the section shows how a stablenamekeeps it. (WithpreserveChanges, a<select>the user picked from can also be matched by its pick.)How: README only. The example and the form control rules were checked in Chromium with throwaway tests: unnamed input or textarea with a class change is replaced; a named one is kept; a name change without an id is replaced, with an id it's kept; an id or type change is replaced; a picked select is kept. The testing description follows
.github/workflows/tests.yml,fuzz.ymlandvitest.config.ts. The table comes from the comparison harness, rerun on this branch on 2026-10-13 in all three browsers with identical results. Its contenteditable scenario now types with real keyboard events and then blurs, since #212 only counts trustedinputevents.🤖 Generated with Claude Code
https://claude.ai/code/session_01HxDH8sJ8nynfYRK86fm3V4