diff options
| author | Eric Yue <jiacheng.yue@foxmail.com> | 2026-09-14 20:46:39 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-09-14 15:46:39 +0300 |
| commit | be03b7a19f198dba2cbf28a5b291b1157e8717c9 (patch) | |
| tree | 97815a5f31d46265a079e70814ad473dcdda9720 /src/cli | |
| parent | c77af1892ff121736ecb103b32d504d6f1b31805 (diff) | |
fix: preserve agent panel scroll when switching machines (#4101)
refs #3937
Root cause:
Activating another endpoint applies a snapshot with a different
endpoint-qualified graphics scope. This triggers reset_endpoint_projection,
which clears agent_scroll together with endpoint-local state even though
the agent list aggregates all machines. The selected agent receives focus,
but the list jumps back to the top.
Fix:
Save the client-owned agent scroll offset and restore it only when
activation changes endpoints. Keep same-endpoint reboot resets,
workspace/tab scroll resets, input cleanup and existing list bounds
clamping unchanged. This adds constant-time work on endpoint activation,
with no protocol, persisted-state or pane-scaled rendering changes.
Validation:
The new regression fails on the original implementation with scroll 0
instead of 6. Tests cover repeated bidirectional agent clicks, stable
visible rows, shrinking lists and same-machine reboots. All 242 client
shell tests pass.
Real SSH A/B testing against the same two disposable 0.9.0 servers
reproduces the reset with both the stable and current-master clients.
The patched client preserves the visible rows through six cross-machine
switches and two same-machine control clicks.
Native just ci passes: 3535 Rust tests, six default skips, plus lint,
maintenance, architecture and integration-asset checks. All seven docs
contract tests pass. Windows cross-lint was not run because its SDK is
not installed; native macOS and Windows UI behavior was not tested.
Diffstat (limited to 'src/cli')
0 files changed, 0 insertions, 0 deletions
