Skip to content

feat(core): seed Finder/Safari navigation profiles for pointing devices - #1351

Open
alexrzem wants to merge 1 commit into
AprilNEA:masterfrom
alexrzem:feat/seed-app-navigation-profiles
Open

feat(core): seed Finder/Safari navigation profiles for pointing devices#1351
alexrzem wants to merge 1 commit into
AprilNEA:masterfrom
alexrzem:feat/seed-app-navigation-profiles

Conversation

@alexrzem

Copy link
Copy Markdown

Summary

Back/Forward work in Chrome but do nothing in Finder or Safari: neither app implements mouse-button-4/5 navigation, and every driver that makes them work there (Logi Options+ included) synthesizes the app's own Go/History shortcut instead. This PR seeds the same two per-app overrides — com.apple.finder / com.apple.SafariBrowserBack/BrowserForward (⌘[ / ⌘]) — for every pointing device.

Because the seeded actions differ from the Back/Forward defaults, the app-scoped capture plan HID++-diverts the buttons while those apps are frontmost, so dispatch does not depend on the OS hook attributing Bluetooth-direct mice (#722). Builds on #1225.

Changes

  • openlogi-core: seed_navigation_profiles, applied exactly once per device (first identity record) and once per config (v7→v8 migration). An app key with any existing per-app entry is never touched, and a v8 file missing the profile is the user's deletion, not a gap to refill. macOS-only — the stock file managers and browsers on Linux/Windows navigate on buttons 4/5 natively. SCHEMA_VERSION 7 → 8; docs/config.example.toml updated.
  • openlogi-desktop: five state tests moved off com.apple.Safari onto neutral bundle ids (Safari now legitimately ships a built-in profile), plus a new test pinning the inventory → identity → seed path.

Testing

Refs #1263, #354, #1118, #722

Fixes #582

Finder and Safari never navigate on mouse buttons 4/5, so the
MouseBack/MouseForward defaults are silently dead there — the classic
"Back/Forward work in Chrome but not Finder" report (AprilNEA#1263, AprilNEA#354, AprilNEA#582).
Logi Options+ closes the same gap with per-app overrides that send the
apps' own Go/History shortcuts.

Seed com.apple.finder and com.apple.Safari with BrowserBack/
BrowserForward (Cmd+[ / Cmd+]) for every pointing device, exactly once:
on the first identity record for a device entry, and via a one-shot
v7->v8 migration for existing configs. An app with any existing per-app
entry is never touched, and a v8 file missing the profile is the user's
deletion, not a gap to refill. Because the seeded actions differ from
the Back/Forward defaults, the app-scoped capture plan HID++-diverts
the buttons while Finder/Safari are frontmost, so dispatch does not
depend on the OS hook attributing Bluetooth-direct mice (AprilNEA#722).

Buttons 4/5 navigate natively in the stock file managers and browsers
on Linux and Windows, so the seed is macOS-only.
@greptile-apps

greptile-apps Bot commented Sep 11, 2026

Copy link
Copy Markdown

RetriggerConfidence Score: 4/5

This PR is not yet safe to merge because a provisionally unidentified mouse can permanently miss the navigation profiles the feature is intended to provide.

Fix All in CodexFindings

  1. P1 Provisional identity prevents seeding

Summary

  • Adds one-shot Finder and Safari BrowserBack/BrowserForward profiles.
  • Migrates recorded pre-v8 pointing-device identities while preserving existing app profiles.
  • Updates desktop state tests and the example configuration.
  • The first-identity gate misses devices whose initially provisional kind is corrected on a later inventory refresh.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Device inventory snapshot] --> B{Identity already recorded?}
  B -- No --> C{Kind is Mouse or Trackball?}
  C -- Yes --> D[Seed Finder and Safari profiles]
  C -- No or Unknown --> E[Do not seed]
  D --> F[Persist identity]
  E --> F
  B -- Yes --> G[Refresh identity without seeding]
  F --> H[Later probe corrects kind]
  H --> G
  G --> I[Corrected mouse may remain unseeded]
Loading

Reviews (1) · Last reviewed commit: "feat(core): seed Finder/Safari navigatio..."

Comment on lines +850 to +853
let device = self.devices.entry(device_key.to_string()).or_default();
if device.identity.is_none() {
seed_navigation_profiles(device, identity.kind);
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Provisional identity prevents seeding

When a device’s first persisted identity has DeviceKind::Unknown because its marketing-type probe was temporarily unavailable, this branch skips seeding but still records the identity. A later refresh that correctly identifies the device as a mouse cannot seed the profiles because device.identity is already populated. As a result, Back and Forward remain inactive in Finder and Safari for that device. The inventory persists measured capabilities independently of the provisional kind, and direct devices explicitly fall back to Unknown, so partial probing can reach this state.

Knowledge Base Used:

Fix in Codex Fix in Claude Code

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.

[Bug]: macOS 26.6 (Intel) + MX Master 2s over 2.4G: Finder Forward/Back buttons stopped working in 0.6.25

1 participant