Commit Graph
13 Commits
Author SHA1 Message Date
Xuanru Li 205c1a31d3 fix(inspector): live queries see every composition, wherever the playhead is (#6651)
* fix(inspector): live queries see every composition, wherever the playhead is

The Studio preview parks scenes away from the playhead, so a live inspect, timeline or
element-map query answered missing for every element in a parked composition. Each live
query now holds every scene mounted under its own holder, then hands the scene window back.
__hfHoldScenes keeps holds per holder, so the inspector letting go never drops a scene
Studio holds.

* fix(inspector): isolate concurrent live query scene holds
2026-10-28 10:39:49 +00:00
James RussoandClaude Opus 5.5 f180ffca64 fix(cli): reap only orphaned browsers HyperFrames launched (#6251)
* fix(cli): reap only orphaned browsers HyperFrames launched

Orphan cleanup on preview and render killed every PPID-1 process of the
current user whose args named chrome-headless-shell or a Puppeteer temp
profile, which included detached browsers started by other tools.

Every HyperFrames Chrome launch now passes an inert
--hyperframes-owned-browser switch, and the reaper only kills PPID-1
processes that carry it as a whole argument.

Fixes #6203

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* fix(core): serve the browser marker from its own subpath

The GCP image's BeginFrame contract step imports the engine's
browserManager straight from source before core's generated runtime
exists, so pulling the marker from the core root entry broke it.
A dependency-free @hyperframes/core/browser-marker subpath keeps that
import chain as light as it was.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* test(cli): expect the browser marker in the capture fallback launches

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* docs(cli): say orphan cleanup runs before preview and render

The cleanup only stops browsers HyperFrames launched, so the opt-out is
no longer needed to protect other tools' browsers.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-24 23:09:57 +00:00
Xuanru Li 05315a14b8 fix(inspector): a component report shows the compositions and hosts that time a matched element (#6015)
* fix(inspector): a component report shows the compositions and hosts that time a matched element

* fix(inspector): resolve mounted roots and Windows ancestry

* fix(inspector): label repeated mounts as source candidates

* fix(inspector): budget candidate context after primary snippets
2026-10-21 09:29:32 +00:00
Xuanru Li 1d422a2fa5 fix(inspector): a component report names a snippet's file and lines only in its id (#6016)
* fix(inspector): a component report names a snippet's file and lines only in its id

* fix(inspector): drop the comment the ratchet refuses

* fix(inspector): prioritize unqueried co-targets in compact reports
2026-10-21 08:56:46 +00:00
Xuanru Li 41af1add0d fix(inspector): a component report under budget keeps the animation code before CSS candidates (#6003)
* fix(inspector): a component report under budget keeps the animation code before CSS candidates

Snippets filled maxBytes in file order, so CSS rules near the top of a file used the budget and the animation code further down was omitted. They now fill it by kind: animation creation, caller, timeline attachment, HTML opening tag, source dependency, then matched CSS candidates; the kept snippets are still returned in file order.

* fix(inspector): preserve explicit snippet request order
2026-10-21 05:54:19 +00:00
Xuanru Li bbb691001d fix(inspector): component reports show the animation code inside large wrappers and only the film's own files (#5989)
* fix(inspector): component reports show the animation code inside large wrappers and only the film's own files

A caller frame whose statement is a large wrapper (an IIFE around a scene) is reported as its call line, so the merged snippet no longer swallows the creation inside it and outgrows maxBytes.

Sources takes the files the inspected document was bundled from (BundleOptions.onRead), so mockups, studies and contact sheets in the project no longer add CSS candidates, script chunks or ambiguous tags. The headless service passes its bundle's reads; prepareLiveInspection takes them as an optional argument.

* chore(inspector): satisfy source comment ratchet
2026-10-21 02:30:21 +00:00
Xuanru Li 8af8e48ad9 fix(inspector): data-hf-id stamps alone do not make the live preview stale (#5870)
* fix(inspector): data-hf-id stamps alone do not make the live preview stale

The source fingerprint hashed html byte for byte, so stamping data-hf-id on disk
(Desktop does at project open and when a run ends) made every live query answer
stale_preview. The preview never reloads for an id-only write, because it already
served those ids, so the error lasted until some other edit. The fingerprint now
reads html without its data-hf-id attributes, the same rule Desktop's change
detection uses.

* fix(inspector): ignore HF IDs only for live previews
2026-10-19 21:19:33 +00:00
Xuanru Li 45825faa5d fix(inspector): grep timeline windows, continuation, candidates and timeline text from the Canary dogfood (#5595)
* fix(inspector): report nested hosts' authored window, one location per source line

The runtime strips data-duration/data-end from nested composition hosts after
boot and keeps them as data-hf-authored-*. Timeline inspection built its
resolver without authored attrs, so a host with data-duration="4" reported
its GSAP timeline length (3.72s) instead.

Timeline text and events[].sources listed the same file:line once per mapped
snippet (creation, caller, dependency), so a one-line script printed one
location up to nine times.

* refactor(inspector): carry the dedupe reason in the helper's name

* fix(inspector): end continuation on a page that fits no snippet; fill budget with candidates

* fix(inspector): timeline groups by component, names attr values, eases, film end

* fix(studio-server): stamp hf ids into a file without reformatting it

* fix(inspector): find an element's tag before its served hf id reaches the source

* fix(inspector): live element map shows authored classes and text, not the playhead's

* fix(inspector): collapse script-built text so the element map ignores the playhead

Class names stay in source order, a runtime-stripped id is shown as id="…"
rather than a selector, and a grouped row names which children it covers.

* fix(inspector): keep paging, stamping, and the live map still on the reported edges

A snippet larger than the page ended the walk, so later snippets could not
be reached. Raw text ended at a longer tag name, which could stamp an id
inside a script. An empty or mixed source element showed live text, and an
unknown duration read as a film that ends at 0s.

* fix(inspector): mint ids for an empty hf id and keep an unquoted class

An empty data-hf-id was treated as already assigned, so stamping left it
blank while the older stamper minted one. An unquoted class was read as no
class, so the live map dropped it.

* fix(inspector): narrow markup before reading a child tag

skipMarkup returns a boolean, so the build still sees Markup where a tag
is required. Narrow on the kind first so the inspector typechecks.

* fix: quiet check false positives and name the ancestor of an id-less target

Endpoint contact, disjoint fromTo pairs, and a negative z-index under a
stacking-context parent were warnings with bad advice. Layout and contrast
blamed a dot grid, a circular avatar's panel, and a visibility override.
A faint texture veil is no longer the click target.

* fix(lint): drop a history sentence and six gsap comments

The comments check treats "load-bearing" as history, and gsap.ts added six
comment lines. The names already carry what those lines said.

* fix(parsers): ignore an empty id written inside another attribute

The empty-id scan matched the first data-hf-id="" in the tag, including one
inside a quoted title. It now skips quoted text, so the real attribute is minted.

* fix(lint): keep real covers and a negative z-index under a card

A gradient scale-down treated every fill like a radial dot, so a panel
that starts transparent stopped counting as a cover. A stacking context
on any ancestor cleared a negative z-index, and a faint wrapper made
images inside it unpickable.

* fix: keep an emoji from shifting a stamped id

The quote mask replaced one emoji with one space, so the id landed before
the closing quote. A radial cover that turns opaque after a clear stop
stays fully painted.

* fix(lint): score a letter-only dot as a dot, not a color name

namesAColor saw #fff and rgba as words, so those dot grids counted as a
full cover. Hex and rgb colors are stripped before that word check.
2026-10-14 09:16:20 +00:00
Xuanru Li abe97f6e4c refactor(inspector)!: drop the predefined agent tools; harnesses define their own (#5570)
* refactor(inspector)!: drop the predefined agent tools; harnesses define their own

* chore(ci): agree to the inspector's agent-tool file deletions

* docs(inspector): describe the HTTP contract only, export the request types

* fix(inspector): ship the HTTP server and give every refusal a stable code

* fix(inspector): keep the server export in the subpath descriptor

* fix(inspector): keep the HTTP server reusable after a large body

* fix(inspector): start the npm bin when it is a symlink

* fix(inspector): import the server test without a .ts extension

* fix(inspector): ship the HTTP server without a second copy of the service
2026-10-14 02:44:10 +00:00
Xuanru Li 6f76b30675 fix(inspector): stop audio waveform caches from making every live question stale (#5536)
* fix(inspector): stop audio waveform caches from making every live question stale

* fix(inspector): drop the comment and format the test

* refactor(core): share the folders Studio's preview ignores

* fix(core): register the project-folders subpath and bundle it into the inspector
2026-10-13 16:01:05 +00:00
Xuanru Li 072f53cda9 feat(inspector): element map, live inspection engine and Node runtime (#5509)
* feat(inspector): element map, live inspection engine and Node runtime

* fix(inspector): reject preview reload races

Return the live document generation from the same page invocation as each
query and reject mismatches. Rearm browser cleanup for failures before a
page operation starts, and cover reloads across all three live operations.
2026-10-13 02:45:46 +00:00
Xuanru Li f45788bb6d feat(inspector): query timelines and inspect the live preview (#5508)
* feat(inspector): query timelines and inspect the live preview

* fix(inspector): align live timeline contracts

Keep realm-safe target detection through the restack and align
floating-point interval boundaries. Update the live group fixture and
make the private runtime entry build itself before use.

* fix(inspector): declare generated build inputs
2026-10-13 02:45:45 +00:00
Xuanru Li 73bbd378df feat(inspector): add the component inspector package (#5507)
* feat(inspector): add the component inspector package

* fix(inspector): satisfy workspace and runtime gates

Declare the source-only package build boundary and use realm-safe element checks so the inspector passes workspace, type, and runtime contracts.

* fix(inspector): harden source file reads

* fix(inspector): satisfy audit gates

* fix(inspector): parse HTML raw-text endings
2026-10-13 02:45:44 +00:00