Skip to content

Delete the orphaned rust/src/shortcuts.rs - #458

Open
btsouth wants to merge 1 commit into
mainfrom
chore/delete-orphaned-shortcuts
Open

btsouth wants to merge 1 commit into
mainfrom
chore/delete-orphaned-shortcuts

Conversation

@btsouth

@btsouth btsouth commented Sep 20, 2026

Copy link
Copy Markdown
Owner

rust/src/shortcuts.rs is dead code. The Aug 2026 audit flagged it and recommended deleting or wiring it up rather than leaving a working-looking copy:

  • No mod shortcuts; declaration exists anywhere in the crate, so rustc never compiled it.
  • Its global_hotkey dependency is not in rust/Cargo.toml.
  • shortcut_bridge owns the live global-shortcut path through tauri-plugin-global-shortcut.

It also contains a real defect: set_open_menu_shortcut always unregisters a hardcoded Ctrl+Shift+U rather than the currently-registered hotkey, leaking a global binding on the second change. Nothing reaches it, but the next person to open the file would reasonably assume it runs.

Validation

  • cargo test --manifest-path rust/Cargo.toml — 1274 + 25 passed with the file gone
  • cargo clippy --manifest-path rust/Cargo.toml --all-targets -- -D warnings — clean
  • cargo fmt --all --check — clean

Deleting changes no compiled behavior; the crate builds and tests identically.

SBS-940.

Note

Delete orphaned rust/src/shortcuts.rs module

Removes the entire shortcuts module, which is no longer referenced. Deletes the ShortcutManager struct, its constructor and methods, the global-hotkey event polling, the shortcut string parser/formatter helpers, and the test module.

Macroscope summarized 66d7935.

The Aug 2026 audit flagged this file as dead: no mod shortcuts; declaration exists anywhere in the crate, so it is not compiled, and its global_hotkey dependency is not in rust/Cargo.toml either. rustc never saw it.

It also contains a real defect (set_open_menu_shortcut always unregisters a hardcoded Ctrl+Shift+U rather than the registered hotkey, leaking a binding on the second change). Leaving a working-looking copy invites someone to adopt or fix code that has no effect; shortcut_bridge owns the live path.

Removed rather than wired up: shortcut_bridge already covers this surface through tauri-plugin-global-shortcut. Deleting it changes no compiled behavior — the crate builds and all 1274 + 25 tests pass without it.

SBS-940.
@coderabbitai

coderabbitai Bot commented Sep 20, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 53 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 17a6f9fd-d92f-49c4-a6b9-b06fb47da354

📥 Commits

Reviewing files that changed from the base of the PR and between bc8771c and 66d7935.

📒 Files selected for processing (1)
  • rust/src/shortcuts.rs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 20, 2026

Copy link
Copy Markdown
Contributor

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
ceiling 66d7935 Commit Preview URL

Branch Preview URL
Sep 20 2026, 05:41 AM

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