Skip to content

feat(playbook): format inline code while editing - #1280

Merged
edwin-zvs merged 2 commits into
mainfrom
feat-playbook-inline-code-editing
Aug 19, 2026
Merged

feat(playbook): format inline code while editing#1280
edwin-zvs merged 2 commits into
mainfrom
feat-playbook-inline-code-editing

Conversation

@edwin-zvs

Copy link
Copy Markdown
Contributor

Summary

  • render completed single-backtick Playbook spans as highlighted inline code without visible delimiters in both TUI and web editors
  • preserve exact source Markdown and source offsets; Backspace at the formatted span boundary removes only the closing backtick and reveals the opening delimiter plus editable text
  • keep unmatched openings and multi-backtick runs literal, and cover the new transformation in the TUI paint/cursor differential corpus
  • record the durable editing rule in spec 0203 and update the built-in-template guidance

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 — passed
  • cargo test -p construct-cli playbook_backspace_after_inline_code — passed
  • cargo test -p construct-cli playbook_cursor_math_matches_painted_buffer_differential — passed
  • cargo test -p construct-e2e --test playbook_view -- --nocapture — passed, 8 tests
  • cargo test -p construct-e2e --test playbook_view web_playbook_view_full_parity -- --exact --nocapture — passed after the native-undo-path refinement
  • cargo build — passed for the full workspace

Failed commands / known baseline issue

  • cargo test -p construct-cli playbook_inline_code --lib — command-shape error: construct-cli has no library target; rerun without --lib passed.
  • cargo test -p construct-cli — 1,417 passed and 1 failed: color::tests::truecolor_backend_still_emits_rgb expected 38;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.
  • Initial sandboxed git fetch origin main and git restore attempts 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.

@edwin-zvs
edwin-zvs merged commit 40860d0 into main Aug 19, 2026
1 of 3 checks passed
@edwin-zvs
edwin-zvs deleted the feat-playbook-inline-code-editing branch August 19, 2026 03:34
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