Skip to content

fix(tauri): resolve "Command restart_core_process not found" stale ACL#280

Merged
graycyrus merged 6 commits intomainfrom
fix/restart-core-process-command-not-found
Apr 2, 2026
Merged

fix(tauri): resolve "Command restart_core_process not found" stale ACL#280
graycyrus merged 6 commits intomainfrom
fix/restart-core-process-command-not-found

Conversation

@graycyrus
Copy link
Copy Markdown
Contributor

@graycyrus graycyrus commented Apr 2, 2026

Summary

  • Add cargo:rerun-if-changed directives for permissions/ and capabilities/ directories in app/src-tauri/build.rs so Tauri regenerates ACL tables on incremental builds
  • Add missing permission entries for register_dictation_hotkey and unregister_dictation_hotkey in allow-core-process.toml

Problem

Clicking "Restart & Refresh Permissions" on the onboarding Screen & Accessibility Permissions step showed Command restart_core_process not found even though the command was correctly registered in generate_handler!, had a permission TOML, and was referenced in capabilities.

Root cause: build.rs had no cargo:rerun-if-changed directives for the permissions/ or capabilities/ directories. When these files were added/changed, cargo's incremental builds skipped re-running tauri-build, embedding stale ACL tables that didn't include the new permission entries.

Changes

File Change
app/src-tauri/build.rs Add rerun-if-changed for permissions and capabilities dirs
app/src-tauri/permissions/allow-core-process.toml Add register_dictation_hotkey and unregister_dictation_hotkey

Test plan

  • Clean build (cargo clean + yarn tauri dev) — verify "Restart & Refresh Permissions" works on ScreenPermissionsStep
  • Verify same button works in Settings > Accessibility panel
  • Verify dictation hotkey registration doesn't error

Closes #270

Summary by CodeRabbit

  • Bug Fixes

    • Resolved an issue where changes to permission and capability configurations weren't triggering proper build regeneration, preventing command registration tables from being updated correctly.
  • New Features

    • Added support for dictation hotkey registration and unregistration commands.

…on, add Recovery Phrase settings panel

- Remove "Open Accessibility" button from ScreenPermissionsStep (step 2)
- Remove MnemonicStep (step 5) from onboarding, reducing total steps from 6 to 5
- Move onboarding completion logic (setOnboardedForUser + setOnboardingCompleted) into handleSkillsNext
- Add RecoveryPhrasePanel in Settings with the same BIP39 generate/import functionality
- Wire recovery-phrase route into Settings.tsx, SettingsHome menu, and useSettingsNavigation
… selector

Address CodeRabbit review feedback:
- Add aria-label to each recovery phrase word input for screen readers
- Add word-count selector (12/15/18/21/24) so longer phrases can be
  entered manually, not just via paste
…ipboard fallback

Address CodeRabbit round 2:
- Remove auto-focus-advance after single character input (was breaking
  manual word entry — typing 'abandon' would split across slots)
- Guard execCommand('copy') fallback with return value check
…g stale ACL builds

Add cargo:rerun-if-changed directives for permissions/ and capabilities/
directories in build.rs so Tauri regenerates ACL tables on incremental
builds. Also add missing permission entries for dictation hotkey commands.

Closes #270
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 2, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 1abd0681-a5ad-478b-8722-596fc9dc8bb1

📥 Commits

Reviewing files that changed from the base of the PR and between e941af1 and 1fa25fb.

⛔ Files ignored due to path filters (1)
  • app/src-tauri/Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (3)
  • .claude/memory.md
  • app/src-tauri/build.rs
  • app/src-tauri/permissions/allow-core-process.toml

📝 Walkthrough

Walkthrough

This PR fixes a bug where the restart_core_process Tauri command was not found at runtime. The root cause was missing cargo:rerun-if-changed directives in the build script, preventing tauri-build from regenerating ACL tables when permission or capability files changed. The fix adds rebuild triggers and extends the allow-core-process permission scope.

Changes

Cohort / File(s) Summary
Build Script Configuration
app/src-tauri/build.rs
Added Cargo directives to emit rebuild triggers for permissions and capabilities directories, ensuring tauri-build re-runs and regenerates ACL tables when these files change.
Permission Declaration
app/src-tauri/permissions/allow-core-process.toml
Expanded permission scope description and added register_dictation_hotkey and unregister_dictation_hotkey to the allowed commands list.
Documentation
.claude/memory.md
Documented the bug fix addressing stale ACL compilation when permission/capability files change; removed duplicate build blocker section.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 A carrot-sized fix for a puzzle unsolved,
Rebuild triggers added—cached stales dissolved!
Commands now found where permissions align,
The hotkeys hop freely, the ACL's divine! 🎯✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main fix: adding cargo:rerun-if-changed directives to resolve stale ACL tables causing the 'Command restart_core_process not found' error.
Linked Issues check ✅ Passed The PR directly addresses all coding requirements from issue #270: adds cargo:rerun-if-changed directives for permission/capability compilation [#270], and extends allow-core-process.toml with dictation hotkey commands [#270].
Out of Scope Changes check ✅ Passed All changes are directly scoped to issue #270: the build.rs modification ensures ACL regeneration, and the permission file updates support command registration as required.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/restart-core-process-command-not-found

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

@graycyrus graycyrus merged commit 8b332c6 into main Apr 2, 2026
14 checks passed
@senamakel senamakel deleted the fix/restart-core-process-command-not-found branch April 4, 2026 21:55
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] "Restart & Refresh Permissions" fails with "Command restart_core_process not found"

1 participant