Skip to content

fix: confirm dashboard process quit, accurate CLI help, security contact - #23

Merged
osmcgrgenc merged 1 commit into
mainfrom
fix/pre-release
Sep 28, 2026
Merged

osmcgrgenc merged 1 commit into
mainfrom
fix/pre-release

Conversation

@osmcgrgenc

Copy link
Copy Markdown
Contributor

Summary

  1. Dashboard quit button no longer kills without confirmation. The top-processes card's quit button now calls AppState.requestProcessTermination(pid:) instead of killProcess. That opens the same dialog the AI Copilot already used ("Terminate this process?", "PID: n. SIGTERM will be sent first.", Cancel / Terminate Normally). Only Terminate Normally sends SIGTERM (force: false). The dialog moved from AICopilotView to the root MainView, so it appears on every screen. That also fixes the Autonomous Guard "Terminate Process" button, which previously set the pending PID and showed no dialog until the user opened AI Copilot. aiKillConfirmationPID / confirmAIProcessTermination() were renamed to pendingTerminationPID / confirmProcessTermination(), and cancelProcessTermination() was added. The dialog buttons now use the ai string table; before, Button("Cancel") looked up the main bundle and wasn't translated. No new strings were needed.
  2. CLI help: --include-trash now says: "Also list Trash items; with --execute --yes, permanently delete them (no confirmation beyond --yes)." This matches the code.
  3. Security contact: SECURITY.md now lists info@codifya.com instead of security@osmancagrigenc.dev. No other doc or source file had a contact address.

Process-termination call sites

Call site Trigger Confirmation Signal
DashboardView → LiveTopProcessesCard.onKill Dashboard top-processes quit button Shared MainView alert (new) SIGTERM
AppState.executeAIAction(.killProcess) from AICopilotView (insight + chat action buttons) AI suggestion "Quit %@" Shared MainView alert (unchanged behavior; dialog moved) SIGTERM
AppState.executeAIAction(.killProcess) from AutonomousGuardView Watchdog "Terminate Process" Shared MainView alert (previously no dialog was visible on that screen) SIGTERM
MemoryView alert → appState.killProcess(pid:force: true) Memory screen force quit Its own .alert "Terminate Process / Quit %@ (PID)? Unsaved data may be lost." → Force Quit SIGKILL / forceTerminate() (unchanged)
AppState.killProcess → MemoryOptimizerService.terminateProcess Only reached from the rows above n/a (internal; SafetyGuard.isProcessKillable enforced) per force
SafeOperationExecutor.terminateProcess No production callers (policy-gated API only) n/a per force

ProcessExecutor / SandboxedCommandRunner SIGTERM→SIGKILL escalation only touches child processes the app itself spawned (timeouts), not user processes. NSApplication.terminate in MacOptimizerApp quits the app itself.

Test plan

  • swift build clean
  • swift test: 91 tests, 0 failures, including new testProcessTerminationWaitsForExplicitConfirmation and testCLIHelpDoesNotPromiseExtraTrashConfirmation
  • Manual on device: Dashboard quit → dialog → Cancel keeps process; Terminate Normally quits it (en + tr)
  • Manual: Autonomous Guard "Terminate Process" now shows the dialog

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@osmcgrgenc
osmcgrgenc merged commit 2b460da into main Sep 28, 2026
3 checks passed
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