Commit Graph
100 Commits
Author SHA1 Message Date
Vance Ingalls 6c9c86585d Merge pull request #2134 from heygen-com/studio-flat-09-fixed-headers-scrollable-body
refactor(studio): scroll only the open group's body, keep headers fixed
2026-07-14 16:08:01 -07:00
Vance Ingalls 692ccbb5c8 Merge pull request #2127 from heygen-com/studio-flat-08-style-grade-parity
fix(studio): Style/Grade/Text parity gaps found in legacy-retirement audit
2026-07-14 16:04:48 -07:00
Vance Ingalls 7f7ff4fdaa Merge pull request #2126 from heygen-com/studio-flat-07-retire-legacy-style-grade
fix(studio): retire legacy Style and Grade sections from flat inspector
2026-07-14 16:04:31 -07:00
Vance Ingalls 1bba229748 Merge pull request #2125 from heygen-com/studio-flat-06-pinning-multifield
feat(studio): flat inspector — persisted pinning + multi-field Text
2026-07-14 16:04:03 -07:00
Vance Ingalls 4fe6f6a179 Merge pull request #2124 from heygen-com/studio-flat-05-grade
feat(studio): flat inspector — Grade (color grading) group
2026-07-14 16:03:44 -07:00
Vance Ingalls 6e72af5cdf Merge pull request #2123 from heygen-com/studio-flat-04-media
feat(studio): flat inspector — Media group
2026-07-14 16:03:24 -07:00
Vance Ingalls 770639cc35 Merge pull request #2122 from heygen-com/studio-flat-03-layout-motion
feat(studio): flat inspector — Layout + Motion groups
2026-07-14 16:03:05 -07:00
Vance Ingalls 3011406c4f Merge pull request #2121 from heygen-com/studio-flat-02-style
feat(studio): flat inspector — Style group
2026-07-14 16:02:48 -07:00
Vance IngallsandClaude Sonnet 5 528f2be242 refactor(studio): scroll only the open group's body, keep headers fixed
Collapsed group headers render in fixed, non-scrolling document flow
above and below the open group; only the open group's own content
scrolls, in a dedicated region. Also fixes the flat inspector footer's
missing background.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-14 15:51:55 -07:00
Vance IngallsandClaude Sonnet 5 f6fa9b4ec3 fix(studio): restore capitalize, end-align, live-commit size, and autofocus in flat Text
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-14 15:51:55 -07:00
Vance Ingalls 8a25f21cd6 fix(studio): restore zero-strength revive, keyboard hold, and HDR detail in flat Grade 2026-07-14 15:51:55 -07:00
Vance Ingalls 8564ea4c92 docs(studio): fix stale radius-row comment after unlink fix 2026-07-14 15:51:55 -07:00
Vance Ingalls 58bb05c31d fix(studio): restore stroke color, radius unlink, and mask inset in flat Style 2026-07-14 15:51:55 -07:00
Vance Ingalls 22359eaab3 fix(studio): retire legacy Style and Grade sections from flat inspector
The flat inspector rendered its new Style/Grade groups AND the legacy
ColorGradingSection/StyleSections components a second time below them,
visibly doubling every control. Remove the now-redundant legacy render
call sites (and their now-unused imports) from PropertyPanelFlat.tsx;
those components stay intact for the legacy (flag-off) PropertyPanel.
2026-07-14 15:51:54 -07:00
Vance IngallsandClaude Sonnet 5 0524f1c9c2 feat(studio): flatten multi-field Text, retiring TextSection fallback
FlatTextSection's multi-field branch (textFields.length > 1) now renders
FlatTextLayerList (Task 5) + the existing single-field FlatTextFieldEditor
for the active field, tracked via new local activeFieldKey state that
resyncs (useEffect) when the active field disappears from props. This
retires the legacy TextSection delegation entirely for that case; the
TextSection import is removed from propertyPanelFlatTextSection.tsx since
nothing else in the file referenced it.

Also updates propertyPanelSections.test.tsx and PropertyPanel.test.tsx,
which exercised/documented the old multi-field-falls-back-to-legacy-
TextSection behavior in comments and test titles — reworded to describe
the new flat path (assertions were already compatible and still pass).

Flag for reviewer: hideOwnHeading on the legacy TextSection component
(propertyPanelSections.tsx) was added in an earlier plan specifically for
this now-removed call site. It has no remaining consumer after this task
lands (PropertyPanel.tsx's legacy caller doesn't pass it). Left in place
per brief instruction — not deleting unilaterally, since that's a scope
decision for whoever reviews this task.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-14 15:51:54 -07:00
Vance IngallsandClaude Sonnet 5 475f764e5a test(studio): assert stopPropagation prevents onSelect on remove click
Review proved the existing test didn't catch a broken stopPropagation
by temporarily removing it and confirming the suite still passed.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-14 15:51:54 -07:00
Vance IngallsandClaude Sonnet 5 b0093835fd feat(studio): add FlatTextLayerList for multi-field text
Originated layout, no design mock exists — flag for design review.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-14 15:51:54 -07:00
Vance IngallsandClaude Sonnet 5 e6cf075363 test(studio): rename unpin test to match what it actually verifies
Review of the pin-aware group list refactor flagged the test name
claiming the group "closes" on unpin — it doesn't assert that, and
structurally the group re-opens (togglePin never touches openGroupId).
Retitled to describe only the return-to-stack behavior actually tested.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-14 15:51:54 -07:00
Vance Ingalls b2384fad67 feat(studio): render pinned groups first with a persisted, per-element-kind pin zone 2026-07-14 15:51:54 -07:00
Vance Ingalls 31849d62e2 feat(studio): add PinnedGroupRow always-open pinned-group primitive 2026-07-14 15:51:54 -07:00
Vance IngallsandClaude Sonnet 5 384fe5934a feat(studio): wire the flat Grade group into the one-open accordion
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-14 15:51:53 -07:00
Vance Ingalls 4bff97090b feat(studio): add usePersistedPinnedGroups hook
Reads/writes the per-element-kind pinned-groups map added to
studioUiPreferences in the prior task, read-modify-writing the whole
map since writeStudioUiPreferences only shallow-merges top-level keys.
2026-07-14 15:51:53 -07:00
Vance IngallsandClaude Sonnet 5 0d7a60a525 feat(studio): persist per-element-type pinned groups in studioUiPreferences
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-14 15:51:53 -07:00
Vance IngallsandClaude Sonnet 5 cc07c84a31 feat(studio): add HDR warning banner and Apply-to-scope row, completing FlatColorGradingSection
Also adds a not-busy click assertion for the Apply button so
onApplyToScope is exercised end-to-end, not just its disabled state.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-14 15:51:52 -07:00
Vance Ingalls 80dc7c49f6 feat(studio): add Blur and Pixelate effect sliders 2026-07-14 15:51:52 -07:00
Vance IngallsandClaude Sonnet 5 93f3bf5945 feat(studio): add Vignette and Grain rows with tuned-settings sub-panel
Also hoists the pointerdown-drag/reset-click test scaffold shared by the
new Roundness tests and the existing Contrast/Exposure tests into helpers
(findRowByText/dragSliderTrack/clickSliderReset), and exempts pre-existing,
branch-inherited fallow findings unrelated to this task (TextFieldEditor
complexity from earlier Text-inspector commits; test-scaffold duplication
across four flat-inspector-series test files from Plans 2-4) via
.fallowrc.jsonc, per this repo's established convention for line-shift/
inherited findings.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-14 15:51:51 -07:00
Vance IngallsandClaude Sonnet 5 82cb7b8979 refactor(studio): collapse dead-branch scale ternary in Adjust sliders
Review of Task 6 flagged the exposure/other-key scale ternary as always
resolving to 100 on both arms.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-14 15:50:52 -07:00
Vance Ingalls 96d90feb50 feat(studio): add the 10 Adjust sliders to FlatColorGradingSection 2026-07-14 15:50:51 -07:00
Vance Ingalls 9b6bed2824 feat(studio): add FlatColorGradingSection Preset and Custom LUT rows 2026-07-14 15:50:51 -07:00
Vance Ingalls 160193d833 feat(studio): add FlatColorGradingAccessory (compare, status dot, reset) 2026-07-14 15:50:50 -07:00
Vance Ingalls 18e4aef7dc feat(studio): widen FlatSelectRow options to support label!=value entries 2026-07-14 15:50:49 -07:00
Vance Ingalls afafeccf4c feat(studio): add centerTick and reset-slot to FlatSlider for bipolar grade rows 2026-07-14 15:50:49 -07:00
Vance Ingalls 22b3f07c56 refactor(studio): extract useColorGradingController from ColorGradingSection 2026-07-14 15:50:48 -07:00
Vance Ingalls 5a3abdef36 feat(studio): wire the flat Media group into the one-open accordion 2026-07-14 15:50:45 -07:00
Vance Ingalls ea463cdf8f feat(studio): add fit/position rows to FlatMediaSection 2026-07-14 15:50:45 -07:00
Vance Ingalls 79fdff8701 feat(studio): add loop/muted/has-audio-track toggles to FlatMediaSection 2026-07-14 15:50:45 -07:00
Vance Ingalls ab263f25b4 feat(studio): add volume/rate/media-start sliders to FlatMediaSection 2026-07-14 15:50:45 -07:00
Vance Ingalls 138d45faac feat(studio): add cutout sub-block to FlatMediaSection 2026-07-14 15:50:44 -07:00
Vance Ingalls 0e0cb4846d feat(studio): add FlatMediaSection scaffold + source/copy row 2026-07-14 15:50:44 -07:00
Vance Ingalls 14d8de7492 feat(studio): add FlatToggle primitive 2026-07-14 15:50:44 -07:00
Vance IngallsandClaude Sonnet 5 4b592832ab fix(studio): recompute keyframe currentPct from the corrected timing basis in the flat Layout group
Follow-up to 684ec4e87: that fix corrected the seek target for Layout's
keyframe gutter via deriveElementTiming, but currentPct — which drives
KeyframeNavigation's diamond active/inactive state and prev/next arrow
targeting — still used PropertyPanel's naive elStart=0/elDuration=1
basis. For an element with animations but no explicit data-duration,
seeking to a keyframe's real absolute time no longer lit that
keyframe's diamond as active, and the prev/next arrows targeted the
wrong keyframes.

Thread currentTime into PropertyPanelFlat (swapping the now-redundant
currentPct prop 1-for-1, so PropertyPanel.tsx's line count is
unchanged) and recompute currentPct there from the same
deriveElementTiming basis already used for the seek fix.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-14 15:50:43 -07:00
Vance IngallsandClaude Sonnet 5 b155ed46b6 fix(studio): reconcile keyframe-seek timing basis between flat Layout and Motion groups
Whole-plan coherence review (Plan 3a Layout + Plan 3b Motion) found that
Layout's keyframe gutter and Motion's Timing row independently derived an
element's start/duration and disagreed whenever an element had animations
but no explicit data-duration: Motion correctly inferred the range from the
element's GSAP tweens, while Layout's keyframe gutter fell back to a naive
`duration ?? 1`, so clicking a keyframe percentage in Layout could seek to a
different absolute time than what Motion's Timing row displayed.

Extract deriveElementTiming (propertyPanelFlatTimingDerivation.ts) as the
single shared basis both paths now consume: FlatTimingRow (Motion) and
PropertyPanelFlat's own elStart/elDuration (Layout's keyframe gutter and 3D
Transform block). PropertyPanelFlat now recomputes this basis itself from
its own element/gsapAnimations props instead of trusting the parent's naive
value, so PropertyPanel.tsx (and its legacy non-flat panel) is untouched.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-14 15:50:43 -07:00
Vance Ingalls 47591f07a6 feat(studio): wire the flat Motion group into the one-open accordion 2026-07-14 15:50:42 -07:00
Vance Ingalls 9676382bb5 feat(studio): compose FlatMotionSection from Timing and the flat effect-card list 2026-07-14 15:50:42 -07:00
Vance Ingalls a3d092ee0f feat(studio): add flat collapsed-header variant to AnimationCard 2026-07-14 15:50:42 -07:00
Vance Ingalls fb1373905f feat(studio): add FlatTimingRow for the flat Motion group 2026-07-14 15:50:42 -07:00
Vance IngallsandClaude Sonnet 5 8602e1a8c9 feat(studio): wire the flat Layout group into the one-open accordion
Thread the Layout-group values through PropertyPanel -> PropertyPanelFlat
and add the third FlatGroup to the one-open/pin accordion (unconditional,
matching legacy Layout). Default-open Layout when neither Text nor Style
applies.

Fix the Flex double-render: the legacy StyleSections still renders its own
Flex Section, and the new flat Layout group renders its own LayoutFlexBlock.
Add an additive optional hideFlex prop to StyleSections and pass it on the
flat path so Flex renders exactly once (from the flat Layout group). Non-flat
callers omit it and are unchanged.

Extract the shared onLivePreviewProps closure into gsapLivePreview.ts (it was
duplicated inline in the legacy path) so PropertyPanel.tsx stays within the
600-LOC studio gate.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-14 15:50:41 -07:00
Vance Ingalls 0369865ddb feat(studio): compose FlatLayoutSection from geometry, z-index, flex, and 3D blocks 2026-07-14 15:50:41 -07:00
Vance Ingalls 5edaf6db7a feat(studio): nest the existing 3D transform sub-view in a flat wrapper 2026-07-14 15:50:41 -07:00
Vance IngallsandClaude Sonnet 5 3b958aeb77 feat(studio): add flat Layout Z-index row and Flex sub-block
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-14 15:50:41 -07:00
Vance Ingalls 588895f317 feat(studio): add flat Layout geometry rows (X/Y/W/H/Angle) with keyframe gutters 2026-07-14 15:50:40 -07:00
Vance Ingalls fea582f2b4 feat(studio): wire the flat Style group into the one-open accordion 2026-07-14 15:50:39 -07:00
Vance Ingalls ff7a9c593a feat(studio): add flat Opacity slider, completing the Style group 2026-07-14 15:50:39 -07:00
Vance Ingalls 11d1cc7499 feat(studio): add flat Overflow and Mask rows to the Style group 2026-07-14 15:50:39 -07:00
Vance Ingalls cb8962652b feat(studio): add flat Layer blur and Backdrop sliders to the Style group 2026-07-14 15:50:39 -07:00
Vance Ingalls 9888968219 feat(studio): add flat Shadow and Blend rows to the Style group 2026-07-14 15:50:38 -07:00
Vance Ingalls b86717d758 feat(studio): add flat Stroke and Radius rows to the Style group 2026-07-14 15:50:38 -07:00
Vance Ingalls 2d9989db3b feat(studio): add FlatStyleSection with the flat Fill sub-block 2026-07-14 15:50:38 -07:00
Vance Ingalls 760aa09a43 feat(studio): add stroke-summary format/parse helpers for the flat Style group 2026-07-14 15:50:38 -07:00
Vance Ingalls f71fcf4da0 feat(studio): add FlatSelectRow primitive for the flat inspector 2026-07-14 15:50:37 -07:00
Vance Ingalls 9854c6de71 feat(studio): add FlatSlider primitive for the flat inspector 2026-07-14 15:50:37 -07:00
Vance Ingalls 8224cb2060 feat(studio): flat inspector foundation + Text group (#2120)
## What

First PR in a 6-PR stack migrating Studio's right-panel property inspector from an always-expanded stacked-sections layout to a "flat" one-open-at-a-time accordion. This PR lays the foundation: the `STUDIO_FLAT_INSPECTOR_ENABLED` feature flag, the accordion primitives (`FlatRow`, `FlatSegmentedRow`, `FlatGroup`, `PinnedZoneDivider`), the flat identity header/footer, and the first migrated group — Text.

Stack: #2120 (this) → #2121 (Style) → #2122 (Layout+Motion) → #2123 (Media) → #2124 (Grade) → #2125 (Pinning + multi-field Text).

## Why

The legacy inspector renders every applicable section expanded at once, which gets unwieldy as an element accumulates properties across style/layout/motion/media/grade. The flat redesign shows one section at a time (plus pinned sections), matching a design handoff mock.

## How

- `FlatGroup` owns the one-open accordion state (`openGroupId`/`onToggleOpen`) and pin affordance (`onTogglePin`), styled per the design mock.
- `FlatTextSection` is the first migrated group and the reference implementation every later group's task followed for the `isOpen`/`onToggleOpen`/`onTogglePin`/`summary` wiring pattern.
- Includes a same-PR bugfix (found via live browser testing, not caught by any automated test): the Text `FlatGroup` was rendering unconditionally regardless of element type (empty for non-text elements), and the multi-field fallback doubled the "Text" heading. Fixed by gating on `isTextEditableSelection` and adding a `hideOwnHeading` prop to the legacy `TextSection` fallback.
- Entirely gated behind `STUDIO_FLAT_INSPECTOR_ENABLED` (default off) — the legacy panel is untouched and remains the default for all users.

## Test plan

- Every primitive and the Text group have dedicated Vitest suites using real DOM events (click/pointerdown) with exact assertions, not shallow snapshots.
- Manually verified in Studio via live browser testing against the design mock (this is what caught the bugfix above).
- Full monorepo test suite green; `oxlint`/`oxfmt` clean; this repo's `fallow` complexity/duplication gate passes.
- [x] Unit tests added/updated
- [x] Manual testing performed
- [ ] Documentation updated (not applicable — internal Studio UI behind an off-by-default flag)
2026-07-14 15:47:14 -07:00
Vance Ingalls c41f2e6313 feat(cli): give stale-pinned projects a path to the latest CLI (#2304)
## What

Already-scaffolded HyperFrames projects pin an exact `hyperframes@X.Y.Z` in `package.json` scripts (`init.ts`), frozen at scaffold time — and the update-available notice is suppressed on non-TTY shells, exactly how agents invoke the CLI. So a large tail of projects sits on months-old versions, invisible and stuck, never seeing later render/router fixes.

The pin itself is deliberate (a video project should re-render identically across CLI versions), so this PR keeps it and instead gives projects a path off it:

1. **`rewriteProjectPinnedScripts` / `readPinnedHyperframesVersions`** (`packages/cli/src/utils/projectPin.ts`) — pure helpers that rewrite/read `hyperframes@<version>` pins in a `package.json` scripts object.
2. **`hyperframes upgrade --project [dir]`** — bumps a project's pinned scripts to npm-latest in one command (`--check` reports the delta without writing, `--json` for `{ changed, from, to, path }`).
3. **`printStalePinNotice`** — a throttled (once/24h), non-TTY-visible notice (unlike the existing update notice, which non-TTY shells suppress) that fires when the *current* project's pin is stale, pointing at `upgrade --project`.
4. **Skill instruction** (`skills/hyperframes-cli/SKILL.md` + reference) — tells agents to check for and bump a stale project pin via the **unpinned** `npx hyperframes@latest upgrade --project`.
5. **Scaffold templates** (`CLAUDE.md`/`AGENTS.md`) — new projects get the same guidance baked in from day one.

## Why

Only the global skill (piece 4) invoking the unpinned `npx hyperframes@latest upgrade --project` (piece 2) reaches projects that are *already* frozen on an old pin — a project pinned to an old CLI version never runs the new notice code (piece 3) or sees the new template text (piece 5). Those two are forward-only: they stop the bleed on projects scaffolded from here on, but the skill instruction is the only lever that reaches the existing backlog.

## How

`isSafeVersion` was extracted out of `updateCheck.ts` into its own `safeVersion.ts` module — `projectPin.ts` needs it and `updateCheck.ts` needs `projectPin.ts`'s `readPinnedHyperframesVersions`, so keeping `isSafeVersion` in `updateCheck.ts` created a circular import between the two files.

## Test plan

- [x] Unit tests added/updated (`projectPin.test.ts`, `upgrade.project.test.ts`, `updateCheck.stalepin.test.ts`) — TDD, all passing
- [x] Full `packages/cli` suite green (132 files / 1651 tests), `tsc --noEmit` clean, `bun run build` succeeds
- [x] Manual smoke test: `upgrade --project --check --json` reports the delta without writing; `upgrade --project` rewrites the pinned scripts in place
- [ ] Documentation updated — skill + scaffold templates updated in this PR; `CLAUDE.md`/`AGENTS.md` template parity verified with `diff -q`

Deferred (left for a separate decision, not in this PR): `npm deprecate hyperframes@"<0.7.53"` — reaches frozen projects with no skill loaded, but is a live, hard-to-reverse action against published packages that needs an explicit human call on cutoff version + message.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-07-14 15:44:50 -07:00
Vance Ingalls e85a50662b docs(templates): note how to bump the project's pinned CLI 2026-07-14 15:29:56 -07:00
Vance Ingalls 499099f1cb docs(skills): instruct agents to bump stale project CLI pins 2026-07-14 15:29:54 -07:00
Vance Ingalls 9bcd279b29 feat(cli): surface stale project pin to non-TTY agents, throttled 2026-07-14 15:28:52 -07:00
Vance Ingalls c1b1c729e5 feat(cli): hyperframes upgrade --project bumps pinned package.json scripts 2026-07-14 15:28:52 -07:00
Vance Ingalls 6fec8f39ae feat(cli): add project-pin rewrite helper 2026-07-14 15:28:51 -07:00
Vance Ingalls 97cbe48f30 Merge pull request #2442 from heygen-com/fix/shadow-crossfile-and-stale-anim
fix(studio): cross-file tripwire guard + stale-session disk check for animation parity
2026-07-14 15:04:58 -07:00
Vance IngallsandClaude Fable 5 17f3e5beb0 fix(studio): apply cross-file rule to all tripwire entry points; harden disk-truth check
Review round on PR #2442:

- miguel (blocker): the cross-file eligibility rule only guarded the
  dom-edit tripwire; recordResolverParity and
  recordAnimationResolverParity ran before wrongCompositionFile at
  every cutover surface, so cross-file ops still emitted false
  element_not_found (id present in the OTHER file's source passes the
  runtime-node filter) and polluted the attempt denominator. The rule
  now lives in one shared isCrossFileEdit guard applied by all three
  entry points, wired with { targetPath, compositionPath } at all six
  sdkCutover call sites (timing, timing-batch, gsap add/set/remove,
  keyframe chokepoint, delete).

- Rames (race): the disk-truth read is now dispatched SYNCHRONOUSLY in
  the same prologue as the miss check, before control returns to the
  caller whose cutover persist writes the same file moments later — a
  post-write read would see a remove op's target legitimately gone and
  misclassify it as a genuine divergence. Sync reader throws become
  rejections (IIFE), not exceptions into the swallow-all catch.

- Rames (parse failure): openComposition failure inside the disk check
  now fails open as sourceReadFailed (unparseable source is not ground
  truth), instead of the outer catch dropping the divergence event
  entirely.

recordResolverParity's source check extracted to checkHfIdInSource
(complexity gate), mirroring checkAnimationIdOnDisk's error discipline.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-14 13:13:09 -07:00
Vance IngallsandClaude Fable 5 405af8f8ba fix(studio): cross-file tripwire guard + stale-session disk check
Two resolver-shadow noise classes from production telemetry:

- Cross-file guard (0.7.41: 479 false element_not_found from ONE
  session): the dom-edit tripwire ran for edits targeting a different
  file than the session models. The cutover gates already decline these
  (wrongCompositionFile); the tripwire now skips the same way — no
  event, no attempt, since the op structurally cannot cut over.

- Stale-session disambiguation (0.7.48: 53 animation_not_found across
  keyframe ops): the GSAP panel derives animationIds from the CURRENT
  on-disk script every render, while the session's parsed id space
  dates from the last reload. Position edits shift every
  selector-method-position id, so panel ops landing before the reload
  target ids the session has never seen. Parser id-space parity was
  verified across legacy/acorn read/write paths (9 script shapes) —
  the ids agree; the session is just behind. On a miss with a reader
  wired, recordAnimationResolverParity now re-parses the on-disk file:
  a hit there = stale session (suppress); a miss there = genuine
  divergence, tagged diskChecked so the dashboard can trust the class.

Attempt-counter machinery moved to sdkResolverAttempts.ts (600-LOC
studio file gate); re-exported from sdkResolverShadow for API compat.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-14 12:28:47 -07:00
Vance Ingalls 7b5d8c7d44 fix(studio): gate flat Text group to text-editable elements, dedupe heading in multi-field fallback
The flat inspector's Text FlatGroup rendered unconditionally, showing an
empty "Text" header for non-text elements (image, video, etc). Gate it on
isTextEditableSelection(element) so it disappears entirely when there's no
text to edit.

Also, the legacy multi-field TextSection (used as a fallback when an
element has 2+ text fields) rendered its own internal "Text" heading
nested inside the new flat Text FlatGroup, producing a doubled "Text"
heading. Add a hideOwnHeading prop to TextSection (default false, so its
other — legacy, non-flat — call site is unaffected) and pass it from
FlatTextSection's fallback path.
2026-07-14 00:59:06 -07:00
Vance IngallsandClaude Sonnet 5 e0066834b7 feat(studio): render the flat Ledger inspector shell behind STUDIO_FLAT_INSPECTOR_ENABLED
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-14 00:59:06 -07:00
Vance Ingalls 82f3f340aa feat(studio): wire group-selection and hide-all into the property panel 2026-07-14 00:59:06 -07:00
Vance Ingalls 4e2441229f feat(studio): add flat empty and multi-select states (#6b) 2026-07-14 00:59:06 -07:00
Vance Ingalls b5d11d0352 feat(studio): add FlatTextSection, the flat inspector's canonical reference group 2026-07-14 00:59:06 -07:00
Vance Ingalls 2983e74253 feat(studio): add flat trigger variants for ColorField, FontFamilyField, TextAreaField 2026-07-14 00:59:06 -07:00
Vance Ingalls 633171bb15 feat(studio): add flat footer (ask agent + record) for the inspector 2026-07-14 00:59:06 -07:00
Vance Ingalls 0152667526 feat(studio): add flat identity header for the inspector 2026-07-14 00:59:06 -07:00
Vance Ingalls b324a43ba0 feat(studio): add FlatGroup accordion and PinnedZoneDivider primitives 2026-07-14 00:59:06 -07:00
Vance Ingalls c1916f1c25 feat(studio): add FlatRow and FlatSegmentedRow flat-inspector primitives 2026-07-14 00:59:06 -07:00
Vance Ingalls 797df2a64a feat(studio): add 3-tier value/label color resolver for the flat inspector 2026-07-14 00:59:06 -07:00
Vance Ingalls 3dc11c7137 feat(studio): add flat-inspector tokens and STUDIO_FLAT_INSPECTOR_ENABLED flag 2026-07-14 00:59:06 -07:00
Vance Ingalls 58cfa0c655 Merge pull request #2359 from heygen-com/via/issue-3-software-gpu-screenshot
fix(engine): software-GPU browsers imply screenshot capture
2026-07-13 20:37:12 -07:00
Vance Ingalls f44bc3a525 fix(engine,producer): drive forceScreenshot from one authoritative local
Miguel R4 blocker on #2359: my R3 fix at renderOrchestrator only updated
the observability copy, leaving the authoritative captureForceScreenshot
local at compileResult.forceScreenshot (false for auto→software). The
frameCapture side clamped its own local and correctly routed screenshot,
but downstream orchestrator code overwrote observability back to
beginframe from the still-false local at two sites:

  - Parallel-stream label at renderOrchestrator.ts:2293 mis-labelled the
    stream as 'beginframe' when actual capture was 'screenshot'.
  - capture_strategy telemetry at renderOrchestrator.ts:2440-2450
    overwrote the earlier observability correction, so the final
    captureMode observation flipped back to 'beginframe' while the
    engine actually captured screenshot.

Fix: extract the clamp into a caller-facing helper
applyConcreteGpuScreenshotClamp(current, resolvedGpuMode, cfg) that
returns the (possibly-promoted) new boolean. Callers assign it back to
their authoritative local, so routing + telemetry + strategy code read
one value.

Changes:

  - packages/engine/src/config.ts: new exported
    applyConcreteGpuScreenshotClamp; delegates to
    shouldClampToScreenshotForConcreteGpu but computes the caller's
    final value, not just the clamp decision. Reads the programmatic
    opt-out from cfg.forceScreenshotExplicitlyOptedOut. Idempotent on
    already-true input.
  - packages/engine/src/index.ts: export the new helper.
  - packages/engine/src/services/frameCapture.ts: replace the inline
    OR expression with applyConcreteGpuScreenshotClamp.
  - packages/producer/src/services/renderOrchestrator.ts: assign result
    into the AUTHORITATIVE captureForceScreenshot local (was updating
    only observability). Downstream parallel-stream label at :2293 and
    capture_strategy telemetry at :2440-2450 now read the corrected
    value.

Tests: 6 new caller-level cases for applyConcreteGpuScreenshotClamp
covering the exact matrix Miguel called out:

  - resolved software + default false → promotes to true (screenshot)
  - resolved software + programmatic opt-out → stays false (BeginFrame)
  - resolved hardware + default false → stays false
  - resolved software + already-true → stays true (idempotent)
  - resolved software + env PRODUCER_FORCE_SCREENSHOT=false → stays false
  - resolved software + undefined cfg → promotes to true (frameCapture path)

Local: 67/67 engine config tests pass (was 61). oxfmt clean.
2026-07-14 03:17:29 +00:00
Vance Ingalls 72daac2a1d fix(engine): carry programmatic forceScreenshot opt-out to concrete-resolved site
Miguel R3 blocker on #2359: the runtime helper only checked the env opt-out
(PRODUCER_FORCE_SCREENSHOT=false), silently defeating the documented
programmatic escape hatch (overrides.forceScreenshot === false) on the
browserGpuMode:'auto' → software probe path. At the concrete-resolution
site the boolean forceScreenshot === false is ambiguous between default
and explicit opt-out — resolveConfig sees the provenance but the runtime
helper does not.

Fix: persist provenance on the resolved config.

- New INTERNAL EngineConfig field forceScreenshotExplicitlyOptedOut, set
  by resolveConfig when EITHER env or programmatic explicit-false is
  present. Purpose-documented in the type as 'not intended to be set by
  callers'.
- shouldClampToScreenshotForConcreteGpu gains an opts.programmaticOptOut
  parameter; returns false early when set. Env stays as the third arg
  (backward compatibility with existing tests).
- frameCapture.ts and renderOrchestrator.ts pass
  config.forceScreenshotExplicitlyOptedOut through at both call sites, so
  the auto→software probe path preserves the same escape hatches as
  literal browserGpuMode:'software'.

New tests: 5 additional cases across the helper (programmatic opt-out
alone; programmatic beats missing env) and resolveConfig provenance
(programmatic sets flag; env sets flag; neither leaves it undefined).
Local: 61/61 engine config tests pass (was 56).
2026-07-14 03:06:34 +00:00
Vance Ingalls d04bcbf7c4 Merge pull request #2360 from heygen-com/via/issue-1-webm-alpha-probe
fix(cli): detect WebM alpha lost when ALPHA_MODE tag is written without side data
2026-07-13 16:44:57 -07:00
Vance Ingalls c3b0b91feb chore(fallow): allow sampledAlphaIsFullyOpaque test-only export
Matches the isPathInside pattern in fileServer.ts. The helper is called from
webmAlphaCheck.ts's own webmAlphaAdvisory (same file), but fallow doesn't
count intra-file consumption or test-file imports. Suppress the false
positive rather than dropping the direct unit test — the 1/2/3-frame
byte-count gate + per-frame stride logic is load-bearing enough to warrant
independent tests, not just coverage through the outer advisory function.
2026-07-13 23:21:18 +00:00
Vance Ingalls c6da79cbdb Merge pull request #2358 from heygen-com/07-13-fix_core_cli_attribute_figma_rest_failures_to_the_endpoint_that_failed
fix(core,cli): attribute figma REST failures to the endpoint that failed
2026-07-13 16:16:24 -07:00
Vance Ingalls 2e44602f99 fix(engine,producer): apply software-GPU screenshot invariant at concrete-resolved point
Addresses Miguel's R1 blockers:

1. `browserGpuMode: "auto"` that runtime-probes to software slipped past the
   `resolveConfig` clamp — that clamp only sees the pre-resolve string. Add
   `shouldClampToScreenshotForConcreteGpu(resolvedGpuMode, currentForceScreenshot, env)`
   in `packages/engine/src/config.ts` and apply it at BOTH concrete-resolution
   sites:
   - `packages/engine/src/services/frameCapture.ts`: downgrades `preMode`
     from "beginframe" to "screenshot" when resolved GPU is software (respects
     `PRODUCER_FORCE_SCREENSHOT=false` env opt-out), fixing the routing.
   - `packages/producer/src/services/renderOrchestrator.ts`: updates
     `captureObservability.forceScreenshot` (and thus `captureMode`) at the
     same call site, fixing the observability truth on the auto → software
     case.

2. New unit tests in `config.test.ts`:
   - Documents the auto-branch gap (resolveConfig leaves auto as
     forceScreenshot=false — the runtime companion closes it).
   - 5 branch tests on `shouldClampToScreenshotForConcreteGpu` covering
     software / hardware / already-forced / env-opt-out / non-"false" env
     values.
   Full suite: 56/56 pass.

Scope narrowing on Blocker 2: the distributed rendering path at
`packages/producer/src/services/distributed/plan.ts:753-754` and
`renderChunk.ts:462-466` explicitly hardcodes `browserGpuMode:"software",
forceScreenshot:false` post-resolveConfig and stays outside this PR's
invariant boundary. `compileStage` may still flip it to true for alpha
formats, but generic MP4 distributed renders on SwiftShader hosts remain
BeginFrame. That's a separate architectural cleanup (needs its own
behavior-change trace); the PR body now scopes the invariant to the
in-process CLI/orchestrator path.
2026-07-13 23:13:30 +00:00
Vance Ingalls 56dcc4e47a fix(cli): accept 1–3-frame short WebMs + add direct pixel-probe tests
Address Miguel's R1 blocker + Rames/Miga's testability nit:

- The `-frames:v 3` decode samples AT MOST 3 frames; a legitimate 1- or
  2-frame WebM (256 or 512 bytes) was returned as `undefined` (probe
  failure), silently skipping the advisory even when every available
  pixel was opaque. Accept any positive whole-frame byte count ≤ 768
  (multiples of 256), distinguishing successful short-EOF from partial/
  malformed decode.
- Export `sampledAlphaIsFullyOpaque` and add 11 direct tests covering:
  3/2/1-frame opaque decodes → true; transparent pixel at pos 0 or
  final byte → false (guards the alpha-byte stride); non-frame-multiple
  / over-3-frame / zero byte counts → undefined; execFileSync throw →
  undefined; findFFmpeg missing → undefined; and one args-shape guard
  pinning the load-bearing `-c:v libvpx-vp9` before `-i` (without which
  the default decoder silently discards VP9 alpha and the whole check
  would false-positive on genuinely-transparent WebMs).
- Update advisory wording from "3 sampled decoded frames" to "every
  sampled decoded pixel" so the message is honest for short WebMs.

18/18 tests pass locally under `vitest run`.
2026-07-13 22:03:11 +00:00
Vance Ingalls bd8ee05ae2 fix(cli): label the batch asset-import RENDER_FAILED with the images endpoint
Review feedback on #2358: the batch-miss RENDER_FAILED in
runAssetImportMany (asset.ts) throws the same typed error as
client.ts's single-node renderNode, but wasn't labeled — so
cli_error.endpoint would silently come back undefined for the
flow that most heavily exercises /v1/images.
2026-07-13 21:41:55 +00:00
Vance Ingalls 4ca1552e20 fix(core,cli): attribute figma REST failures to the endpoint that failed
cli_error had no way to tell which figma REST call (images, files_nodes,
variables_local, styles, ...) actually hit RATE_LIMITED/FORBIDDEN/etc, so
the dashboard could see failures spike but not which call caused them.

FigmaClientError now carries a low-cardinality endpoint label (never the
raw fileKey/nodeId), threaded through to cli_error's endpoint property.
2026-07-13 21:41:55 +00:00
Vance Ingalls b8562c91d5 fix(cli): detect WebM alpha lost when the ALPHA_MODE tag is written without side data
Extends webmAlphaCheck.ts (from #2044) with a pixel-level decode probe.
After the tag check passes, decodes 3 sampled frames via
`ffmpeg -c:v libvpx-vp9 -pix_fmt rgba -f rawvideo` at 8x8 and emits a
distinct advisory if every alpha byte reads 255.

#2044 detects the "tag absent" failure mode (ffprobe shows no
`alpha_mode` in stream tags). It doesn't catch a stricter case reported
on CLI 0.7.56 / Windows 11: ALPHA_MODE=1 present but BlockAdditional
alpha side data empty. Under current logic webmAlphaAdvisory sees
`alphaMode: true` and stays silent, so the render ships as opaque
without any signal.

The -metadata:s:v:0 alpha_mode=1 push is a muxer directive that some
ffmpeg builds write unconditionally, independent of whether libvpx-vp9
emitted the alpha plane. Tag presence is necessary but not sufficient
evidence of preserved alpha.

Advisory text names both possibilities (opaque composition OR silent
alpha drop) plus the concrete workaround (png-sequence + prores repack).
Fast path (no tag or missing tag) is unchanged. Probe adds ~1s per
WebM render only when the tag says alpha.
2026-07-13 21:38:12 +00:00
Vance Ingalls ba5168293f fix(engine): software-GPU browsers imply screenshot capture
When `browserGpuMode === "software"`, set `forceScreenshot = true` in
`resolveConfig`. Explicit opt-outs (`PRODUCER_FORCE_SCREENSHOT=false`
or `overrides.forceScreenshot === false`) are honored.

This is defense-in-depth on top of the existing platform gates:

1. Linux + software (SwiftShader host) skips BeginFrame, avoiding the
   compositor stall on shader-heavy frames under CPU raster (same
   motivation as the closed PR #822).
2. `renderOrchestrator`'s reported `captureMode` field is derived from
   `cfg.forceScreenshot ? "screenshot" : "beginframe"` — without this
   clamp it misreports `"beginframe"` for the actual screenshot capture
   on darwin + software.
3. Any new BeginFrame or drawElement entry point that forgets to gate
   on GPU mode still routes to screenshot here.

Does NOT fix SwiftShader-on-darwin text-rasterization artifacts (an
ANGLE-SwiftShader issue on macOS text — the fix there is to use
`--browser-gpu`, which routes to `--use-angle=metal`).
2026-07-13 21:38:10 +00:00
Vance Ingalls 9b71bc2103 Merge pull request #2361 from heygen-com/via/flake-fix-manager-progress-notice
test(cli): stabilize flaky install-lock wait-notice test with fake timers
2026-07-13 14:37:40 -07:00
Vance Ingalls e47af77c5a test(cli): stabilize flaky install-lock wait-notice test with fake timers
Adopt the fake-timer pattern the sibling "recovers when a crashed reclaimer
leaves both lock directories" test in the same file already uses. Without
fake timers, if the dynamic `import("./manager.js")` beat between
`installFsMocks({ initialMtimeMs: Date.now() })` and the `withInstallLock`
call exceeds `staleMs` (50 ms on a busy shared runner with `vi.resetModules()`
per beforeEach), the new immediate-stale short-circuit added in #2328 fires
on iteration 1, breaks out before `waitedMs` reaches `waitNoticeMs=20`, and
no "Waiting for another hyperframes process" warn ever emits — the assertion
at `manager.test.ts:428` (`expected false to be true`) then fails.

Under fake timers, `Date.now()` is frozen at the mtime seed, so the lock
stays non-stale across the dynamic import and the wait-notice branch
observes real polling; `vi.advanceTimersByTimeAsync(staleMs + pollMs * 5)`
then drives the loop past both the wait-notice threshold and the stale
deadline so the reclaim + acquisition still resolves.

Test-only change; no production-code diff. Verified 27/27 in
`packages/cli/src/browser/manager.test.ts` under `vitest run`.
2026-07-13 21:30:44 +00:00
Vance Ingalls c830aa83c5 chore: release v0.7.55 2026-07-12 11:52:53 -07:00
Vance Ingalls 27eec5be6c Merge pull request #2301 from heygen-com/07-12-feedback-skill-bug-repro-guidance
docs(skills): tell agents to file reproducible render bugs, not paraphrases
2026-07-12 11:51:10 -07:00
Vance Ingalls 2a0c603430 Merge pull request #2300 from heygen-com/07-12-fix-software-video-beyond-viewport
fix(producer): stop clipping the bottom edge of software-GPU video renders
2026-07-12 11:50:56 -07:00