Skip to content

fix(ui): refine mouse handling for proposal#34

Merged
andev0x merged 1 commit into
mainfrom
feature/core-evolution
Jul 4, 2026
Merged

fix(ui): refine mouse handling for proposal#34
andev0x merged 1 commit into
mainfrom
feature/core-evolution

Conversation

@andev0x

@andev0x andev0x commented Jul 4, 2026

Copy link
Copy Markdown
Member
  • restructure mouse event processing into phases for better clarity and maintainability

- restructure mouse event processing into phases for better clarity and maintainability

@andev0x andev0x left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Phase 1 (lines ~352-366): Wheel scrolling intercepted first — mouseMsg.Action == tea.MouseActionPress with MouseButtonWheelUp/Down. Routes directly to m.vp.Update(msg) for native smooth scrolling, consumes immediately via return m, vpCmd.

  • Phase 2 (lines ~369-378): Left-click intercepted for Izen components — iterates m.pendingProposals calling checkProposalHeaderBounds() which dynamically computes the header line position from m.widgetScreenStartY() + 1. If a proposal header is hit, toggles Expanded and returns early — the viewport never sees the click.

  • Phase 3 (lines ~381-410): Everything else (Press→selection start, Motion→drag, Release→copy) falls through to the viewport text-selection pipeline unchanged.

@andev0x andev0x merged commit e8d4811 into main Jul 4, 2026
2 checks 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