Repository navigation
Paint scoped ::selection ranges for Code OSS and xterm #750
Description
Active implementation checkpoint — 20 September 2026
Exact upstream heads are WebScene 3cc78ac28101e23f07ded947b44869277da6632d and AppScene acf42662309ea601720ed07c440cf183d7c73fe3; unchanged Code OSS is 645f29cc3176500b4b5762ba887cf2a7f0ffdf2c. Local vscode-demo is 06b5fa4328bae547e40462cbd049b6322f8e8d8e, clean, 294 commits ahead, and intentionally unpushed with Actions disabled.
Focused merge stacks
- Worker/resource stack — merged: WebScene Load dynamically inserted CSS imports asynchronously #702, Complete WorkerOptions and worker load policy #703, Enforce Worker policy across redirect hops #705 and Expose fetch request headers to resource hosts #707; AppScene Expose CSS retained-effect computed values #282; local vscode-demo Add native WebGPU runtime support #10. Dynamic CSS imports, Worker options/credentials/CORS, per-hop redirect validation, and request-header ABI v5 are on main.
- Interactive validation stack — merged: WebScene Present bounded interactive reportValidity feedback #709, Fix validation message text measurement #711, Dismiss stale validation feedback after mutations #712, Bound validation message wrapping and formatting #718, Add bounded validation message formatter ABI #721, Add bounded validation message timeout #723, Bound form ownership invalidation #724, Reflect form labels in semantic validity #725, Implement bounded custom element states #726, Implement live form control collections #727, Implement bounded form state restoration #728 and Wire Flutter validation localization #729; AppScene Wake native runtime for queued WebSocket events #284; local vscode-demo Broaden WebScene compatibility coverage and release gates #11. This includes focused invalid reporting, text-measurement repair, stale-feedback dismissal, bounded wrapping, localization ABI, optional timeout scheduling, and mutation-local form/fieldset ownership invalidation.
- Selector/pseudo stack — merged through scoped selection: WebScene Complete selector matching, specificity, and dependency invalidation coverage #237/Match live hyperlink selector state #730, Implement bounded local-link selector state #735, Implement bounded target-within selector state #736 and Implement functional local-link path depth #737 merged live location selectors; Paint Code OSS placeholder pseudo styles #738 merged paint-only Code OSS
::placeholder; Implement static Code OSS details content #739 merged the bounded static subset for the ten unchanged Code OSS::details-contentrules. Native GitHub stack #745 merged atomically as Implement live Range boundaries for Code OSS highlights #742 (live Range boundaries), Add Highlight and CSS.highlights registry for Code OSS #744 (bounded Highlight/CSS.highlights registry), and Paint CSS Custom Highlight ranges for Code OSS (#746) #747 (functional::highlight(name)theme cascade plus retained range paint), closing Implement CSS Custom Highlight API for Code OSS ranges #740/Implement live Range boundaries for Code OSS highlights #741/Add Highlight and CSS.highlights registry for Code OSS #743/Paint CSS Custom Highlight ranges for Code OSS #746 at main7a2d0f8d. PR Paint scoped selection ranges for Code OSS #751 then merged global/scoped::selectioncascade, theme colors, forward/backward range normalization, and retained background/foreground commands at main2c83b45f, closing Paint scoped ::selection ranges for Code OSS and xterm #750. Focused native/compiler run35469464706and precompiled contracts35469464714passed. Details animation/compositing, control-part/shadow-selector inventory, and remaining CSS work stay recorded in Complete selector matching, specificity, and dependency invalidation coverage #237/[Epic] CSS features, compatibility, validation, and performance #235. - Typed transition stack — merged: WebScene PR Implement typed registered custom-property animations #752 merged typed
<angle>/<percentage>@propertysupport. PR Implement Code OSS starting-style entry transitions #753 then merged Implement @starting-style entry transitions used by Code OSS #749 at main3cc78ac2, adding document-level@starting-style, precedence-correct starting cascades, first-render/display re-entry, opacity/2D transform/background-color admission,transition-behavior: allow-discrete, computed-versus-used display behavior,CSSStartingStyleRule, detached-state release, reinsertion, teardown, and a zero-allocation guard across 256 unrelated nodes. Focused precompiled JavaScript35473084845, Linux native SDK35473084825, and native Linux document contracts35473084848passed. - Consolidations — open and deliberately unmerged: WebScene Add Code OSS browser and native desktop compatibility #76 is refreshed to
ed2eb2c57ec6b1a8bda4bd75747379a7c19c86cf; AppScene Stream native application video directly from file and network URLs #65 is at2d2407f5e38c4cdd3d851394a5636cc0a8ce9064; vscode-demo Typescript #1 tracks the local unpushed integration branch.
One-agent mode is enforced. No subagent is active. Reusable runtime behavior continues to land in WebScene or AppScene; unchanged Code OSS remains pinned. The change-related #752 and #753 runs passed. Broad PR CI/NuGet plus consolidation, post-merge main and previous-main runs were canceled to release runners; no WebScene job is intentionally retained between focused PRs. Full package, performance, visual, physical-platform and VM qualification remains deferred under the fast implementation directive; focused parser/native correctness and allocation checks are complete locally.
Next: finish the remaining planned CSS and product features, then physical Linux pixels, synchronization/device-loss/resize/soak/performance, visual comparison, VM/computer-use, and unchanged Code OSS Release qualification. Rich clipboard MIME, MULTIPLE/SAVE_TARGETS, recorded desktop-service/cross-platform work, workspace/Explorer, file/save, terminal, Markdown preview, accessibility, lifecycle, package-size, and no-browser promotion gates remain tracked and incomplete.
Parent selector/CSS trackers: #237, #241, and epic #235
Proven gap
Unchanged Code OSS and bundled xterm/Markdown styles contain global and scoped ::selection rules. WebScene deliberately excludes these rules from ordinary selector indexing, and its existing Window Selection model publishes no retained selection pixels. Text selection therefore lacks the authored foreground/background colors even though Range/text-fragment intersection now exists through #740.
Scope
- parse global and selector-qualified
::selectionrules without creating pseudo DOM nodes; - retain the Code OSS property subset:
colorandbackground-color, including theme variables, importance, specificity, source/layer order, stylesheet replacement, and scoped origin matching; - publish the live Window Selection anchor/focus range through the retained range/text-fragment paint path, normalizing forward/backward endpoints;
- update on selection mutation, pointer/keyboard selection, style/theme change, detach, navigation, and nested-context teardown;
- paint backgrounds before ordinary text and selected foreground after it, with zero idle frames and no DOM/visual-tree nodes;
- keep input/textarea native selection paint as a separate control-specific follow-up if its byte-oriented selection state cannot share the DOM Selection range safely.
Gates
- browser/native same-node, cross-node, forward/backward, collapsed, scoped/global cascade, custom-property, stylesheet mutation, hidden/detached, nested-context, and cleanup contracts;
- exact Code OSS/xterm fixture mapping;
- bounded work against unrelated DOM/rules, mutation coalescing, zero settled frame demand, repeated selection/clear/navigation memory stability, scene commands, and visual comparison.
Activity
Paint scoped selection ranges for Code OSS (#750) (#751)