openpencil/crates
Kayshen-X 47d2e185e2 fix(html): make web-snapshot text, icon and layout capture faithful
A capture of a real page (search results, marketing sites) came in
with smeared paragraphs, invisible gradient headings, mistinted icons
and a mid-page navbar. Each had a distinct root cause in how the
extractor read the DOM or how the importer re-laid it out:

- Fold gates: Chrome computes the -webkit-line-clamp idiom as
  flow-root, and undecorated single-line inline-block chips (search
  result dates) are text flow — both blocked the inline fold and left
  per-child union rects painting over each other.
- Partial folding: consecutive inline-flow children between
  block-level siblings fold as runs, so a paragraph interrupted by a
  list still folds the text around it. Script/style sources and
  display:none subtrees are excluded from the folded segments.
- Per-line splitting: a wrapped bare text run that cannot fold is
  emitted as one node per line box (binary search over character
  offsets), each at its true rect — the union box anchored every line
  at the block's left edge and overlapped whatever shared those lines.
- Line counting: vertical-band grouping with a mostly-overlapping
  criterion, so nested-span fragments and bidi runs do not over-report
  and tight display leading (line-height 1.05 under a CJK glyph box)
  does not merge real lines into one.
- Single-line leading clamp: the capture measures glyph boxes, so the
  page's half-leading is already in the captured y; re-applying a
  vertically-centring line-height (40px footers) pushed runs a dozen
  pixels below their neighbours.
- Gradient text: background-clip:text moves the box fill onto the
  descendants' glyphs (first gradient stop) instead of painting a bar
  over transparent text; -webkit-text-fill-color wins over color.
- Icon paint: each shape's computed fill/stroke is inlined into the
  serialized svg clone — a standalone data URI loses the stylesheet
  rule that actually painted the icon, and currentColor then leaked
  the inherited theme accent.
- Multi-colour flat svg art becomes one path node per consecutive
  same-fill group instead of an undecodable raster fallback.
- position:fixed subtrees capture in viewport coordinates; adding the
  scroll offset dropped a scrolled page's navbar into mid-document.
- The element-picker overlay marks itself data-openpencil-ui and the
  extractor skips it.
2026-08-05 22:15:09 +08:00
..
op-acp fix(editor): async hygiene — safe block_on, bounded acp channels, thread teardown 2026-07-26 13:19:34 +08:00
op-ai feat(desktop): one-click mcp registration for twelve clis 2026-08-05 00:52:13 +08:00
op-ai-skills feat(ai): teach the planning corpus real deck design 2026-08-05 00:47:10 +08:00
op-auth-bridge fix(panels): scroll the template grid on trackpad, and lay the deck out 2026-08-02 21:21:13 +08:00
op-chrome-extension-core feat(extension): add OpenPencil web-capture Chrome extension 2026-08-04 21:43:01 +08:00
op-cli feat(html): overhaul HTML and browser-snapshot import fidelity 2026-08-04 21:47:49 +08:00
op-codegen refactor: typed error enums across the whole workspace 2026-07-27 21:09:06 +08:00
op-collab chore(rust): align workspace checks 2026-08-01 16:19:26 +08:00
op-collab-policy-file fix(collab): harden p2p collaboration against resource exhaustion 2026-08-01 09:48:23 +08:00
op-collab-relay-client fix(collab): close review follow-ups and align the reauth budget test 2026-08-01 11:42:10 +08:00
op-collab-relay-control-plane refactor(collab): split the control-plane pairing wire tests 2026-08-03 21:05:11 +08:00
op-collab-relay-locator-hsm feat(collab): add isolated PKCS11 locator signer 2026-08-01 16:35:59 +08:00
op-collab-relay-locator-server feat(collab): replace public invites with 10-char region-tagged pairing codes 2026-08-02 08:31:13 +08:00
op-collab-relay-protocol feat(collab): replace public invites with 10-char region-tagged pairing codes 2026-08-02 08:31:13 +08:00
op-collab-relay-server feat(collab): minimize the relay credential and confirm the owner on LAN 2026-08-01 14:24:46 +08:00
op-collab-smoke feat(collab): allow cross-account collaboration 2026-08-01 13:01:24 +08:00
op-collab-transport fix(collab): close a gesture whose release never arrives 2026-08-03 21:15:32 +08:00
op-config-store test(desktop): keep persistence tests out of the real user config 2026-07-28 00:29:39 +08:00
op-design-lint fix(agent): repair text that is invisible against its own background 2026-08-02 21:21:13 +08:00
op-editor-core feat(editor): give decks a full workspace of navigation, generation and export surfaces 2026-08-05 00:57:49 +08:00
op-editor-host-core feat(desktop): one-click mcp registration for twelve clis 2026-08-05 00:52:13 +08:00
op-editor-ui feat(renderer): rasterize svg image sources at the byte-cache seam 2026-08-05 22:15:09 +08:00
op-figma refactor: typed error enums across the whole workspace 2026-07-27 21:09:06 +08:00
op-git
op-host-desktop feat(renderer): rasterize svg image sources at the byte-cache seam 2026-08-05 22:15:09 +08:00
op-host-native feat(editor): give decks a full workspace of navigation, generation and export surfaces 2026-08-05 00:57:49 +08:00
op-host-services feat(editor): give decks a full workspace of navigation, generation and export surfaces 2026-08-05 00:57:49 +08:00
op-host-web feat(renderer): rasterize svg image sources at the byte-cache seam 2026-08-05 22:15:09 +08:00
op-host-web-server refactor: dedupe cross-crate code and converge hardcoded literals 2026-07-26 11:24:22 +08:00
op-html fix(html): make web-snapshot text, icon and layout capture faithful 2026-08-05 22:15:09 +08:00
op-i18n feat(editor): give decks a full workspace of navigation, generation and export surfaces 2026-08-05 00:57:49 +08:00
op-mcp feat(html): overhaul HTML and browser-snapshot import fidelity 2026-08-04 21:47:49 +08:00
op-opmerge
op-orchestrator feat(editor): give decks a full workspace of navigation, generation and export surfaces 2026-08-05 00:57:49 +08:00
op-pen-loader feat(editor): give decks a full workspace of navigation, generation and export surfaces 2026-08-05 00:57:49 +08:00
op-process-io
op-rpc-transport fix(mcp): authenticate the live endpoint and degrade the bootstrap cache 2026-08-01 12:23:09 +08:00
op-smoke feat(editor): give decks a full workspace of navigation, generation and export surfaces 2026-08-05 00:57:49 +08:00
op-util feat(collab): add authenticated p2p collaboration 2026-07-29 00:06:58 +08:00
op-web-sdk feat(editor): give decks a full workspace of navigation, generation and export surfaces 2026-08-05 00:57:49 +08:00
CLAUDE.md feat(collab): add authenticated p2p collaboration 2026-07-29 00:06:58 +08:00