TidGi-Desktop/features
linonetwo cdb496961c Improve shutdown DB cleanup and edit workspace UI
Add end-to-end test for editing workspace and improve shutdown/database cleanup and edit-workspace behavior.

Key changes:
- features/editWorkspace.feature: new E2E scenario to verify save button behavior when enabling HTTP API and restarting a wiki.
- src/main.ts: wrap before-quit cleanup in try/catch/finally, call databaseService.closeAllDatabases() early, and add logging to make shutdown order explicit.
- src/services/database/*: add prepareDatabase pragmas (busy_timeout, synchronous) to SQLite config, make closeAppDatabase more robust with safer dataSource.destroy() handling, and add closeAllDatabases() to close all connections and backup stream to avoid better-sqlite3 crashes.
- src/services/database/interface.ts: expose closeAllDatabases() in the service interface and IPC descriptor.
- src/services/workspaces/interface.ts: mark runtime-only fields as non-config (add lastUrl, homeUrl, hibernated, active), move port to localOnlyFields and remove it from syncableConfigFields to avoid spurious save prompts.
- src/services/workspacesView/index.ts: emit a test log marker ([test-id-WIKI_WORKER_RESTARTING]) when a workspace restart is initiated to help tests detect restart events.
- src/windows/EditWorkspace/server.tsx: add data-testid attributes to server options accordion and HTTP API switch to support the new test selectors.
- src/windows/EditWorkspace/useForm.ts: tighten effect dependencies and adjust originalWorkspace change handling to avoid unnecessary form resets during user edits.

Why: fixes intermittent crashes on app quit related to better-sqlite3 by closing DBs first and finalizing resources, and stabilizes edit-workspace UI and tests by preventing runtime-only field changes from triggering save UI and by adding testable hooks.
2026-02-09 00:04:26 +08:00
..
stepDefinitions Fix/misc bug (#679) 2026-01-26 02:43:27 +08:00
supports Fix/misc bug (#679) 2026-01-26 02:43:27 +08:00
agent.feature Fix/misc bug (#677) 2026-01-20 11:11:28 +08:00
aiCommitMessage.feature Fix/misc bug (#677) 2026-01-20 11:11:28 +08:00
configError.feature Fix/misc bug (#677) 2026-01-20 11:11:28 +08:00
crossWindowSync.feature Fix/misc bug (#679) 2026-01-26 02:43:27 +08:00
cucumber.config.js Fix/misc bug (#679) 2026-01-26 02:43:27 +08:00
defaultWiki.feature Fix/misc bug (#679) 2026-01-26 02:43:27 +08:00
editWorkspace.feature Improve shutdown DB cleanup and edit workspace UI 2026-02-09 00:04:26 +08:00
filesystemPlugin.feature Fix/misc bug (#677) 2026-01-20 11:11:28 +08:00
gitLog.feature Fix/misc bug (#677) 2026-01-20 11:11:28 +08:00
hibernation.feature Fix/misc bug (#677) 2026-01-20 11:11:28 +08:00
logging.feature Feat/watch fs (#649) 2025-10-28 13:25:46 +08:00
newAgent.feature Fix/misc bug (#679) 2026-01-26 02:43:27 +08:00
oauthLogin.feature Fix/misc bug (#677) 2026-01-20 11:11:28 +08:00
preference.feature Fix/misc bug (#677) 2026-01-20 11:11:28 +08:00
smoke.feature Feat/Native AI Agent (#640) 2025-10-10 17:16:56 +08:00
streamingStatus.feature Fix/misc bug (#679) 2026-01-26 02:43:27 +08:00
subWiki.feature Fix/misc bug (#677) 2026-01-20 11:11:28 +08:00
sync.feature Fix/misc bug (#677) 2026-01-20 11:11:28 +08:00
talkWithAI.feature Fix/misc bug (#677) 2026-01-20 11:11:28 +08:00
tiddler.feature Fix/misc bug (#677) 2026-01-20 11:11:28 +08:00
tidgiMiniWindow.feature Fix/misc bug (#677) 2026-01-20 11:11:28 +08:00
tidgiMiniWindowWorkspace.feature Fix/misc bug (#677) 2026-01-20 11:11:28 +08:00
tsconfig.json Feat/Native AI Agent (#640) 2025-10-10 17:16:56 +08:00
vectorSearch.feature Fix/misc bug (#677) 2026-01-20 11:11:28 +08:00
workspaceConfig.feature Fix/misc bug (#677) 2026-01-20 11:11:28 +08:00