Capture walkthroughs online in a separate tool, then merge them into the document offline #28

Closed
opened 2026-11-24 19:47:52 +00:00 by eric · 0 comments
Owner

Problem

Today, walkthroughs are captured with "Capture from screen…" inside the main app, in Edit mode. That means the unlocked document (with all its secrets) is open in a browser that is also online, logged in to a bank or brokerage. I want to shrink that attack surface: the machine/browser that touches the internet should never hold the decrypted document.

Goal

Split capture from editing:

  1. Online, capture only. A separate tool captures walkthroughs while connected. It has no access to the document and no secrets in it.
  2. Offline, merge. Later, when not on the internet, I open the main app and merge the captured walkthroughs into the document, choosing where each goes.

I can capture one walkthrough at a time (one bank, then later another) or several in one sitting (bank A, bank B, brokerage), then merge whenever I like, in one batch or piecemeal.

Decisions (agreed)

  • Capture tool is a separate standalone HTML file (e.g. capture.html, built by build.js like the main file). Same style: single file, no dependencies, no network calls, no install. It contains no document and no personal data.
  • Capture only. The tool grabs frames and lets me title each walkthrough. All annotation (step text, if-stuck text, markers, boxes, blur, stop flags, credential references) happens offline in the main app after merge.
  • Export bundle is encrypted with its own passphrase (same PBKDF2 + AES-GCM format family as the main file), because screenshots of bank pages can show balances and account numbers. The passphrase is entered again at merge time. Never stored.
  • Merge happens in the main app, offline, with a destination chosen per walkthrough: pick the section, records list and sub-tab, or leave it unplaced to decide later.

Scope

Capture tool

  • Start/name a walkthrough, capture frames from the screen (reuse getDisplayMedia approach from images.js), reorder/delete frames, capture several walkthroughs in one session.
  • Same image pipeline as the main app: sniff, downscale to 1600 px, re-encode (strips metadata), ~3 MB per image limit.
  • Export a bundle file (.fwcapture or similar). Can export several walkthroughs in one bundle; can export more than once.
  • Bundle gets a format marker + version, authenticated header, like the main blob.
  • Nothing persisted in the browser (no localStorage, no IndexedDB). Closing the tab loses unexported captures, and the UI should say so.

Merge in main app

  • New "Import captured walkthroughs…" action, available only when the document is unlocked.
  • Choose the bundle file, enter its passphrase, preview the walkthroughs it contains.
  • For each walkthrough: choose destination (section / records list / sub-tab, or text section's sequences), or defer it.
  • Imported sequences get fresh ids that are unique across the document, captured date set from the bundle, frames converted through addCapture()-style logic in ops.js.
  • Nothing is written until Save, same as other edits. Cancel reverts.
  • Reject bad/corrupt bundles and wrong passphrases with a clear message; never partially merge.

Open questions for implementation

  • Bundle file extension and magic bytes (suggest "FC" 0x01 to differ from "FW").
  • Whether deferred ("unplaced") walkthroughs live in a holding area in the document or just stay in the bundle until the next merge. Simplest: they stay in the bundle, so merge is re-runnable and you only pick what to bring in.
  • Should the existing in-app "Capture from screen…" stay? Suggest yes for now, maybe with a note that capturing online is better done via the capture tool.

Security notes

  • The capture tool must have no code path that reads the main document or its passphrase.
  • Document in README / docs/thumbdrive/README.txt the recommended flow: capture online with capture.html → copy bundle → open main file offline → import → delete the bundle.
  • Consider a "delete the bundle after import" reminder, since the bundle holds sensitive screenshots.

Tests

  • Bundle encrypt/decrypt round trip, wrong passphrase, tampered header/ciphertext.
  • Merge ops are pure and tested in ops.js: ids unique, destination handling, validate() passes afterward.
  • Build test: capture.html builds, contains no payload document and no reference to the main app state.
## Problem Today, walkthroughs are captured with "Capture from screen…" inside the main app, in Edit mode. That means the unlocked document (with all its secrets) is open in a browser that is also online, logged in to a bank or brokerage. I want to shrink that attack surface: the machine/browser that touches the internet should never hold the decrypted document. ## Goal Split capture from editing: 1. **Online, capture only.** A separate tool captures walkthroughs while connected. It has no access to the document and no secrets in it. 2. **Offline, merge.** Later, when not on the internet, I open the main app and merge the captured walkthroughs into the document, choosing where each goes. I can capture one walkthrough at a time (one bank, then later another) or several in one sitting (bank A, bank B, brokerage), then merge whenever I like, in one batch or piecemeal. ## Decisions (agreed) - **Capture tool is a separate standalone HTML file** (e.g. `capture.html`, built by `build.js` like the main file). Same style: single file, no dependencies, no network calls, no install. It contains no document and no personal data. - **Capture only.** The tool grabs frames and lets me title each walkthrough. All annotation (step text, if-stuck text, markers, boxes, blur, stop flags, credential references) happens offline in the main app after merge. - **Export bundle is encrypted with its own passphrase** (same PBKDF2 + AES-GCM format family as the main file), because screenshots of bank pages can show balances and account numbers. The passphrase is entered again at merge time. Never stored. - **Merge happens in the main app, offline**, with a destination chosen per walkthrough: pick the section, records list and sub-tab, or leave it unplaced to decide later. ## Scope ### Capture tool - Start/name a walkthrough, capture frames from the screen (reuse `getDisplayMedia` approach from `images.js`), reorder/delete frames, capture several walkthroughs in one session. - Same image pipeline as the main app: sniff, downscale to 1600 px, re-encode (strips metadata), ~3 MB per image limit. - Export a bundle file (`.fwcapture` or similar). Can export several walkthroughs in one bundle; can export more than once. - Bundle gets a format marker + version, authenticated header, like the main blob. - Nothing persisted in the browser (no `localStorage`, no IndexedDB). Closing the tab loses unexported captures, and the UI should say so. ### Merge in main app - New "Import captured walkthroughs…" action, available only when the document is unlocked. - Choose the bundle file, enter its passphrase, preview the walkthroughs it contains. - For each walkthrough: choose destination (section / records list / sub-tab, or text section's sequences), or defer it. - Imported sequences get fresh ids that are unique across the document, `captured` date set from the bundle, frames converted through `addCapture()`-style logic in `ops.js`. - Nothing is written until Save, same as other edits. Cancel reverts. - Reject bad/corrupt bundles and wrong passphrases with a clear message; never partially merge. ## Open questions for implementation - Bundle file extension and magic bytes (suggest `"FC"` 0x01 to differ from `"FW"`). - Whether deferred ("unplaced") walkthroughs live in a holding area in the document or just stay in the bundle until the next merge. Simplest: they stay in the bundle, so merge is re-runnable and you only pick what to bring in. - Should the existing in-app "Capture from screen…" stay? Suggest yes for now, maybe with a note that capturing online is better done via the capture tool. ## Security notes - The capture tool must have no code path that reads the main document or its passphrase. - Document in `README` / `docs/thumbdrive/README.txt` the recommended flow: capture online with `capture.html` → copy bundle → open main file offline → import → delete the bundle. - Consider a "delete the bundle after import" reminder, since the bundle holds sensitive screenshots. ## Tests - Bundle encrypt/decrypt round trip, wrong passphrase, tampered header/ciphertext. - Merge ops are pure and tested in `ops.js`: ids unique, destination handling, validate() passes afterward. - Build test: `capture.html` builds, contains no `payload` document and no reference to the main app state.
eric closed this issue 2026-11-27 20:41:15 +00:00
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: eric/final-wishes#28
No description provided.