Skip to content

Show what Morphlex keeps and how it's tested in the README - #211

Merged
joeldrapper merged 9 commits into
claude/preserve-contenteditable-oanz4cfrom
claude/project-thread-uc4zbq
Oct 13, 2026
Merged

joeldrapper merged 9 commits into
claude/preserve-contenteditable-oanz4cfrom
claude/project-thread-uc4zbq

Conversation

@joeldrapper

@joeldrapper joeldrapper commented Oct 12, 2026 •

Copy link
Copy Markdown
Collaborator

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). What preserveChanges keeps, 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 preserveChanges keeps, including text typed into a contenteditable after 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 name or id", 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 its id, or else its name. 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 whose name changes without an id, one whose id changes, and an <input> whose type changes. A replaced control loses its typed value and focus even with preserveChanges, so the section shows how a stable name keeps it. (With preserveChanges, 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.yml and vitest.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 trusted input events.

🤖 Generated with Claude Code

https://claude.ai/code/session_01HxDH8sJ8nynfYRK86fm3V4

@joeldrapper joeldrapper self-assigned this Oct 12, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-13T09:15:59.298592Z 37756e0 New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread README.md Outdated
Comment thread README.md Outdated
Comment thread README.md Outdated
Comment thread README.md Outdated
Comment thread README.md Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread README.md Outdated
Comment thread README.md Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread README.md Outdated
Comment thread README.md Outdated
@joeldrapper
joeldrapper force-pushed the claude/project-thread-uc4zbq branch from 430be93 to 2305458 Compare October 13, 2026 08:41
@joeldrapper
joeldrapper changed the base branch from main to claude/preserve-contenteditable-oanz4c October 13, 2026 08:42
@joeldrapper
joeldrapper force-pushed the claude/project-thread-uc4zbq branch 2 times, most recently from ed0af93 to 62711a1 Compare October 13, 2026 08:52
@joeldrapper
joeldrapper added this pull request to stack #213 October 13, 2026 08:54
@joeldrapper joeldrapper mentioned this pull request Oct 13, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread README.md Outdated
Comment thread README.md
@joeldrapper joeldrapper mentioned this pull request Oct 13, 2026
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
@joeldrapper
joeldrapper force-pushed the claude/project-thread-uc4zbq branch from 26f6243 to 37756e0 Compare October 13, 2026 09:09

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread README.md
Comment thread README.md Outdated
Comment thread README.md Outdated
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HxDH8sJ8nynfYRK86fm3V4
@joeldrapper
joeldrapper merged commit ae7ab17 into main Oct 13, 2026
7 checks passed
@joeldrapper
joeldrapper deleted the claude/project-thread-uc4zbq branch October 13, 2026 09:26
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