Skip to content

cli: hyperframes compositions prints NaN for a non-numeric data-width/data-height #7670

Open

Description

@jrusso1020

hyperframes compositions lists each composition with its size. When data-width or data-height isn't a number, the size prints as NaN:

<div data-composition-id="main" data-width="wide" data-height="360">...</div>
$ hyperframes compositions
main  NaN×360  ...

The cause is in packages/cli/src/commands/compositions.ts. Both the root parser (around line 63) and the sub-composition parser (around line 133) call parseInt(...) and use the result without checking it. The ?? "1920" and ?? "1080" fallbacks only apply when the attribute is missing, not when it's invalid.

What to do

  1. Use the default size (1920×1080 for the root, the parent's size for sub-compositions) whenever the parsed value isn't a positive finite number.
  2. Add a test with a non-numeric data-width that checks the listed size.

— Rames Jusso

Activity

  1. added
    bugSomething isn't working
    difficulty/easyLocalized change with a known approach, limited risk, and straightforward verification.
    good first issueEasy, available, ready work with code/test pointers and a confirmed newcomer mentor.
    help wantedReady, available work with maintainer review support; any difficulty.
    on Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdifficulty/easyLocalized change with a known approach, limited risk, and straightforward verification.good first issueEasy, available, ready work with code/test pointers and a confirmed newcomer mentor.help wantedReady, available work with maintainer review support; any difficulty.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions