Commit 385d519
committed
feat: added multiple functions.
## Added
- **Widget SDK v2** — `manifest.json` now supports `manifest_version`, `sdk_version`, structured `capabilities`, and `csp`. Legacy v1 manifests are auto-normalized to v2.
- **Widget `local_api_call` enforcement** — widgets can request `local-api:call`; the host issues scoped API tokens and the local API server enforces token scopes across all routes.
- **Widget dev harness** — updated the local widget preview page to handle SDK v2 capabilities and permission simulation.
- **Widget template & migration guide** — upgraded `examples/third-party-widget-template/` to SDK v2 with TypeScript types and `localApiCall` example; added `docs/WIDGET_SDK_v2_MIGRATION.md`.
- **Settings UI for v2.0.0 platform features** — added sections/cards for migration rehearsal/integrity checks, passphrase-protected backups, archive scheduler and compression, profile management, and database encryption.
- **CI quality gates** — added `npm test`, Rust `cargo test`, Tauri build smoke test, offline critical-journey tests, and migration-rehearsal job to `.github/workflows/ci.yml`.
- **Dashboard Insights enhancements** — added saved views, distraction hotspot card, and Apps/Categories/Projects comparison tabs.
- **Focus rule backend integration** — Focus Mode rules now persist in the backend `focus_rules` table with CRUD commands and backend-driven auto start/stop.
- **Profile state isolation** — moved profile metadata and `current_profile_id` into a separate unencrypted `app_state.db` so profile switching remains reliable even when individual profile databases are encrypted.
- **Full Japanese, Korean, French, German, and Spanish localization** — completed frontend translations across all desktop namespaces (`common`, `dashboard`, `widgets`, `settings`, `limits`, `categories`, `goals`, `focus`, `browserUsage`) for `ja`, `ko`, `fr`, `de`, and `es`.
- **Frontend accessibility pass** — added "Skip to main content" link, global `:focus-visible` styles, ARIA live announcer for notifications, navigation landmark labels, `aria-current="page"`, icon-only button labels, dialog roles/modal attributes, and dynamic HTML `lang` updates.
- **Local API server governance** — hardened all API server routes to enforce widget-scoped API token scopes and reject unscoped or revoked tokens.
- **Offline test harness scripts** — added `scripts/offline-journey-tests.sh` and `scripts/migration-rehearsal.sh` for local critical-journey and migration validation.
### Changed
- Consolidated roadmap governance into a single canonical local-first source at `docs/ROADMAP_v2.0.0.md`.
- Archived the parallel roadmap track to avoid split planning ownership and version drift.
- Normalized core desktop release metadata to `2.0.0` across npm, Tauri, and Windows MSIX manifest sources.
- Added advanced Browser Usage date-range exploration with local saved views (custom range, save/apply/delete presets).
- Added Dashboard "what changed" summary card for recent period comparison (top increase/decrease, new/stopped active apps, total delta).
- Added Dashboard "Unified Insight Workspace" narrative panel (daily review, weekly reflection, goal health) powered by local suggestions and anomaly detection.
- Added local notification automation controls in Tracking settings (quiet hours + reminder cooldown) and wired them into all in-app alert dispatches.
- Added Dashboard "Unified Timeline" panel with cross-source feed (desktop focus sessions, browser sessions, interruption markers) and local source/search filters.
- Moved "What Changed" summary, Unified Insight Workspace, and Unified Timeline into a dedicated Dashboard Insights page to reduce homepage density and improve analysis flow.
- Added cross-module drill-down actions from Dashboard summaries/timeline into Categories, Browser Usage, and Focus Mode, with URL-parameter context handoff.
- Fixed interruption marker detail drill-down target: `Open Detail` now routes to a dedicated interruption detail view with hour window, switch count, and fragment score context instead of Focus Mode landing.
- Added a unified Privacy & Permission Center entry in Settings to aggregate local-only boundary, tracking state, API governance, backup, and data health with one-click deep links.
- Added reusable async state cards (loading/empty/error) and applied them to core pages for consistent platform-level UX.
- Expanded async state card adoption to Goals, Dashboard, and Widget Center to reduce duplicated state UI logic.
- Added Focus Mode rule automation panel with local rule management, simulation, and one-click apply-to-start behavior.
- Hardened third-party widget permission enforcement by mapping `settings:write` to runtime channel interception and fixing install-time permission dialog state reset / instance targeting.
- Upgraded Widget permission matrix from read-only audit view to manageable controls with one-click permission revoke.
- Added secondary confirmation and success/failure feedback for widget permission revoke actions to reduce accidental operations.
- Added per-widget permission change timeline (grant/revoke actor + timestamp) for third-party widget governance audits.
- Completed i18n coverage for newly added Widget permission matrix and Browser Usage/Dashboard incremental features across `en` / `zh-CN` / `zh-TW`.
### Fixed
- **Profile switching reliability** — fixed a bug where switching profiles could result in a "connection refused" error or missing profiles because `current_profile_id` was stored inside the encrypted profile database.
- **Widget permission dialog state** — fixed install-time permission dialog state reset and instance targeting so permission grants are correctly associated with the widget being installed.
- **Database encryption shutdown corruption** — fixed a critical bug where shutdown re-encryption generated a fresh nonce/salt but did not update the stored metadata, causing the next startup to fail with "Failed to decrypt database". Re-encryption now writes updated metadata and uses atomic temp-file writes.
- **Database encryption file-lock resilience** — encryption/decryption and plaintext wipe now retry on Windows file locks and fall back to a usable runtime plaintext database if the encrypted backup cannot be decrypted on startup.
- **Database encryption disable flow** — fixed a bug where disabling encryption and restarting could corrupt or overwrite the latest plaintext with a stale encrypted backup. Disabling now preserves the current runtime plaintext and removes encrypted artifacts after verifying the plaintext is valid.
- **Database open retry on restart** — added a short retry loop when opening the profile database during startup to avoid "localhost refused connection" / startup failures caused by Windows file-lock races after `app.restart()`.1 parent 1220e12 commit 385d519
94 files changed
Lines changed: 8293 additions & 934 deletions
File tree
- .github/workflows
- docs
- examples/third-party-widget-template
- scripts
- src-tauri/src
- api_server
- commands
- db
- src
- components
- layout
- hooks
- i18n
- locales
- de
- en
- es
- fr
- ja
- ko
- zh-CN
- zh-TW
- pages
- DashboardInsights
- FocusMode
- Settings
- WidgetCenter
- WidgetDevHarness
- services
- styles
- types
- widgets
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
32 | 35 | | |
33 | | - | |
| 36 | + | |
34 | 37 | | |
35 | 38 | | |
36 | 39 | | |
| |||
58 | 61 | | |
59 | 62 | | |
60 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
33 | 46 | | |
34 | 47 | | |
35 | 48 | | |
| |||
54 | 67 | | |
55 | 68 | | |
56 | 69 | | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
57 | 79 | | |
58 | 80 | | |
59 | 81 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
248 | 248 | | |
249 | 249 | | |
250 | 250 | | |
251 | | - | |
| 251 | + | |
252 | 252 | | |
253 | 253 | | |
254 | 254 | | |
| |||
0 commit comments