GeezerVison is showing github.com — fix(tui): enable transcript jumps in subagent sessions by ricky9408 · Pull Request #60817 · anomalyco/opencode
Conversation
ricky9408
commented
Oct 31, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Issue for this PR
Closes #60727
Type of change
- Bug fix
- New feature
- Refactor / code improvement
- Documentation
What does this PR do?
Child sessions keep the subagent composer open, which puts the keymap in composer mode. The first/last transcript bindings were only available in base mode. Register the existing unfocused layer in composer mode so Home, End and Ctrl+G can reach the transcript.
Base-session bindings, editor focus and picker priority stay as they are. PageUp/PageDown already work on current dev.
How did you verify your code works?
bun run check: 35/35 packages passed.
- From
packages/tui: bun run typecheck:tsc; bun test --timeout 30000 --only-failures: 1,597 passed, 2 skipped.
- Child-session Home/End regression repeated 10 times: 10 passed. Removing the source change makes Home fail.
- Additional local renderer checks covered paging, modal isolation, picker/parent navigation and a 40-paragraph assistant reply. The submitted test stays focused on Home/End.
The results above are local. Main GitHub CI has not run (action_required). UI verification used the headless OpenTUI renderer with local fixtures; a live-terminal smoke test was not run.
Visual
<svg xmlns="http://www.w3.org/2000/svg" width="240" height="72" viewBox="0 0 240 72" fill="none" stroke="currentColor">
<style>
.key{animation:pulse 2.4s ease-in-out infinite}
.arrow{animation:up 2.4s ease-in-out infinite}
@keyframes pulse{0%,100%{opacity:.4}50%{opacity:1}}
@keyframes up{0%,100%{transform:translateY(3px);opacity:.4}50%{transform:translateY(0);opacity:1}}
@media(prefers-reduced-motion:reduce){.key,.arrow{animation:none}}
</style>
<rect x="12" y="8" width="144" height="56" rx="5" opacity=".35"/>
<path d="M24 21h86M24 29h108M24 37h70" opacity=".6"/>
<path d="M13 47h142" opacity=".25"/>
<text x="24" y="58" fill="currentColor" stroke="none" font-family="monospace" font-size="9">Subagents</text>
<g class="arrow" opacity=".8"><path d="M143 39V19m-4 4 4-4 4 4"/></g>
<g class="key" opacity=".8">
<rect x="176" y="23" width="52" height="26" rx="4"/>
<text x="202" y="40" text-anchor="middle" fill="currentColor" stroke="none" font-family="monospace" font-size="11">Home</text>
</g>
</svg>
Screenshots / recordings
Local OpenTUI renderer captures at 120×30, after PageUp then Home. Capture details.
Before:

After:

Checklist
- I have tested my changes locally
- I have not included unrelated changes in this PR
AI-assisted with Codex.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fix works. I ran the issue's reproduction from source with a simulated model. On the base, Home and Ctrl+G do nothing in a subagent session. With this change, both jump to the first message, End returns to the bottom, and the subagent picker keys still work. The new test fails on the base and passes here. The nearby session, keymap and composer tests pass, and tsc -b for packages/tui is clean.
No composer key (up/down/enter/ctrl+d/left/right/escape/ctrl+c, k/j) overlaps the Home, End or Ctrl+G bindings. The layer stays off while an editor is focused, so moving it into composer mode looks safe.
Public API: unchanged.
The only thing I'd change is the test. At 106 lines it covers paging, the session dialog, sibling and parent navigation, and two widths, which is a lot for a one-line fix that needs no test. Please drop it, or cut it down to opening a child session and checking that Home and End move the transcript.


Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test is now a single focused Home/End check in a child session, which addresses my earlier point. It passes consistently here and fails on the base without the fix. tsc -b is clean. The source change is the same as before, and the earlier from-source reproduction still applies: Home and Ctrl+G now move the transcript in a subagent session.
Public API: unchanged.
No further concerns.


Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Registering the unfocused layer in composer mode is the minimal fix: Home, End and Ctrl+G now reach the transcript in subagent sessions, and the layer stays disabled while an editor is focused. The test is focused on Home/End in a child session. Nothing to change.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new commit is only a merge of dev, and the fix still holds on top of it. I re-ran the issue's reproduction from source with a simulated model. On current dev, Home and Ctrl+G do nothing in a subagent session. With this branch, both jump to the first message and End returns to the bottom. The test passes here and fails on dev without the fix. tsc -b is clean.
Public API: unchanged.
No further concerns.


Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Nov 7, 2026
Reviewers
+1 more reviewer
Reviewers whose approvals may not affect merge requirements
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|