Skip to content

[bugfix] motion: report visible clips under hidden ancestors - #673

Open
twu3202 wants to merge 1 commit into
ThinkFlowLab:mainfrom
twu3202:fix-motion-inspect-visibility
Open

twu3202 wants to merge 1 commit into
ThinkFlowLab:mainfrom
twu3202:fix-motion-inspect-visibility

Conversation

@twu3202

@twu3202 twu3202 commented Dec 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Motion frame inspection could report an empty frame while Chrome painted a clip. A clip can restore CSS visibility under a hidden ancestor. The inspector now uses the clip’s own computed visibility and still accounts for ancestor display, opacity and clipping.

Linked issue

No issue is linked. This was reproduced while inspecting an eight-second Motion composition.

Labels

Suggested: type:bug, area:canvas.

Test plan

  • python -m pytest -q tests/test_motion_inspect_v2.py — 13 passed with Chrome on macOS. The regression checks a visible title alongside inherited hidden visibility, collapsed visibility, a parent with display: none, and a parent with zero opacity.
  • Base: 9f24de145389dab2186944d6fcc79acee5492dad. Head: 67f6418a476f675d5244127dd9dd4d4d32d402dc. Hosted Release checks are pending.
  • Independent pre-submission review on this base and head: 93/100. The local reviewer reproduced the before/after result, inspected the screenshot and reran the Chrome suite.

Evidence that it works

With OpenDirector running, send the supplied request to the frame inspector on each revision:

curl -sS "$OPENDIRECTOR_API_URL/api/creation/motion/inspect-frames" \
  -H 'Content-Type: application/json' -H 'X-OpenDirector-Request: 1' \
  --data-binary @inspect-request.json | jq '.frames[] | {time, ids: [.activeClips[].id]}'

The jq filter reads the raw API response. The two filmstrip JPEGs are byte-identical across revisions. The base returned [] at both times. This head reports curve1, curve2, and curve3 at 3 s, and text at 6 s. The three curves overlap visually in this example. frame-inspection.png pairs the actual inspector filmstrip with the before/after receipts.

Inspected frames and active clip IDs before and after the fix

Frame inspection responses: base and candidate.

Provider verification

The check ran against a saved document in local Chrome. It requires no model provider.

Bilingual UI

The change affects diagnostic values. No interface strings changed.

@david6666666 david6666666 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PASS 67f6418 · no linked issue

这个改动让 inspector 以 clip 自己的 computed visibility 为准,父级的 display: none、opacity 和裁剪依然生效。已下载核对截图及前后 JSON:3 秒从 [] 变成 3 条曲线,6 秒从 [] 变成文字,对得上图像。作者报告本机 Chrome 13 项通过;当前 SHA 的 Release、CodeQL、DSH 已绿,我没有本地重跑。没有新的 actionable finding。

93/100(范围 3,正确性 3,验证 2,主张证据 3,简洁性 3;均满分 3)。

Dot,代表 @david6666666;非表决。Coordinator:由仓库指定维护者接手,本次未投票。

This branch has not been deployed

No deployments
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.

2 participants