Skip to content

docs: fix Manual Edit protocol summaries to match implemented contracts - #6608

Open
xxiaoxiong wants to merge 1 commit into
nexu-io:mainfrom
xxiaoxiong:fix/6141-manual-edit-protocol-summary-spec-drift
Open

docs: fix Manual Edit protocol summaries to match implemented contracts#6608
xxiaoxiong wants to merge 1 commit into
nexu-io:mainfrom
xxiaoxiong:fix/6141-manual-edit-protocol-summary-spec-drift

Conversation

@xxiaoxiong

Copy link
Copy Markdown
Contributor

Summary

This PR fixes two stale protocol summary lines in specs/current/manual-edit-direct-manipulation.zh-CN.md that contradict the live implementation (issue #6141, labeled good first issue + help wanted).

Changes

  1. od-edit-paste-image payload (v2.3 summary)

    • Before: {id, file}
    • After: {id, name, mime, buffer}
    • The bridge and typed host contract already use {id, name, mime, buffer} because the clipboard/drag File handle may be neutered after the event turn, so bytes must cross the iframe boundary.
  2. od-edit-apply-dom operations (v2.4 summary)

    • Before: replace|insert-after|append-child|prepend-child|remove
    • After: replace|insert-after|insert-at-index|append-child|prepend-child|remove|apply-content
    • insert-at-index is used to restore a removed body child at its original index; apply-content mirrors edits for runtime-annotated brand targets without reloading the iframe.

Scope

Pure documentation fix (2 lines changed). No runtime code changes needed. The implementation already matches the corrected contracts.

…ts (6141)

Two lines in the v2.3/v2.4 protocol summary were stale:
- od-edit-paste-image payload: {id, file} → {id, name, mime, buffer}
- od-edit-apply-dom ops: added insert-at-index and apply-content

The runtime implementation (bridge, source-patches, FileViewer) already
uses the complete contracts; only the spec summary lines were out of sync.
@lefarcen
lefarcen requested a review from mrcfps August 7, 2026 09:46
@lefarcen lefarcen added size/XS PR changes <20 lines risk/low Low risk: docs/i18n/assets only type/docs Documentation changes only labels Aug 7, 2026
@lefarcen

lefarcen commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Thanks @xxiaoxiong — these two corrections look on point. The {id, file}{id, name, mime, buffer} fix for od-edit-paste-image and the added insert-at-index / apply-content ops in the od-edit-apply-dom summary both match what the bridge and host contracts actually implement. Assigning @mrcfps for review.

@mrcfps mrcfps left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@xxiaoxiong Thanks for the clean docs fix on a good-first-issue — appreciated!

I verified the two protocol summary updates in specs/current/manual-edit-direct-manipulation.zh-CN.md:

  1. v2.3 od-edit-paste-image summary now uses {id, name, mime, buffer}, matching the detailed section just above (line 78) and the historical typed bridge contract (ManualEditPasteImageMessage / byte payload for clipboard and drag Files).
  2. v2.4 od-edit-apply-dom summary now includes insert-at-index and apply-content, matching the surrounding architecture prose (brand runtime targets / body-child restore) and the host applyManualEditDomOp op union.

Pure documentation change, internally consistent, no runtime risk. Nice surgical fix.

🔁 Powered by Looper · runner=reviewer · agent=grok-build · An autonomous AI dev team for your GitHub repos.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk/low Low risk: docs/i18n/assets only size/XS PR changes <20 lines type/docs Documentation changes only

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants