fix(core): stop seeding Back/Forward with a divertable default - #1225
Conversation
BrowserBack/BrowserForward were the default binding for Back/Forward, so picking either in the GUI matched the default and capture_plan never diverted the button. The action was configured but unreachable, which is why Back/Forward silently did nothing in Safari (no native mouse-button navigation to fall back on) while Chrome kept working via its own native handling of buttons 4/5. Reseed the default to MouseBack/MouseForward, the actions is_native_click already treats as native, so an untouched button stays native and a BrowserBack/BrowserForward binding now differs from the default and gets diverted.
Greptile SummaryThis PR separates native Back/Forward defaults from explicit browser-navigation actions so the latter enter OpenLogi’s dispatch pipeline.
Confidence Score: 5/5The PR appears safe to merge, with the changed defaults and capture behavior aligned across configuration and regression coverage. Explicit browser-navigation bindings now differ from native Back/Forward defaults and therefore enter the dispatch path, while untouched controls retain native behavior.
|
| Filename | Overview |
|---|---|
| crates/openlogi-core/src/binding/defaults.rs | Changes Back/Forward defaults to native mouse actions, allowing explicit browser actions to be distinguished and diverted. |
| crates/openlogi-agent-core/src/capture_plan.rs | Adds focused regression coverage for explicit BrowserBack diversion and native untouched Forward behavior. |
| crates/openlogi-core/src/config/tests.rs | Updates the gesture-mode fallback expectation to the new canonical native Back action. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
A[Thumb button input] --> B{Configured action equals native default?}
B -->|Yes: MouseBack or MouseForward| C[Keep native button event]
B -->|No: BrowserBack or BrowserForward| D[Divert into OpenLogi]
D --> E[Dispatch configured browser action]
Reviews (1): Last reviewed commit: "fix(core): stop seeding Back/Forward wit..." | Re-trigger Greptile
|
Validated on hardware — this patch fixes the problem here. Environment: MacBook Air M1 (arm64), macOS 26.6.2, MX Master 3S over Before: taken from the stock 0.8.3 agent's own log on this machine (same After: Back and Forward now navigate correctly in both Brave and Safari, one page step Press-level log with
One extra data point that supports the direction of the change: with a per-app Local gates on the branch, all green: Not verified: Linux and Windows, and any device other than the MX Master 3S. |
Summary
ButtonId::Back/ButtonId::Forward's default binding fromBrowserBack/BrowserForwardtoMouseBack/MouseForward.Changes
openlogi-core:default_bindingnow seeds Back/Forward withMouseBack/MouseForwardinstead ofBrowserBack/BrowserForward.openlogi-core: update a config test's expected fallback value to match the new default.openlogi-agent-core: add a regression test asserting a thumb button bound toBrowserBackis diverted, while an untouched Forward stays native.Why
capture_planonly diverts a button into OpenLogi's dispatch pipeline when its configured binding differs fromdefault_binding. Back/Forward's default wasBrowserBack/BrowserForward— so picking that same action in the GUI (the obviously correct choice for "navigate back/forward") matched the default and the button was never diverted. The raw native button-4/5 click went straight to the OS instead.Chrome/Firefox interpret a native button-4/5 click as back/forward themselves, so this was invisible there. Safari has no native mouse-button navigation binding, so the click did nothing — the action was configured correctly in the GUI but structurally unreachable, regardless of the separate Safari-dispatch-timing work in #1082.
Confirmed on real hardware: with this change alone (on top of current
master, which already carries the SafariAXPressnavigation code from #363), a Logitech MX Master 3 withBack = "BrowserBack"/Forward = "BrowserForward"correctly navigates back/forward in Safari and Chrome.Testing
openlogi-desktop,openlogi-ui,openlogi-overlay) not built/tested locally — no full Xcode/Metal toolchain available on this machine.Related: #736, #1118, #23, #354, #1018 (stale, proposed the same default reseed among a larger, now-conflicting diff), #1082 (fixes separate Safari-dispatch timing/focus issues once a button is diverted).
Fixes #736
Fixes #1118
Fixes #23
Fixes #354