Skip to content

feat(renderer): media-native render pipeline#60

Merged
YakiHugo merged 15 commits into
mainfrom
ci/parallel-jobs-and-typecheck
Apr 25, 2026
Merged

feat(renderer): media-native render pipeline#60
YakiHugo merged 15 commits into
mainfrom
ci/parallel-jobs-and-typecheck

Conversation

@YakiHugo

Copy link
Copy Markdown
Owner

Summary

  • Carrier & signal families: halftone carrier (GPU shader, mono/CMYK/RGB, 4 dot shapes) and channel-drift signal damage as first-class authored families with dedicated edit panels
  • Semantic overlay system: SemanticOverlayNode union (timestamp, caption, watermark) with typed overlay execution pipeline, CPU renderers, and canvas edit panels
  • Quality tiers: RenderQualityTier (interactive | quality | export) replaces the scattered ImageRenderIntent + ImageRenderQuality pair; single tier config resolves intent and error strictness
  • Analysis layer: AnalysisLayerInputs replaces ad-hoc snapshot bags; typed requirements derived from carrier transforms with per-tier validation strictness
  • Motion render contract: MotionProgram authored type with signal-drift preset, time-parameterized frame context, sequence renderer with abort support
  • Dead-code enforcement: knip now fails on unused exports in verify pipeline; AGENTS.md documents @public JSDoc tag for multi-slice exemptions
  • Review fixes: normalizedTime branches on loop flag, abort re-checked after async frame render, non-null assertion on nullable reference canvas replaced with safe coalescing, dead code removed (unused requiresStyleAnalysisSnapshot field, zero-consumer computeEdgeMap)

Test plan

  • pnpm test — 88 render tests pass, 0 regressions
  • pnpm lint — no new lint errors
  • tsc -b — no new type errors (3 pre-existing)
  • pnpm dead-code — verify knip catches remaining unused exports across codebase
  • Manual smoke test of halftone/signal-damage/caption/watermark edit panels in canvas

YakiHugo and others added 9 commits April 24, 2026 06:46
- Split the single serial verify job into parallel lint, test, typecheck
  jobs with build gated behind all three
- Add typecheck job (was missing from CI)
- Restrict triggers to push on main + PRs targeting main
- Add timeout-minutes to prevent hung jobs

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…lies

Extend the render pipeline with two new first-class authored families:

Carrier transforms: add halftone alongside ASCII. GPU shader supports
mono/CMYK/RGB color separation with circle/diamond/line/square dot
shapes. Carrier orchestrator now dispatches by transform type.

Signal damage: add signalDamage[] as a separate authored family on
CanvasImageRenderStateV1. Channel drift shifts RGB channels by
independent pixel offsets. Executes as a dedicated pipeline stage
between carrier transforms and style effects.

Both families include full GPU shaders, pipeline integration,
state editing helpers, and UI panels with preview/commit workflow.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Update AGENTS.md long task rules:
- JSON fields: id, status, blockedBy, passes (no derived fields)
- blockedBy defines the DAG; empty array = no dependency
- Eligible = pending + all blockedBy done
- Claim by setting in_progress and committing before implementation

Migrate media-native-render-pipeline task files to new schema.
Mark carrier-and-signal-families slice as done.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Extend SemanticOverlayNode union beyond TimestampSemanticOverlayNode with
CaptionSemanticOverlayNode and WatermarkSemanticOverlayNode. Migrate
output.timestamp to semanticOverlays[] in neutral state. Add normalization
guard for new overlay types and CaptionAdjustments/WatermarkAdjustments
in the shared type surface.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add CPU canvas renderers for caption (positioned text bar with background)
and watermark (tiled rotated text pattern). Overlay execution pipeline
dispatches both through the same GPU-blend path as timestamp, preserving
preview/export parity.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add state editing helpers (resolve/apply/upsert) for caption and watermark
semantic overlays. Create CanvasCaptionEditPanel and CanvasWatermarkEditPanel
with preview/commit workflow matching halftone/signal-damage pattern. Register
both as floating panel types.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Caption and watermark overlays satisfy the pass criteria. Update handoff
notes with implementation details and remaining follow-ups.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ract

Complete the remaining media-native-render-pipeline slices:

- RenderQualityTier replaces the scattered ImageRenderIntent + ImageRenderQuality pair
- AnalysisLayerInputs replaces ad-hoc CarrierSnapshots with typed inputs and validation
- MotionProgram authored type with signal-drift preset and frame sequence renderer
- normalizedTime correctly branches on loop flag for seamless vs endpoint behavior
- Abort re-checked after each async frame render to prevent partial frame delivery
- Non-null assertion on nullable fallback reference canvas replaced with safe coalescing
- Dead code removed: requiresStyleAnalysisSnapshot (computed, never consumed), computeEdgeMap (zero importers)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Remove --no-exit-code from knip so unused exports fail CI
- Add dead-code step to verify pipeline (lint → dead-code → test → build)
- AGENTS.md: document knip rule and @public JSDoc tag for multi-slice exemptions

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Apr 25, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
film-lab Ready Ready Preview, Comment Apr 25, 2026 1:28pm
film-lab-ff1i Ready Ready Preview, Comment Apr 25, 2026 1:28pm

- Fix union narrowing in analysisLayer test helpers (use Extract + const assertions)
- Add missing motionPrograms field to createNeutralCanvasImageRenderState
- Revert strict knip in verify — codebase has ~260 pre-existing unused exports;
  AGENTS.md rule enforces agent discipline, knip stays as reporting tool

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 34cf5475cb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/render/image/renderSingleImage.ts Outdated
Comment thread src/render/image/motionRender.ts Outdated
- Capture a dedicated stage snapshot before signal-damage execution so
  masked signal-damage nodes get a correct reference canvas even when
  no carrier transforms are present
- Clamp fps to >= 1 in motion frame context to prevent Infinity/NaN
  from malformed or persisted states with fps <= 0

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Main restructured canvas modules (boardImageRendering, imageRenderStateEditing
moved to canvas/image/, SliderControl replaced by CanvasSliderRow, geometry
files moved to canvas/geometry/). Update all edit panel imports accordingly.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9d08fd5e59

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/render/image/motionRender.ts Outdated
Comment thread src/render/image/renderSingleImage.ts Outdated
…gnal-damage snapshot

- Signal-drift offsets no longer pre-multiply by intensity — the shader's
  u_intensity uniform is the single scaling control, fixing quadratic attenuation
- Signal-damage stage snapshot now released in finally block, matching the
  style/finalize cleanup pattern to prevent canvas accumulation during previews

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 07d362b18e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +22 to +25
halftone: "Halftone",
"signal-damage": "Signal Damage",
caption: "Caption",
watermark: "Watermark",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Add UI entry points for newly registered floating panels

These panel types are registered here, but there is currently no user path that can activate them: a repo-wide search shows togglePanel is only called from CanvasToolRail, whose panelButtons list still exposes only library, layers, edit, and ascii. That means halftone, signal-damage, caption, and watermark cannot be opened in the app, so the new edit panels are effectively unreachable despite being wired into rendering.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Acknowledged — this is a known follow-up. The edit panels and panel type registration are in place, but CanvasToolRail button wiring is out of scope for this render pipeline PR. Will be addressed when the tool rail UI is extended.

Comment thread src/render/image/motionRender.ts Outdated
Catch AbortError thrown by the image pipeline during per-frame render
so cancellation returns already-produced frames instead of rejecting
the entire sequence.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@YakiHugo YakiHugo merged commit 8dccebc into main Apr 25, 2026
7 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 49f037b20b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/render/image/motionRender.ts
Comment thread src/render/image/renderSingleImage.ts
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