Skip to content

Add terminal jump-to-present control - #660

Merged
Jinwoo-H merged 4 commits into
stablyai:mainfrom
colinchambachan:feat/terminal-scroll-reset
Apr 15, 2026
Merged

Jinwoo-H merged 4 commits into
stablyai:mainfrom
colinchambachan:feat/terminal-scroll-reset

Conversation

@colinchambachan

@colinchambachan colinchambachan commented Apr 15, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds a pane-local terminal jump-to-present control that appears when a terminal is scrolled away from the live bottom and returns that pane to the present output with one click.

Screenshots

Screen recording to be added separately.

Screen.Recording.2026-04-14.at.8.59.17.PM.mov

Testing

  • pnpm lint
  • pnpm typecheck
  • pnpm test
  • pnpm build
  • Added or updated high-quality tests that would catch regressions, or explained why tests were not needed

AI Review Report

Reviewed the change locally with an iterative AI review/fix pass focused on correctness, event lifecycle ownership, render hot paths, and terminal focus behavior.
The review flagged and I fixed three concrete issues in the new listener path:

  • stale jump-button state when new PTY output advanced the buffer without a viewport scroll
  • unnecessary parent React work on every scroll/write event even when button visibility did not change
  • stale visibility after xterm refit/resize flows changed baseY and viewportY

The final implementation now derives pane visibility from xterm buffer state, listens to scroll/write/resize transitions, and gates React updates behind a per-pane visibility ref so steady-state terminal output does not keep scheduling redundant updates.

Cross-platform review summary:

  • macOS, Linux, and Windows compatibility was explicitly checked
  • the change does not introduce platform-specific shortcuts, labels, path handling, shell behavior, or Electron-only branches
  • the UI copy (Present, Jump to present) is platform-neutral
  • focus restoration stays inside existing pane-manager/xterm flows used across all supported platforms

Security Audit

Basic security review completed.
No new input handling, command execution, auth, secrets, dependency, or IPC surface was added.
The feature is renderer-local and only reads xterm buffer/viewport state plus existing pane-manager references.
No filesystem path handling or shell interpolation was introduced.
No follow-up security work is currently needed for this change.

Notes

  • This is a focused UI/interaction change in the terminal pane only.
  • The jump control is pane-local, so split terminals track visibility independently.
  • I verified the core behavior with unit coverage for the scroll-threshold logic and full repo checks locally.
  • Video demo intentionally omitted here per contributor preference and can be added afterward.

@colinchambachan
colinchambachan marked this pull request as draft April 15, 2026 00:58
@colinchambachan
colinchambachan marked this pull request as ready for review April 15, 2026 01:05
- Raise scroll threshold to 20 lines so button only appears after a
  deliberate scroll, not a transient viewport nudge
- Change button shape from rounded-full to rounded-md to match app style

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@Jinwoo-H
Jinwoo-H merged commit d256879 into stablyai:main Apr 15, 2026
1 check passed
@brennanb2025 brennanb2025 mentioned this pull request Apr 15, 2026
6 tasks done
AmethystLiang added a commit that referenced this pull request Apr 16, 2026
AmethystLiang added a commit that referenced this pull request Apr 16, 2026
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
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.

2 participants