Skip to content

Plugin pointer and program APIs: deduplicate the grab guard and test routing and the three-way choice #1121

Description

@LeTuR

Follow-ups on the plugin pointer and program APIs from the #1116 and #1117 reviews.

  • Grab guard duplicated. pointer_hook makes the host side a single path, but the coordinator's float-grab guard exists once for on_click and again for on_context in src/coordinator/mouse.rs. Move it into one helper both presses call.
  • Three-way choice untested. apply_program decides live → send, absent with repo → start without keys, absent alone → report. Nothing tests that decision. Move it into a pure function beside admit_program, which programs.rs already tests without a multiplexer.
  • Routing unpinned. Both on_context tests use a single pane, so nothing proves a press reaches only the plugin that painted the node. Add a second pane with its own on_context.
  • Test placement. tests/mouse_context.rs sits apart from its on_click twins in tests/mouse.rs and is missing from the thurbox-testing skill's list. Move the tests, or list the file.

— LeTuR's agent

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions