Skip to content

Refactor canvas workbench seams and image generation capabilities#38

Merged
YakiHugo merged 49 commits intomainfrom
feat/canvas-optimize
Mar 24, 2026
Merged

Refactor canvas workbench seams and image generation capabilities#38
YakiHugo merged 49 commits intomainfrom
feat/canvas-optimize

Conversation

@YakiHugo
Copy link
Owner

Summary

  • narrow the canvas active-workbench boundary and split viewport, selection, export, and document responsibilities into clearer seams
  • advance the canvas document v3 rewrite, including hierarchy, resolve, command, patch, and history updates across the client canvas stack
  • update image generation and chat persistence paths on the server and shared schemas, including capability handling, prompt observability, and route/provider integrations
  • refresh supporting config, task notes, and test coverage needed for the canvas and image-generation changes

Testing

  • pnpm exec eslint src/features/canvas/CanvasViewportStageShell.tsx
  • pnpm exec vitest --run src/features/canvas/viewportOverlay.test.ts src/features/canvas/textRuntimeViewModel.test.ts src/features/canvas/elements/TextElement.test.ts
  • Additional repo-wide validation status was not confirmed from the provided context

YakiHugo added 30 commits March 22, 2026 16:38
@vercel
Copy link

vercel bot commented Mar 24, 2026

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

Project Deployment Actions Updated (UTC)
film-lab Ready Ready Preview, Comment Mar 24, 2026 6:22pm
film-lab-ff1i Ready Ready Preview, Comment Mar 24, 2026 6:22pm

@YakiHugo YakiHugo merged commit 9c79d0d into main Mar 24, 2026
5 checks passed
Copy link

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

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: d36e7d9d37

ℹ️ 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".

metadata: metadata as Record<string, unknown>,
includeThumbnail: Boolean(thumbnailBlob),
});
const id = prepared.assetId;

Choose a reason for hiding this comment

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

P1 Badge Avoid creating local assets with reused remote IDs

When prepareAssetUpload returns existing: true, this code reuses prepared.assetId as the new local asset ID and still appends a new asset record. If two imported files share content (e.g., same bytes with different filenames) or the hash already exists remotely, multiple local entries can end up with the same id, while IndexedDB put overwrites by key. That leaves in-memory state with duplicate IDs and causes later update/delete logic to act on the wrong asset instance.

Useful? React with 👍 / 👎.

Comment on lines +80 to +82
const mimeType = request.headers["content-type"];
if (typeof mimeType !== "string" || !mimeType.startsWith("image/")) {
return reply.code(400).send({ error: "Only image uploads are supported." });

Choose a reason for hiding this comment

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

P1 Badge Register a parser for binary image upload bodies

This route expects image/* request bodies and then reads raw bytes, but the server setup never registers a content-type parser for image/*. In Fastify, unsupported content types are rejected before the handler runs, so PUT /api/assets/upload/:assetId/:kind will return 415 for normal image uploads and new asset uploads cannot complete.

Useful? React with 👍 / 👎.

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