feat(playbook): format inline code while editing - #1280
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Source-preserving behavior
The stored and synchronized document remains exact Markdown, including both backticks. The rendered form is only presentation. In the web contenteditable, a completed span is atomic until Backspace at its right edge unwraps it to the opening-backtick editing form; retyping the closing backtick formats it again. This preserves the source invariant while providing the requested editing path.
Validation
cargo test -p construct-cli playbook_inline_code— passedcargo test -p construct-cli playbook_backspace_after_inline_code— passedcargo test -p construct-cli playbook_cursor_math_matches_painted_buffer_differential— passedcargo test -p construct-e2e --test playbook_view -- --nocapture— passed, 8 testscargo test -p construct-e2e --test playbook_view web_playbook_view_full_parity -- --exact --nocapture— passed after the native-undo-path refinementcargo build— passed for the full workspaceFailed commands / known baseline issue
cargo test -p construct-cli playbook_inline_code --lib— command-shape error:construct-clihas no library target; rerun without--libpassed.cargo test -p construct-cli— 1,417 passed and 1 failed:color::tests::truecolor_backend_still_emits_rgbexpected38;2;92;103;118, while the captured backend output contained no RGB sequence.cargo test -p construct-cli color::tests::truecolor_backend_still_emits_rgb -- --exact— reproduced the same unrelated terminal-color failure in isolation. No changed file is in the color backend.git fetch origin mainandgit restoreattempts were denied access to worktree Git metadata; both were rerun with the required approval and succeeded.Reviewer media
No new recording was made. Media would not materially improve review: the dynamic boundary behavior is exercised in real headless Chromium, and the visual treatment is a small inline highlight rather than a layout change.