claude-print/notes/bf-9u4.md
jedarden 066f1e060b Close bead bf-9u4: bracketed paste injection verified complete
Implementation was already present from bf-54m. make_prompt_payload()
wraps the startup prompt in ESC[200~ / ESC[201~\r; injection fires after
the post-dismiss idle gap. All 41 tests pass confirming correct behavior.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-08 10:17:59 -04:00

24 lines
1.1 KiB
Markdown

# bf-9u4: Bracketed Paste Injection
## Status: Already Implemented (verified)
Bracketed paste injection was completed as part of bf-54m (idle-gap timing). No additional code was required.
## Implementation
`startup.rs:188-199``StartupSeq::make_prompt_payload()` wraps the startup prompt in the correct escape sequences:
- `\x1b[200~` (ESC[200~) — bracketed paste open
- prompt bytes
- `\x1b[201~\r` (ESC[201~) — bracketed paste close + CR to submit
Injection fires from `poll_timers()` in the `TrustDismissed` phase after `idle_gap_ms` of uninterrupted PTY silence, satisfying the ordering requirement from bf-54m.
## Tests Verified
All 41 tests pass (30 unit + 11 integration):
- `startup::tests::make_prompt_payload_wraps_in_bracketed_paste` — output bytes contain `\x1b[200~` and `\x1b[201~\r`
- `startup::tests::idle_gap_fires_after_silence` — full payload verified (open, prompt, close+CR)
- `startup::tests::idle_gap_resets_on_new_output` — injection deferred until PTY goes silent
- `tests/startup.rs::test_trust_dialog_prompt_payload_uses_bracketed_paste` — integration-level check