`motionContextToDocs`: `y` track copies `opacity` when a node animates both (key lookup has no word boundary)
Los mantenedores suelen responder en 1 día
@Muzzy5150 ya está trabajando en esto.
Desde el 30/10/2026.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 78/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- node.js, typescript
Línea de trabajo
Empieza con dist/figma/motionContextToDocs.js e inspecciona arrayAfterKey, scalarAfterKey y la búsqueda de balancedBlock descrita en el issue. Ejecuta la reproducción proporcionada con el paquete y comprueba la pista y emitida. El trabajo está terminado cuando sus valores y tiempos coinciden con los arrays esperados cuando opacity e y aparecen juntos.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Describe the bug
In @hyperframes/core (dist/figma/motionContextToDocs.js), arrayAfterKey, scalarAfterKey and the
balancedBlock(transition, ${prop}: {) lookup search for the key with a plain regex or substring,
with no word boundary. When a Figma node animates opacity and y together, the search for y: [
matches inside opacity: [ (and y: { inside opacity: {), so the y track gets the opacity values
and timing. Letters that should rise 120px move 1px. Any key that ends another key is exposed the same
way.
The verify-motion.mjs check in the /figma skill passes the wrong translation: on our test it
scored the broken output higher than the corrected one (16.28 dB against 15.89 dB worst segment),
because the fade dominates the motion energy it compares.
Minimal reproduction
// repro.mjs — run: node repro.mjs <path to an installed @hyperframes/core>
const core = process.argv[2];
const { motionContextToDocs } = await import(core + "/dist/figma/index.js");
const snippet = '<motion.div initial={{ opacity: 0, y: 120, }} animate={{ opacity: [0, 0, 1, 1], y: [120, 120, 0, 0], }} transition={{ opacity: { duration: 4.5, times: [0, 0.0444, 0.1333, 1], ease: ["linear", "easeOut", "linear"], repeat: Infinity }, y: { duration: 4.5, times: [0, 0.0444, 0.2222, 1], ease: ["linear", "easeOut", "linear"], repeat: Infinity }, }} />';
const response = {
nodes: [{ nodeId: "1:2", nodeName: "Box", nodeType: "FRAME", codeSnippets: { motionDev: snippet } }],
timelineCohorts: [{ rootNodeId: "1:1", durationMs: 4500, loopMode: "loop", memberNodeIds: ["1:2"] }],
};
console.log(JSON.stringify(motionContextToDocs(response, { selectorFor: () => "#box" }), null, 1));
The snippet has the same shape as what get_motion_context returns for a layer with a fade and a
rise in Figma Motion.
Steps to reproduce
npm pack @hyperframes/[email protected] && tar xzf hyperframes-core-0.8.217.tgz && (cd package && npm install --omit=dev)node repro.mjs ./package- Look at the
ytrack.
Expected behavior
y track: values [120, 120, 0, 0], times [0, 0.0444, 0.2222, 1].
Actual behavior
y track: values [0, 0, 1, 1], times [0, 0.0444, 0.1333, 1]: the opacity track, copied.
Environment
✓ Version CLI 0.8.181 (plugin) · @hyperframes/core 0.8.181 and 0.8.217 both affected
✓ Node.js v24.22.0 (darwin arm64)
✓ CPU 8 cores · Apple M3
✓ FFmpeg ffmpeg 6.0
✓ Chrome chrome-headless-shell mac_arm 152.0.7977.30
Additional context
A fix that keeps the current parsing: anchor the key so it cannot match inside a longer identifier,
for example new RegExp(`(?<![\\w$])${escapeRegExp(key)}\\s*:\\s*\\[`) in arrayAfterKey, the same
in scalarAfterKey, and the same guard in the balancedBlock lookup for ${prop}: {. Our workaround
until then is to reorder the snippet so the y entry comes before opacity, which changes no value.
It would also help if verify-motion.mjs compared the emitted tweens property by property against
the get_motion_context keyframes, since a frame-energy score cannot see a swapped track.
- Lenguaje dominante
- TypeScript
- Estrellas
- 54.1k
- Forks
- 4.9k
- Merge medio
- 6 h 8 min
- PR fusionados (30 d)
- 797
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de heygen-com/hyperframes
-
render --start/--end applies the 2 GB Lambda plan cap to local rendersPosiblemente ocupada @ump45nose la tomó hace 1 día. Abiertobug good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
heygen-com/hyperframes#7035 ·
Los mantenedores suelen responder en 1 día
-
[CLI] Reject non-integer tokens for distributed render flagsPosiblemente ocupada @pqminh27 la tomó hace 3 días. Abiertoarea/tool bug difficulty/easy
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
heygen-com/hyperframes#6889 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Segmented capture always fails with `--format mov`Posiblemente ocupada @DaKaufeeBoii la tomó hace 3 días. Abiertobug difficulty/easy triage/ready
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
heygen-com/hyperframes#6481 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Timeline: show a clip's full name when its label is cut offPosiblemente ocupada @DanielMcSheehy la tomó hace 16 días. Abiertodesktop-candidate difficulty/easy enhancement good first issue help wanted triage/ready
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
heygen-com/hyperframes#5582 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Studio: press ? to open the keyboard shortcuts panelPosiblemente ocupada @B-Payal la tomó hace 20 días. Abiertodesktop-candidate difficulty/easy enhancement good first issue help wanted triage/ready
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
heygen-com/hyperframes#5580 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de heygen-com/hyperframes
Issues similares
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
formbricks/formbricks#9918 ·
Los mantenedores suelen responder en 1 día
-
Chat: Resize question overlayAbiertoenhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
thecodacus/pithagoras#364 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 72/100
openclimatefix/quartz-frontend#823 ·
Los mantenedores suelen responder en 4 días
-
area:agent-manager community needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
`contacts.create` posts to `/audiences/undefined/contacts` when `audienceId` is undefinedPosiblemente ocupada @RaphaelFakhri la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
resend/resend-node#1176 ·
Los mantenedores suelen responder en 1 día