Skip to content

Web SDK Phase 8.2: DOM digest + selector-based pointing engine#12

Merged
engmsaleh merged 1 commit into
developfrom
feature/web-sdk-8.2-pointing
Jun 3, 2026
Merged

Web SDK Phase 8.2: DOM digest + selector-based pointing engine#12
engmsaleh merged 1 commit into
developfrom
feature/web-sdk-8.2-pointing

Conversation

@engmsaleh
Copy link
Copy Markdown
Collaborator

The signature "points at the real element" capability — the web analog of the desktop cursor overlay, built on the 8.1 widget.

What's in it

  • digest.ts — DOM digest: a structured, screenshot-free view of the page's interactive/annotated/heading elements → stable ids, accessible labels, viewport rects, plus an element registry. data-skilly annotations are prioritized; the list is capped with a logged warning (no silent truncation). Exposed as Skilly.getPageDigest() (the page view the AI consumes in 8.3).
  • pointing.ts — pointing engine: parses [POINT:id:label], resolves the target (digest id → data-skilly → element id → CSS selector → visible-text fallback), flies the cursor along a bezier arc, and re-anchors on scroll/resize so it stays pinned. parsePointTags() strips the tags from the response text.
  • Widget: setCursorPosition (driven per-frame by the engine); removed the CSS transform transition.
  • Turn flow now builds the digest and drives real pointing (the simulated response emits a real POINT tag against the live DOM).

Validation

  • bun run typecheck + bun run build clean (IIFE ~12KB).
  • Playwright: after a turn, the cursor flies the arc and lands exactly on the data-skilly="pricing-section" element — measured 0px from its center — with the POINT tag stripped from the bubble. Screenshot verified.

Next

8.3 OpenAI Realtime voice pipeline (replaces the simulated turn; sends the digest to the AI) · 8.4+ multi-tenant Next.js backend.

…hase 8.2)

- digest.ts: screenshot-free structured page view (interactive/annotated elements
  -> stable ids, accessible labels, viewport rects) + element registry +
  getPageDigest(). data-skilly annotations prioritized; capped with no silent drop.
- pointing.ts: parse [POINT:id:label], resolve (digest id / data-skilly / CSS /
  visible-text fallback), fly the cursor along a bezier arc, re-anchor on
  scroll/resize. parsePointTags() strips tags from the response text.
- widget: setCursorPosition (engine drives per-frame); removed CSS transform transition.
- index: turn flow now builds the digest and drives real pointing.

Validated: bun typecheck + build clean; Playwright confirms the cursor flies and
lands exactly on the data-skilly-resolved element (0px error). Screenshot verified.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@engmsaleh engmsaleh merged commit 2ff27f5 into develop Jun 3, 2026
8 checks passed
@engmsaleh engmsaleh deleted the feature/web-sdk-8.2-pointing branch June 3, 2026 04:20
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