Implement focus-aware block selection with Command and Shift clicks #3

Open
opened 2026-09-13 13:34:39 +00:00 by kayg · 34 comments
Owner

Request and current status

Implementation active. Review rejected a contiguous envelope for Command selection.

Acceptance

Unfocused first click selects and focuses; Command toggles individual blocks, Shift selects an anchored range; ordinary focused click edits text. Use real disjoint ranges. Copy/delete/paste/format/drag/move/indent must not accidentally affect intervening blocks. Preserve IME, undo and accessibility.

Keep open until the user-facing outcome is verified in a delivered build. Source review or a successful build alone is not completion.

## Request and current status Implementation active. Review rejected a contiguous envelope for Command selection. ## Acceptance Unfocused first click selects and focuses; Command toggles individual blocks, Shift selects an anchored range; ordinary focused click edits text. Use real disjoint ranges. Copy/delete/paste/format/drag/move/indent must not accidentally affect intervening blocks. Preserve IME, undo and accessibility. Keep open until the user-facing outcome is verified in a delivered build. Source review or a successful build alone is not completion.
Author
Owner

Implementation status from /root/block_drag_finish in .worktrees/editor-hover-margins, branch wave16/editor-hover-margins, based on reviewed hover commit 85117d150581a9c3ed9595d90e4223f926f53fbb.

The first interaction patch now uses native selectedRanges: first unfocused click focuses and selects one exact projected block; focused ordinary clicks return to NSTextView editing; Command-click toggles exact individual block ranges; Shift and Command-Shift extend from a stable block anchor in either direction. A focused caret or partial text selection is discarded before Command-click creates block selection, so partial ranges cannot leak into block actions.

Reviewer findings addressed in the dirty patch:

  • Handle clicks while unfocused now focus and select the grabbed block while suppressing native mouse-up caret placement.
  • Unsupported modified left-clicks are consumed; Control-click retains native context-menu routing.
  • Focus/modifier cursor feedback uses native arrow/I-beam/open-hand/closed-hand cursors.
  • Exact discontiguous Copy, Cut, Backspace/Delete operate on whole selected blocks; Cut/Delete use one canonical source transaction and one Undo. Paste, typing/IME, formatting, indent/move, context actions remain guarded when selection is genuinely discontiguous.
  • Adjacent individually selected blocks can drag as one exact source union; noncontiguous drag is rejected instead of moving intervening blocks.

Regression coverage in progress exercises native focus selection, matching mouse-up suppression, caret-to-Command normalization, nonadjacent add/remove, Shift both directions, unsupported modifiers, exact Copy/Cut/Delete plus Undo, adjacent/noncontiguous drag eligibility, and unfocused handle focus. No local build or GUI run per lane policy; next gate is exact source review, then the sole build/QA lane.

Dependencies: issue #17 list behavior and issue #15 mixed drops should consume these exact native block-selection semantics after this candidate is reviewed; neither should assume a contiguous envelope for Command-selected blocks.

Implementation status from `/root/block_drag_finish` in `.worktrees/editor-hover-margins`, branch `wave16/editor-hover-margins`, based on reviewed hover commit `85117d150581a9c3ed9595d90e4223f926f53fbb`. The first interaction patch now uses native `selectedRanges`: first unfocused click focuses and selects one exact projected block; focused ordinary clicks return to NSTextView editing; Command-click toggles exact individual block ranges; Shift and Command-Shift extend from a stable block anchor in either direction. A focused caret or partial text selection is discarded before Command-click creates block selection, so partial ranges cannot leak into block actions. Reviewer findings addressed in the dirty patch: - Handle clicks while unfocused now focus and select the grabbed block while suppressing native mouse-up caret placement. - Unsupported modified left-clicks are consumed; Control-click retains native context-menu routing. - Focus/modifier cursor feedback uses native arrow/I-beam/open-hand/closed-hand cursors. - Exact discontiguous Copy, Cut, Backspace/Delete operate on whole selected blocks; Cut/Delete use one canonical source transaction and one Undo. Paste, typing/IME, formatting, indent/move, context actions remain guarded when selection is genuinely discontiguous. - Adjacent individually selected blocks can drag as one exact source union; noncontiguous drag is rejected instead of moving intervening blocks. Regression coverage in progress exercises native focus selection, matching mouse-up suppression, caret-to-Command normalization, nonadjacent add/remove, Shift both directions, unsupported modifiers, exact Copy/Cut/Delete plus Undo, adjacent/noncontiguous drag eligibility, and unfocused handle focus. No local build or GUI run per lane policy; next gate is exact source review, then the sole build/QA lane. Dependencies: issue #17 list behavior and issue #15 mixed drops should consume these exact native block-selection semantics after this candidate is reviewed; neither should assume a contiguous envelope for Command-selected blocks.
Author
Owner

Reviewer status — focus and multi-block selection

Reviewed dirty two-file scope in .worktrees/editor-hover-margins atop exact 85117d150581a9c3ed9595d90e4223f926f53fbb (Sources/CalternalEditor/BlockEditorView.swift, Tests/CalternalEditorTests/MarkdownBlockDocumentTests.swift). Source review only; no build, mounted test, or GUI verification was run.

Current blockers/findings:

  • P1: Command-click appends the current native selectedRanges without proving each range is a whole projected block. From a focused caret or ordinary text selection this creates a mixed partial-text plus full-block selection, which makes later Copy/Delete mapping unsafe. Normalize retained ranges to exact whole blocks or start a new block selection, and cover caret-to-Command-click.
  • P2: The handle hit path runs before first-focus selection handling, so clicking a visible handle while unfocused can arm/select without making the editor first responder.
  • P2: Blanket multi-selection guards in performKeyEquivalent/keyDown consume common commands. The minimum coherent behavior is exact discontiguous Copy, Cut only after copy succeeds, Backspace/Delete in one canonical transaction with one Undo and a defined surviving selection. Adjacent selected blocks can use the existing contiguous drag transaction; genuinely separated drag may remain rejected.
  • P2: Modifier matching uses contains, allowing Option-click to enter native editing and Command+Option/Shift+Option to act as block selection. Match supported modifier masks explicitly and preserve native Control-click context menus.
  • P3: Cursor rects distinguish focus only, so focused Command/Shift selection still advertises an I-beam. Cursor feedback should show arrow for block-selection gestures and open/closed hand over the handle.

Coverage needed before the next source gate: exercise public mouseDown/mouseUp, focused ordinary caret entry, caret-to-Command normalization, nonadjacent toggle/removal, exact Copy/Cut/Delete plus Undo, and adjacent versus separated handle drag behavior.

Reviewer status — focus and multi-block selection Reviewed dirty two-file scope in `.worktrees/editor-hover-margins` atop exact `85117d150581a9c3ed9595d90e4223f926f53fbb` (`Sources/CalternalEditor/BlockEditorView.swift`, `Tests/CalternalEditorTests/MarkdownBlockDocumentTests.swift`). Source review only; no build, mounted test, or GUI verification was run. Current blockers/findings: - **P1:** Command-click appends the current native `selectedRanges` without proving each range is a whole projected block. From a focused caret or ordinary text selection this creates a mixed partial-text plus full-block selection, which makes later Copy/Delete mapping unsafe. Normalize retained ranges to exact whole blocks or start a new block selection, and cover caret-to-Command-click. - **P2:** The handle hit path runs before first-focus selection handling, so clicking a visible handle while unfocused can arm/select without making the editor first responder. - **P2:** Blanket multi-selection guards in `performKeyEquivalent`/`keyDown` consume common commands. The minimum coherent behavior is exact discontiguous Copy, Cut only after copy succeeds, Backspace/Delete in one canonical transaction with one Undo and a defined surviving selection. Adjacent selected blocks can use the existing contiguous drag transaction; genuinely separated drag may remain rejected. - **P2:** Modifier matching uses `contains`, allowing Option-click to enter native editing and Command+Option/Shift+Option to act as block selection. Match supported modifier masks explicitly and preserve native Control-click context menus. - **P3:** Cursor rects distinguish focus only, so focused Command/Shift selection still advertises an I-beam. Cursor feedback should show arrow for block-selection gestures and open/closed hand over the handle. Coverage needed before the next source gate: exercise public `mouseDown`/`mouseUp`, focused ordinary caret entry, caret-to-Command normalization, nonadjacent toggle/removal, exact Copy/Cut/Delete plus Undo, and adjacent versus separated handle drag behavior.
Author
Owner

Reviewer transition — second source pass on the current dirty two-file patch atop 85117d150581a9c3ed9595d90e4223f926f53fbb

The first-pass P1 is resolved: Command-click now discards a caret/partial text selection before creating exact whole-block ranges. The patch also adds one canonical Copy/Cut/Delete transaction and adjacent-only multi-block drag eligibility. Source review only; the patch is still dirty/unfrozen and has not been built or run by this reviewer.

Remaining findings:

  • P2: performKeyEquivalent compares .deviceIndependentFlagsMask; Caps Lock therefore prevents Command-C/Command-X. Compare only Command/Shift/Control/Option.
  • P2: the new cursor update path forces an I-beam for every focused, unmodified location, overriding NSTextView’s native link/attachment cursors. Fall back to super.cursorUpdate(with:) for ordinary focused interaction.
  • P2: with a discontiguous selection, grabbing an unselected block handle is rejected. Collapse to the newly grabbed block; reject only when the grabbed block belongs to a genuinely noncontiguous selected set.
  • P3 coverage: exercise the public focused ordinary click path and assert caret entry; add Caps-Lock Copy, CRLF plus hidden block-ID Copy/Delete/Undo, and a valid post-delete selection. Define and cover right-click and accessibility-delete policy for discontiguous selections.

Exact source gate remains pending these repairs and a frozen SHA. Build, mounted tests, accessibility, and GUI behavior remain unverified.

Reviewer transition — second source pass on the current dirty two-file patch atop `85117d150581a9c3ed9595d90e4223f926f53fbb` The first-pass P1 is resolved: Command-click now discards a caret/partial text selection before creating exact whole-block ranges. The patch also adds one canonical Copy/Cut/Delete transaction and adjacent-only multi-block drag eligibility. Source review only; the patch is still dirty/unfrozen and has not been built or run by this reviewer. Remaining findings: - **P2:** `performKeyEquivalent` compares `.deviceIndependentFlagsMask`; Caps Lock therefore prevents Command-C/Command-X. Compare only Command/Shift/Control/Option. - **P2:** the new cursor update path forces an I-beam for every focused, unmodified location, overriding NSTextView’s native link/attachment cursors. Fall back to `super.cursorUpdate(with:)` for ordinary focused interaction. - **P2:** with a discontiguous selection, grabbing an unselected block handle is rejected. Collapse to the newly grabbed block; reject only when the grabbed block belongs to a genuinely noncontiguous selected set. - **P3 coverage:** exercise the public focused ordinary click path and assert caret entry; add Caps-Lock Copy, CRLF plus hidden block-ID Copy/Delete/Undo, and a valid post-delete selection. Define and cover right-click and accessibility-delete policy for discontiguous selections. Exact source gate remains pending these repairs and a frozen SHA. Build, mounted tests, accessibility, and GUI behavior remain unverified.
Author
Owner

Candidate frozen for exact source review:

  • Role/worktree: /root/block_drag_finish, .worktrees/editor-hover-margins
  • Branch: wave16/editor-hover-margins
  • Commit: a413f10f62cf06acc45ea32ac34652b89c342fc8
  • Parent: reviewed hover commit 85117d150581a9c3ed9595d90e4223f926f53fbb
  • Files: Sources/CalternalEditor/BlockEditorView.swift, Tests/CalternalEditorTests/MarkdownBlockDocumentTests.swift
  • Local checks: git diff --check passed; worktree clean. No build or GUI run under the sole-builder policy.

Implemented behavior: first unfocused click focuses and selects one exact block; focused ordinary click enters native text editing; Command toggles true native discontiguous ranges; Shift/Command-Shift extend from a stable block anchor. Copy, Cut, Backspace/Delete are exact whole-block actions; Cut/Delete share the canonical transaction/Undo seam. Adjacent selected blocks can drag together, while grabbing a selected member of a noncontiguous set is rejected and grabbing an unselected block collapses to that block. Context-click explicitly collapses to its clicked action target.

Deliberate bounded limitation for this candidate: discontiguous paste, typing/IME replacement, formatting, indent/move, and accessibility text replacement are rejected rather than silently acting on the primary range. Those commands can be added only with exact multi-range source transactions; issue #17 and issue #15 must not route their behavior through a contiguous envelope.

The mounted regression covers focus/mouse-up behavior, caret-to-Command normalization, add/remove and Shift both directions, Caps-Lock Command-C, CRLF and hidden-ID exact export, exact Delete/Cut source with one Undo and valid post-delete selection, adjacent/noncontiguous drag eligibility, context-click policy, unsupported modifiers, and unfocused handle focus. Exact reviewer gate is in progress.

Candidate frozen for exact source review: - Role/worktree: `/root/block_drag_finish`, `.worktrees/editor-hover-margins` - Branch: `wave16/editor-hover-margins` - Commit: `a413f10f62cf06acc45ea32ac34652b89c342fc8` - Parent: reviewed hover commit `85117d150581a9c3ed9595d90e4223f926f53fbb` - Files: `Sources/CalternalEditor/BlockEditorView.swift`, `Tests/CalternalEditorTests/MarkdownBlockDocumentTests.swift` - Local checks: `git diff --check` passed; worktree clean. No build or GUI run under the sole-builder policy. Implemented behavior: first unfocused click focuses and selects one exact block; focused ordinary click enters native text editing; Command toggles true native discontiguous ranges; Shift/Command-Shift extend from a stable block anchor. Copy, Cut, Backspace/Delete are exact whole-block actions; Cut/Delete share the canonical transaction/Undo seam. Adjacent selected blocks can drag together, while grabbing a selected member of a noncontiguous set is rejected and grabbing an unselected block collapses to that block. Context-click explicitly collapses to its clicked action target. Deliberate bounded limitation for this candidate: discontiguous paste, typing/IME replacement, formatting, indent/move, and accessibility text replacement are rejected rather than silently acting on the primary range. Those commands can be added only with exact multi-range source transactions; issue #17 and issue #15 must not route their behavior through a contiguous envelope. The mounted regression covers focus/mouse-up behavior, caret-to-Command normalization, add/remove and Shift both directions, Caps-Lock Command-C, CRLF and hidden-ID exact export, exact Delete/Cut source with one Undo and valid post-delete selection, adjacent/noncontiguous drag eligibility, context-click policy, unsupported modifiers, and unfocused handle focus. Exact reviewer gate is in progress.
Author
Owner

Reviewer transition — frozen candidate a413f10f62cf06acc45ea32ac34652b89c342fc8 is not source-passed

Parent is exact hover commit 85117d150581a9c3ed9595d90e4223f926f53fbb; worktree was clean and diff-check clean. Prior Caps-Lock shortcut, native cursor fallback, unselected-handle collapse, and deletion-envelope findings are fixed. Source review only; no build, mounted test, accessibility run, or GUI verification.

Remaining findings:

  • P2 performance: normalizedWholeBlockDisplayRanges expands a contiguous Shift selection and uses normalized.contains for every block. Shift-select-all followed by Command-click in the supported 10K editor performs roughly 50 million range comparisons on the main thread. Preserve ordering and deduplicate against the last appended range, or use an ordered Set-backed pass, so the operation is linear.
  • P2 behavior: Command-clicking the sole selected block is a no-op because removal requires more than one selected range. To implement true toggle semantics while retaining NSTextView’s required selection, collapse to a caret at that block boundary, clear the block-selection anchor, consume mouse-up, and do not enter native edit handling.

Add a sole-block toggle-off assertion. Exact source gate remains pending an amended SHA.

Reviewer transition — frozen candidate `a413f10f62cf06acc45ea32ac34652b89c342fc8` is **not source-passed** Parent is exact hover commit `85117d150581a9c3ed9595d90e4223f926f53fbb`; worktree was clean and diff-check clean. Prior Caps-Lock shortcut, native cursor fallback, unselected-handle collapse, and deletion-envelope findings are fixed. Source review only; no build, mounted test, accessibility run, or GUI verification. Remaining findings: - **P2 performance:** `normalizedWholeBlockDisplayRanges` expands a contiguous Shift selection and uses `normalized.contains` for every block. Shift-select-all followed by Command-click in the supported 10K editor performs roughly 50 million range comparisons on the main thread. Preserve ordering and deduplicate against the last appended range, or use an ordered Set-backed pass, so the operation is linear. - **P2 behavior:** Command-clicking the sole selected block is a no-op because removal requires more than one selected range. To implement true toggle semantics while retaining NSTextView’s required selection, collapse to a caret at that block boundary, clear the block-selection anchor, consume mouse-up, and do not enter native edit handling. Add a sole-block toggle-off assertion. Exact source gate remains pending an amended SHA.
Author
Owner

Candidate superseded after exact reviewer findings. The current frozen SHA is 66c43fa4b632e94a04ae326a457277139c4c9deb (same worktree/branch and parent).

Changes from the superseded a413f10f candidate:

  • Whole-block normalization is now linear after sorting native ranges; it appends already-ordered block ranges and deduplicates only against the last range, removing the prior quadratic behavior for Shift-select-all followed by Command-click in a 10K-block note.
  • Command-clicking the sole selected block now toggles it off by collapsing to a caret at that block boundary, clearing the block anchor, consuming mouse-up, and avoiding the native text edit path.
  • The mounted regression asserts the sole-block toggle-off behavior.

git diff --check passes and the worktree is clean. Exact reviewer re-gate is active; no build/GUI has run.

Candidate superseded after exact reviewer findings. The current frozen SHA is `66c43fa4b632e94a04ae326a457277139c4c9deb` (same worktree/branch and parent). Changes from the superseded `a413f10f` candidate: - Whole-block normalization is now linear after sorting native ranges; it appends already-ordered block ranges and deduplicates only against the last range, removing the prior quadratic behavior for Shift-select-all followed by Command-click in a 10K-block note. - Command-clicking the sole selected block now toggles it off by collapsing to a caret at that block boundary, clearing the block anchor, consuming mouse-up, and avoiding the native text edit path. - The mounted regression asserts the sole-block toggle-off behavior. `git diff --check` passes and the worktree is clean. Exact reviewer re-gate is active; no build/GUI has run.
Author
Owner

Exact source review PASS for 66c43fa4b632e94a04ae326a457277139c4c9deb (parent 85117d150581a9c3ed9595d90e4223f926f53fbb). Reviewer found no remaining P1-P3 issues; worktree and diff-check are clean. The 10K normalization path is linear, and sole Command-toggle collapses to a valid projected UTF-16 caret boundary without entering editing.

Pending gates remain build, mounted regression runtime, GUI behavior, and accessibility verification. The issue stays open until the user-facing behavior is verified in a delivered build.

Exact source review PASS for `66c43fa4b632e94a04ae326a457277139c4c9deb` (parent `85117d150581a9c3ed9595d90e4223f926f53fbb`). Reviewer found no remaining P1-P3 issues; worktree and diff-check are clean. The 10K normalization path is linear, and sole Command-toggle collapses to a valid projected UTF-16 caret boundary without entering editing. Pending gates remain build, mounted regression runtime, GUI behavior, and accessibility verification. The issue stays open until the user-facing behavior is verified in a delivered build.
Author
Owner

Reviewer transition — exact source gate PASS for 66c43fa4b632e94a04ae326a457277139c4c9deb

Parent: 85117d150581a9c3ed9595d90e4223f926f53fbb. Worktree .worktrees/editor-hover-margins was clean and git diff --check passed. Scope remains the editor source and its mounted regression.

No remaining P1–P3 source findings. Whole-block normalization now preserves ordered native ranges and uses adjacent last-only deduplication, removing the 10K quadratic Command-toggle path. Command-clicking the sole selected block now collapses to a valid projected UTF-16 caret, clears the block anchor, and consumes mouse-up without entering native editing. The earlier focus, exact Copy/Cut/Delete with one Undo, adjacent-only selected drag, Caps-Lock shortcut, native cursor fallback, CRLF/hidden-ID, and context-click repairs remain present.

Verification limit: source review only. Build, mounted test execution, GUI behavior, and the deliberately unavailable discontiguous accessibility mutation remain pending/unverified. Keep the issue open through delivered-build user verification.

Reviewer transition — exact source gate **PASS** for `66c43fa4b632e94a04ae326a457277139c4c9deb` Parent: `85117d150581a9c3ed9595d90e4223f926f53fbb`. Worktree `.worktrees/editor-hover-margins` was clean and `git diff --check` passed. Scope remains the editor source and its mounted regression. No remaining P1–P3 source findings. Whole-block normalization now preserves ordered native ranges and uses adjacent last-only deduplication, removing the 10K quadratic Command-toggle path. Command-clicking the sole selected block now collapses to a valid projected UTF-16 caret, clears the block anchor, and consumes mouse-up without entering native editing. The earlier focus, exact Copy/Cut/Delete with one Undo, adjacent-only selected drag, Caps-Lock shortcut, native cursor fallback, CRLF/hidden-ID, and context-click repairs remain present. Verification limit: source review only. Build, mounted test execution, GUI behavior, and the deliberately unavailable discontiguous accessibility mutation remain pending/unverified. Keep the issue open through delivered-build user verification.
Author
Owner

Post-review compile correction: root’s independent read found that performKeyEquivalent(with:) became a multi-statement function when the discontiguous-selection branch was added, but its former trailing single expression lacked an explicit return. Commit cb9b7b85526f74558b1f386e99d270bceb89c7f7 adds only that required return atop margin commit a876821f / interaction commit 66c43fa4.

An analogous scan of the changed expression bodies found no other converted implicit-return cases. git diff --check passes and the worktree is clean. Exact tip review is active; build has not started.

Post-review compile correction: root’s independent read found that `performKeyEquivalent(with:)` became a multi-statement function when the discontiguous-selection branch was added, but its former trailing single expression lacked an explicit `return`. Commit `cb9b7b85526f74558b1f386e99d270bceb89c7f7` adds only that required return atop margin commit `a876821f` / interaction commit `66c43fa4`. An analogous scan of the changed expression bodies found no other converted implicit-return cases. `git diff --check` passes and the worktree is clean. Exact tip review is active; build has not started.
Author
Owner

Reviewer transition — compile repair cb9b7b85526f74558b1f386e99d270bceb89c7f7 source PASS

Parent: passed margin commit a876821f4677e01578a13b0ad4b660d3d4ac43b8. The exact one-line change adds the required explicit return to the now multi-statement performKeyEquivalent(with:) implementation. Worktree and diff-check are clean; no analogous omission was found in the changed expression bodies.

Verification limit: source/compile-plausibility review only. An actual compiler/build and mounted runtime remain pending.

Reviewer transition — compile repair `cb9b7b85526f74558b1f386e99d270bceb89c7f7` source **PASS** Parent: passed margin commit `a876821f4677e01578a13b0ad4b660d3d4ac43b8`. The exact one-line change adds the required explicit `return` to the now multi-statement `performKeyEquivalent(with:)` implementation. Worktree and diff-check are clean; no analogous omission was found in the changed expression bodies. Verification limit: source/compile-plausibility review only. An actual compiler/build and mounted runtime remain pending.
Author
Owner

Root integrated the reviewed focus/multiselection stack66c43fa4, margin reductiona876821f, explicit-return repaircb9b7b85 and styled-background candidatea1a8b163. Integration tip37c5d40d now contains all four with clean cherry-picks. Text's compounded inset is reduced while preserving a stable handle gutter. Source review is complete; compile/mounted/runtime verification of this combined tip is pending. Build waits for the exclusive compiler-idle performance capture to finish. No desktop replacement or UI acceptance claim yet.

Root integrated the reviewed focus/multiselection stack66c43fa4, margin reductiona876821f, explicit-return repaircb9b7b85 and styled-background candidatea1a8b163. Integration tip37c5d40d now contains all four with clean cherry-picks. Text's compounded inset is reduced while preserving a stable handle gutter. Source review is complete; compile/mounted/runtime verification of this combined tip is pending. Build waits for the exclusive compiler-idle performance capture to finish. No desktop replacement or UI acceptance claim yet.
Author
Owner

Build pipeline update — /root/build_pipeline_recover (sole builder)
Marker: BUILD-HOLD-37C5-ISSUE3-20260913

  • Worktree/branch: /Users/kayg/Developer/calternal-app/.worktrees/editor-overnight-combined / wave14/editor-overnight-combined
  • Current state: exact inputs prepared; compile intentionally held while the exclusive 6ca85fd2 performance capture is active. No compiler or test process was started for this revision.
  • Integration revision: 37c5d40de40a2d0b279aad8d13d6f68837533c2d; tree a4ab6f472e41dc4ad43e6f4af3aade68fcee5713; 259 verified inputs. Focus selection commit in this lineage: 960b23a07ad80ae90883fb886d65d68e30c26f24; formatting-result follow-up: c02320f963b6c6e76cdd19996e63114c4fb990e0.
  • Immutable source archive SHA-256: 927b248d34f322259770c52b9c2690878a532b82ce49d843117e3fd8d13f3480; source manifest SHA-256: 18252bbb20e8639297a378b0f4175fc26090b66d6f34741a42ecf77ccfd5ac46.
  • Queued focused gates after the hold clears: testFocusClickAndModifierClicksUseNativeFullBlockSelections, testBlockHandleAppearsOnlyForHoverAndStaysReachableDuringInteraction, and testBlockDragPreviewTargetGeometryAndFeedbackCleanup.
  • Next action: prepare the exact package mirror, compile, run all three focused selectors, and build/stage a Release preview only if they pass.

Limitations: prepared provenance is verified, but this exact integration has not compiled, run tests, reached VM QA, or been delivered to the user. The issue remains open.

**Build pipeline update — `/root/build_pipeline_recover` (sole builder)** Marker: `BUILD-HOLD-37C5-ISSUE3-20260913` - Worktree/branch: `/Users/kayg/Developer/calternal-app/.worktrees/editor-overnight-combined` / `wave14/editor-overnight-combined` - Current state: **exact inputs prepared; compile intentionally held** while the exclusive 6ca85fd2 performance capture is active. No compiler or test process was started for this revision. - Integration revision: `37c5d40de40a2d0b279aad8d13d6f68837533c2d`; tree `a4ab6f472e41dc4ad43e6f4af3aade68fcee5713`; 259 verified inputs. Focus selection commit in this lineage: `960b23a07ad80ae90883fb886d65d68e30c26f24`; formatting-result follow-up: `c02320f963b6c6e76cdd19996e63114c4fb990e0`. - Immutable source archive SHA-256: `927b248d34f322259770c52b9c2690878a532b82ce49d843117e3fd8d13f3480`; source manifest SHA-256: `18252bbb20e8639297a378b0f4175fc26090b66d6f34741a42ecf77ccfd5ac46`. - Queued focused gates after the hold clears: `testFocusClickAndModifierClicksUseNativeFullBlockSelections`, `testBlockHandleAppearsOnlyForHoverAndStaysReachableDuringInteraction`, and `testBlockDragPreviewTargetGeometryAndFeedbackCleanup`. - Next action: prepare the exact package mirror, compile, run all three focused selectors, and build/stage a Release preview only if they pass. Limitations: prepared provenance is verified, but this exact integration has not compiled, run tests, reached VM QA, or been delivered to the user. The issue remains open.
Author
Owner

Build started — /root/build_pipeline_recover (sole builder)
Marker: BUILD-START-37C5-ISSUE3-20260913

  • Worktree/branch: /Users/kayg/Developer/calternal-app/.worktrees/editor-overnight-combined / wave14/editor-overnight-combined.
  • Performance owner released the exclusive compiler hold. Package compile has now started on agents@mbp; no local build and no central mutation.
  • Exact revision: 37c5d40de40a2d0b279aad8d13d6f68837533c2d; tree: a4ab6f472e41dc4ad43e6f4af3aade68fcee5713; 259 verified inputs.
  • Source archive SHA-256: 927b248d34f322259770c52b9c2690878a532b82ce49d843117e3fd8d13f3480; manifest SHA-256: 18252bbb20e8639297a378b0f4175fc26090b66d6f34741a42ecf77ccfd5ac46.
  • Focused selectors: testFocusClickAndModifierClicksUseNativeFullBlockSelections, testBlockHandleAppearsOnlyForHoverAndStaysReachableDuringInteraction, and testBlockDragPreviewTargetGeometryAndFeedbackCleanup.
  • Next action: run all three focused tests after compile, then produce and stage the exact Release only if all pass. Build, runtime verification, delivery, and user acceptance remain distinct.
**Build started — `/root/build_pipeline_recover` (sole builder)** Marker: `BUILD-START-37C5-ISSUE3-20260913` - Worktree/branch: `/Users/kayg/Developer/calternal-app/.worktrees/editor-overnight-combined` / `wave14/editor-overnight-combined`. - Performance owner released the exclusive compiler hold. Package compile has now started on `agents@mbp`; no local build and no central mutation. - Exact revision: `37c5d40de40a2d0b279aad8d13d6f68837533c2d`; tree: `a4ab6f472e41dc4ad43e6f4af3aade68fcee5713`; 259 verified inputs. - Source archive SHA-256: `927b248d34f322259770c52b9c2690878a532b82ce49d843117e3fd8d13f3480`; manifest SHA-256: `18252bbb20e8639297a378b0f4175fc26090b66d6f34741a42ecf77ccfd5ac46`. - Focused selectors: `testFocusClickAndModifierClicksUseNativeFullBlockSelections`, `testBlockHandleAppearsOnlyForHoverAndStaysReachableDuringInteraction`, and `testBlockDragPreviewTargetGeometryAndFeedbackCleanup`. - Next action: run all three focused tests after compile, then produce and stage the exact Release only if all pass. Build, runtime verification, delivery, and user acceptance remain distinct.
Author
Owner

QA plan for the pending exact 37c VM candidate is recorded at /tmp/qa-runs/20260913-37c-prep/37c-plan.md (shared summary will be copied with candidate evidence). This is a plan only; no outcome is claimed before the artifact is hash-verified and a fresh native post-action frame proves the target state.

Issue-specific acceptance for #3 will be exercised with a synthetic/disposable launch only. Each route uses fresh window-local screenshot coordinates with foreground delivery and a post-action screenshot plus viewer/editor state. Virtualized offscreen AX rows and driver return values are insufficient evidence.

QA plan for the pending exact 37c VM candidate is recorded at `/tmp/qa-runs/20260913-37c-prep/37c-plan.md` (shared summary will be copied with candidate evidence). This is a plan only; no outcome is claimed before the artifact is hash-verified and a fresh native post-action frame proves the target state. Issue-specific acceptance for #3 will be exercised with a synthetic/disposable launch only. Each route uses fresh window-local screenshot coordinates with foreground delivery and a post-action screenshot plus viewer/editor state. Virtualized offscreen AX rows and driver return values are insufficient evidence.
Author
Owner

Build worker update for exact central candidate 37c5d40de40a2d0b279aad8d13d6f68837533c2d (tree a4ab6f472e41dc4ad43e6f4af3aade68fcee5713, worktree .worktrees/editor-overnight-combined). SwiftPM Release test compilation and staging passed on agents@mbp.

The focused selection selector CalternalEditorTests.MarkdownBlockDocumentTests/testFocusClickAndModifierClicksUseNativeFullBlockSelections is not passed on the non-Aqua build-host runner. It entered the test and then remained blocked at MarkdownBlockDocumentTests.swift:1313 -> BlockEditorView.mouseDown -> NSTextView.mouseDown -> nextEventMatchingMask; the worker sampled the exact stack and terminated only that hung XCTest process after a bounded wait. Evidence: /Users/agents/Developer/BuildOnly/package-tests-d40/Evidence/package-tests/20260913T141514Z-central-37c5d40d-focus-0f35ed69/focused-1.log and focused-1-hang-sample.txt.

Per the preview gate owner, Release packaging may continue after successful compilation and unaffected focused checks, but this remains preview-only. Native focus, Command-click toggle, multi-selection, and background-click behavior still require the VM GUI and user QA. This comment records a runner limitation; it does not relabel the selector as passed and does not close the issue.

<!-- BUILD-GATE-SCOPE-37C5-ISSUE3-20260913 --> Build worker update for exact central candidate `37c5d40de40a2d0b279aad8d13d6f68837533c2d` (`tree a4ab6f472e41dc4ad43e6f4af3aade68fcee5713`, worktree `.worktrees/editor-overnight-combined`). SwiftPM Release test compilation and staging passed on `agents@mbp`. The focused selection selector `CalternalEditorTests.MarkdownBlockDocumentTests/testFocusClickAndModifierClicksUseNativeFullBlockSelections` is **not passed** on the non-Aqua build-host runner. It entered the test and then remained blocked at `MarkdownBlockDocumentTests.swift:1313 -> BlockEditorView.mouseDown -> NSTextView.mouseDown -> nextEventMatchingMask`; the worker sampled the exact stack and terminated only that hung XCTest process after a bounded wait. Evidence: `/Users/agents/Developer/BuildOnly/package-tests-d40/Evidence/package-tests/20260913T141514Z-central-37c5d40d-focus-0f35ed69/focused-1.log` and `focused-1-hang-sample.txt`. Per the preview gate owner, Release packaging may continue after successful compilation and unaffected focused checks, but this remains preview-only. Native focus, Command-click toggle, multi-selection, and background-click behavior still require the VM GUI and user QA. This comment records a runner limitation; it does not relabel the selector as passed and does not close the issue.
Author
Owner

Build-host result and bounded harness correction:

  • The exact integrated source compiled, and the existing hover/drag focused tests passed.
  • testFocusClickAndModifierClicksUseNativeFullBlockSelections did not complete: it hung at the direct call to NSTextView.mouseDown on line 1313. On the non-Aqua agents@mbp test host, AppKit entered nextEventMatchingMask and did not consume the separately posted synthetic mouse-up. This is an unsupported headless native-event simulation, not a product assertion failure. The focused test is not passed yet.
  • Tests-only commit 3700311d44ce2ebc210089cbddfcc251387c5d68 removes that direct native tracking-loop call. It retains the editor-owned decision assertion (handleBlockSelectionMouseDown returns false for an ordinary focused click, handing the gesture to NSTextView), then asserts the resulting native caret state explicitly. The full physical mouse gesture remains assigned to VM QA; the headless test does not claim it.

Stack tip is now 3700311d44ce2ebc210089cbddfcc251387c5d68 atop compile repair cb9b7b85, margin a876821f, interaction 66c43fa4, and hover 85117d15. The correction touches only Tests/CalternalEditorTests/MarkdownBlockDocumentTests.swift; git diff --check passes and the worktree is clean. Reviewer and rerun are pending.

Build-host result and bounded harness correction: - The exact integrated source compiled, and the existing hover/drag focused tests passed. - `testFocusClickAndModifierClicksUseNativeFullBlockSelections` did not complete: it hung at the direct call to `NSTextView.mouseDown` on line 1313. On the non-Aqua `agents@mbp` test host, AppKit entered `nextEventMatchingMask` and did not consume the separately posted synthetic mouse-up. This is an unsupported headless native-event simulation, not a product assertion failure. The focused test is **not passed** yet. - Tests-only commit `3700311d44ce2ebc210089cbddfcc251387c5d68` removes that direct native tracking-loop call. It retains the editor-owned decision assertion (`handleBlockSelectionMouseDown` returns false for an ordinary focused click, handing the gesture to NSTextView), then asserts the resulting native caret state explicitly. The full physical mouse gesture remains assigned to VM QA; the headless test does not claim it. Stack tip is now `3700311d44ce2ebc210089cbddfcc251387c5d68` atop compile repair `cb9b7b85`, margin `a876821f`, interaction `66c43fa4`, and hover `85117d15`. The correction touches only `Tests/CalternalEditorTests/MarkdownBlockDocumentTests.swift`; `git diff --check` passes and the worktree is clean. Reviewer and rerun are pending.
Author
Owner

Reviewer: /root/editor_polish_inventory

Exact tests-only correction reviewed: 3700311d44ce2ebc210089cbddfcc251387c5d68 in .worktrees/editor-hover-margins.

Source verdict: PASS — no P1-P3 findings.

The commit removes only the unsupported direct NSTextView.mouseDown tracking-loop call that hung the non-Aqua build runner. It retains the editor-owned assertion that handleBlockSelectionMouseDown returns false for an ordinary click in an already-focused editor, which is the boundary proving the event is handed to AppKit. The explicit setSelectedRange/equality assertion establishes only the fixture’s expected caret target/state; it does not simulate or prove native mouse gesture delivery.

No product source or selection behavior changes. No local build was run. The previously hung selector must be rerun on agents@mbp to establish that the headless suite completes, while the actual focused click-to-caret gesture remains explicitly unverified until VM testing with a real native event and post-action selection evidence. This review does not claim the physical gesture passed and issue #3 remains open through delivered user acceptance.

Reviewer: `/root/editor_polish_inventory` Exact tests-only correction reviewed: `3700311d44ce2ebc210089cbddfcc251387c5d68` in `.worktrees/editor-hover-margins`. Source verdict: **PASS — no P1-P3 findings.** The commit removes only the unsupported direct `NSTextView.mouseDown` tracking-loop call that hung the non-Aqua build runner. It retains the editor-owned assertion that `handleBlockSelectionMouseDown` returns `false` for an ordinary click in an already-focused editor, which is the boundary proving the event is handed to AppKit. The explicit `setSelectedRange`/equality assertion establishes only the fixture’s expected caret target/state; it does not simulate or prove native mouse gesture delivery. No product source or selection behavior changes. No local build was run. The previously hung selector must be rerun on `agents@mbp` to establish that the headless suite completes, while the actual focused click-to-caret gesture remains explicitly unverified until VM testing with a real native event and post-action selection evidence. This review does not claim the physical gesture passed and issue #3 remains open through delivered user acceptance.
Author
Owner

Root integration: reviewed test-only 3700311d integrated as 5b602934. It removes a native NSTextView mouse-tracking loop that hung the non-Aqua build-host test. The decision-seam assertion remains; assigned caret state is only fixture evidence, not proof of a physical click. Exact-tip rerun is queued behind the 37c5 Release preview. Physical click-to-caret must be checked on the VM.

Current preview37c5: compile, hover, and drag checks passed; focused selection test NOT PASSED (hang preserved). Preview build proceeds under the user-authorized preliminary-check policy, with the limitation explicit. No stable acceptance/merge gate is relaxed.

Parallel execution: title#5 remains in performance repair; inspector#10 in final test review; image controls#12 and codeblocks#9 now have independent implementation/planning owners. Caret performance#13/#14 plan is under review. Event#1 continues Store-boundary recovery fixes.

Root integration: reviewed test-only 3700311d integrated as 5b602934. It removes a native NSTextView mouse-tracking loop that hung the non-Aqua build-host test. The decision-seam assertion remains; assigned caret state is only fixture evidence, not proof of a physical click. Exact-tip rerun is queued behind the 37c5 Release preview. Physical click-to-caret must be checked on the VM. Current preview37c5: compile, hover, and drag checks passed; focused selection test NOT PASSED (hang preserved). Preview build proceeds under the user-authorized preliminary-check policy, with the limitation explicit. No stable acceptance/merge gate is relaxed. Parallel execution: title#5 remains in performance repair; inspector#10 in final test review; image controls#12 and codeblocks#9 now have independent implementation/planning owners. Caret performance#13/#14 plan is under review. Event#1 continues Store-boundary recovery fixes.
Author
Owner

Build/stage result for focus and native block selection, produced by build worker /root/build_pipeline_recover from .worktrees/editor-overnight-combined:

  • Exact source: 37c5d40de40a2d0b279aad8d13d6f68837533c2d; tree a4ab6f472e41dc4ad43e6f4af3aade68fcee5713; 259 verified inputs.
  • Source archive SHA-256: 927b248d34f322259770c52b9c2690878a532b82ce49d843117e3fd8d13f3480; source manifest SHA-256: 18252bbb20e8639297a378b0f4175fc26090b66d6f34741a42ecf77ccfd5ac46.
  • SwiftPM Release test compilation: PASS on agents@mbp; package binary SHA-256 03a041be97c0fc56a26a6b4437f66373c169604fe73aeb7a0d8c082e2fe4371f.
  • Focus/modifier selector: NOT PASSED on the non-Aqua runner. It blocked at MarkdownBlockDocumentTests.swift:1313 -> BlockEditorView.mouseDown -> NSTextView.mouseDown -> nextEventMatchingMask; only that XCTest process was terminated after a bounded wait. Log SHA-256 7647ee10715dce7d66b1a8fc9780615acca26098f7a808d3f209d6ce49a0c58a; sample SHA-256 adf89ec63bbe10173e064d38bc927ea12d843559da82fca85d880dd79294257b.
  • Preview-only Release build: PASS, arm64. Zip SHA-256 72a344ce72ec1d848703af89f71c11ac3255077df24e0cf155168bbdcd6b6dfa; executable SHA-256 53d72abd06aca991ea8dfde7be807dd0959185da601fc83461c8b8e6daa2ae51. Fresh-unzip strict codesign and bundle diff: PASS.
  • Local artifact: /Users/Shared/CalternalBuilds/37c5d40de40a-150324a1/Calternal-37c5d40de40a-Release-arm64.zip.
  • VM artifact: /Users/lume/CalternalQA/37c5d40de40a-150324a1/Calternal-37c5d40de40a-Release-arm64.zip.
  • Exact evidence/stack: /Users/Shared/CalternalBuilds/37c5d40de40a-150324a1/tests/ and immutable build-host evidence /Users/agents/Developer/BuildOnly/package-tests-d40/Evidence/package-tests/20260913T141514Z-central-37c5d40d-focus-0f35ed69/.

State is built and staged, not runtime-accepted or user-accepted. VM GUI verification of real focus, Command-click toggle, multi-selection, and background-click behavior is next. No GUI was executed by the build worker. Keep this issue open.

<!-- BUILD-RESULT-37C5-ISSUE3-20260913 --> Build/stage result for focus and native block selection, produced by build worker `/root/build_pipeline_recover` from `.worktrees/editor-overnight-combined`: - Exact source: `37c5d40de40a2d0b279aad8d13d6f68837533c2d`; tree `a4ab6f472e41dc4ad43e6f4af3aade68fcee5713`; 259 verified inputs. - Source archive SHA-256: `927b248d34f322259770c52b9c2690878a532b82ce49d843117e3fd8d13f3480`; source manifest SHA-256: `18252bbb20e8639297a378b0f4175fc26090b66d6f34741a42ecf77ccfd5ac46`. - SwiftPM Release test compilation: PASS on `agents@mbp`; package binary SHA-256 `03a041be97c0fc56a26a6b4437f66373c169604fe73aeb7a0d8c082e2fe4371f`. - Focus/modifier selector: **NOT PASSED** on the non-Aqua runner. It blocked at `MarkdownBlockDocumentTests.swift:1313 -> BlockEditorView.mouseDown -> NSTextView.mouseDown -> nextEventMatchingMask`; only that XCTest process was terminated after a bounded wait. Log SHA-256 `7647ee10715dce7d66b1a8fc9780615acca26098f7a808d3f209d6ce49a0c58a`; sample SHA-256 `adf89ec63bbe10173e064d38bc927ea12d843559da82fca85d880dd79294257b`. - Preview-only Release build: PASS, arm64. Zip SHA-256 `72a344ce72ec1d848703af89f71c11ac3255077df24e0cf155168bbdcd6b6dfa`; executable SHA-256 `53d72abd06aca991ea8dfde7be807dd0959185da601fc83461c8b8e6daa2ae51`. Fresh-unzip strict codesign and bundle diff: PASS. - Local artifact: `/Users/Shared/CalternalBuilds/37c5d40de40a-150324a1/Calternal-37c5d40de40a-Release-arm64.zip`. - VM artifact: `/Users/lume/CalternalQA/37c5d40de40a-150324a1/Calternal-37c5d40de40a-Release-arm64.zip`. - Exact evidence/stack: `/Users/Shared/CalternalBuilds/37c5d40de40a-150324a1/tests/` and immutable build-host evidence `/Users/agents/Developer/BuildOnly/package-tests-d40/Evidence/package-tests/20260913T141514Z-central-37c5d40d-focus-0f35ed69/`. State is built and staged, not runtime-accepted or user-accepted. VM GUI verification of real focus, Command-click toggle, multi-selection, and background-click behavior is next. No GUI was executed by the build worker. Keep this issue open.
Author
Owner

37c5 preliminary VM result: first foreground click visibly selected the synthetic event, but a second click stayed in the event viewer. The post-state has no mounted text field/text area or focused editable control (.agents/native-break/37c5-vm-qa/11-after-second.json), so unfocused/focused block selection and Command/Shift disjoint/range behavior were not exercised. Issue remains open.

37c5 preliminary VM result: first foreground click visibly selected the synthetic event, but a second click stayed in the event viewer. The post-state has no mounted text field/text area or focused editable control (`.agents/native-break/37c5-vm-qa/11-after-second.json`), so unfocused/focused block selection and Command/Shift disjoint/range behavior were not exercised. Issue remains open.
Author
Owner

Build worker /root/build_pipeline_recover has frozen .worktrees/editor-overnight-combined (wave14/editor-overnight-combined) at exact 56e61d2e4d8da6915fc693a99b2d09d8b5160863, tree 3a21c99da5c7c0ab3ae8ec2d949439b5a0c5e5a3, clean with git diff --check passing. This tip includes the reviewed headless focus-test repair 5b602934 and retains the real focus/multi-selection product code from the prior preview.

The sole agents@mbp lane will compile SwiftPM Release tests, rerun CalternalEditorTests.MarkdownBlockDocumentTests/testFocusClickAndModifierClicksUseNativeFullBlockSelections, then build an immutable arm64 Release only after the focused package gates. This records build start only; no runtime or user acceptance is claimed.

<!-- BUILD-START-56E-ISSUE3-20260913 --> Build worker `/root/build_pipeline_recover` has frozen `.worktrees/editor-overnight-combined` (`wave14/editor-overnight-combined`) at exact `56e61d2e4d8da6915fc693a99b2d09d8b5160863`, tree `3a21c99da5c7c0ab3ae8ec2d949439b5a0c5e5a3`, clean with `git diff --check` passing. This tip includes the reviewed headless focus-test repair `5b602934` and retains the real focus/multi-selection product code from the prior preview. The sole `agents@mbp` lane will compile SwiftPM Release tests, rerun `CalternalEditorTests.MarkdownBlockDocumentTests/testFocusClickAndModifierClicksUseNativeFullBlockSelections`, then build an immutable arm64 Release only after the focused package gates. This records build start only; no runtime or user acceptance is claimed.
Author
Owner

Root delivery verified: desktop ~/Applications/Calternal.app now runs exact37c5d40de40a2d0b279aad8d13d6f68837533c2d, executable SHA25653d72abd06aca991ea8dfde7be807dd0959185da601fc83461c8b8e6daa2ae51. Native Quit then atomic replacement, prior bundle retained, no user source/settings writes; expected Calternal Space/window restored. Receipt .agents/desktop-install/37c5d40d/install-receipt.json.

User QA now available: hover-only six-dot handle with tighter margins; first unfocused block click selection, focused edit, Cmd/Shiftselection; styled-note top background candidate; cold sidebar overlap candidate. VM basic launch and eventselection passed; actual editor gestures/stylednote and exact collapsed-preview overlap remain unverified, and focus headless test is NOTPASSED. No performance/stable/useracceptance claim.

Next56e61 build contains reviewed imageQuickLook/transcription/inspector and testharnessfix. Eventdate/title/code/list refinements continue separately; this delivery does not close issues.

Root delivery verified: desktop ~/Applications/Calternal.app now runs exact37c5d40de40a2d0b279aad8d13d6f68837533c2d, executable SHA25653d72abd06aca991ea8dfde7be807dd0959185da601fc83461c8b8e6daa2ae51. Native Quit then atomic replacement, prior bundle retained, no user source/settings writes; expected Calternal Space/window restored. Receipt `.agents/desktop-install/37c5d40d/install-receipt.json`. User QA now available: hover-only six-dot handle with tighter margins; first unfocused block click selection, focused edit, Cmd/Shiftselection; styled-note top background candidate; cold sidebar overlap candidate. VM basic launch and eventselection passed; actual editor gestures/stylednote and exact collapsed-preview overlap remain unverified, and focus headless test is NOTPASSED. No performance/stable/useracceptance claim. Next56e61 build contains reviewed imageQuickLook/transcription/inspector and testharnessfix. Eventdate/title/code/list refinements continue separately; this delivery does not close issues.
Author
Owner

37c5 VM result on the documented disposable no-image note: first click visibly focuses text with a caret (22-first-focus.png); Cmd-clicks produce visibly disjoint selected blocks 3 and 6 with intervening 4–5 unselected (26-cmd-disjoint.png); Shift-click produces a visible contiguous range 3–8 (28-shift-range.png). This establishes the UI selection paths. Copy/delete/paste/format/drag/move/indent, IME and Undo adversaries were not run, so do not close the issue yet.

37c5 VM result on the documented disposable no-image note: first click visibly focuses text with a caret (`22-first-focus.png`); Cmd-clicks produce visibly disjoint selected blocks 3 and 6 with intervening 4–5 unselected (`26-cmd-disjoint.png`); Shift-click produces a visible contiguous range 3–8 (`28-shift-range.png`). This establishes the UI selection paths. Copy/delete/paste/format/drag/move/indent, IME and Undo adversaries were not run, so do not close the issue yet.
Author
Owner

Exact 56e61d2e4d8da6915fc693a99b2d09d8b5160863 SwiftPM Release test compilation passed on agents@mbp. The repaired headless selector now completes instead of hanging, but it fails three assertions at MarkdownBlockDocumentTests.swift:1339, :1353, and :1395: actual clipboard text is First block\r\n\r\nThird block while the expected value is First block \r\n\r\nThird block (the actual result lacks the space before the first CRLF).

Exact log: /Users/agents/Developer/BuildOnly/package-tests-d40/Evidence/package-tests/20260913T143932Z-central-56e61d2e-image-voice-inspector-15a9e8a8/focused-1.log, SHA-256 0a89cdff7a853afd4393f63b17073abedefe65444eeffb22e50e17a7e1dc34de. Release is held at this focused gate; this is neither a pass nor runtime acceptance. Root has the direct failure report. Keep #3 open.

<!-- TEST-RESULT-56E-ISSUE3-20260913 --> Exact `56e61d2e4d8da6915fc693a99b2d09d8b5160863` SwiftPM Release test compilation passed on `agents@mbp`. The repaired headless selector now completes instead of hanging, but it **fails three assertions** at `MarkdownBlockDocumentTests.swift:1339`, `:1353`, and `:1395`: actual clipboard text is `First block\r\n\r\nThird block ` while the expected value is `First block \r\n\r\nThird block ` (the actual result lacks the space before the first CRLF). Exact log: `/Users/agents/Developer/BuildOnly/package-tests-d40/Evidence/package-tests/20260913T143932Z-central-56e61d2e-image-voice-inspector-15a9e8a8/focused-1.log`, SHA-256 `0a89cdff7a853afd4393f63b17073abedefe65444eeffb22e50e17a7e1dc34de`. Release is held at this focused gate; this is neither a pass nor runtime acceptance. Root has the direct failure report. Keep #3 open.
Author
Owner

Focused 56e selector diagnosis — /root/block_drag_finish

The three failures are a product UTF-16/Swift-Character boundary bug, not an expectation mismatch. writeSelectedBlocks recognizes a trailing \r\n and calls String.dropLast(2). Swift treats CRLF as one extended grapheme cluster, so that removes the CRLF plus the authored separator space immediately before the hidden block ID. This explains the exact observed asymmetry: the first selected block loses its trailing space before CRLF, while the final block without a line ending retains it.

The export contract remains: remove the hidden ^id token, preserve its preceding authored horizontal separator, then remove exactly one physical trailing line ending before joining selected blocks. I am preparing a minimal product fix that removes CRLF by UTF-16 length (2 code units) and LF/CR by 1, leaving the existing exact clipboard/Undo regression unchanged. No local build or GUI run; the focused selector must be rerun by the sole builder.

Focused 56e selector diagnosis — `/root/block_drag_finish` The three failures are a product UTF-16/Swift-Character boundary bug, not an expectation mismatch. `writeSelectedBlocks` recognizes a trailing `\r\n` and calls `String.dropLast(2)`. Swift treats CRLF as one extended grapheme cluster, so that removes the CRLF plus the authored separator space immediately before the hidden block ID. This explains the exact observed asymmetry: the first selected block loses its trailing space before CRLF, while the final block without a line ending retains it. The export contract remains: remove the hidden `^id` token, preserve its preceding authored horizontal separator, then remove exactly one physical trailing line ending before joining selected blocks. I am preparing a minimal product fix that removes CRLF by UTF-16 length (2 code units) and LF/CR by 1, leaving the existing exact clipboard/Undo regression unchanged. No local build or GUI run; the focused selector must be rerun by the sole builder.
Author
Owner

Candidate frozen for exact source review — /root/block_drag_finish

  • Worktree: .worktrees/editor-hover-margins
  • Branch: wave16/editor-hover-margins
  • Commit: db0b1f203dbe7c329c078b5d5fd49bdc5e938761
  • Parent: reviewed test-harness correction 3700311d44ce2ebc210089cbddfcc251387c5d68
  • Scope: one product file, Sources/CalternalEditor/BlockEditorView.swift (5 additions, 2 deletions)

The selected-block export now removes one trailing physical line ending in UTF-16 units: 2 for CRLF, 1 for LF or CR. This preserves the authored separator before a hidden block ID and directly addresses all three exact failures in the 56e focused selector. The existing clipboard expectations were not changed or weakened.

git diff --check passes and the worktree is clean. No local build or GUI run. Independent source review is active; the exact focused selector still requires the sole-builder rerun on the integrated tip.

Candidate frozen for exact source review — `/root/block_drag_finish` - Worktree: `.worktrees/editor-hover-margins` - Branch: `wave16/editor-hover-margins` - Commit: `db0b1f203dbe7c329c078b5d5fd49bdc5e938761` - Parent: reviewed test-harness correction `3700311d44ce2ebc210089cbddfcc251387c5d68` - Scope: one product file, `Sources/CalternalEditor/BlockEditorView.swift` (5 additions, 2 deletions) The selected-block export now removes one trailing physical line ending in UTF-16 units: 2 for CRLF, 1 for LF or CR. This preserves the authored separator before a hidden block ID and directly addresses all three exact failures in the 56e focused selector. The existing clipboard expectations were not changed or weakened. `git diff --check` passes and the worktree is clean. No local build or GUI run. Independent source review is active; the exact focused selector still requires the sole-builder rerun on the integrated tip.
Author
Owner

Reviewer: /root/editor_polish_inventory

Exact product fix reviewed: db0b1f203dbe7c329c078b5d5fd49bdc5e938761 in .worktrees/editor-hover-margins, parent 3700311d44ce2ebc210089cbddfcc251387c5d68.

Source verdict: PASS — no P1-P3 findings.

Swift treats CRLF as one extended Character, so dropLast(2) removed the CRLF plus the preceding authored character. The repair bridges to NSString and removes exactly two UTF-16 code units for CRLF or one for LF/CR. The suffix guards guarantee the subtraction cannot underflow; trimming occurs at an ASCII line-ending boundary and cannot split a preceding Unicode scalar. Each block’s own terminal ending is handled independently, so mixed line endings remain safe while the existing preferred separator policy is unchanged.

No local build was run. Rerun the focused CRLF/hidden-ID clipboard regression on agents@mbp; issue #3 remains open through VM/user acceptance.

Reviewer: `/root/editor_polish_inventory` Exact product fix reviewed: `db0b1f203dbe7c329c078b5d5fd49bdc5e938761` in `.worktrees/editor-hover-margins`, parent `3700311d44ce2ebc210089cbddfcc251387c5d68`. Source verdict: **PASS — no P1-P3 findings.** Swift treats CRLF as one extended `Character`, so `dropLast(2)` removed the CRLF plus the preceding authored character. The repair bridges to `NSString` and removes exactly two UTF-16 code units for CRLF or one for LF/CR. The suffix guards guarantee the subtraction cannot underflow; trimming occurs at an ASCII line-ending boundary and cannot split a preceding Unicode scalar. Each block’s own terminal ending is handled independently, so mixed line endings remain safe while the existing preferred separator policy is unchanged. No local build was run. Rerun the focused CRLF/hidden-ID clipboard regression on `agents@mbp`; issue #3 remains open through VM/user acceptance.
Author
Owner

The three exact-source 56e61d2e failures identified a product bug, not an obsolete expectation. Swift's character-level CRLF handling made the prior dropLast(2) remove the hidden ID boundary and the authored space before CRLF. Root integrated the reviewed UTF-16/NSString correction as central exact 0e835eed87233ab1156fbef86c0286e18a45fa90 (Preserve block text before CRLF export), tree 48fca32ee4a06602470d50e7cc5ebe953081d018; the worktree is clean and git diff --check passes.

Build worker /root/build_pipeline_recover is restaging exact 0e835eed for a fresh SwiftPM Release compile and rerun of the unchanged focus/modifier selector plus the integrated image/speech checks, followed by immutable Release packaging only on pass. Prior 56e remains failed evidence and is not a release candidate. No runtime or user acceptance is claimed by this transition.

<!-- BUILD-TRANSITION-0E835EED-ISSUE3-20260913 --> The three exact-source `56e61d2e` failures identified a product bug, not an obsolete expectation. Swift's character-level CRLF handling made the prior `dropLast(2)` remove the hidden ID boundary and the authored space before CRLF. Root integrated the reviewed UTF-16/NSString correction as central exact `0e835eed87233ab1156fbef86c0286e18a45fa90` (`Preserve block text before CRLF export`), tree `48fca32ee4a06602470d50e7cc5ebe953081d018`; the worktree is clean and `git diff --check` passes. Build worker `/root/build_pipeline_recover` is restaging exact 0e835eed for a fresh SwiftPM Release compile and rerun of the unchanged focus/modifier selector plus the integrated image/speech checks, followed by immutable Release packaging only on pass. Prior 56e remains failed evidence and is not a release candidate. No runtime or user acceptance is claimed by this transition.
Author
Owner

Exact reviewed CRLF correction candidate 0e835eed87233ab1156fbef86c0286e18a45fa90 (tree 48fca32ee4a06602470d50e7cc5ebe953081d018, 262 verified inputs) compiled and passed the unchanged testFocusClickAndModifierClicksUseNativeFullBlockSelections on agents@mbp in 4.545s. This verifies the headless test no longer hangs and the authored space before CRLF now survives block clipboard export. Focus log SHA-256: 2c964a18064075e14f74b7dbc314fe5f076d7a028e27a9362163664124c928f4.

Release arm64 build and extraction-safe archive passed. Source archive SHA-256 7abfd7108583fe70696e53e6e615057e142b6ce6e83f3a5ff736b5c9b93959ec; manifest SHA-256 3a2c2afd60ad995ce4d8bf3dc1c60e65e3376eaef8344d8d056b7933d95afd65; zip SHA-256 a18cecf74cb32fd205201b21783b2a7df56aec77a081e04d3c791f6377b4e0ee; executable SHA-256 e2ce47b34c64f73d5b7d57384e9b17bc13379658138803ab56ec670246965226. Fresh-unzip strict codesign and byte-for-byte bundle diff passed.

Local artifact: /Users/Shared/CalternalBuilds/0e835eed8723-3507d319/Calternal-0e835eed8723-Release-arm64.zip. VM artifact: /Users/lume/CalternalQA/0e835eed8723-3507d319/Calternal-0e835eed8723-Release-arm64.zip. Receipt: /Users/Shared/CalternalBuilds/0e835eed8723-3507d319/archive-verify.json, SHA-256 572c67fcdb1c5521360fcfcf4d6ec6e972c11de195a8e426fcf6cdbbc5a67eca.

State is built and staged. The build worker ran no GUI. Exact 0e runtime/user acceptance remains pending; keep #3 open through that verification.

<!-- BUILD-RESULT-0E835EED-ISSUE3-20260913 --> Exact reviewed CRLF correction candidate `0e835eed87233ab1156fbef86c0286e18a45fa90` (`tree 48fca32ee4a06602470d50e7cc5ebe953081d018`, 262 verified inputs) compiled and passed the unchanged `testFocusClickAndModifierClicksUseNativeFullBlockSelections` on `agents@mbp` in 4.545s. This verifies the headless test no longer hangs and the authored space before CRLF now survives block clipboard export. Focus log SHA-256: `2c964a18064075e14f74b7dbc314fe5f076d7a028e27a9362163664124c928f4`. Release arm64 build and extraction-safe archive passed. Source archive SHA-256 `7abfd7108583fe70696e53e6e615057e142b6ce6e83f3a5ff736b5c9b93959ec`; manifest SHA-256 `3a2c2afd60ad995ce4d8bf3dc1c60e65e3376eaef8344d8d056b7933d95afd65`; zip SHA-256 `a18cecf74cb32fd205201b21783b2a7df56aec77a081e04d3c791f6377b4e0ee`; executable SHA-256 `e2ce47b34c64f73d5b7d57384e9b17bc13379658138803ab56ec670246965226`. Fresh-unzip strict codesign and byte-for-byte bundle diff passed. Local artifact: `/Users/Shared/CalternalBuilds/0e835eed8723-3507d319/Calternal-0e835eed8723-Release-arm64.zip`. VM artifact: `/Users/lume/CalternalQA/0e835eed8723-3507d319/Calternal-0e835eed8723-Release-arm64.zip`. Receipt: `/Users/Shared/CalternalBuilds/0e835eed8723-3507d319/archive-verify.json`, SHA-256 `572c67fcdb1c5521360fcfcf4d6ec6e972c11de195a8e426fcf6cdbbc5a67eca`. State is built and staged. The build worker ran no GUI. Exact 0e runtime/user acceptance remains pending; keep #3 open through that verification.
Author
Owner

Task /root/editor_polish_inventory — next-combined-preview acceptance handoff (planning only; no GUI/build).

Already established: exact 0e835eed compiled and its focused focus/modifier/CRLF clipboard selector passed; prior VM evidence showed Command-disjoint and Shift-contiguous block highlighting. This does not establish destructive commands on disjoint selections.

Remaining VM checks, owned by /root on the next exact combined build: in the disposable fixture Command-select two nonadjacent uniquely labelled blocks, then separately exercise Copy, formatting, Delete+Undo, paste, drag/move, and Tab/Shift-Tab. At every step assert the intervening block bytes/selection are unchanged, primary range remains predictable, and one Undo restores the exact source. Include a plain caret/IME composition sanity check after clearing the disjoint selection. Capture before/after fixture hashes; never use the real vault. Keep #3 open.

Task `/root/editor_polish_inventory` — next-combined-preview acceptance handoff (planning only; no GUI/build). Already established: exact `0e835eed` compiled and its focused focus/modifier/CRLF clipboard selector passed; prior VM evidence showed Command-disjoint and Shift-contiguous block highlighting. This does not establish destructive commands on disjoint selections. Remaining VM checks, owned by `/root` on the next exact combined build: in the disposable fixture Command-select two nonadjacent uniquely labelled blocks, then separately exercise Copy, formatting, Delete+Undo, paste, drag/move, and Tab/Shift-Tab. At every step assert the intervening block bytes/selection are unchanged, primary range remains predictable, and one Undo restores the exact source. Include a plain caret/IME composition sanity check after clearing the disjoint selection. Capture before/after fixture hashes; never use the real vault. Keep #3 open.
Author
Owner

Remote preservation checkpoint — 2026-09-14

The following original-worktree candidates are now pushed and exact hashes verified on both Forgejo and GitHub. These are preserved candidates/diagnostics, not a claim of new acceptance; some may already be integrated by cherry-pick or superseded. Use the issue’s existing evidence before choosing changes to resume.

  • codex/wip/editor-handle-diagnostic-20260914 — a4a34c7401bdca2c0e2ab10db58d71087d16df95
  • codex/wip/editor-handle-geometry-20260914 — 5aac728b2fb3e2e1d77b2881ba2036a3d22d0196
  • codex/wip/editor-handle-render-diagnostic-20260914 — d17a8d1cd16670082ce89a0617525d345b8307b3
  • wave14/editor-block-drag — 05fefc98890003a4d14ff297d4ead459deca0538
  • wave14/editor-empty-marker-host-repro — 79dc861166b57a70a29e6591c1dc1effbd4f7a82
  • wave14/editor-empty-marker-map-publication — c2dcd6d05e22d0ef39b9da8d9e37fa95ec03e2be
  • wave14/editor-empty-marker-paint — e32565510ac13063a5c72994ce0db16dae7ac355
  • wave14/editor-empty-marker-preview — 10d6af95f1fe4d786c6c7423d4154bc9e39a2bce
  • wave14/editor-empty-marker-probe — bded2b644854c65f4e1c4dfbaeedf30302b19f34
  • wave14/editor-empty-marker-runtime-diag — bf946ddd7a0c9b0e89e73dc6cc85f1461228b9e4
  • wave14/editor-list-enter-next — 66c4af4aaddb3b09f7366211d48d4533d8b08cf6
  • wave14/editor-list-handle-integrated — 3441a34263f24aab2c4a8142db103ca1cd8ee3e6
  • wave14/editor-list-keyboard-audit — 846a9c768425e2bec809063aae09c3dd6f16ba78
  • wave16/editor-list-refinements — eeed031a28cbae672de108d70738c6c89f19584e

Master #20 contains the resume instructions. No force push; dev remains 1d8f4adf.

Remote preservation checkpoint — 2026-09-14 The following original-worktree candidates are now pushed and exact hashes verified on both Forgejo and GitHub. These are preserved candidates/diagnostics, not a claim of new acceptance; some may already be integrated by cherry-pick or superseded. Use the issue’s existing evidence before choosing changes to resume. - `codex/wip/editor-handle-diagnostic-20260914` — `a4a34c7401bdca2c0e2ab10db58d71087d16df95` - `codex/wip/editor-handle-geometry-20260914` — `5aac728b2fb3e2e1d77b2881ba2036a3d22d0196` - `codex/wip/editor-handle-render-diagnostic-20260914` — `d17a8d1cd16670082ce89a0617525d345b8307b3` - `wave14/editor-block-drag` — `05fefc98890003a4d14ff297d4ead459deca0538` - `wave14/editor-empty-marker-host-repro` — `79dc861166b57a70a29e6591c1dc1effbd4f7a82` - `wave14/editor-empty-marker-map-publication` — `c2dcd6d05e22d0ef39b9da8d9e37fa95ec03e2be` - `wave14/editor-empty-marker-paint` — `e32565510ac13063a5c72994ce0db16dae7ac355` - `wave14/editor-empty-marker-preview` — `10d6af95f1fe4d786c6c7423d4154bc9e39a2bce` - `wave14/editor-empty-marker-probe` — `bded2b644854c65f4e1c4dfbaeedf30302b19f34` - `wave14/editor-empty-marker-runtime-diag` — `bf946ddd7a0c9b0e89e73dc6cc85f1461228b9e4` - `wave14/editor-list-enter-next` — `66c4af4aaddb3b09f7366211d48d4533d8b08cf6` - `wave14/editor-list-handle-integrated` — `3441a34263f24aab2c4a8142db103ca1cd8ee3e6` - `wave14/editor-list-keyboard-audit` — `846a9c768425e2bec809063aae09c3dd6f16ba78` - `wave16/editor-list-refinements` — `eeed031a28cbae672de108d70738c6c89f19584e` Master #20 contains the resume instructions. No force push; dev remains 1d8f4adf.
Author
Owner

Spec update from user (2026-09-14), Craft reference screenshots supplied in session:

  • While the editor is unfocused, a single click on a block selects it (native selection highlight spanning the block, per Craft). A second click on the selected block, or a double-click from the unfocused state, enters text editing at the click point; the caret keeps blinking there while the mouse hovering over other blocks only changes their hover state.
  • Command-click toggles individual blocks into a disjoint selection; Shift-click extends from the anchor as a contiguous range. Unchanged from the existing acceptance.
  • Hover and the trailing block menu are tracked in #4 and #24; keep the selection model independent of them.

Assignment: parallel track wave19/block-editor-craft (worktree .worktrees/block-editor-craft), starting from dev 1d8f4adf. Scout mapping of the current selection code is in progress.

Spec update from user (2026-09-14), Craft reference screenshots supplied in session: - While the editor is unfocused, a single click on a block selects it (native selection highlight spanning the block, per Craft). A second click on the selected block, or a double-click from the unfocused state, enters text editing at the click point; the caret keeps blinking there while the mouse hovering over other blocks only changes their hover state. - Command-click toggles individual blocks into a disjoint selection; Shift-click extends from the anchor as a contiguous range. Unchanged from the existing acceptance. - Hover and the trailing block menu are tracked in #4 and #24; keep the selection model independent of them. Assignment: parallel track `wave19/block-editor-craft` (worktree `.worktrees/block-editor-craft`), starting from dev `1d8f4adf`. Scout mapping of the current selection code is in progress.
Author
Owner

Chunk 2 (click / double-click editing) on wave19/block-editor-craft: fa90c96 repeated-click caret path, fb8b1bc defer selected-block editing until mouse-up (8 pt drag threshold replays the native press; visible handle excluded; per-character TextKit 2 hit mapping so the caret lands on the clicked character), 90c00f7 restores the unfocused ordinary-click guard and drag-preview grab geometry. Reviewer (read-only) findings addressed: unreachable branch, swallowed handle/text drags, exact caret index assertion. Build host: focus/modifier test, drag-preview test and the new double-click test each 1/1; the rest of the class matches the dev baseline (dev has a pre-existing crash in the rendered-image copy test, noted on #11). Delivery to kayg@mbp waits on chunk 1 (#4) acceptance.

Chunk 2 (click / double-click editing) on `wave19/block-editor-craft`: `fa90c96` repeated-click caret path, `fb8b1bc` defer selected-block editing until mouse-up (8 pt drag threshold replays the native press; visible handle excluded; per-character TextKit 2 hit mapping so the caret lands on the clicked character), `90c00f7` restores the unfocused ordinary-click guard and drag-preview grab geometry. Reviewer (read-only) findings addressed: unreachable branch, swallowed handle/text drags, exact caret index assertion. Build host: focus/modifier test, drag-preview test and the new double-click test each 1/1; the rest of the class matches the dev baseline (dev has a pre-existing crash in the rendered-image copy test, noted on #11). Delivery to kayg@mbp waits on chunk 1 (#4) acceptance.
Author
Owner

Click/double-click editing commits are on wave19/block-editor-craft @ bc3ace0 (see #24 for status); not yet VM-driven; paused for supervised continuation tomorrow.

Click/double-click editing commits are on `wave19/block-editor-craft` @ `bc3ace0` (see #24 for status); not yet VM-driven; paused for supervised continuation tomorrow.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kayg/calternal-macos#3
No description provided.