feat(tui): add focused transcript actions - #5608
Conversation
Add content, metadata, fullscreen, and raw-detail actions for the focused transcript cell while preserving Tasks rail y/Y behavior. Document the shortcuts and cover focused pager/copy paths for Hmbown#5551.
|
Thanks @wuisabel-gif for taking the time to contribute. This repository is observing a maintainer-managed PR intake gate in dry-run mode, so this pull request is staying open. This note helps maintainers prepare the allowlist before any enforcement is considered. Please read |
|
CI diagnosis for the failed matrix jobs:
All 667 |
|
Holding this PR — not merging tonight. CI is red on all three Test jobs, and the failures are outside this diff:
This PR is the focused-transcript-actions slice for #5551 (6 files). Once those suite failures are green on the branch (or shown to be pre-existing on |
|
Thanks for this — the feature is a good idea and the Windows: not your fault, ignore it
Those two fail on Ubuntu + macOS: this one is real, and it's a genuine user-facing bugOne test fails on both, and it's green on Read that dump closely: the pager is open, showing the previous Root cause is ordering. Your new block sits at app.input.replace_range(grab.start_byte..cursor_byte, "");It pulls already-typed characters back out of the composer into the burst buffer. So There's a second, quieter issue: Suggested fixThe codebase already has the precedent you want — crate::tui::paste_burst::FlushResult::Typed(' ')
if app.input.is_empty() && handle_transcript_space(app) => { true }Move Two follow-ons worth doing while you're in there:
The |
|
@Hmbown Thank you so much, will fix the bugs accordingly. |
Route y/Y/r only after the paste-burst ambiguity window resolves and require an active transcript selection. Preserve typed command characters and add a regression for fast /plugin commands.
|
Follow-up fix pushed in
Local verification after the fix:
|
|
@wuisabel-gif — you were right, and we owe you a straight account of what happened here. What went wrong on our sideHunter approved this slice for you on #5551 on 08-24. Then, at 02:04 on 08-25, we landed our own implementation of the same slice as Your finding was real — and our version had the bug tooThe internal read on this PR was that your gate ( You correctly identified that the Typing We wrote your scenario as a test against What landed
Gates: rustfmt clean, clippy clean, 11391 passed / 0 failed / 13 ignored. This PRClosing it, because Also, for the record on the red CI you were chasing: the two Windows failures were never yours. They fail on Thank you for pushing |
@wuisabel-gif found this while diagnosing the CI failure on PR #5608: the `r` in `/plugin t-r-ust` opened a raw-detail pager mid-command, which is what broke plugin_toml_binary_lifecycle_skill_and_stdio_mcp_acceptance on ubuntu and macOS. Their PR gated on `detail_target_cell_index().is_some()`, and the review of that PR treated the selection gate shipped in 32baa17 as the answer. It was not the whole answer. The selection gate refuses their exact case, but the same keystroke is still stolen by a different route: a transcript selection made with the mouse is never cleared by typing — only by resize, click-away, or an explicit command — so with a selection standing, the first `y`/`Y`/`r` of a typed message is consumed as a block action while `app.input` still reads empty. Typing "review this" left "eview this" in the composer and opened a pager. `transcript_block_actions_available` now also defers to an in-flight paste/typing burst. A keystroke inside a burst belongs to the composer; a standing selection still claims the key once the burst settles, so the feature is unchanged for its intended use. Two regression tests, both theirs in substance: - typing_burst_keeps_its_first_char_out_of_block_actions — pins the mechanism, and pins that the selection still wins after the burst ends. - typed_plugin_command_survives_a_standing_selection — walks the literal `/plugin trust demo` string they reproduced from CI. The first fails on 32baa17 as shipped, which is how we know their report described a real defect in our own implementation and not only in theirs. rustfmt --edition 2024 clean cargo clippy -p codewhale-tui --lib --tests --locked clean cargo test -p codewhale-tui --lib --locked 11391 passed, 0 failed, 13 ignored Co-Authored-By: wuisabel-gif <wuisabel-gif@users.noreply.github.com> Co-Authored-By: Grok 4.6 <noreply@anthropic.com> Entire-Checkpoint: 01M0X0C2TGGHSKV8PZS37K775N
Sorry to Claude at you so much Isabel - awesome fix here. Thank you thank you! |
|
/lgtm |
|
@wuisabel-gif — honest correction, and we still owe you the landing. This PR was closed on 08-25 as "already on the 0.9.12 integration branch" (
Closing this GitHub PR as "integrated" was bookkeeping against a stale integration head, not a merge to main. Sorry. The work is yours, including the paste-burst ordering catch that made the feature safe. Rescue plan (not asking you to rebase the fork branch): local worktree
That branch is not yet on Nothing for you to re-send unless you want to. Credit stays with you. |
|
Re-landing this on current #5608 was closed as already integrated on the 0.9.12 integration branch, but the work never reached |
Rescue of @wuisabel-gif #5608 onto main. Authorship preserved. The original PR never reached origin/main despite being closed as landed.
|
Landed on |
Summary
Addresses the approved focused slice of #5551.
When the transcript is focused and the composer is empty, the current focused block now supports:
y— copy canonical block content;Y— copy the rendered metadata/receipt view;Enter— open the block in a fullscreen readable pager;r— open the existing raw detail view.The implementation reuses the existing focused-cell heuristic, clipboard seam, pager surfaces, and raw-detail renderer. The Tasks rail
y/Yshortcuts remain ahead of transcript handling and retain their existing behavior.docs/KEYBINDINGS.mdand the changelog are updated.Tests
Passed locally:
cargo fmt --all -- --checkgit diff --checkcargo test -p codewhale-tui --lib 'tui::ui::activity_detail' --locked(11 passed)cargo test -p codewhale-tui --lib 'tui::ui::tests' --locked(667 passed)CARGO_INCREMENTAL=0 cargo clippy -p codewhale-tui --all-targets --locked -- -D warningsCoverage includes focused pager/copy targeting, canonical content copy, metadata copy, existing raw-detail behavior, and the full UI event-loop test module.
No provider credentials or network access are required.
No-Issue: This PR addresses the approved #5551 transcript action slice without automatically closing the broader issue.