Compare commits
10
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4f57e38c95
|
||
|
|
bc0b7dd3ed | ||
|
|
9a055fba64
|
||
|
|
0e0b429f6b
|
||
|
|
e04c0778f5 | ||
|
|
52f151d476
|
||
|
|
af0a3d30da
|
||
|
|
ade25e5ba4 | ||
|
|
68afcb0b97
|
||
|
|
0621f261a1 |
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 | |
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
# Spike 02 — Google sign-in and SSO popups
|
||||
|
||||
**Question:** can users sign in to Google inside WebView2 with the default user agent, and do the SSO flows the catalog relies on work?
|
||||
**Decision:** GO with conditions. Google, Spotify, Discord and Facebook sign-ins all completed inside WebView2 with the default user agent, one Google sign-in covered every app on the shared `google` profile, and in a controlled re-test all five sign-ins survived a restart. Two conditions remain for P2:
|
||||
- Google's sign-in hops through country-code Google domains, and today's `navAllow` blocks that hop.
|
||||
- One session lost every cookie it had set, and the cause is still unknown.
|
||||
|
||||
**Measured:** 2026-10-30. Two sessions where the maintainer signed in by hand, in WebLab on `spike/p0`: the first at `0fe4b12`, the re-test at `3eae21e` with Chromium logging on. Between them, the `--measure` run (`ec79454`) and the cookie probes (`6c60b86`). Issue [#3](https://github.com/poli0981/OmniDeck/issues/3).
|
||||
|
||||
## Environment
|
||||
|
||||
- **User agent:** WebView2 Runtime 156.0.4314.50 with its default user agent, `Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/156.0.0.0 Safari/537.36 Edg/156.0.0.0`. The string is identical to Edge's, but `navigator.userAgentData.brands` also lists **Microsoft Edge WebView2 156**, so sites can see the embedding through client hints.
|
||||
- **Policy:** the catalog's `navAllow` / `popupAllow` were enforced. A navigation outside them was cancelled and logged; the product would hand it to the default browser.
|
||||
- **Profiles:** one environment, one profile per catalog `profile` group.
|
||||
- **Location:** Vietnam.
|
||||
|
||||
## Results
|
||||
|
||||
### Sign-in flows (main frame)
|
||||
|
||||
| App (profile) | Flow | Result |
|
||||
|---|---|---|
|
||||
| YouTube (`google`) | `youtube.com` → `accounts.google.com` sign-in → passkey-enrollment prompt → `CheckCookie` → Google's prompts (a home-address prompt the first time, identity verification by selfie on the re-test) → `accounts.youtube.com/accounts/SetSID` → **`accounts.google.com.vn/accounts/SetSID`** | The credentials were accepted. The main-frame hop to `google.com.vn` falls outside `navAllow` and was cancelled. Google retried it 15 times in about 40 s the first time and 6 times on the re-test, a loop the user can only leave by navigating away. The `.google.com.vn` sign-in cookies were set anyway, through subresource requests. |
|
||||
| Gmail, Drive, Calendar, Maps (`google`) | `mail.google.com` → `accounts.google.com/ServiceLogin` → `<service>/accounts/SetOSID` → app | Signed in with no prompt. One sign-in covers the group. |
|
||||
| Spotify (`spotify`) | `open.spotify.com` → `accounts.spotify.com/login` → back | Signed in with Spotify credentials; playback works (spike #1) |
|
||||
| Discord (`discord`) | inside `discord.com/app` | Signed in |
|
||||
| Facebook (`meta`) | `facebook.com` → `/checkpoint/…` → `/auth_platform/afad/` → home | Facebook's new-device checkpoint, completed in the app, both times |
|
||||
|
||||
Other observations:
|
||||
|
||||
- Google offered passkey enrollment. It was skipped, so WebAuthn was not exercised.
|
||||
- YouTube and Facebook asked for the Notifications permission. P2 bridges these requests through `PermissionRequested`.
|
||||
|
||||
### Sessions across restarts
|
||||
|
||||
- **First session (12:35–13:01, 11 windows, about 25 minutes):**
|
||||
- At the next start, Google, Spotify and Facebook were signed out. Not a single cookie set during that session was left in any of the four profiles: neither the auth cookies nor tracking cookies such as `datr`, `sp_t` and `__dcfduid`.
|
||||
- Cookies set by an earlier scripted run in the same `google` profile were still there.
|
||||
- Discord stayed signed in, because its token lives in localStorage, which survived.
|
||||
- **Cookie probes:** a one-year cookie set from a lab page survived a clean exit, a window close, a host kill, and a hard kill of the whole WebView2 tree 55 s after it was set. How the host shut down does not explain the loss.
|
||||
- **Controlled re-test** (Chromium logging on: sign in, wait, close with the window's X): the auth cookies were on disk right after closing: Google `SID`/`SAPISID`/`__Secure-*PSID`, Spotify `sp_dc`/`sp_key`, Facebook `c_user`/`xs`. On restart, `--check-signed-in` found **Gmail, YouTube, Spotify, Facebook and Discord all signed in**. Gmail was still signed in after a reload with CDP capture on (spike #4). The Chromium log shows no cookie-store or decryption errors.
|
||||
- **One clue:** in the first session the `google` profile wrote nothing to its preferences diagnostics. The other profiles logged every 10 s. Not enough to name a cause.
|
||||
|
||||
### Not tested
|
||||
|
||||
Spotify's "Continue with Google / Facebook / Apple" buttons were not tried; the maintainer used Spotify credentials. `spotify`'s `navAllow` lists only Spotify's domains, so if those buttons move the main frame to `accounts.google.com`, `facebook.com` or `appleid.apple.com`, the product would hand them to the default browser and sign-in would fail. They must be tested in P2 before the entry's lists are final ([WEBAPP-CATALOG](../WEBAPP-CATALOG.md#2-review-rules-for-new-entries-pr-checklist) §2).
|
||||
|
||||
## Consequences
|
||||
|
||||
- **Google's account domains on every country-code TLD.** Google lists them at `https://www.google.com/supported_domains`. Enumerating about 190 domains in each `google` entry would be unreadable. The proposal is a catalog schema v2 field, `navAllowSets: ["google-account-domains"]`, which the app resolves from a list it bundles. A narrower rule in code would only allow `accounts.google.<ccTLD>/accounts/SetSID`. Either way this changes the catalog or its schema, so it is decided in P2 with the maintainer's approval.
|
||||
- **Sessions must be checked, not assumed.** The P2 exit criterion "stays signed in across hibernation" makes the unexplained loss a real risk:
|
||||
- P2 dogfoods with Chromium logging available;
|
||||
- the web runner records whether each app comes back signed in after a restart. The `--check-signed-in` probes become a debug-only health check;
|
||||
- the bug report includes per-profile cookie-store counts, never cookie values.
|
||||
- If the loss comes back, it gets investigated before 0.2.0.
|
||||
- **Default user agent only:** this works today, and there is no spoofing. Because client hints name WebView2, Google could block it later. The roadmap's mitigation still applies: document it as an upstream limitation.
|
||||
- **New-device flows** (Facebook's checkpoint, Google's prompts including the selfie check) need full in-app navigation within the entry's domains, which works.
|
||||
|
||||
## Reproduce
|
||||
|
||||
On `spike/p0`:
|
||||
|
||||
```powershell
|
||||
dotnet run --project spikes/WebLab -- "--wv2-args=--enable-logging --v=0" # sign in by hand, then close
|
||||
dotnet run --project spikes/WebLab -- --check-signed-in # SIGNED-IN lines in weblab\*.log
|
||||
dotnet run --project spikes/WebLab -- --cookie-set=probe1 # then --cookie-check
|
||||
```
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
**Question:** what do web apps really cost in each governor state, and which memory metric do the caps use?
|
||||
**Decision:** GO. The governor measures **private commit** (`Process.PrivateMemorySize64`), summed over the shell and every WebView2 process. Suspension mostly trims the working set rather than freeing memory, so a working-set metric would reward exactly that trimming. The ladder's real memory saving comes from hibernation.
|
||||
**Measured:** 2026-10-30 on `spike/p0` at `ec79454`: the `WebLab --measure` run (60 s phases, a sample every 2 s) plus the maintainer's own interactive session. Issue [#4](https://github.com/poli0981/OmniDeck/issues/4).
|
||||
**Measured:** 2026-10-30 on `spike/p0`: the `WebLab --measure` run at `ec79454` (60 s phases, a sample every 2 s), the signed-in Gmail ladder at `3eae21e`, and the maintainer's own interactive session. Issue [#4](https://github.com/poli0981/OmniDeck/issues/4).
|
||||
|
||||
## Environment
|
||||
|
||||
@@ -51,9 +51,20 @@
|
||||
| Disposed | 0 | 0 | 0 | 0 | 0 |
|
||||
| Reopened | 180 | 164 | 263 | 123 | 3.1 |
|
||||
|
||||
**Gmail, signed in** (measured after the sign-in re-test in spike #2; still signed in after the reopen)
|
||||
|
||||
| State | App commit | App private WS | Shared commit | Shared private WS | CPU (ms/s) |
|
||||
|---|---|---|---|---|---|
|
||||
| Active | 253 | 234 | 269 | 130 | 19.4 |
|
||||
| Hidden | 214 | 198 | 248 | 119 | 1.3 |
|
||||
| Suspended + Low | 196 | 65 | 248 | 58 | 0.3 |
|
||||
| Resumed | 221 | 148 | 261 | 39 | 17.6 |
|
||||
| Disposed | 0 | 0 | 0 | 0 | 0 |
|
||||
| Reopened | 255 | 236 | 254 | 122 | 25.7 |
|
||||
|
||||
- **Shell:** the WPF window itself used 93–130 MB of private commit throughout.
|
||||
- **Suspend and resume:** `TrySuspendAsync` returned `true` in 0–4 ms, and resuming took 1–5 ms.
|
||||
- **Reopen after dispose:** 155–165 ms until the controller was ready, and 590–900 ms until the first `NavigationCompleted`.
|
||||
- **Reopen after dispose:** 155–176 ms until the controller was ready, and 590–900 ms until the first `NavigationCompleted` (2.5 s for signed-in Gmail).
|
||||
- **One stall:** creating a controller while the previous browser process was still shutting down took 5.2 s once.
|
||||
|
||||
### Everything at once (MB)
|
||||
@@ -73,7 +84,7 @@ In the maintainer's session:
|
||||
|
||||
## Analysis
|
||||
|
||||
- **Hiding** a web app already releases 18–31 % of its committed memory, because Chromium drops caches for hidden pages.
|
||||
- **Hiding** a web app already releases 15–31 % of its committed memory, because Chromium drops caches for hidden pages.
|
||||
- **Suspend + Low** cuts the private working set by 65–70 % but committed memory by only 5–15 %. The pages move to the standby list or the page file; they are not released. After resume the working set stays low until those pages are touched again.
|
||||
|
||||
A working-set metric would therefore read low exactly when nothing has been freed. That is the page shuffling [RAM-GOVERNOR](../RAM-GOVERNOR.md#4-cap-enforcement) §4 rejects.
|
||||
@@ -91,7 +102,7 @@ In the maintainer's session:
|
||||
|
||||
## Open items
|
||||
|
||||
- **Gmail:** Gmail signed in was not measured, because the profile had lost its session (spike #2). It will be measured after the persistence check. This does not affect the metric decision.
|
||||
- ~~**Gmail:** Gmail signed in was not measured, because the profile had lost its session (spike #2).~~ Done after the sign-in re-test; see the Gmail table above. The same pattern holds: hiding −15 % commit, suspend + Low −8 % more commit but −67 % private working set.
|
||||
- **8 GB machines:** every number here comes from a 32 GB machine. Re-measure on a GA build of Windows 11 with 8 GB of RAM during P2 dogfooding.
|
||||
|
||||
## Reproduce
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
# Spike 04 — CDP console capture
|
||||
|
||||
**Question:** can the web runner keep a per-app console ring buffer through the DevTools Protocol, safely and cheaply?
|
||||
**Decision:** GO. Capture through `Runtime.enable` + `Log.enable` works with the DevTools UI disabled. The widely used page-side check did not detect it, its cost was too small to measure, and signed-in apps kept working with it on. Capture stays on for every web app.
|
||||
**Measured:** 2026-10-30 on `spike/p0`: the `WebLab --auto` run (`0fe4b12`), the `--measure` run (`ec79454`) and the `--check-signed-in` run (`3eae21e`). Issue [#5](https://github.com/poli0981/OmniDeck/issues/5).
|
||||
|
||||
## Environment
|
||||
|
||||
- WebView2 Runtime 156.0.4314.50, with `AreDevToolsEnabled = false` (the release setting) on every view.
|
||||
- The capture subscribes to `Runtime.consoleAPICalled`, `Runtime.exceptionThrown` and `Log.entryAdded` through `GetDevToolsProtocolEventReceiver`, after `CallDevToolsProtocolMethodAsync("Runtime.enable" / "Log.enable")`.
|
||||
- It feeds a 200-entry ring buffer per app.
|
||||
|
||||
## Method
|
||||
|
||||
- **Detection page** (`LabPages/cdp-detect.html`): logs an `Error` whose `stack` getter has a side effect. Only a DevTools client that serializes console arguments would read it. The page then emits `console.log`, `console.warn`, an uncaught exception and a failing fetch. It is checked with capture off, with Runtime + Log, and with Log only.
|
||||
- **Signed-in apps:**
|
||||
- Discord, Gmail and Spotify run with capture off for 60 s, on for 60 s, then reload with capture on;
|
||||
- separately, signed-in Gmail reloads with capture on.
|
||||
|
||||
## Results
|
||||
|
||||
| Mode | Detected by the page? | Captured |
|
||||
|---|---|---|
|
||||
| off | no | nothing |
|
||||
| Runtime + Log | **no** | `console.debug/log/warn/error`, uncaught exceptions (`Runtime.exceptionThrown`), network errors such as a 404 (`Log.entryAdded`) |
|
||||
| Log only | no | network and browser messages only; **not** `console.*` calls |
|
||||
|
||||
- **DevTools UI:** capture works with it disabled. Turning capture on took 4–24 ms per app (230 ms once, on Spotify).
|
||||
- **Signed-in apps:**
|
||||
- Discord, signed in, reloaded fine with capture on;
|
||||
- Gmail, signed in, reloaded with capture on and stayed signed in, with 12 entries captured;
|
||||
- no captcha or sign-out appeared.
|
||||
- **Cost:**
|
||||
- Across the three apps, committed memory was 1,057 MB with capture off, 1,041 MB with it on, and 988 MB after the reloads. The difference is within noise.
|
||||
- CPU was dominated by the apps themselves.
|
||||
- The buffer itself is at most 200 short strings per app.
|
||||
- **Volume:**
|
||||
- Discord logged 86 entries in about 2 minutes, mostly debug lines styled with `%c` CSS arguments. A 200-entry ring holds about 4–5 minutes of Discord.
|
||||
- Gmail and Spotify were far quieter: interventions, and Tracking Prevention warnings on Spotify's login page.
|
||||
- **Personal data:** console lines carry it. Discord logs the user's numeric ID, for example.
|
||||
- **Not the alternative:** Chromium's own `--enable-logging` also records console messages, but in one global file shared by every app, including personal data. It is a diagnostic switch, not the capture mechanism.
|
||||
|
||||
## Consequences
|
||||
|
||||
- **Always on:** the web runner enables `Runtime` + `Log` for each web app when its view is created, and keeps the DevTools UI disabled. Capture stops with the view when it is disposed.
|
||||
- **Two buffers per app:** a 200-entry ring for everything, and a 50-entry ring for errors and uncaught exceptions only, so debug chatter cannot evict the lines a bug report needs.
|
||||
- **Formatting:** apply `%c` / `%s` format arguments when rendering, and drop the CSS.
|
||||
- **Privacy:** console lines go through the bug-report scrubber (SPEC §6) like the logs do. Nothing is captured to disk until the user starts a report.
|
||||
- **Watch:** this held on runtime 156. If a provider starts flagging `Runtime.enable` (captchas, sign-outs), the fallback is to enable capture only while a bug report is being recorded.
|
||||
|
||||
## Reproduce
|
||||
|
||||
On `spike/p0`:
|
||||
|
||||
```powershell
|
||||
dotnet run --project spikes/WebLab -- --auto # detection and capture modes
|
||||
dotnet run --project spikes/WebLab -- --check-signed-in # signed-in Gmail reload with capture on
|
||||
```
|
||||
@@ -0,0 +1,90 @@
|
||||
# Spike 06 — LibVLCSharp in WPF (airspace, fullscreen)
|
||||
|
||||
**Question:** does LibVLCSharp's `VideoView` work inside a WPF-UI `FluentWindow` with overlay controls and a fullscreen toggle?
|
||||
**Decision:** GO with conditions. Inside a Mica `FluentWindow`, `VideoView` plays with hardware decoding, and WPF overlay controls and subtitles draw correctly above the video. Fullscreen works by resizing the shell window over the monitor. FlyleafLib is not needed. Three conditions:
|
||||
- moving a playing player to another window (pop-out) needs a video-output restart plus a seek;
|
||||
- the pop-out's overlay was clipped once;
|
||||
- with the SPEC plugin set, libVLC adds about 39 MB compressed to the installer.
|
||||
|
||||
**Measured:** 2026-10-30 on `spike/p0` at `2a87046` (`spikes/MediaLab`): the `--auto` and `--auto-move` runs on the trimmed plugin build, with every screen capture checked by eye. Issue [#7](https://github.com/poli0981/OmniDeck/issues/7).
|
||||
|
||||
## Environment
|
||||
|
||||
- LibVLCSharp.WPF 3.10.2 and VideoLAN.LibVLC.Windows 3.0.24 (libVLC 3.0.24 "Vetinari"); WPF-UI 4.3.0; .NET 10.0.14.
|
||||
- One 2560×1440 monitor at 100 % scale; RTX 5080 (D3D11VA); Windows Insider build 29648.
|
||||
- Test media, generated locally with ffmpeg so nothing was downloaded:
|
||||
- H.264/AAC 1080p30, 60 s;
|
||||
- H.264/AAC 2160p60, 20 s;
|
||||
- an external `.srt` with Vietnamese and Japanese text.
|
||||
|
||||
## Method
|
||||
|
||||
MediaLab is a `FluentWindow` (Mica, `ui:TitleBar`) holding a `VideoView`. The view's WPF content is a badge in the top-right corner and a control bar (`ui:Button`, `Slider`, time).
|
||||
|
||||
The `--auto` run:
|
||||
1. plays the 1080p clip and adds the `.srt`;
|
||||
2. toggles fullscreen in place;
|
||||
3. opens a fullscreen window and a pop-out, each with and without restarting the video output;
|
||||
4. hides and shows the main window;
|
||||
5. plays the 2160p60 clip.
|
||||
|
||||
At every step it captures the screen as DWM composited it, because the video and the overlay are separate windows and only the screen shows how they combine. It also logs libVLC warnings, frame statistics, CPU and private commit. `--auto-move` repeats the hand-over to another window with a seek, capturing at 0.5 s and 2 s.
|
||||
|
||||
## Results
|
||||
|
||||
| Check | Result |
|
||||
|---|---|
|
||||
| WPF overlay above the video (airspace) | OK. LibVLCSharp's overlay window draws the WPF controls above the video, translucent backgrounds included |
|
||||
| External subtitles (`.srt`, UTF-8, Vietnamese and Japanese) | OK |
|
||||
| Fullscreen in place: shell window resized to the monitor, chrome hidden, corners square | OK, playback never interrupted |
|
||||
| Hand-over to another window, as is | **No.** The video keeps drawing into the original window, and the new window stays black |
|
||||
| … after re-selecting the video track | The new window shows video, corrupted until the next keyframe (several seconds) |
|
||||
| … after re-selecting the track and seeking to the current time | **OK.** A clean picture within 0.5 s, in both directions |
|
||||
| Pop-out into a second `FluentWindow` | Video OK. The overlay button was clipped on its right side once |
|
||||
| Hide and show (tray) | Overlay and playback come back |
|
||||
| Hardware decoding (D3D11VA) | 1080p30 and 2160p60 with 0 lost frames, at under 1 % CPU (of 28 logical cores) |
|
||||
|
||||
**Memory** (private commit; libVLC runs inside the shell process):
|
||||
|
||||
| Moment | Private commit |
|
||||
|---|---|
|
||||
| before libVLC loads | 45 MB |
|
||||
| libVLC loaded | 116 MB |
|
||||
| playing 1080p30 | 284 MB |
|
||||
| playing 2160p60 | 522 MB |
|
||||
| after `Stop` | 324 MB |
|
||||
|
||||
**Size**, x64 only. The package also copies its x86 and ARM64 builds unless `VlcWindowsX86Enabled` and `VlcWindowsArm64Enabled` are set to `false`.
|
||||
|
||||
| Plugin set | Raw | Zip (deflate, level 9) |
|
||||
|---|---|---|
|
||||
| Full (321 plugins) | 106 MB | 48 MB |
|
||||
| SPEC set (267 plugins) | 86 MB | 39 MB |
|
||||
|
||||
The SPEC set keeps the plugin folders access, audio filter, audio mixer, audio output, codec, demux, packetizer, stream filter, text renderer, spu, video chroma, video filter, video output and misc. The largest files are `libavcodec` (18 MB), `access/srt` (4 MB; network streaming only, removable for local files), `libass` (3.4 MB) and `freetype` (3 MB).
|
||||
|
||||
## Consequences
|
||||
|
||||
- **Engine:** LibVLCSharp with libVLC 3.0.x, as [SPEC](../SPEC.md#36-media-player) §3.6 says. FlyleafLib stays unused.
|
||||
- **Fullscreen:** the module's own window (main or pop-out) covers the monitor; the player never moves to a separate fullscreen window. This passes the fullscreen part of [WPFUI-CONVENTIONS](../WPFUI-CONVENTIONS.md#8-hard-rules) §8.
|
||||
- **Pop-out:** move the player to the new `VideoView`, re-select the video track, and seek to the current time. Pop-out ships only after P2 fixes the overlay's sizing in a newly created window and re-tests it, as §8 requires.
|
||||
- **Build:**
|
||||
- set `VlcWindowsX86Enabled` and `VlcWindowsArm64Enabled` to `false` and use the SPEC include list;
|
||||
- consider dropping the network access plugins (srt and others), since playback is local-file only;
|
||||
- libVLC is the largest single component in the installer, at about 39 MB compressed. THIRD-PARTY-NOTICES gets its entry in P2, with approval.
|
||||
- **Governor:** playback holds 280–520 MB committed in the shell process, and `Stop` alone kept 324 MB. `SuspendAsync` therefore stops and disposes the `MediaPlayer`, and `HibernateAsync` disposes the `LibVLC` instance as well.
|
||||
- **Not tested:** a second monitor and per-monitor DPI changes, because only one monitor was available. Check them in P2 once the media module exists.
|
||||
- **Log noise:** filter these harmless libVLC messages out of the app log:
|
||||
- `option quiet does not exist`;
|
||||
- `SetThumbNailClip failed` (a fullscreen window without a taskbar button);
|
||||
- `not enough decoding slices`.
|
||||
|
||||
## Reproduce
|
||||
|
||||
On `spike/p0`, with the test clips from `spikes/README.md`:
|
||||
|
||||
```powershell
|
||||
dotnet build spikes/MediaLab -c Release -p:TrimVlc=true
|
||||
spikes\MediaLab\bin\Release\net10.0-windows\win-x64\MediaLab.exe --auto
|
||||
spikes\MediaLab\bin\Release\net10.0-windows\win-x64\MediaLab.exe --auto-move --seek-on-move
|
||||
```
|
||||
@@ -16,11 +16,11 @@ P0 runs from 2 to 15 November 2026 ([ROADMAP](../ROADMAP.md#1-phases)). Its job
|
||||
| # | Spike | Blocks | Decision | Note |
|
||||
|---|---|---|---|---|
|
||||
| 1 | DRM / Widevine in WebView2 | P2: Spotify catalog entry | **GO:** the runtime ships Widevine and Spotify plays, with no flags | [01-drm-widevine.md](01-drm-widevine.md) |
|
||||
| 2 | Google sign-in and SSO popups | P2: `google` profile group, Spotify sign-in | Pending ([#3](https://github.com/poli0981/OmniDeck/issues/3)) | `02-google-sign-in.md` |
|
||||
| 2 | Google sign-in and SSO popups | P2: `google` profile group, Spotify sign-in | **GO with conditions:** sign-ins work and persist; Google's ccTLD hop needs `navAllow` support; one unexplained session loss is watched in P2 | [02-google-sign-in.md](02-google-sign-in.md) |
|
||||
| 3 | Memory reality check and governor metric | **P1**: RAM governor ([§4](../RAM-GOVERNOR.md#4-cap-enforcement)) | **GO:** the metric is private commit; suspend trims, only hibernate frees memory | [03-memory.md](03-memory.md) |
|
||||
| 4 | CDP console capture | P2: bug-report flow | Pending ([#5](https://github.com/poli0981/OmniDeck/issues/5)) | `04-cdp-console.md` |
|
||||
| 4 | CDP console capture | P2: bug-report flow | **GO:** always on, works with the DevTools UI disabled, not detected, no measurable cost | [04-cdp-console.md](04-cdp-console.md) |
|
||||
| 5 | Runtime preset swap | **P1**: theme engine | **GO with conditions:** `Od` styles for WPF-UI's static keys, motion driven from code, text size from the registry | [05-theme-swap.md](05-theme-swap.md) |
|
||||
| 6 | LibVLCSharp in WPF (airspace, fullscreen) | P2: media player | Pending ([#7](https://github.com/poli0981/OmniDeck/issues/7)) | `06-libvlcsharp.md` |
|
||||
| 6 | LibVLCSharp in WPF (airspace, fullscreen) | P2: media player | **GO with conditions:** overlay and fullscreen in place work; pop-out needs a vout restart + seek; about 39 MB compressed | [06-libvlcsharp.md](06-libvlcsharp.md) |
|
||||
| 7 | Stock data providers | P3: stocks | **GO with conditions:** Twelve Data with the user's key is the only provider; Stooq NO-GO | [07-providers.md](07-providers.md) |
|
||||
|
||||
The two spikes that block P1 (#3 and #5) go first. A spike that only blocks P2 or P3 may run on into the first weeks of P1, but its note still has to land before the phase it blocks starts.
|
||||
|
||||
Reference in new issue
Block a user