feat: add troubleshooting settings with open app data and reset workspace

Add a Troubleshooting section under a Support nav group in Settings:

- Open App Data Folder: reveals the user-data directory in the OS file
  explorer via shell.openPath.
- Reset Local Workspace: destructive action that deletes workspace.json
  and scratchpad contents, clears the in-memory cache, and reseeds
  defaults. Auth secrets are preserved. Requires two-step confirmation.

New IPC channels, ElectronApi methods, and preload bridge added for
openAppDataFolder and resetLocalWorkspace. Existing electron mock in
tests updated to include shell.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
David Kaya
2026-03-25 21:50:16 +01:00
co-authored by Copilot
parent 5123f9163c
commit 2e3175934d
8 changed files with 168 additions and 5 deletions
+2
View File
@@ -108,6 +108,8 @@ export interface ElectronApi {
selectSession(sessionId?: string): Promise<WorkspaceState>;
setPatternFavorite(input: SetPatternFavoriteInput): Promise<WorkspaceState>;
setTheme(theme: AppearanceTheme): Promise<WorkspaceState>;
openAppDataFolder(): Promise<void>;
resetLocalWorkspace(): Promise<WorkspaceState>;
onWorkspaceUpdated(listener: (workspace: WorkspaceState) => void): () => void;
onSessionEvent(listener: (event: SessionEventRecord) => void): () => void;
}