Skip to content

A reload goes back to the window you were in - #65

Merged
andrin-n-dream merged 1 commit into
masterfrom
Ui
Sep 19, 2026
Merged

andrin-n-dream merged 1 commit into
masterfrom
Ui

Conversation

@andrin-n-dream

Copy link
Copy Markdown
Contributor

A reload goes back to the window you were in

The page always arrived at the first worktree, so a reload in the middle of
the row dropped you at its start with the window you had been working in off
screen. ui.activeWorktree now remembers where you are -- a worktree, a
project pane or the machine's terminal -- written as you move on the usual
debounced ui write, and the arrival goes there if the row still has it and
to the first worktree otherwise.

Getting the row to actually land there took three fixes to the arrival path,
each measured on a scratch instance at 1600px:

  • "Keep your place across a resize" runs in the same commit as the row's first
    width and snapped it back to the unit it had been at: two-terms aimed at
    1191px and the row stayed at 0. A request now sets that unit to where it is
    headed.
  • A scroll cannot go past the row's width at the moment it is sent, and the
    windows are still laying out: sent to 3176px with 1589px of row, the glide
    stopped at 1589 with the machine's window lit, focused and off screen. The
    request now waits a frame at a time (1.5s at most) for the row to be wide
    enough and sends it again -- unless a finger, a wheel or another request has
    taken the row, or the focus that arrival hands over starts the same glide.
  • The row at rest with one whole window on screen marks that window, and it
    came to rest mid-layout with only alpha whole, so alpha took the
    keyboard from the machine's window it had just been handed to. A glide
    something asked for has already said where you are, so that rule now only
    reads rests you caused.

After: at 1600px, reloading from the machine's window, alpha, two-terms,
feature-x and fourth each came back lit, focused and wholly on screen; at
390px the same for three windows reached by swiping. The mid-swipe marking
still follows the middle of the screen.

🤖 Generated with Claude Code

The page always arrived at the first worktree, so a reload in the middle of
the row dropped you at its start with the window you had been working in off
screen. `ui.activeWorktree` now remembers where you are -- a worktree, a
project pane or the machine's terminal -- written as you move on the usual
debounced `ui` write, and the arrival goes there if the row still has it and
to the first worktree otherwise.

Getting the row to actually land there took three fixes to the arrival path,
each measured on a scratch instance at 1600px:

- "Keep your place across a resize" runs in the same commit as the row's first
  width and snapped it back to the unit it had been at: `two-terms` aimed at
  1191px and the row stayed at 0. A request now sets that unit to where it is
  headed.
- A scroll cannot go past the row's width at the moment it is sent, and the
  windows are still laying out: sent to 3176px with 1589px of row, the glide
  stopped at 1589 with the machine's window lit, focused and off screen. The
  request now waits a frame at a time (1.5s at most) for the row to be wide
  enough and sends it again -- unless a finger, a wheel or another request has
  taken the row, or the focus that arrival hands over starts the same glide.
- The row at rest with one whole window on screen marks that window, and it
  came to rest mid-layout with only `alpha` whole, so `alpha` took the
  keyboard from the machine's window it had just been handed to. A glide
  something asked for has already said where you are, so that rule now only
  reads rests you caused.

After: at 1600px, reloading from the machine's window, `alpha`, `two-terms`,
`feature-x` and `fourth` each came back lit, focused and wholly on screen; at
390px the same for three windows reached by swiping. The mid-swipe marking
still follows the middle of the screen.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@andrin-n-dream
andrin-n-dream merged commit 8faf6b2 into master Sep 19, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant