Skip to content

fix(app): resolve hotkey, file uri and updater audit findings - #305

Merged
StudentWeis merged 1 commit into
mainfrom
fix/audit-state-uri-diagnostics
Oct 22, 2026
Merged

StudentWeis merged 1 commit into
mainfrom
fix/audit-state-uri-diagnostics

Conversation

@StudentWeis

Copy link
Copy Markdown
Owner

Summary

Preserve newer shortcut drafts when asynchronous registration finishes, reject unsupported file URI authorities, and capture update-helper failures on stderr. History rows now borrow records and prepare bounded previews only when needed.

Linked Issue

Closes #304

Changes

  • Preserve edits made during hotkey registration, retain the submission guard across window recreation, and release it even if completion arrives while the window is closed.
  • Parse file URI authorities exactly: accept empty authority or case-insensitive localhost, reject unsupported hosts and incomplete URIs, and preserve literal filesystem whitespace and percent characters.
  • Install a scoped stderr tracing subscriber around startup/update handling so rollback failures reach the helper log before normal application logging starts.
  • Borrow history records instead of cloning entire records, remove redundant preview copies, and retain Unicode-safe bounded text for requested previews.
  • Add regressions for hotkey window lifecycle, unsupported URI authorities, million-character Unicode previews, payload presentation and update-helper rollback diagnostics. The stale-installation fixture recompiles a valid replacement executable with a different optimization level.

Testing

  • scripts/precheck.sh --check passes locally: 794 Rust tests passed, 3 existing tests ignored; 83 Python tests passed; Clippy, formatting, resource checks, core dependency boundaries, private D-Bus tray test and rustdoc passed.
  • New / updated tests cover the change. Regression probes failed against the original implementation before the fixes.
  • All three update handoff scenarios pass: healthy startup, failed startup rollback and stale installation recovery with stderr diagnostics.

Validation ran on Linux using headless GPUI and native helper subprocesses. Native macOS, Windows and Wayland desktop end-to-end tests were not run.

Self-Check

  • PR title follows Conventional Commits
  • No hardcoded user-facing strings — no new display strings or locale keys
  • Errors defined with thiserror (no manual impl Display/Error) — no new error types
  • No unrelated changes mixed in

@StudentWeis
StudentWeis merged commit 54b8793 into main Oct 22, 2026
12 checks passed
@StudentWeis
StudentWeis deleted the fix/audit-state-uri-diagnostics branch October 22, 2026 15: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.

fix: resolve hotkey, file uri and updater audit findings

1 participant