Skip to content

fix(cli): allow zero layout tolerance#2541

Open
tianma-if wants to merge 1 commit into
heygen-com:mainfrom
tianma-if:codex/cli-zero-layout-tolerance
Open

fix(cli): allow zero layout tolerance#2541
tianma-if wants to merge 1 commit into
heygen-com:mainfrom
tianma-if:codex/cli-zero-layout-tolerance

Conversation

@tianma-if

Copy link
Copy Markdown

Summary

  • preserve an explicit --tolerance 0 for layout inspection
  • continue clamping negative values to zero
  • retain the default tolerance of 2 for invalid input

Why

The previous parseFloat(value) || 2 expression treated a valid zero as missing, so callers could not request exact, zero-tolerance overflow checks.

Validation

  • bunx oxfmt packages/cli/src/commands/layout.ts packages/cli/src/commands/layout.test.ts
  • bunx oxlint packages/cli/src/commands/layout.ts packages/cli/src/commands/layout.test.ts
  • bun run --filter @hyperframes/cli test -- layout.test.ts
  • bun run --filter @hyperframes/cli typecheck

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.

1 participant