Skip to content

fix(editor): preserve Markdown selection when leaving Find - #35764

Open
brennanb2025 wants to merge 38 commits into
mainfrom
brennanb2025/sta-12544-md-find-anchor
Open

brennanb2025 wants to merge 38 commits into
mainfrom
brennanb2025/sta-12544-md-find-anchor

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 13 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​2329 $\color{#cf222e}{\Huge{\mathbf{−}}}$​123 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​2206
Prod 13 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1632 $\color{#cf222e}{\Huge{\mathbf{−}}}$​250 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1382

After using Find in rich Markdown, Shift-click could extend from an old search match instead of the clicked caret. Closing Find or Replace and immediately pressing Cmd/Ctrl+F could also fail to reopen it until the editor was clicked.

This change completes the current selection before Find, formatting, typing or copying consumes it. Clicking text beside an image and native multiple-click selection also update the editor before the next action. The editor checks whether a browser selection came from focus restoration before accepting it as a user selection, including while a drag remains active. Genuine outgoing input is still completed when focus leaves, and the drag keeps its existing lifetime and table protections. Explicit editor focus restores the current model selection before native focus can expose an older range. Frame-based selection reconciliation is removed.

Closing Find or Replace returns panel-owned focus to the editor synchronously before removing the panel. Closing while another pane or control owns focus leaves that control active. Editor-owned close completes pending selection before removing search highlights. Cmd/Ctrl+F can immediately reopen Find.

tracked in STA-12544

tracked in STA-12764

Plan: EditorState remains the sole remembered editor range. One selection-completion operation serves outgoing focus, native notifications and editor consumers. The existing editor engine is patched through the repository's version-pinned dependency patch mechanism so its focus classification, rich selection construction and native projection stay together. No saved caret, separate pointer controller or delayed selection replay is added.

Design: intended — rich table/atom selections, plugin selection construction, embedded controls and native table presentation remain with the current editor engine, which supports structures plain-text pointer controllers lack. Held drags keep their native presentation and complete before an action consumes them; selection-driven UI waits for completion. Explicit focus and external content replacement preserve the current accepted selection. Panel-owned focus returns synchronously on close.

Review path: full — repeated focus-selection bugs, prior delayed-focus/scroll failures, selection ownership, close ordering and teardown. No saved-data, wire or provider changes. Both tickets share one E2E spec and ship together.

Validation on merged revision 98442784: the current PR workflow passed, with static analysis, typecheck, all twelve unit shards, packaging and changed E2E specs. The completed check snapshot has 64 passed checks and 13 intentional skips. Earlier focused evidence remains seventeen unit files (224/224 cases), actual compiler execution across five projects, dependency isolation (22/22 cases), and eight Linux Markdown E2E cases. The unit tests exercise the real patched editor API, selection consumers, lifetime and N/10N operation bounds. The separate Windows-host CI setup repair tracked in #36715 is merged.

The viewport repair tracked in STA-13206 landed in #36781 and is integrated here. The combined dependency patch retains both selection completion and passive-focus viewport handling. A scripts-on frozen install on the admitted Windows QA machine completed successfully; remaining native product acceptance is pending.

Earlier native runs retained exact four-cell copy but lost viewport position after returning from Find or Replace. Continued drag input then missed its intended table target. The staged acceptance on revision 98442784 now passes on Windows and macOS: Find → bare editor focus → immediate copy preserves exact plain/HTML copy, the four-cell selection and DOM classes, document contents and viewport position (Windows 1985 → 1985; macOS 2036.5 → 2036.5). Missing visible multi-cell highlighting is pre-existing on main, tracked in STA-13408; the no-Find controls have the same limitation. It is outside this PR’s scope.

The genuine held-Replace continuation also passes on both platforms. Returning to the editor while the pointer remains down preserves the original press and viewport; continued movement reaches the intended neighbouring-cell target, and immediate typing replaces exactly that range without changing outside content. A later macOS check exposed a harness-only synthetic focus route, also on main, no product caller (source-traced). Its utility-world focus call explicitly blurred Find and bypassed the editor’s page focus method; the viewport moved from 1887 to 0 before Shift-extension and copy could run. Escape, editor clicks, toolbar/menu returns and native Tab use different product paths. No speculative viewport repair is included. Additional original Mac selection, focus-ownership, toolbar and text-input checks passed within their recorded limits. Native acceptance is incomplete, and this PR is not ready to merge. Temporary diagnostic code remains removed.

QA limits; the two synthetic return chains are source-traced in the search close and pointer-return callers:

  • Synthetic Find → editor focus → still-mounted Replace → editor focus → typing: no matching product caller is established. Escape removes Replace; a text click changes the required four-cell selection. This exact harness chronology is not exercised; the production-fixture contracts remain covered.
  • Synthetic changed Find query → editor focus → retained Close: no matching product caller is established. Escape removes Close; a text click changes the required backward selection. This exact harness chronology is not exercised; the production-fixture contracts remain covered.
  • The full editor ↔ Find/Replace native Tab/Shift+Tab route is unexercised: editor Tab is consumed and intervening controls vary, so no defined route can be tested without inventing a traversal. Existing keyboard/completion contracts carry; this is neither a pass nor a failure.

Prior native acceptance result on 98442784: with Find open on macOS, selecting the image and then clicking character 6 of Before atom left the editor model and cached selection on the image in the immediate recorded snapshot, while the browser caret had moved into the text. The original assertion requiring an immediate text selection failed. The model naturally synchronized 12.3 ms later. The same unchanged callback then dragged across the image and typed xy: it produced exactly Beforexy atom, removed the image, and preserved all content outside that target. This establishes the failed immediate assertion, not an observed typing-target or outside-content failure. The scroller changed from 3164 to 3052 during the first typing transaction; its cause has not been established.

Later native acceptance stopped after that result. The adjacent Replace, editable Details/code, remaining structured/close cases and fixed five-Tab close/reopen check have not completed. The original Windows toolbar outcomes have recorded formatting/entry evidence, but their required hidden-inspector capture route was not met; no waiver or complete pass is claimed. The later Windows text invocation was held before any native input. No completion marker is asserted.

The pointer-ordering repair is now published at 66e1cdf7. Independent review accepted the source and test changes. On the admitted Windows machine, all 60 tests across six named editor files passed with the installed runtime verified against the reviewed patch; the adversarial file also passed after extending its scale contract to ordinary mouseup/click and native multiple-click completion. No existing work bound was relaxed. Full CI on the published repair passed: 64 successful checks and 13 intentional skips, including static analysis/typecheck, all twelve unit shards, packaging and changed E2E specs. Targeted native acceptance remains pending. The earlier failed snapshot is retained as historical evidence, not relabelled a pass.

On the repaired Windows build, selecting the image and then clicking character 6 of Before atom immediately produced the correct text caret in the model, browser selection and cache. The unchanged drag-and-type sequence then produced exactly Beforexy atom, removed the image and preserved all preceding content. The scroll position stayed at 3085 through the clicks and drag release, then moved to 2973 at the first document-changing typing transaction. Its cause remains unclassified: that Windows run did not measure content height or scroll maxima. At that point, all six Windows toolbar originals remained unrun; the subsequent limited Windows results are reported above.

Two earlier macOS attempts supplied no native verdict: the first stopped at the strict clone-path guard because the prepared plan mistook Parent folder for the resulting repository root; the next did not launch an app or driver because setup could not fit its remaining allowance. Those attempts are not passes or product failures.

The subsequent corrected macOS run on published 66e1cdf7 used the parent folder and verified the resulting fixture-source repository, including .git, before opening the file. The byte-identical original adjacent-Find callback ran once. Its immediate snapshot now has the correct text caret in the model, browser selection and cache before the later selection notification. The prescribed drag and first xy typing produced exactly Beforexy atom, removed the image and left all 105 outside nodes unchanged. The required whole capture used the hidden inspector with the window not visible; it shows the final typed result, while raw events establish the earlier immediate selection.

Both approved passive geometry reads were saved outside the unchanged callback. Measured content height fell from 4105 to 3993, and the maximum scroll position fell from 3164 to 3052 after the destructive edit. The final position is exactly 3052 with the edited text visible; the previous position no longer fits the final layout. Independent review confirmed this measured contraction and bottom-limited final position, but did not certify the actual scroll writer or every intermediate viewport state. Whole native/viewport acceptance remains uncredited; this Mac geometry does not fill the Windows measurement gap.

N1 and C1 remain open. The affected multiple-click proof and other missing original checks retain their existing unrun or limited dispositions; the Windows toolbar results have since been examined separately. Earlier failures and limits are preserved. The test copy, lead and driver stopped and all owned commands and transfers settled within the authorized attempt budget; the QA ticket is released. No additional attempt, source repair, completion marker or merge-ready claim is made. The PR remains not ready.

The existing Windows evidence archive has now been retrieved, verified against the exporter’s size and SHA256, and read together with all six hidden whole-window images. The four formatting originals pass their recorded outcomes: Bold with Find closed, Bold from Find, Bold from genuine Replace, and backward Heading 2 preserve the intended browser/model/cache range, change only the expected document content, and show zero recorded viewport movement through FINAL. Link entry opens without submission and leaves the document unchanged; its original native-null settlement timeout is retained as an entry-only limit. Review-note entry likewise opens on the intended selection with an unchanged document and a successful hidden capture, but its post-capture listener cleanup/Escape and driver completion remain unproved at the time limit. The review-note case and the overall run remain limited. All six capture acknowledgements save the exited helper’s null ExitCode and successful hidden capture facts. Ticket 4155 stays closed; this was retrieval and offline review only, with no new test. N1 and C1 remain open, and the Mac viewport chain remains unaccepted. No completion marker or merge-ready claim is made.

Windows ticket 4155: final appearance only; raw events establish earlier selection ordering. These captures do not lift the review-note or whole-run limit.

Original and scope Hidden whole capture
Bold, Find closed — recorded formatting outcome 01-toolbar-whole.png
Find → Bold — recorded formatting outcome 02-find-whole.png
Genuine Replace → Bold — recorded formatting outcome 03-replace-whole.png
Backward Heading 2 — recorded formatting outcome 04-heading-whole.png
Link entry only — original settlement limit retained 05-link-whole.png
Review-note entry — LIMIT; post-capture cleanup unproved 06-annotation-whole.png

A preceding Windows validation reached the original Bold-with-search-closed case. It made only “alpha” bold, preserved the rest of the document, matched browser/model/cache selection at release and the first toolbar press, and recorded no scroll movement. Independent review confirmed these bounded results. The required hidden whole-window capture succeeded with the window not visible, but the QA runner rejected its capture acknowledgement and stopped; the case remains limited, with no complete-case acceptance. At that point, the other five originals—Bold from Find, Bold from genuine Replace, backward Heading 2, Link entry and review-note entry—were unrun. Launch accepted only the authorized alias warning; the process ID, start time, executable-name and listener-ancestry checks passed. Shutdown required a forced stop after Browser.close timed out. All recorded processes, the lead, terminal, commands and transfers settled within the original 30-minute allowance, and the ticket is released. N1 and C1 remain open; the recorded Mac callback and two geometry reads stand, with its viewport chain still unaccepted. No further ticket, source change, completion marker or merge-ready claim is made.

Previous Windows Bold-with-search-closed attempt: final formatting image only; raw events establish that attempt’s recorded selection order. That case remained limited because its capture acknowledgement was rejected. This image is not from the latest six-case retry.

Windows Bold closed — bounded result, case LIMIT

@brennanb2025
brennanb2025 marked this pull request as ready for review October 29, 2026 08:50
@greptile-apps

greptile-apps Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no new actionable issue was found.

Summary

The PR publishes completed native selections before Find or editor actions consume them. It also returns panel-owned focus before closing Find.

  • Rich Markdown uses the current browser selection before editor actions consume it.
  • Closing Find or Replace returns focus before the panel disappears.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Completed native selection] --> B[Publish to EditorState]
  B --> C[Find or editor action uses selection]
  D[Close Find] --> E{Who owns focus?}
  E -->|Search panel| F[Focus editor synchronously]
  E -->|Editor| B
  E -->|Another control| G[Leave focus unchanged]
  F --> H[Reset search state]
  C --> H
  G --> H
Loading

Reviews (16) · Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." · Reviewed by Greptile

@coderabbitai

coderabbitai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review.

Walkthrough

The editor now completes native selections on configured events and before cut handling. Search-focus handling focuses the editor view after its existing target and control checks pass. The drag-selection guard changes how it processes selection changes during mouse drags. Search closing now prepares editor focus or completes a pending selection before resetting search state. The toolbar and link removal complete pending selections before their actions. Tests cover selection publication, Find and Replace handoffs, search closing, table selections, and pointer controls.

Merge Risk: Low · up to b9fd8

Editing a link immediately after a drag selection may use the previous selection. This is a bounded interaction risk that should be fixed or explicitly accepted before merging.

Pre-merge checks: Passed 3 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Description check Warning The description is long and detailed, and it covers the problem, the mechanism, and the test evidence. It does not follow the repository template, though. It has no ELI5 section, and it has no explici… Restructure the description to follow the repository template. Add an ELI5 section in plain language. Split the content into What Changed, Why, and Linked Issue sections. Replace the ticket mentions with an actual 'Fixes #' issue link. Add …
Passed Passed checks: 3 passed

Check name Status Explanation
Title check Passed The title names the primary change: it fixes the editor so a Markdown text selection is kept when focus leaves Find/Replace. The raw summary confirms the changeset covers selection completion before f…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the primary change: it fixes the editor so a Markdown text selection is kept when focus leaves Find/Replace. The raw summary confirms the changeset covers selection completion before focus moves, and close-time focus restoration. The title is specific and matches the main objective, so it passes.

Full details: Description check

Explanation

The description is long and detailed, and it covers the problem, the mechanism, and the test evidence. It does not follow the repository template, though. It has no ELI5 section, and it has no explicit Why, Linked Issue, Visual Proof, Testing checklist, Risk level, AI Disclosure, Review, or Checklist sections. Its tickets (STA-12544, STA-12764, STA-13206, STA-13408) are referenced but not linked as 'Fixes #'. It also states that the PR is not ready to merge, with native acceptance incomplete. The Visual Proof content is present as a table of Windows capture images, but the Testing section does not follow the template's checkbox format. The Risk section describes review path and design but does not state a risk level or a backout plan.

Resolution

Restructure the description to follow the repository template. Add an ELI5 section in plain language. Split the content into What Changed, Why, and Linked Issue sections. Replace the ticket mentions with an actual 'Fixes #' issue link. Add the Visual Proof section with before and after media, or write N/A with a reason. Add a Testing section with the template checkboxes and the platforms actually tested. Add a Risk section with a level (Low, Medium, or High), the riskiest parts, and the backout method. Add the AI Disclosure section, the Review section, the Agent skill upstream boundary checkbox, and the Checklist. Move the long LoC table and the QA chronology to a shorter form, and keep the description focused on the current state.

Finishing Touches

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 220640e4-aa8d-4e5a-94f7-f35f62f46830
Commits

Reviewing files that changed from the base of the PR and between fc4c3a2 and b9fd822.

Files selected for processing: 8

  • src/renderer/src/components/editor/RichMarkdownEditor.focus-leave.test.tsx
  • src/renderer/src/components/editor/RichMarkdownToolbar.tsx
  • src/renderer/src/components/editor/drag-selection-guard.ts
  • src/renderer/src/components/editor/rich-markdown-search-focus.adversarial.test.ts
  • src/renderer/src/components/editor/rich-markdown-selection-flush.ts
  • src/renderer/src/components/editor/useLinkBubble.ts
  • src/renderer/src/components/editor/useRichMarkdownReviewController.open-guard.test.ts
  • tests/e2e/markdown-find-adversarial.spec.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 1 remain after this review.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1


Review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 8426f35c-3d42-4b83-94c2-02f0df6dfb3d
Commits

Reviewing files that changed from the base of the PR and between 5450afd and 1307203.

Files selected for processing: 7
  • src/renderer/src/components/editor/RichMarkdownEditorSurface.tsx
  • src/renderer/src/components/editor/drag-selection-guard.ts
  • src/renderer/src/components/editor/rich-markdown-editor-config.ts
  • src/renderer/src/components/editor/rich-markdown-search-focus.adversarial.test.ts
  • src/renderer/src/components/editor/rich-markdown-search-focus.test.ts
  • src/renderer/src/components/editor/rich-markdown-search-focus.ts
  • tests/e2e/markdown-find-adversarial.spec.ts
Files with no reviewable changes: 1
  • src/renderer/src/components/editor/RichMarkdownEditorSurface.tsx

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 4 remain after this review.

@brennanb2025
brennanb2025 marked this pull request as draft October 29, 2026 09:24
@brennanb2025
brennanb2025 marked this pull request as ready for review October 29, 2026 09:46
@brennanb2025
brennanb2025 marked this pull request as draft October 29, 2026 10:34
@brennanb2025
brennanb2025 marked this pull request as ready for review October 29, 2026 10:37
@brennanb2025

brennanb2025 commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor Author

Not ready to merge. The repaired adjacent-Find callback passes its immediate-selection and prescribed drag/type outcomes on Windows and macOS. Whole native acceptance remains incomplete; N1 and C1 stay open. CI is green.

The existing Windows evidence archive has now been retrieved, verified against the exporter’s size and SHA256, and read together with all six hidden whole-window images. The four formatting originals pass their recorded outcomes: Bold with Find closed, Bold from Find, Bold from genuine Replace, and backward Heading 2 preserve the intended browser/model/cache range, change only the expected document content, and show zero recorded viewport movement through FINAL. Link entry opens without submission and leaves the document unchanged; its original native-null settlement timeout is retained as an entry-only limit. Review-note entry likewise opens on the intended selection with an unchanged document and a successful hidden capture, but its post-capture listener cleanup/Escape and driver completion remain unproved at the time limit. The review-note case and the overall run remain limited. All six capture acknowledgements save the exited helper’s null ExitCode and successful hidden capture facts. Ticket 4155 stays closed; this was retrieval and offline review only, with no new test. N1 and C1 remain open, and the Mac viewport chain remains unaccepted. No completion marker or merge-ready claim is made.

Windows ticket 4155: final appearance only; raw events establish earlier selection ordering. These captures do not lift the review-note or whole-run limit.

Original and scope Hidden whole capture
Bold, Find closed — recorded formatting outcome 01-toolbar-whole.png
Find → Bold — recorded formatting outcome 02-find-whole.png
Genuine Replace → Bold — recorded formatting outcome 03-replace-whole.png
Backward Heading 2 — recorded formatting outcome 04-heading-whole.png
Link entry only — original settlement limit retained 05-link-whole.png
Review-note entry — LIMIT; post-capture cleanup unproved 06-annotation-whole.png

A preceding Windows validation reached the original Bold-with-search-closed case. It made only “alpha” bold, preserved the rest of the document, matched browser/model/cache selection at release and the first toolbar press, and recorded no scroll movement. Independent review confirmed these bounded results. The required hidden whole-window capture succeeded with the window not visible, but the QA runner rejected its capture acknowledgement and stopped; the case remains limited, with no complete-case acceptance. At that point, the other five originals—Bold from Find, Bold from genuine Replace, backward Heading 2, Link entry and review-note entry—were unrun. Launch accepted only the authorized alias warning; the process ID, start time, executable-name and listener-ancestry checks passed. Shutdown required a forced stop after Browser.close timed out. All recorded processes, the lead, terminal, commands and transfers settled within the original 30-minute allowance, and the ticket is released. N1 and C1 remain open; the recorded Mac callback and two geometry reads stand, with its viewport chain still unaccepted. No further ticket, source change, completion marker or merge-ready claim is made.

Previous Windows Bold-with-search-closed attempt: final formatting image only; raw events establish that attempt’s recorded selection order. That case remained limited because its capture acknowledgement was rejected. This image is not from the latest six-case retry.

Windows Bold closed — bounded result, case LIMIT

After Find moved focus away from rich Markdown, a later Shift-click could extend from the old search match. Closing Find or Replace could also leave Cmd/Ctrl+F unable to reopen it immediately. This PR completes the current browser selection through the editor's existing selection mechanism before an action consumes it, and restores panel-owned focus before removing search.

Review used the full path and completed six historical production rounds. The newly commissioned pointer-ordering repair at 66e1cdf78134482373af16fc6b49297b23318667 now completes ordinary native release/click input through the same editor selection mechanism; independent correctness and performance checks accepted the source and test changes. The installed candidate passed all 60 tests across six named editor files on the admitted Windows machine, including the original work bounds; its adversarial file also passed after adding the ordinary mouseup/click and untracked multiple-click scale contract. The earlier Windows native run used af5736a8, whose shipped files are identical to the published head; the subsequent Mac run used exact published 66e1cdf7. The later two commits change tests only. Full CI on the published repair passed: 64 successful checks and 13 intentional skips. The PR is out of draft, mergeable and CLEAN. Previous head 68d9f40e passed 64 checks with 13 intentional skips. Earlier focused evidence for unchanged paths includes 224 cases across seventeen files, five compiler projects, 22 dependency-isolation cases and eight Linux Markdown E2E cases. No agent code changes or agents under test.

The integrated viewport repair is tracked in STA-13206/#36781. A frozen install with scripts enabled verified the combined editor dependency patch on the admitted Windows machine. Windows and macOS both pass the original four-cell Find → bare return → immediate copy sequence, preserving exact plain/HTML payload, structured selection, four DOM selection classes, document and viewport. Both also pass the genuine held Replace continuation: the same press reaches the intended neighbouring-cell range, and immediate typing changes only that range. Historical raw failure labels and their narrower acceptance dispositions remain in the private ledger.

Known main gaps: missing visible multi-cell fill is pre-existing on main, tracked in STA-13408. The no-Find controls show the same limitation. The separate IME Escape capture gap is tracked in STA-12792. Neither is changed here. The deferred native comparison concern and the tool-limited input remain disclosed in the private ledger; no outcome is claimed for either.

For Brennan's review:

Accepted flow Windows macOS
Four-cell Find return/copy Windows Find return Mac Find return
No-Find control Windows control Mac control
Held Replace continuation Windows held Replace Mac held Replace

Additional bounded Windows Find-owner proof: Windows Find owner, Escape and exact copied range. Raw/image review and final verification/cleanup completed. The four remaining Windows ownership cases are explicit tool limits after the single authorized retry, not passes.

Mac toolbar consumer evidence:

Original input Accepted scope and whole capture
Bold, search closed Mac Bold closed
Bold from Find Mac Bold from Find
Bold from Replace Mac Bold from Replace
Backward range → Heading 2 Mac Heading 2
Link entry only; no submission Mac Link entry
Review-note entry only; no submission Mac review-note entry

The first four preserve the intended range, exact formatting-only document change and viewport. Both entries open on the selected alpha with unchanged document and viewport; their original text-settlement predicate times out once native focus leaves the editor. No submitted link or note target is claimed.

Prior Mac text-selection evidence on 98442784 (18 original inputs accepted within their recorded scope; representative whole captures). The repair changes the native multiple-click boundary, so that affected proof remains owed on the new source; these older images do not establish it:

Mac: Shift-click after Find copies the intended cross-paragraph range.

Mac: Shift-click after Find copies the intended cross-paragraph range.

Mac: clicking inside the range establishes the intended caret before Shift-click after Replace.

Mac: clicking inside the range establishes the intended caret before Shift-click after Replace.

Mac: typing over a backward selection changes only the selected paragraphs.

Mac: typing over a backward selection changes only the selected paragraphs.

Mac: double-click after Replace selects alpha; immediate typing replaces only that word.

Mac: double-click after Replace selects alpha; immediate typing replaces only that word.

Mac: triple-click after Find copies the exact paragraph.

Mac: triple-click after Find copies the exact paragraph.

Mac: dragging after Replace and typing edits only the intended range.

Mac: dragging after Replace and typing edits only the intended range.

The original copies matched exactly. Typing changed only the intended word or paragraphs; forward and backward ranges retained their direction, and every observed visible-scroller position stayed unchanged. Double-click snapshots retain the observed native/model timing difference; the immediate word replacement and final state passed. These checks use the original copy-event and observer protocol.

Prior failing input on 98442784: with Find open, select the image, then click character 6 of Before atom. The browser caret moved into the text, but the immediate recorded editor model/cache still selected the image. The original text-selection assertion failed. A natural transaction synchronized the model 12.3 ms later; that does not change the recorded FAIL. The same callback subsequently dragged from Before atom character 6 to After atom character 5 and immediately typed xy. It correctly produced Beforexy atom, removed the image, and changed nothing outside those three original nodes. No typing-target failure or outside-content loss was observed. The viewport changed 3164 → 3052 during typing, with cause unestablished.

The whole capture below shows the correct final typed result; it does not show or prove the earlier immediate selection state.

Mac original adjacent Find final typed result

The two original image-selection Escape/reopen checks passed their bounded outcomes, retaining the original settlement timeouts rather than calling them text-selection passes. The adjacent Replace, Details/code and later structured/close cases remain unrun; the fixed five-Tab close/reopen check remains owed. The later Windows text invocation was held before app/driver/native inputs. Windows toolbar formatting and entry evidence is retained, but its required hidden-inspector capture route was unmet; acceptance credit has not been waived. The changed adjacent-Find case has now run on the repaired Windows source through the required hidden inspector with the window not visible. At that point, all six toolbar originals remained unrun after the adjacent case stopped for viewport classification; the subsequent limited Windows results are reported above. The subsequent Mac adjacent-Find result is described below. The review ledger remains open. No completion marker or merge-ready claim is made.

On the repaired Windows build, selecting the image and then clicking character 6 of Before atom immediately produced the correct text caret in the model, browser selection and cache. The unchanged drag-and-type sequence then produced exactly Beforexy atom, removed the image and preserved all preceding content. The scroll position stayed at 3085 through the clicks and drag release, then moved to 2973 at the first document-changing typing transaction. Its cause remains unclassified: that Windows run did not measure content height or scroll maxima. At that point, all six Windows toolbar originals remained unrun; the subsequent limited Windows results are reported above.

Two earlier macOS attempts supplied no native verdict: the first stopped at the strict clone-path guard because the prepared plan mistook Parent folder for the resulting repository root; the next did not launch an app or driver because setup could not fit its remaining allowance. Those attempts are not passes or product failures.

The subsequent corrected macOS run on published 66e1cdf7 used the parent folder and verified the resulting fixture-source repository, including .git, before opening the file. The byte-identical original adjacent-Find callback ran once. Its immediate snapshot now has the correct text caret in the model, browser selection and cache before the later selection notification. The prescribed drag and first xy typing produced exactly Beforexy atom, removed the image and left all 105 outside nodes unchanged. The required whole capture used the hidden inspector with the window not visible; it shows the final typed result, while raw events establish the earlier immediate selection.

Both approved passive geometry reads were saved outside the unchanged callback. Measured content height fell from 4105 to 3993, and the maximum scroll position fell from 3164 to 3052 after the destructive edit. The final position is exactly 3052 with the edited text visible; the previous position no longer fits the final layout. Independent review confirmed this measured contraction and bottom-limited final position, but did not certify the actual scroll writer or every intermediate viewport state. Whole native/viewport acceptance remains uncredited; this Mac geometry does not fill the Windows measurement gap.

N1 and C1 remain open. The affected multiple-click proof and other missing original checks retain their existing unrun or limited dispositions; the Windows toolbar results have since been examined separately. Earlier failures and limits are preserved. The test copy, lead and driver stopped and all owned commands and transfers settled within the authorized attempt budget; the QA ticket is released. No additional attempt, source repair, completion marker or merge-ready claim is made. The PR remains not ready.

The Windows whole capture shows the final typed result; the earlier immediate state is established by raw events.

Windows repaired adjacent-Find final typed result

The editor patch is unchanged, so the lock keeps this branch's prosemirror-view hash.
Main requires the source on the review controller. The selection test was the one call that still omitted it.
The add-note button appears only once the editor can name the copy the note belongs to. The selection checks were already passing.

This branch has not been deployed

No deployments
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