Skip to content

Playbook editor: support triple-backtick fenced code - #1281

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

Playbook editor: support triple-backtick fenced code#1281
edwin-zvs merged 4 commits into
mainfrom
feat-playbook-fenced-code-editing

Conversation

@edwin-zvs

@edwin-zvs edwin-zvs commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Summary

  • extend the source-preserving single-backtick editor contract to completed exact triple-backtick spans on one source line
  • hide completed triple delimiters while highlighting the body in TUI and web; preserve exact Markdown source, Unicode offsets, cursor geometry, and collaboration offsets
  • make Backspace at the rendered right boundary remove the complete closing triple delimiter, reveal the opening delimiter/body source, and allow retyping the closer to restore formatting
  • keep multiline and incomplete fences literal and line-preserving in both clients, with smart clips, attachments, action links, headings, and list-aware editing suppressed inside them
  • preserve current main's Tab/Escape selection-menu focus model and readable inline-code foreground contrast for both single- and triple-backtick rendering
  • rename the duplicate inline-code decision to specs/0204-playbook-code-editing.md and evolve it to cover both single- and triple-backtick behavior

Latest-main integration

Verification

  • cargo build
  • cargo test -p construct-cli --bin construct playbook (352 passed; includes single/triple delimiters, Backspace/retype, CJK, painted-buffer differential geometry, and selection-menu tests)
  • cargo test -p construct-e2e --test playbook_view (8 passed)
  • cargo test -p construct-e2e --test web_smoke (2 passed)
  • rustfmt --edition 2021 --check crates/cli/src/playbook_markdown.rs
  • git diff --check

Multiline constraint

The Playbook editor keeps a stable one-source-line/one-edit-row and collaboration-offset model. Therefore multiline fences remain visible literal source instead of collapsing opener/closer rows differently across clients. The completed one-line triple form provides delimiter-hidden editing parity without violating those invariants.

@edwin-zvs
edwin-zvs merged commit d33289e into main Aug 19, 2026
1 check passed
@edwin-zvs
edwin-zvs deleted the feat-playbook-fenced-code-editing branch August 19, 2026 04:31
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