Skip to content

feat: diff images, secret snippets, retagging, and a tooltip sweep - #11

Merged
mindaugaskasp merged 1 commit into
mainfrom
feat/diff-image-secret-snippets
Jul 31, 2026
Merged

feat: diff images, secret snippets, retagging, and a tooltip sweep#11
mindaugaskasp merged 1 commit into
mainfrom
feat/diff-image-secret-snippets

Conversation

@mindaugaskasp

Copy link
Copy Markdown
Owner

Several related pieces of work; they share files (diffStore, DiffViewer), so they land together rather than as artificially split commits that would not build in between.

Diff image export

  • Scroll-and-stitch: a diff taller than the pane is captured a viewport at a time and joined in main from raw BGRA rows (no new dependency). A single capturePage can never exceed the pane — Monaco keeps no offscreen lines in the DOM.
  • Wait for Monaco's diff WORKER before the shutter. Counting frames photographed the files with no highlights, which read as "no differences".
  • Select lines in either pane to export just those; the selection follows the pane last used, and is hidden from the picture.
  • Ceiling is configurable (Settings -> Limits) in SCREEN pixels, so the same diff captures the same amount on any display scale. Main keeps its own pixel/height backstop — it must not trust a renderer loop.
  • Preview data URL is downscaled; full resolution stays in main for copy/save, and the PNG is encoded lazily.

Secret snippets

  • Mark a snippet secret: contents never render in the editor, hover card or launcher, but still copy in full. Monaco is unmounted while masked, so the plaintext is not in the DOM at all.
  • Fixed-width mask (a length-preserving one would leak the size), and a secret is never decrypted just to be previewed.
  • Masking sits on top of the encryption every snippet already has.

Saved diffs

  • Fix "Untagged" on a tagged diff: the format was stored both on entry.format and injected into tags, then subtracted back out, so a user tag matching the format vanished.
  • Retag a saved diff from its row (setTags had no caller).
  • Stop the "both sides are identical" banner flashing on every diff opened: Monaco returns null until its worker lands, and null was folded into zeros.

Tooltips

  • Interactive controls move from native title, which Electron often never draws, to the app's own tooltip; the search toggles now explain what they do. Long tips wrap and are clamped inside the window.
  • Icon-only controls gained accessible names; e2e locators that found controls by title updated to match.

Verified: npm run check (1012 tests) and the full Docker e2e suite (139 passed, 2 skipped).

Several related pieces of work; they share files (diffStore, DiffViewer),
so they land together rather than as artificially split commits that
would not build in between.

Diff image export
- Scroll-and-stitch: a diff taller than the pane is captured a viewport
  at a time and joined in main from raw BGRA rows (no new dependency).
  A single capturePage can never exceed the pane — Monaco keeps no
  offscreen lines in the DOM.
- Wait for Monaco's diff WORKER before the shutter. Counting frames
  photographed the files with no highlights, which read as "no
  differences".
- Select lines in either pane to export just those; the selection
  follows the pane last used, and is hidden from the picture.
- Ceiling is configurable (Settings -> Limits) in SCREEN pixels, so the
  same diff captures the same amount on any display scale. Main keeps
  its own pixel/height backstop — it must not trust a renderer loop.
- Preview data URL is downscaled; full resolution stays in main for
  copy/save, and the PNG is encoded lazily.

Secret snippets
- Mark a snippet secret: contents never render in the editor, hover card
  or launcher, but still copy in full. Monaco is unmounted while masked,
  so the plaintext is not in the DOM at all.
- Fixed-width mask (a length-preserving one would leak the size), and a
  secret is never decrypted just to be previewed.
- Masking sits on top of the encryption every snippet already has.

Saved diffs
- Fix "Untagged" on a tagged diff: the format was stored both on
  entry.format and injected into tags, then subtracted back out, so a
  user tag matching the format vanished.
- Retag a saved diff from its row (setTags had no caller).
- Stop the "both sides are identical" banner flashing on every diff
  opened: Monaco returns null until its worker lands, and null was
  folded into zeros.

Tooltips
- Interactive controls move from native `title`, which Electron often
  never draws, to the app's own tooltip; the search toggles now explain
  what they do. Long tips wrap and are clamped inside the window.
- Icon-only controls gained accessible names; e2e locators that found
  controls by `title` updated to match.

Verified: npm run check (1012 tests) and the full Docker e2e suite
(139 passed, 2 skipped).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@mindaugaskasp
mindaugaskasp merged commit 37f10c1 into main Jul 31, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant