Commit the pending application, help and browser regression work. Pin the patched PKCS dependency for the production release.
36 lines
5.9 KiB
Markdown
36 lines
5.9 KiB
Markdown
# Desktop promotion
|
||
|
||
Browser-only enhancement in `desktop-promotion.js`, using the existing parser-blocking `PlotDirectorPwa.standalone` state and `application-pwa.js` captured install prompt. No new database schema, analytics service or right-click/ribbon changes.
|
||
|
||
Eligibility uses the navigation service's already-authorised project and non-archived books, on Timeline, Plot Lines, Story Bible or another substantive workspace. A short delay avoids interrupting initial rendering; visible dialogs, a hidden tab or active Story Intelligence progress suppress automatic opening on that navigation. The manual account-menu entry works without automatic eligibility.
|
||
|
||
State is account-scoped in device/browser localStorage (`plotdirector.desktop.v1.<userId>`): first presentation, dismissal, manual reopen, reminder and installation detection. First automatic presentation is recorded before opening, preventing repeats even if navigation interrupts it. After 30 days from the latest presentation/dismissal/reminder, only a smaller reminder appears. Its timestamp is persisted immediately. Storage errors disable automatic promotion; manual access remains available. Browser storage clearing resets this state.
|
||
|
||
Standalone overrides everything and does not create the overlay or request screenshots. A detected installation also suppresses future automatic promotions locally. Browsers cannot reliably detect all installed copies from a tab: the manifest does not declare a related installed app, and `getInstalledRelatedApps` cannot supply a portable universal signal. We use actual standalone state and `appinstalled`; a prompt's accepted outcome alone never displays success. Local installed suppression may outlive an uninstall; manual access remains available in a browser tab.
|
||
|
||
Chrome and Edge desktop are the established install-help paths. Official browser documentation was checked for those menus and Safari's macOS Sonoma+ Add to Dock flow; iOS/Android receive manual guidance. Other browsers receive current Chrome/Edge guidance without a one-click promise. No additional browser support contract is introduced. Private browsing and organisation policy can prevent installation.
|
||
|
||
The two supplied PNG files are preserved byte-for-byte. Their widths match (1710); the one-pixel source height difference (919 vs 920) is normalised to the same 1710:920 frame. Both images always have identical geometry. They are only fetched when the comparison is opened. Narrow screens retain a larger scrollable comparison plus a full-width accessible slider rather than tiny UI text.
|
||
|
||
The native HTML dialog supplies modal semantics and inert background, with explicit boundary Tab cycling, Escape dismissal and focus restoration. Reduced motion disables the single first-presentation hint. Palette tokens support all six themes. No first-Desktop-launch welcome was added: the requested comparison and install flow remain the scope. No new analytics/admin persistence was introduced for device-local promotion state.
|
||
|
||
## Verification — 30 October 2026
|
||
|
||
Dev release: `340c5e3-desktop-promotion-worktree-20261030T212452Z` (existing worktree preserved). Published/deployed DLL SHA-256: `5a58fce18c75cc6dc011cab2b003a49a857e08e4895c2c07a67c2aaed9d248b9`. Release archive includes the source patch and untracked files; timestamped prior-directory backup retained. Production untouched.
|
||
|
||
- `dotnet build PlotLine.slnx`: passed (existing dependency vulnerability/nullable warnings remain).
|
||
- Executable regression harness: passed.
|
||
- Focused `desktop-promotion.cjs` and existing `application-pwa.cjs`: passed.
|
||
- Authenticated public Dev Chromium checks: passed; all six theme previews inspected, 1440×1100 and 390×844; sticky Install/Continue actions remain within the viewport. Genuine supplied screenshots decoded, mouse/keyboard divider, persisted dismissal, manual account-menu reopen and Help verified.
|
||
- Real Chromium CDP app install/standalone launch/uninstall: passed. No promotion or install entry in installed mode. Parser-paused first paint checks report zero workspace shift for cold launch, navigation, reload and browser stale-state cases.
|
||
- Native prompt mechanism tested with controlled browser events in the isolated fixture. Non-promptable fallback exercised deterministically in Dev; real installation completion verified through Chromium CDP. Automated tests cannot confirm the user's operating-system installation consent UI across Edge/Safari/mobile. Those platforms receive documented manual guidance when no captured prompt exists.
|
||
- Service active, local/public GET 200, published/deployed hashes match. Preflight verified Development database and no active/queued background runs before deployment. Isolated Dev identity uses normal account/project/book workflows and is removed through the established cleanup command.
|
||
|
||
Private operational logs and publish output live under `/var/tmp/pd-desktop-promotion-work`; theme previews under `/tmp/pd-desktop-promotion-*.png`. No credential files are committed.
|
||
|
||
## Divider scroll correction — 30 October 2026
|
||
|
||
Pointer dragging now focuses the keyboard range with `preventScroll: true` and prevents the pointer's default focus handling. Previously that range, below the screenshot, scrolled into view and moved the dialog 227 pixels in a 1440×900 reproduction. Focus and keyboard adjustment are preserved. Both isolated and authenticated Dev regression checks assert unchanged dialog scroll position after dragging. Both passed; installed-app first-paint checks still measured zero shift.
|
||
|
||
Deployed only the static JavaScript atomically to Dev without a service restart; previous script retained at `/var/tmp/pd-desktop-divider-fix/previous.js`. Source, deployed and HTTPS-served script SHA-256 match: `9a90902d27fba4bd1e979b21042f69405df9b20bade2b4371b8edf0c7cfddcdf`. No application DLL or Production changes. Verification log: `/var/tmp/pd-desktop-divider-fix/browser.log`. Dedicated test identity and fixture project/book removed through the established cleanup workflow.
|