Repository navigation
Copy as Report: reviewed Markdown/plain reports from command blocks - #360
raiseCatError wants to merge 40 commits into
Conversation
…-text report - /copy … --report (Markdown) or --report=plain, and /cp alike; the picker's r; Actions → Copy as report…. Built from the command records only: command, recorded status, exit code, duration, and optionally directory and start time; output in a fence longer than any backtick run inside it. - Redaction (on by default) replaces common token, key and credential shapes, private-key blocks, email addresses and private paths (home as ~, other users' homes as <user>), and says what it changed. It is a pattern match, and the review says so. - The review opens whenever the unredacted report looks sensitive (and always from the picker and Actions): the exact text to be copied, switches for redaction, format, directory and times, and e to correct it in VISUAL/EDITOR (a private temporary file, removed afterwards). Enter copies, Esc copies nothing. - The same clipboard write, feedback and Auto-expand rule as every other copy; nothing is sent anywhere.
…dits are re-checked A report is made to be shared and redaction is a pattern match, so a report never reaches the clipboard unseen: /copy --report opens the review too (Enter copies). The review marks each line redaction changed and lists their numbers, and text edited in VISUAL/EDITOR is scanned again and called out when it still looks sensitive. Redaction also covers --password/--token style flags, Cookie and Set-Cookie headers, PGP private-key blocks and Stripe secret keys.
- Invisible format characters (zero-width spaces and joiners, bidi overrides, soft hyphens) are removed from reports and from edits before scanning, so a secret cannot slip past redaction behind characters the review never shows. - Token shapes are found when glued to a word character (build_ghp_..._done), not only at \b. - The review wraps long lines instead of cutting them, and the more-below row no longer covers a line: every character Enter copies has been on screen. Enter copies exactly the reviewed text.
…sted and parsed - U+2028/U+2029 become real line breaks before fences are sized: editors and Markdown readers treat them as newlines, so a separator inside output could otherwise close the fence on paste. - Every default-ignorable code point is removed (variation selectors, fillers and other invisible characters, not only format characters). - Patterns match a skeleton of the text (compatibility forms, combining marks dropped) mapped back to the original: full-width look-alikes or marks inside a token no longer hide it, and text outside a redacted span keeps its exact characters. - The review counts any character a terminal may draw wider as two cells, so no row overflows and is cut.
…annot add structure to the report
|
The failed actual published head remains The unchanged fixture reproduced the quit timeout on Ubuntu/less 590 with a live foreground pager and both PTYs at 35×110. A separate observation found the literal Test-only input candidate |
Copy as Report builds Markdown or plain text from stored command records and opens explicit review. Enter copies exactly the reviewed text; cancel preserves the clipboard. Source fragments are sanitized/redacted before authored Markdown, toggles rebuild from stable snapshots, and edits are rescanned and labelled when unredacted. Short reviews keep body rows reachable and refuse approval when they cannot fit. Backtick enclosure stays bounded for hostile or long input. Detection is best-effort; external clipboard failure cannot guarantee rollback of bytes already written.
The additive stabilization fixes catchable startup termination and frontend cleanup. SIGTERM/SIGHUP handlers precede host-probe/journal waits; stopped probe completion cannot create a journal, and saves already underway retain durability. Stop removes only the frontend's instance-owned exit callback, preventing retention across session switches while preserving unrelated listeners. Controlled regressions fail before correction and pass afterward; assertions and deadlines are unchanged.
The reattach fixture waits for the complete final-size native pager frame and prompt before a single quit key, retaining original deadlines and strict cleanup. Bounded failure-only observations distinguish repaint from quit completion. Controlled native less read/WINCH evidence establishes a signal/input hazard; it does not reconstruct historical CI failures.
Native completion retains fragmented readiness within a bounded initialization buffer and recognizes the complete LF/CRLF marker without resetting existing budgets. A real-PTY regression fails before correction and passes afterward, including naturally fragmented reads. This independently confirmed framing fix does not establish the historical Copy recovery failure cause.
Clipboard completion requires an error-free payload-write callback and the backend’s own successful exit, retaining original error/timeout/process cleanup safeguards. Real-child regressions cover suppressed finish, partial reads and callback errors after exit. Early fullscreen startup regressions submit before the notice through the actual editor/submit pipeline, including delayed journal startup; original input/abort/ownership assertions remain intact. This proves independently controlled defects/fixture assumptions, not the precise historical failure causes.
Published head:
cb28d4586197e563e4f98c1f0a96e9e3b8f95251. Focused lifecycle/startup/clipboard, clean exact-head canonical build/full runtime/ranking/cleanup/diff verification pass. Comprehensive candidate CI 38567509019 passes every required job, including Fedora/timing; actual PR CI 38568288217 passes applicable platform/runtime/aggregate gates. Attempts: 1/1.Shared acceptance, exact ancestry, remaining gates and retained historical failures are tracked in #359 and the durable handoff. Historical macOS/Ubuntu failures remain unattributed; new passes do not explain them. Native pager input during concurrent resize remains a physical QA limitation. Forced SIGKILL can bypass detached-helper cleanup while trusted configuration blocks it. No release/master merge or frontend integration occurs here.
Physical QA remains unperformed in Ghostty/Terminal.app across zsh, Bash and Fish: actual clipboard bytes, cancellation/backend failure, edits/toggles and hostile Markdown/control/Unicode input at narrow and short sizes. Automated/headless results do not claim this validation.
Refs #351
Refs #359
Refs #363