feat(web): toggle thread pin from the keyboard - #132
Conversation
Add a mod+shift+p shortcut that pins or unpins the active thread. Ignore the shortcut during terminal focus and when the server does not support thread pinning. (cherry picked from commit 4c51b4c9b6a85d96a22e0df41d5cfd2d8fc9901d)
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
|
Independent review pass. One low-confidence finding, nothing fixed.
The review confirmed the things I would have wanted checked: |
Pinning a thread required reaching for its context menu. Adds
mod+shift+ptopin or unpin the thread you have open.
The shortcut is gated on the environment's
threadPinningcapability, ignoredwhile the terminal has focus, and reports failures through the usual thread
toast. Pylon already had the whole substrate —
threadPinning: trueinServerEnvironment, andpinThread/unpinThreadinclient-runtime— so thisonly wires the keyboard path to it.
Adopted from T3 Code
4c51b4c9b6a85d96a22e0df41d5cfd2d8fc9901d, cherry-pickedclean with no adaptation.
Both directions are covered, so this is not a one-way door: the same shortcut
unpins. Because the command is added to
THREAD_KEYBINDING_COMMANDSincontracts, it also shows up in Settings → Keybindings for rebinding without any
extra label wiring — checked rather than assumed.
Verification
vp test run apps/server/src/keybindings.test.ts— 22 passedmod+shift+pdefault fails the test(
expected undefined to equal 'mod+shift+p')vp run -F @t3tools/web typecheck,-F @t3tools/contracts typecheck,-F @t3tools/shared typecheck— all cleandocs/user/keybindings.mdanddocs/user/thread-sidebar.md, both already in Pylon's voice with no T3references
Keyboard-only change, so no screenshots.
Claude Opus 5 via Claude Code.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.