Repository navigation
Agent: keep application Vim on a task opened on another computer - #1310
Merged
Merged
Conversation
Each paired computer has its own Chat and sidebar, and the window swaps them when a task on another computer opens. The swap carried the sidebar's search, archive and scroll state but not application Vim's row, so the computer switched to showed the row it had when last left, usually the task just navigated away from. The keyboard focus also stayed on the Chat that was replaced, which is no longer drawn, so Vim keys did nothing until a click. Carry the row with the rest of the browse state. A sidebar names its own computer's tasks as plain task rows and other computers' tasks by computer, so the row travels in the computer form and turns back into a plain task row on its own computer. The Chat swapped in takes the keyboard focus, as it already did on its first visit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The new test failed on Linux CI, and about once in 30 local runs. Each fixture backend opens an empty store, and the sidebar read the computers' task pages from it. An empty reply is authoritative, so the task rows disappeared whenever one landed mid-test, and application Vim fell back to New Task. The test's computers now have no backend, so their rows come from the snapshots alone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Application Vim's sidebar row now follows a task you open on another computer, and Vim keys keep working after the switch.
What was wrong
Each paired computer has its own chat screen and sidebar. Opening a task on another computer swaps the window over to that computer's screen. The swap carried the sidebar's search, archive and scroll state, but not application Vim's row. So the screen you switched to kept the row it had when you last left it. Usually that was the task you had just come from, while the task you opened was selected and showing in the main window. It made no difference whether you pressed Enter on the row or clicked it.
The screen you switched to also never took the keyboard focus on a return visit. The focus stayed on the screen it replaced, which is no longer drawn, so Vim keys did nothing until you clicked.
This came in with paired remote access (PR #1170), when each computer got its own screen. The recent sidebar work (PR #1248) didn't touch it. Within one computer, including between its projects, the row already followed the open task.
Fix
Sidebar::browse_statecarries the Vim row with the rest of the browse state. A sidebar names its own computer's tasks as plain task rows and other computers' tasks by computer, so the row travels in the by-computer form. On its own computer it turns back into a plain task row. If the destination doesn't show the row, its selection is left alone.Testing
test_application_vim_row_follows_a_task_opened_on_another_computerswaps a local and a remote computer's chat screens the way the desktop does. It goes local → remote → local → remote, opening each task with Enter on its sidebar row, then pressesk.Computer(Navigate { computer: None, destination: Task("here") })), andkchanges nothing.just cipasses, run by the pre-commit hook withMAPLE_HOOK_FULL=1: format, clippy for every feature set, and all tests (1,053 app tests plus the rest of the workspace).jdid nothing.jmoved it right away.🤖 Generated with Claude Code