Drive the drop-target border radius from --image-drop-radius, enlarge the
overlay radius, and widen the composer editor padding.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add a VisualAnnotationPanel letting users mark regions on an image (brush,
circle, rectangle, cross) with per-mark edit instructions, composited into
an annotation guide image. The new "visual-annotation" node action sends
the unmarked source plus the annotated guide to the image model, editing
only numbered regions. Server validates the annotation image/instructions
and threads them through the generator task.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Clarify in API/README that device limits are enforced independently per
normalized device type with atomic overflow revocation, and add a mapper
test covering the RFC3339 UTC timestamp contract.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add an ImageDropOverlay component and useImageDropTarget hook that let
users drop an image onto the home prompt card or canvas agent composer to
upload it as a reference, with a localized drop overlay.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Track authenticated sessions per device (parsing user-agent for desktop
vs mobile via mileusna/useragent), enforce configurable concurrent device
limits (Auth.DeviceLimits), and surface device status and "remove other
devices" management in the account dialog. Adds device/session context to
the auth module stores and exposes limits through the API.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Track agent history loading in the workspace and render a spinner with a
localized "loading conversation history" message in the assistant feed,
so the empty state no longer flashes before history resolves.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Condense the settings-chip summary to quality, ratio, and image count
(dropping resolution and pixel size), wrap the label in an ellipsized
span, and swap the up/down chevron for a single rotating ChevronDown
across the canvas agent and image generator composers.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Render a CanvasAgentEmptyState in the Agent panel that fetches localized
starter content from the new agent-starters endpoint, with local defaults
as fallback. Clicking a starter focuses the prompt composer (new focus
handle). Includes accompanying UI polish: side-nav cleanup, animated
prompt examples, and canvas panel spacing tweaks.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add a public GET /api/ui/agent-starters endpoint returning localized
empty-state content (title, description, preview images, and starter
prompts) for the canvas Agent panel. Content is server-configurable via
AgentStarter config with built-in zh-CN/en-US fallbacks, and the route is
exempt from authentication so shared canvases render the same content.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add a brand kit domain model, repository, and dedicated page/route for
managing brand kits, plus a BrandKitSelector used on the home page and
canvas workspace. Home project creation and the workspace can attach a
brand kit to a project, with new i18n strings and a side-nav entry.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add a brand kit domain with memory and postgres stores, a BrandKitService
for CRUD and resolution, and REST endpoints to list, upsert, and delete
brand kits. Projects can bind a brand kit whose resolved context and
reference images feed into the agent's long-term memory and design prompts.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Introduce sm/md/lg sizes on the Switch component driven by CSS custom
properties, move switch styling into a dedicated switch.css, and remove
the duplicated overrides from styles.css and ToolbarCustomizeDialog.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Move PSD generation off the server. The image-generation API only
produces raster formats, so drop the PSD request path, the oov/psd
decoder, and the LayeredDocumentGenerator wiring. Layer separation now
returns clean background, foreground, and text_render_data artifacts
into a transparent frame.
Export that frame (or any image node) as PSD from the canvas context
menu: ag-psd assembles layers, rotation/flip, opacity, editable text,
and stroke effects from the current canvas state at download time.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Replace the ratio-baked size presets with a resolution tier (1K/2K/4K) plus
ratio selection and normalized dimensions, send imageQuality/imageCount to
the agent, and add the output_format field to GeneratorTaskInputArgs.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Map imageQuality/imageCount and output_format across the HTTP and
WebSocket handlers, pass them into the design service calls, and register
the layered document generator in the service context.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add quality and output_format to ImageRequestOptions, plumb them through
the JSON/multipart request bodies, generalize asset URL collection to
non-image formats, and add GenerateLayeredDocument for PSD output.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Convert GPT Image 2 layered PSD output into canvas image/text nodes with a
local separation fallback (new layer_separation.go, oov/psd dependency),
default layer-separation/edit-elements output_format to psd, and thread
imageQuality/imageCount through project generation and job processing.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add ImageQuality/ImageCount to AgentRequest, AgentChatRequest and Job,
add OutputFormat to GeneratorTaskInputArgs, and introduce the
LayeredDocument types and LayeredDocumentGenerator port for PSD output.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Extend CreateProject/Generate/AgentChat request types with imageQuality
and imageCount, and add output_format to GeneratorTaskInputArgs for
layered (PSD) generation output.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Render and manage the separated layers produced by the edit-elements
action as a manual-frame container with attached image and text
children.
- canvasNodeOps: frame container/child helpers, render ordering,
auto-attach nodes to containing frames, and layer reordering
- CanvasWorkspace wires frame-aware selection, drag, resize, hide/lock,
and layer reorder through the new ops
- CanvasPanels: expandable layer tree with rename/reorder
- designGateway.submitGeneratorTask + GeneratorTaskSubmitResponse and
bbox/generator_name artifact metadata in the domain
- ArtboardPreview shows a working state for generating frame layers
- i18n: expandLayer / renameLayer / layerTitlePlaceholder; styles
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Introduce the `layer-separation` generator (edit-elements node action)
that splits a source image into a clean background layer, foreground
image artifacts with bounding boxes, and editable text render data.
- New layer_separation.go builds the separated result and artifacts
- SubmitGeneratorTask routes layer-separation and move-object via a
switch; standalone task completion + polling support
- Extend artifact metadata with BBox and GeneratorName across the
domain, API types, mapper, .api schema, and API.md
- edit-elements gets a transparent manual-frame placeholder holding the
separated foreground images and text layers beside the original
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Switch the editable selection title from onDoubleClick to onClick so
renaming a node/layer title begins with a single click.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Some image endpoints reject the `n` count parameter (Unknown parameter
tools[0].n / param: n). Detect that error and re-issue the batch as
concurrent count=1 requests, each with a suffixed idempotency key, then
assemble the URLs into a single GeneratedImage.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Negative and larger letter spacing values are legitimate for extracted
text layers; clamp only outside ±256 instead of rejecting anything
below 0 (or above 80 in the extractor).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Thread a translate function through friendlyAgentErrorMessage/
friendlyProjectFailureMessage and move the hard-coded zh-CN error copy
into the i18n locale files (with a zh-CN fallback map). Generation
stream failures now report through a toast via showGenerationError in
addition to setError, so the removed inline .panel-error footer is
gone.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
When an image-generator target requests multiple images, duplicate the
target placeholder into N generating clones and lay them out beside the
target. Incremental results after the first are appended as siblings
rather than merged into the target, and placeholder cleanup now clears
the target's generating clones on failure.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
When multiple image-generator tasks carry the same brief, request all
images from a single GPT Image call with Count=N instead of firing one
call per image. Adds directImageBatchCount/Prompt detection, batch
(incremental) generation paths, and folds the planned count into the
idempotency key. Disables the streaming plan probe for multi-image
requests.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Reduce polling pressure on the generator task status endpoint by raising
the client poll interval from 3s to 5s.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Treat a generator task as completed when it produces artifacts, when a
task message reaches a terminal state, or when the project is ready —
even if the project is still exploring another concurrent thread. Adds
generatorTaskMessageCompleted to classify terminal task messages and
covers ready-without-messages and concurrent-thread cases with tests.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Compact the floating composer with an auto-resizing prompt editor and a
scrollable settings popover, add a titled settings panel, and show the
resolved image size in the settings summary. Add the imageCountLabel
string for the count section.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Persist each image-generator node's target resolution in metadata and
surface it in the selection frame and node preview. Place new generators
without overlapping existing ones, keep local draft generators when a
compressed snapshot omits them, and add a dedicated selection-frame
variant plus scale-aware preview styling.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Track image-generator streams in a keyed Map/Set instead of a single ref
so several placeholders can generate at once without cancelling each
other. Generating state is derived from the number of open streams.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Use the user-visible contents (without injected image-mode settings) for the
optimistic agent messages so the settings blob is not echoed in the thread.
Widen the composer settings chip to 150px so longer labels are not clipped.
Also picks up regenerated next-env.d.ts and tsbuildinfo.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
SaveCanvas treated a nil Nodes/Connections slice from a compressed snapshot
as an empty canvas, wiping existing content. Distinguish nil (field omitted,
keep the project's current nodes/connections) from an explicit empty slice.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
For image / pure-image / image-generator / image-action modes, skip the
task-planning round trip and hand the prompt straight to the image model,
deriving the requested image count from the composer settings. Also
normalize completed image-generator nodes back into regular image nodes
(clearing the image-generator layer role and defaulting Tone to "visual")
when merging generated results and when restoring finished nodes, so a
finished generator node is not re-appended as a duplicate.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>