Skip to content

refactor(gui): share clipboard, geometry, and tree visibility helpers - #10

Merged
cursor[bot] merged 1 commit into
mainfrom
cursor/gui-shared-abstraction-59a1
Jul 29, 2026
Merged

refactor(gui): share clipboard, geometry, and tree visibility helpers#10
cursor[bot] merged 1 commit into
mainfrom
cursor/gui-shared-abstraction-59a1

Conversation

@mgttt

@mgttt mgttt commented Jul 29, 2026

Copy link
Copy Markdown
Owner

Summary

Consolidates duplicated Win/Unix GUI helpers into shared modules while aligning Unix sidebar row geometry with Windows.

Changes

  • ui_clipboard: shared normalize_terminal_paste, normalize_composer_paste, and paste byte limit (used by Unix GUI + remote Win32 client).
  • ui_geometry: shared pixel_rect_json, scrollbar hit-testing, terminal cell mapping, and wheel delta helpers (Unix input path; Win snapshot JSON).
  • tab_tree::visible_tree_rows: shared collapsed-ancestor filtering for sidebar snapshots.
  • Unix sidebar: row height 34→36 (TAB_HEIGHT) to match shared tree geometry and ui-snapshot bounds.

Validation

  • cargo fmt
  • cargo clippy --target x86_64-unknown-linux-gnu --bin agenterm --bin agenterm-cli -- -D warnings
  • cargo clippy --target x86_64-pc-windows-msvc --all-targets -- -D warnings
  • cargo test --lib (243 passed)

Follow-ups (not in this PR)

  • Shared terminal_selection painting on Unix
  • Theme color parsing module
  • TTF font path on Linux
Open in Web Open in Cursor 

Centralize terminal/composer paste normalization in ui_clipboard,
scrollbar hit-testing and pixel_rect_json in ui_geometry, and
collapsed-tree filtering in tab_tree. Unix sidebar rows align to
shared TAB_HEIGHT (36px) matching Windows tree geometry.

Co-authored-by: datakk <mgttt@users.noreply.github.com>
@cursor
cursor Bot marked this pull request as ready for review July 29, 2026 16:52
@cursor
cursor Bot merged commit d5664b5 into main Jul 29, 2026
@cursor
cursor Bot deleted the cursor/gui-shared-abstraction-59a1 branch July 29, 2026 16:52
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