Skip to content

style: apply oxfmt baseline formatting across all source files#25

Merged
vanceingalls merged 1 commit intomainfrom
va-851/03-baseline-formatting
Mar 24, 2026
Merged

style: apply oxfmt baseline formatting across all source files#25
vanceingalls merged 1 commit intomainfrom
va-851/03-baseline-formatting

Conversation

@vanceingalls
Copy link
Copy Markdown
Collaborator

@vanceingalls vanceingalls commented Mar 23, 2026

Summary

  • Run oxfmt . across the entire codebase to establish formatted baseline
  • 299 files changed — mechanical formatting only, no logic changes
  • Double quotes, semicolons, 2-space indent, trailing commas, 100 print width

Part 3/4 of VA-851

Test plan

  • pnpm format:check — all 426 files pass
  • pnpm -r typecheck — all packages pass
  • pnpm build — all packages build
  • All 348 tests pass

@linear
Copy link
Copy Markdown

linear Bot commented Mar 23, 2026

VA-851 [Pre-Migration] Configure ESLint, Prettier, and conventional commits

Context

The codebase currently has no linting or formatting enforcement. Code is clean by convention, but OSS contributors need automated guardrails. Team feedback: "I love when an open source repo has this."

What to do

  1. ESLint — add configuration at monorepo root with TypeScript rules. Extend from @typescript-eslint/recommended.
  2. Prettier — add .prettierrc at root. Configure for the existing code style (double quotes, no semicolons or with — match what's already there).
  3. Conventional commits — add commitlint config enforcing conventional commit format (feat:, fix:, refactor:, etc.). This enables automated changelog generation later.
  4. Run formatter across all source files to establish baseline (single "format" commit in internal repo before port).
  5. Add lint/format scripts to root package.json: pnpm lint, pnpm format, pnpm format:check
  6. Verify all existing code passes lint + format checks with zero errors

Why before port

We want the OSS repo's first commit to already have these configs in place and all code conforming. No "fix linting" commits in public history.

@vanceingalls vanceingalls marked this pull request as ready for review March 23, 2026 18:00
@vanceingalls vanceingalls force-pushed the va-851/03-baseline-formatting branch from ee29ed2 to ca72f81 Compare March 23, 2026 21:57
@vanceingalls vanceingalls force-pushed the va-851/02-lint-fixes branch 2 times, most recently from 7ed3a20 to f5b8a4e Compare March 23, 2026 22:11
@vanceingalls vanceingalls force-pushed the va-851/03-baseline-formatting branch from ca72f81 to 635d134 Compare March 23, 2026 22:11
@vanceingalls vanceingalls force-pushed the va-851/02-lint-fixes branch 2 times, most recently from b3b9d0f to f7c8d23 Compare March 23, 2026 23:06
@vanceingalls vanceingalls force-pushed the va-851/03-baseline-formatting branch from 635d134 to 017472c Compare March 23, 2026 23:06
@vanceingalls vanceingalls changed the base branch from va-851/02-lint-fixes to graphite-base/25 March 23, 2026 23:41
@vanceingalls vanceingalls force-pushed the va-851/03-baseline-formatting branch from 017472c to a7198b7 Compare March 23, 2026 23:42
@graphite-app graphite-app Bot changed the base branch from graphite-base/25 to main March 23, 2026 23:42
@vanceingalls vanceingalls force-pushed the va-851/03-baseline-formatting branch from a7198b7 to 9714703 Compare March 23, 2026 23:42
@vanceingalls vanceingalls merged commit 20be2ea into main Mar 24, 2026
17 checks passed
Copy link
Copy Markdown
Collaborator Author

Merge activity

miguel-heygen added a commit that referenced this pull request Apr 7, 2026
#219)

## Summary

Fixes a bug where non-template sub-compositions (full HTML documents loaded via `data-composition-src`) lost all `<head>` styles and scripts. This affected **three code paths**:

1. **Runtime** (`compositionLoader.ts`) — browser preview via iframe fetch
2. **Bundler** (`htmlBundler.ts`) — studio preview HTML bundling (**this was causing the black preview**)
3. Producer fix is in PR #220

## What it fixes

**Eval prompt #25** (iris-wipe) renders entirely black in both the studio preview and rendered video because scene backgrounds (`#EF4444` red, `#3B82F6` blue), positioning, and the GSAP CDN script were all in `<head>` and silently dropped.

### Verified

Rebuilt core, started studio preview, fetched the bundled HTML from `/api/projects/iris-wipe/preview` — confirmed `#scene1 { background: #EF4444 }` and `.scene { position: absolute }` are now present in the output.

## Root cause

All three code paths did the same thing:
```js
const contentHtml = template ? template.innerHTML : bodyEl.innerHTML;
// ^ <head> content is already lost here
```

## Test plan

- [x] All 429 core tests pass
- [x] Studio preview endpoint returns correct bundled HTML with head styles included
- [x] `pnpm --filter @hyperframes/core build` succeeds

🤖 Generated with [Claude Code](https://claude.com/claude-code)
miguel-heygen added a commit that referenced this pull request Apr 7, 2026
…postcss ESM (#220)

## Summary

Two fixes in the producer:

1. **Head styles/scripts extraction**: mirrors the runtime fix from PR #219. The producer's `inlineSubCompositions()` parsed only `bodyEl.innerHTML` from non-template sub-compositions, discarding all `<head>` content.
2. **Externalize postcss**: postcss is a CJS module with `require("path")` — bundling it into ESM output caused "Dynamic require of path is not supported" at runtime, breaking `npx tsx cli render` and `npx tsx cli preview` from the local dev build.

## Verified

Re-rendered the iris-wipe composition (eval prompt #25, previously scored 1.0/5 — entirely black):

| Frame | Before fix | After fix |
| --- | --- | --- |
| 0\.5s | Black | Red background + "HELLO" text |
| File size | 16\.9 KB (all black) | 64\.8 KB (actual content) |

Scene 1 now renders correctly. Scene 2's clip-path animation has a separate GSAP issue (the lint already warns about it via `scene_layer_missing_visibility_kill`).

## Test plan

- [x] `pnpm --filter @hyperframes/producer build` succeeds
- [x] `node --input-type=module -e "import './dist/index.js'"` loads without error
- [x] Re-render iris-wipe produces visible content (64.8 KB vs 16.9 KB)
- [x] Frame extraction confirms red "HELLO" scene renders correctly
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