Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4f57e38c95
|
||
|
|
bc0b7dd3ed | ||
|
|
9a055fba64
|
No files matched your search
@@ -6,6 +6,11 @@ All notable changes to OmniDeck are documented here. The format follows
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
### Changed
|
||||
- Stocks: Twelve Data with the user's own API key is now the only provider. Stooq was dropped because
|
||||
its download endpoints now block scripted clients (P0 spike #7). The free Twelve Data plan covers US
|
||||
listings; home-market EU listings and indices need a paid plan.
|
||||
|
||||
### Removed
|
||||
- Messenger from the web app catalog: Meta closed messenger.com on 15 April 2026 and sends web
|
||||
users to `facebook.com/messages`, which the Facebook entry already covers.
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ These are design requirements from the [SPEC](docs/SPEC.md); each one is enforce
|
||||
- Web apps run only from the reviewed catalog: per-app navigation allowlists, per-app cookie profiles, SSO popups restricted to listed identity domains, everything else opens in your default browser.
|
||||
- Release builds disable the WebView2 DevTools UI and browser password autosave/autofill; OmniDeck never sees or stores web credentials.
|
||||
- The only secret the app stores (optional Twelve Data API key) is encrypted with Windows DPAPI, current-user scope.
|
||||
- All service calls (Open-Meteo, Stooq, Twelve Data, GitHub) are HTTPS-only.
|
||||
- All service calls (Open-Meteo, Twelve Data, GitHub) are HTTPS-only.
|
||||
- Bug reports scrub query strings, cookie values, and token-shaped strings before packaging; nothing is ever uploaded automatically — you attach the zip yourself.
|
||||
- No telemetry, no analytics, no crash auto-upload (see [PRIVACY](docs/legal/PRIVACY.md)).
|
||||
|
||||
|
||||
+16
-11
@@ -4,15 +4,15 @@ The governor is the feature that makes "many apps in one" viable. It moves every
|
||||
|
||||
## 1. State ladder
|
||||
|
||||
| State | Entered when | Native module | Web app | Typical web-app RAM |
|
||||
| State | Entered when | Native module | Web app | Measured web-app cost (committed, P0 spike #3) |
|
||||
|---|---|---|---|---|
|
||||
| Active | visible / interacted | full UI | full WebView2 | 300–700 MB |
|
||||
| Idle | hidden < `IdleAfter` | keep view, stop animations/timers | hidden, still live | unchanged |
|
||||
| Suspended | hidden ≥ `IdleAfter` | `SuspendAsync`: drop caches, charts, bitmaps; GC follows | `TrySuspendAsync` + `MemoryUsageTargetLevel.Low` | tens of MB |
|
||||
| Hibernated | hidden ≥ `HibernateAfter`, or cap pressure | `HibernateAsync`: view + everything released, tiny state blob kept | `Dispose()`; only `{url}` kept, session lives in profile cookies | ≈ 0 |
|
||||
| Active | visible / interacted | full UI | full WebView2 | app 250–450 MB, plus 170–270 MB of shared browser, GPU and utility processes |
|
||||
| Idle | hidden < `IdleAfter` | keep view, stop animations/timers | hidden, still live | 15–31 % less, as Chromium drops the hidden page's caches |
|
||||
| Suspended | hidden ≥ `IdleAfter` | `SuspendAsync`: drop caches, charts, bitmaps; GC follows | `TrySuspendAsync` + `MemoryUsageTargetLevel.Low` | 85–95 % of Idle. The working set is trimmed by about 65 %, so this rung saves CPU and power, not memory |
|
||||
| Hibernated | hidden ≥ `HibernateAfter`, or cap pressure | `HibernateAsync`: view + everything released, tiny state blob kept | `Dispose()`; only `{url}` kept, session lives in profile cookies | 0. Disposing the *last* web app also ends the shared processes |
|
||||
| Closed | user closes | released | released | 0 |
|
||||
|
||||
Reactivation from Suspended is instant; from Hibernated it is a cold open (view rebuild / page reload) — acceptable because the profile keeps the user signed in.
|
||||
Reactivation from Suspended is instant. From Hibernated it is a cold open (view rebuild and page reload, about 0.6–2.5 s); that is acceptable because the profile keeps the user signed in. After the last web app has been hibernated, the next one also restarts the browser process (about 160 ms).
|
||||
|
||||
## 2. Defaults (all configurable in Settings → Memory)
|
||||
|
||||
@@ -20,8 +20,8 @@ Reactivation from Suspended is instant; from Hibernated it is a cold open (view
|
||||
|---|---|
|
||||
| `IdleAfter` | 5 min hidden |
|
||||
| `HibernateAfter` | 30 min hidden |
|
||||
| `SoftCapBytes` | 4.5 GiB |
|
||||
| `HardCapBytes` | 6.0 GiB |
|
||||
| `SoftCapBytes` | min(4.5 GiB, 35 % of physical RAM) |
|
||||
| `HardCapBytes` | min(6.0 GiB, 50 % of physical RAM) |
|
||||
| `PollInterval` | 10 s |
|
||||
|
||||
## 3. Pinning
|
||||
@@ -38,10 +38,15 @@ Pinned modules are skipped by cap enforcement; if the hard cap is exceeded purel
|
||||
|
||||
Total footprint = shell process + Σ all WebView2 processes (`CoreWebView2Environment.GetProcessInfos()` → PID), sampled every `PollInterval`.
|
||||
|
||||
**Metric — chosen by P0 spike #3.** Summing `Process.WorkingSet64` over-counts: Chromium processes share DLL and shared-memory pages, and each process reports them again. Working set also drops whenever pages are trimmed (for example by `MemoryUsageTargetLevel.Low`), so a working-set cap would reward exactly the page shuffling the honesty note below rejects. The spike compares private commit (`Process.PrivateMemorySize64`) with private working set and fixes one metric; the caps, the toasts, and the task-manager panel all use it.
|
||||
**Metric: private commit** (`Process.PrivateMemorySize64`), summed over the shell and every WebView2 process. P0 spike #3 ([note](spikes/03-memory.md)) chose it for three reasons:
|
||||
- Summing `Process.WorkingSet64` over-counts, because Chromium processes share DLL and shared-memory pages and each one reports them again.
|
||||
- Working sets drop whenever pages are trimmed. Suspend + `Low` cut the private working set by 65–70 % but committed memory by only 5–15 %, so a working-set cap would reward exactly the page shuffling the honesty note below rejects.
|
||||
- Private commit needs no process handle.
|
||||
|
||||
- **> SoftCap:** demote the least-recently-used unpinned module one step down the ladder; repeat next tick if still above.
|
||||
- **> HardCap:** force-hibernate LRU unpinned modules until below, then raise one toast summarizing what was hibernated.
|
||||
The caps, the toasts and the task-manager panel all use it. The panel may show the private working set beside it, since that is the figure Task Manager shows. Renderer processes are attributed to apps through `GetProcessExtendedInfosAsync`. The shared browser, GPU and utility processes form one "WebView2 (shared)" row and are never a demotion target.
|
||||
|
||||
- **> SoftCap:** hibernate the least-recently-used unpinned module, since Suspended frees almost no memory. Repeat on the next tick if still above.
|
||||
- **> HardCap:** force-hibernate LRU unpinned modules until below, then raise one toast summarizing what was hibernated. If the shared WebView2 processes alone keep the total above the cap (the GPU process grows with video), the toast says so instead of hibernating apps that would free nothing.
|
||||
|
||||
Ordering hint: `RamClass.Heavy` modules (web apps, media, stocks charts) are preferred victims over `Light` ones at equal recency.
|
||||
|
||||
|
||||
+16
-6
@@ -10,7 +10,7 @@ Solo-developer plan, ~29 weeks from the start of P0 (2 November 2026). Each phas
|
||||
|
||||
Repository foundation: documentation suite; solution skeleton (`OmniDeck.App`, `OmniDeck.Core`, `OmniDeck.Tests`); self-contained CI (build, tests, formatting, analyzers as errors, NuGet Audit, catalog validation, workflow and link linting, CodeQL, SonarCloud, Dependency Review, OpenSSF Scorecard); protected `main` and release tags; the Velopack release pipeline proven end to end with the `0.0.1-alpha.1` pre-release.
|
||||
|
||||
### P0 — Spikes (2 – 15 Nov 2026)
|
||||
### P0 — Spikes (2 – 15 Nov 2026) — done early, 30 Oct 2026
|
||||
|
||||
De-risk everything that could invalidate the design, on real hardware:
|
||||
|
||||
@@ -24,6 +24,15 @@ De-risk everything that could invalidate the design, on real hardware:
|
||||
|
||||
**Exit:** a written go/no-go note per spike in [`docs/spikes/`](spikes/README.md). The proof-of-concept code stays on the unmerged `spike/p0` branch, so spike-only packages never reach `main`'s dependency graph or the release SBOM.
|
||||
|
||||
**Result:** all seven notes are in. #1, #3 and #4 are GO; #2, #5, #6 and #7 are GO with conditions:
|
||||
- #1 DRM: Widevine ships with the runtime.
|
||||
- #2 sign-in: works and persists; Google's country-code hop needs `navAllowSets` in P2.
|
||||
- #3 memory: the governor metric is private commit; suspend trims, only hibernate frees.
|
||||
- #4 CDP capture: always on.
|
||||
- #5 presets: code-built, with `Od` styles over WPF-UI's static keys.
|
||||
- #6 libVLC: fullscreen in place; pop-out needs a vout restart and a seek.
|
||||
- #7 providers: Twelve Data with the user's own key; Stooq dropped.
|
||||
|
||||
### P1 — Shell & skeleton (16 Nov 2026 – 10 Jan 2027)
|
||||
|
||||
Shell (nav, tray, single-instance, command palette), module contract + host, RAM governor v1 with task-manager panel, theme engine + three presets (Standard polished, others functional), legal gate + About, settings + storage layer (data root, Velopack uninstall hook), and the three trivial modules: clock, timer, calculator.
|
||||
@@ -38,7 +47,7 @@ Full web runner (profiles, nav policy, SSO popups, notifications→toast, permis
|
||||
|
||||
### P3 — Stocks, presets, i18n (8 Mar – 11 Apr 2027)
|
||||
|
||||
Stocks module (Stooq default + Twelve Data BYO key, watchlist, candlesticks); Dynamic and Comfort presets polished to spec (UI-MODES token table); VI + JA translations; settings import/export; accessibility pass (text scaling, contrast themes, keyboard nav).
|
||||
Stocks module (Twelve Data with the user's own key, which spike #7 left as the only provider; watchlist, candlesticks); Dynamic and Comfort presets polished to spec (UI-MODES token table); VI + JA translations; settings import/export; accessibility pass (text scaling, contrast themes, keyboard nav).
|
||||
|
||||
**Exit (0.3.0):** feature-complete against SPEC v1 scope.
|
||||
|
||||
@@ -65,10 +74,11 @@ Every version below 1.0.0 is published as a GitHub **pre-release**; 1.0.0 is the
|
||||
|
||||
| Risk | Impact | Mitigation |
|
||||
|---|---|---|
|
||||
| Widevine unavailable in WebView2 on target machines | Spotify won't play | P0 spike gates the catalog entry; fallback: ship Spotify entry disabled with an explanatory note, YouTube covers music for many users |
|
||||
| Google blocks sign-in in WebView2 | Google group unusable | P0 spike; fallback: session import guidance / treat as upstream limitation, documented |
|
||||
| LibVLCSharp airspace friction in WPF | Media UX degraded | P0 spike; fallback engine FlyleafLib |
|
||||
| Free API tiers change (Twelve Data/Stooq) | Stocks degraded | **Materialized for Stooq** (checked 2026-10-30): the CSV endpoint now answers scripted clients with a JavaScript browser check, and community reports say downloads need a per-user API key obtained through a captcha — P0 spike #7 decides the replacement. Provider abstraction; BYO-key model isolates OmniDeck from quota policy; Stocks is first in the cut order (§4) |
|
||||
| Widevine unavailable in WebView2 on target machines | Spotify won't play | **Retired by spike #1:** the evergreen runtime ships Widevine and Spotify plays without flags. If a future runtime breaks EME, the bug report's EME self-check shows it. Fallback unchanged: ship the Spotify entry disabled with a note |
|
||||
| Google blocks sign-in in WebView2 | Google group unusable | **Spike #2:** sign-in works with the default user agent, and one sign-in covers the `google` group. Google's hop to country-code domains needs `navAllowSets` (P2). Client hints name WebView2, so Google could still block it later; fallback: treat it as an upstream limitation, documented |
|
||||
| LibVLCSharp airspace friction in WPF | Media UX degraded | **Retired by spike #6:** overlay controls and fullscreen in place work in a `FluentWindow`. Pop-out needs a video-output restart and a seek, plus an overlay sizing fix in P2. FlyleafLib is not needed |
|
||||
| Free API tiers change (Twelve Data/Stooq) | Stocks degraded | **Materialized for Stooq** (2026-10-30), which now blocks scripted clients. Spike #7 leaves Twelve Data with the user's own key as the only provider; its free plan covers US listings. The provider abstraction stays; Stocks is first in the cut order (§4) |
|
||||
| Web sessions lost across restarts | Users signed out of web apps | Seen once in P0 and not reproduced (spike #2). P2 records sign-in health after restarts, and bug reports carry cookie-store counts (never values) |
|
||||
| User data stored in Velopack's install folder | Uninstall or reinstall wipes data and sign-ins | data root `%LocalAppData%\OmniDeck.Data`, never `%LocalAppData%\OmniDeck` ([ARCHITECTURE](ARCHITECTURE.md) §5) |
|
||||
| Solo bandwidth vs. other projects | Schedule slip | cut order below; phases sized with buffer |
|
||||
|
||||
|
||||
+10
-7
@@ -54,16 +54,18 @@ All mini-apps implement the module contract in [ARCHITECTURE](ARCHITECTURE.md) a
|
||||
|
||||
### 3.5 Stocks (US/EU)
|
||||
- **Watchlist** with quote, day change, sparkline; detail view with candlestick/OHLC + volume charts (ScottPlot 5), range 1M/6M/1Y/5Y.
|
||||
- **Providers** behind `IOdQuoteProvider`:
|
||||
- `Stooq` (default, keyless): end-of-day CSV for US and major EU tickers and indices. Zero configuration.
|
||||
- `TwelveData` (optional, user-supplied free API key): delayed intraday quotes and time series, US + international coverage. Key stored via **DPAPI**, never in plaintext or logs.
|
||||
- Client-side **sliding-window rate limiting** per provider; on limit or error, keep last cached values and show `N/A` for missing fields (never delete cached data on network failure).
|
||||
- **Provider** behind `IOdQuoteProvider`: `TwelveData`, with the user's own API key (free Basic plan or paid). The module asks for the key on first use; it is stored via **DPAPI**, never in plaintext or logs.
|
||||
- **Coverage depends on the user's plan.** The free plan covers US stocks, ETFs and US-listed ADRs. Home-market EU listings need Grow, and indices need Pro. Symbol search (`show_plan=true`, free) labels each listing with the plan it needs, and a plan error reads "not available on your Twelve Data plan".
|
||||
- **Stooq was dropped** in P0 because it now blocks scripted clients ([spike #7](spikes/07-providers.md)).
|
||||
- Client-side **sliding-window rate limiting**: ≤ 8 credits per rolling 60 s and the plan's daily budget, counting failed calls. Watchlist refreshes use batch quotes. On limit or error, keep the last cached values and show `N/A` for missing fields; never delete cached data on network failure.
|
||||
- Every stocks screen carries the data disclaimer footer ("delayed/indicative data — not investment advice"), mirrored in [DISCLAIMER](legal/DISCLAIMER.md).
|
||||
|
||||
### 3.6 Media player
|
||||
- Engine: **LibVLCSharp + VideoLAN.LibVLC.Windows (x64)**, plugins trimmed to codecs/demux/audio/video output.
|
||||
- Local files and folders, playlist (m3u load/save), subtitles (embedded + external `.srt`/`.ass`, encoding selection), audio track & device selection, speed 0.25–4×, snapshot.
|
||||
- libVLC initializes lazily on first open; the player counts as **pinned** while playback is active (governor may not suspend it).
|
||||
- libVLC initializes lazily on first open; the player counts as **pinned** while playback is active (governor may not suspend it). Suspend stops and disposes the player, and hibernate disposes libVLC too: playback holds 280–520 MB committed.
|
||||
- **Fullscreen** makes the module's own window cover the monitor. **Pop-out** hands the player to the new window by re-selecting the video track and seeking to the current time ([spike #6](spikes/06-libvlcsharp.md)).
|
||||
- **Build:** x64 only (`VlcWindowsX86Enabled` and `VlcWindowsArm64Enabled` set to false), with the trimmed plugin set: about 86 MB raw, 39 MB compressed.
|
||||
|
||||
## 4. Web runner
|
||||
|
||||
@@ -73,7 +75,8 @@ All mini-apps implement the module contract in [ARCHITECTURE](ARCHITECTURE.md) a
|
||||
- **Permissions:** `PermissionRequested` (mic/camera/clipboard/geolocation) shows a native prompt; the decision is remembered per app and reviewable in settings.
|
||||
- **Downloads:** routed through `DownloadStarting` to the user's Downloads folder with an in-shell progress row.
|
||||
- **Media pinning:** while `IsDocumentPlayingAudio` is true, the module is pinned (see RAM-GOVERNOR).
|
||||
- **Lifecycle:** hidden web apps are suspended via `TrySuspendAsync` + `MemoryUsageTargetLevel.Low`, later disposed entirely (session survives via profile cookies). Full state machine in [RAM-GOVERNOR](RAM-GOVERNOR.md).
|
||||
- **Lifecycle:** hidden web apps are suspended via `TrySuspendAsync` + `MemoryUsageTargetLevel.Low`, later disposed entirely (session survives via profile cookies). Disposing the last web app ends the shared browser process. Full state machine in [RAM-GOVERNOR](RAM-GOVERNOR.md).
|
||||
- **Google account domains:** Google's sign-in sets cookies on country-code domains (for example `accounts.google.com.vn`). The `google` entries need them in `navAllow`, through a catalog schema v2 field (`navAllowSets`) decided in P2 ([spike #2](spikes/02-google-sign-in.md)).
|
||||
- **Catalog:** shipped in `catalog/webapps.json`, refreshed from this repo's raw URL at most once per day; schema and rules in [WEBAPP-CATALOG](WEBAPP-CATALOG.md).
|
||||
|
||||
## 5. Cross-cutting requirements
|
||||
@@ -86,7 +89,7 @@ All mini-apps implement the module contract in [ARCHITECTURE](ARCHITECTURE.md) a
|
||||
|
||||
## 6. Bug reporting flow
|
||||
|
||||
1. A DevTools Protocol session per web app subscribes to `Runtime.consoleAPICalled` and `Log.entryAdded`, keeping a 200-entry ring buffer per app. .NET unhandled exceptions and the Serilog tail are collected shell-side.
|
||||
1. A DevTools Protocol session per web app (`Runtime` + `Log`, always on, DevTools UI still disabled) subscribes to `Runtime.consoleAPICalled`, `Runtime.exceptionThrown` and `Log.entryAdded`. It keeps a 200-entry ring buffer per app, plus a 50-entry errors-only ring so chatty apps cannot evict errors ([spike #4](spikes/04-cdp-console.md)). .NET unhandled exceptions and the Serilog tail are collected shell-side.
|
||||
2. **Report bug** composes: version, Windows build, UI preset, active modules + RAM snapshot, the relevant console ring buffer, and last log lines.
|
||||
3. Before packaging, a scrubber strips query strings, cookie values, and bearer-token-shaped strings.
|
||||
4. The app opens a pre-filled GitHub issue (bug template) and writes `bugreport-<timestamp>.zip` to `%LocalAppData%\OmniDeck.Data\reports` for the user to attach (issue-URL prefill has a length limit, so long logs travel in the zip).
|
||||
|
||||
@@ -49,9 +49,9 @@ Top-level file fields: `$schema` (optional editor hint), `schemaVersion` (int),
|
||||
|
||||
| id | profile | audioPin | Notes |
|
||||
|---|---|---|---|
|
||||
| spotify | spotify | yes | Web Player; requires DRM in the runtime — gated on the P0 spike result; third-party sign-in buttons (Google/Facebook/Apple) untested until then |
|
||||
| spotify | spotify | yes | Web Player; DRM works in the runtime ([spike #1](spikes/01-drm-widevine.md)); the third-party sign-in buttons (Google/Facebook/Apple) are still untested ([spike #2](spikes/02-google-sign-in.md)) |
|
||||
| discord | discord | no | no global PTT on web; host hotkey partial mitigation |
|
||||
| youtube | google | yes | |
|
||||
| youtube | google | yes | sign-in hops to Google's country-code domains, which need `navAllowSets` (P2, spike #2) |
|
||||
| gmail | google | no | |
|
||||
| gcalendar | google | no | |
|
||||
| gdrive | google | no | |
|
||||
|
||||
Reference in new issue
Block a user