Skip to content

fix(core): match Actions Ring layouts with the per-app selector - #643

Merged
AprilNEA merged 1 commit into
masterfrom
fix/app-selector-ring-parity
Oct 1, 2026
Merged

AprilNEA merged 1 commit into
masterfrom
fix/app-selector-ring-parity

Conversation

@AprilNEA

@AprilNEA AprilNEA commented Aug 16, 2026 •

Copy link
Copy Markdown
Owner

Summary

#572 taught per_app_bindings to fall back to exe:<filename>.exe when the foreground identifier is a Windows path, but action_ring.per_app kept looking that identifier up verbatim. Both maps are keyed by the same identifier, so on Windows a Store or self-updating application could keep its button overlay across an update while silently losing its ring layout — the versioned path the ring was keyed by no longer exists.

Rebuilt on current master: the matcher moves to openlogi_core::app::overlay_for and both maps resolve through it, so a selector cannot mean one thing for buttons and another for the ring. The fallback now requires a path separator in the identifier — a macOS bundle id or Linux application class that merely ends in .exe is never reinterpreted as an executable (the earlier review's P1).

Changes

  • openlogi-core: app::overlay_for is the one per-app matcher (exact key, then the Windows exe:<filename> fallback); config/per_app.rs and ActionRingConfig::effective_layout call it. The private app_overlay helper is gone.
  • .ast-grep/rules/core-app-overlay-owner.yml: fails the next per-app map that builds an exe: key or indexes per_app by the raw identifier.
  • docs/CONFIGURATION.md: action_ring.per_app takes the same selectors as per_app_bindings.

Testing

  • cargo test -p openlogi-core -- app:: action_ring per_app (new: a_ring_layout_keyed_by_executable_survives_a_versioned_install_path; the fallback's three cases moved to app::tests)
  • cargo xtask ci ast-grep
  • cargo fmt --all -- --check, RUSTFLAGS=-D warnings cargo clippy --workspace --all-targets -- -D warnings, cargo test --workspace
  • Not runtime-tested on Windows hardware: the change is a pure lookup; the test exercises the versioned-path case directly.

Fixes the ring half of #572's follow-up.

Copilot AI lite review requested due to automatic review settings August 16, 2026 10:59

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@greptile-apps

greptile-apps Bot commented Aug 16, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[Medium risk] Unifies application selector matching across configuration overlays.

The PR appears safe to merge; the previous identifier-collision finding is fixed and no new actionable issue was identified.

Summary

The PR makes Actions Ring layouts and per-app button bindings use the same selector resolution.

  • Exact application keys take precedence over the Windows exe:<filename> fallback.
  • The revised matcher avoids treating separator-free .exe identifiers as Windows paths, resolving the previous finding.
  • Documentation and an ast-grep guard describe and protect the shared behavior.
Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Foreground application ID] --> B{Exact key exists?}
  B -- Yes --> C[Use exact overlay]
  B -- No --> D{Path separator and .exe basename?}
  D -- Yes --> E[Look up exe:filename fallback]
  D -- No --> F[Use default]
  E --> G{Fallback exists?}
  G -- Yes --> H[Use fallback overlay]
  G -- No --> F
Loading

Reviews (2) · Last reviewed commit: "fix(core): match Actions Ring layouts wi..."

Comment thread crates/openlogi-core/src/binding/action_ring.rs
@davidbudnick davidbudnick added type: bug Something is broken or behaves incorrectly platform: all Cross-platform issue labels Aug 20, 2026
#572 taught per_app_bindings to fall back from a Windows executable path to its exe:<filename> key, but action_ring.per_app kept looking the foreground identifier up verbatim. Both maps are keyed by the same identifier, so on Windows a Store or self-updating application kept its button overrides across an update while silently losing its ring layout — the versioned path the ring was keyed by no longer exists.

The matcher moves to openlogi_core::app::overlay_for and both maps resolve through it, so a selector cannot mean one thing for buttons and another for the ring. The fallback now requires a path separator: an identifier without one is a bundle identifier or an application class, so a name that merely ends in .exe is no longer reinterpreted as an executable. An ast-grep guard keeps the next per-app map from indexing by the raw identifier.
@AprilNEA
AprilNEA force-pushed the fix/app-selector-ring-parity branch from c1be234 to ff45769 Compare October 1, 2026 09:24
@AprilNEA AprilNEA changed the title fix(core): apply application selectors to Actions Ring layouts fix(core): match Actions Ring layouts with the per-app selector Oct 1, 2026
@AprilNEA
AprilNEA merged commit ef164de into master Oct 1, 2026
23 checks passed
@AprilNEA
AprilNEA deleted the fix/app-selector-ring-parity branch October 1, 2026 10:15
@aprilnea aprilnea Bot mentioned this pull request Oct 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

platform: all Cross-platform issue type: bug Something is broken or behaves incorrectly

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants