Canvix — Free & open-source graphic design tool. A community-built Canva alternative with a drag-and-drop editor, templates, shapes, text, images & one-click export. Works on desktop, tablet & mobile.
Changelog
All notable changes to Canvix will be documented in this file. The format is based on Keep a Changelog.
Fixed — v0.34.3: the arm64 self-host build (issue #99) — openssl detection + the arch-agnostic toolchain guard
docker compose up -d --build failed on linux/arm64 hosts at the
runner's migrate-toolchain step (✗ migrate toolchain install failed)
while everything before it built fine — two independent platform
quirks, both reported and root-caused by @wayangm on a real ARM64 VPS:
- The runner stage lacked the
opensslCLI package. Prisma shells out toopenssl versionto pick its engine binaryTarget; without the package, detection fails on a barenode:22-slimimage and Prisma defaults to theopenssl-1.1.xtarget — a binary name bookworm (libssl3 only) cannot run. The runner now installsopensslalongside dumb-init/curl/ca-certificates, so detection resolves tolinux-arm64-openssl-3.0.xon arm64 (and stays correct on x64). - The toolchain guard hardchecked the x86_64 binary name.
test -x …schema-engine-debian-openssl-3.0.xnever passes on aarch64, where the binary isschema-engine-linux-arm64-openssl-3.0.x. The guard is now arch-agnostic (ls …schema-engine-*): it accepts whichever per-arch binary was downloaded and still fails loudly when none exists.
Dockerfile comments + docs/DOCKER.md updated to describe the per-arch binary names. The CI docker job (amd64 build + compose smoke) keeps validating the x64 path; the arm64 path is validated by the reporter's host per this fix.
feat(v0.34.2): AUTO-DELETE (optional), the plan that never dies, the Stop button that finally stops
Two production reports from the same day, three fixes at the cause:
- AUTO-DELETE (optional, default OFF). A toggle in the Canvix AI
composer pre-approves the destructive tools (
delete_elements,clear_page,delete_page) for the whole run: no approval dialog, server-sideawaitConfirmskipped viabody.confirmed— and a mid-run flip auto-answers any gate that still asks. Off by default, persisted per browser; Undo agent work and version history remain the safety net. Fixes along the way: the SECOND destructive call of an approved tool used to wait 120s on the server for a confirmation the client never showed, time out as "declined" — while the client had already applied it (a divergence); every auto/applied destructive the server was not pre-told about now answers its confirm explicitly. - THE PLAN THAT NEVER DIES (the Kashmir incident). A premium
travel-ad brief ended at "3 steps · 0 actions — stopped after 3
rejected plan_layout calls": missing section names, non-numeric
y/height, more sections than the page can host. The v0.32.4 lesson
(never make the model redo geometry) now covers ARGUMENTS too —
names are labels and y is an ordering hint, so both are SYNTHESIZED
and disclosed (a bare string entry becomes a name); floor-infeasible
compositions are TRUNCATED to the first fitting prefix by the new
solvePlanBandsTruncatingwrapper (order kept, drop disclosed). plan_layout now rejects only when the sections are unusable at all or the canvas is genuinely full — the bounded rejection budget stays as the honest stop. - THE STOP BUTTON. The client-side abort worked mid-stream; three
server/client dead-ends did not: (1) the post-run vision critique
rode its own unabortable fetch — Stop during it did nothing and the
panel stayed busy forever; it now rides the run's AbortSignal.
(2) An abort left every pending bridge waiter (confirm/ack/brief/
capture) dangling up to 45–120s before the loop noticed; the abort
listener now releases them all at once, and the bridge promises
never register on a stopped run. (3) An aborted run persisted as
runningforever (excluded from the ledger AND recovery); it now persists and finalizes asstopped— recovery never resumes a deliberate stop.
Tests: the truncation contract replaces the old reject pin; +4 unit
regressions (arg synthesis, the Kashmir loop run that now builds, the
genuinely-full honest stop, stop-persist); +3 e2e (mocked SSE): the
approval gate default, auto-delete without asking (incl. body.confirmed),
Stop releasing a hanging critique. 1,850/1,850 unit; CHANGELOG's
leftover <<<<<<< HEAD merge markers from PR #95 resolved.
Fixed — v0.33.1: the live-repro convergence — the focal-size default and the unmet-message math
The v0.33.0 live reproduction (49 steps · 36 actions, brief validated with a real photo focal, honest audit disclosure) exposed two convergence defects, both fixed:
- The illustration default size was fixed at 420px — 8.1% of a 1240×1754 poster, under the feature contract's ≥10% focal threshold, and the model churned six attempts trying to satisfy a size it was never told. add_illustration now defaults to the page-adaptive focal size (max(420, ceil(√(10% of the page)))).
- The illustration unmet message carried no math. It now names the exact minimum (e.g. "at least 467×467px, 10% of 1240×1754") and the resize path (add_illustration defaults to it, or update_elements {width, height}).
Harness: +2 regression tests (the adaptive default on square vs poster canvases; the unmet-message math + resize path) — 1,779/1,779.
feat(v0.33.0): the design-quality architecture — server-resolved assets, the visual-feature contract, asset-visibility audit, the native effects surface
One brief, one review ("a program that places elements at coordinates that passes geometry tests"), five deterministic root causes, all fixed at the architecture level — no poster-specific hardcoding:
- Assets resolve SERVER-SIDE (fail-closed). add_icon, add_illustration and add_sticker passed raw queries to the client and hoped; unknown concepts were acked {ok:true} while NOTHING was created (the NEON 2027 poster claimed four stickers — two never existed: there is no "robot" in the 562-icon pack). The offline packs are pure data: the server resolves queries (add_sticker now reaches the 160+ VECTOR sticker library, add_icon the 562 icons, add_illustration the 48 illustrations), REJECTS unknowns with real resolvable examples, and passes the resolved asset + the model's OWN geometry — icons/illustrations/ stickers land exactly where the model placed them (the old path default-centred every icon and ignored x/y/size). The client additionally acks no-op result strings as failures (a no-op is not success), exhaustively pattern-matched so "no overlaps — layout is clean" still acks ok.
- The visual-feature contract. The brief contract knew three composite kinds; the NEON brief's asks (central illustration, floating stickers, call to action, gradients, shadows) extracted NOTHING — "brief validated" was true-and-empty. Six new checkable feature kinds — illustration (a ≥10% focal element; small icons never qualify), stickers (with counts), cta-button (a filled shape + short actionable text; bare text never passes), gradients, shadows, text-effects — are extracted as MANDATORY requirements and validated against real canvas state, including the new gradient/textEffect/shadow context fields.
- The audit sees non-text elements. Present ≠ visible now holds for art too: stickers/icons/illustrations/photos entirely off-canvas, sliver-sized, or fully covered by a higher opaque element are reported as defects.
- The native effects surface — exposed (and actually applied). The editor has supported gradient fills (shapes + text), per-element shadows and neon/glow/drop text effects since v0.3; the agent's tool surface never exposed them, so "use gradients, shadows, creative typography" briefs were physically impossible to satisfy. add_shape takes gradientFrom/gradientTo/ gradientAngle, add_text takes effect ("neon", "glow"…), update_elements patches gradient/textEffect/shadow — and now actually APPLIES rotation, opacity, italic, underline, strike, uppercase, align, curve, flipH/V, brightness, contrast, saturation, locked, visible (previously validated server-side, then silently dropped by the client whitelist).
- Composition intelligence in the plan. The create/improve prompt REQUIRES: one dominant focal element (≥10% of the page — never a text-only page), layered background treatment (set_background + low-opacity shapes or a gradient band), a composite CTA button (filled rounded rect + text, never bare text), placed accents (x/y/size on every sticker/icon), and theme effects on futuristic/neon briefs. The skills playbooks teach the same with the concrete tool calls.
- Transient-provider retry. Upstream 429s and network blips killed live runs mid-build and shipped degraded, half-built posters; the route's chat call retries transient errors ×2 with backoff before surfacing them.
Harness: +18 regression tests (server-side resolution, geometry passthrough, unknown-concept rejections, the effects surface, the feature contract including the bare-CTA failure and the ≥10% focal threshold, the asset-visibility audit, and the full-circle honesty: done with unmet stickers → the resolved add_sticker → accepted only then) — 1,777/1,777 expected.
Fixed — v0.32.8: the NEON 2027 agent runs — scaled plans, the emitted capture, the type#id alias
One brief, three runs, three deterministic defects:
- Run 1 (create, 0 actions): a reasonable 7-section poster plan exceeded the safe area; the model cannot redo height arithmetic, and three infeasible rejections ended the run with ZERO elements ("ask the user for a smaller composition or fewer sections"). Fix: the plan solver now SCALES oversized section heights uniformly to fit (each band floored at 56px, the model's relative hierarchy kept, the scaling DISCLOSED); on an occupied canvas it shrinks sections into the free space (bounded ×0.88 passes, floored) before declaring infeasible. Infeasible survives only for compositions that cannot fit even at the floor — reported with the exact math AND the maximum section count that fits. The system prompt states the computed per-page section budget up front, and the plan-rejection guard message points at the fixable cause (malformed sections / floor-infeasible composition), never at the user's brief.
- Run 2 (create, 70 actions): "Visual critique UNAVAILABLE
(canvas capture timed out or no client)" — the
captureevent was in the protocol and handled by the panel but NEVER EMITTED, so every create/improve run stalled the full capture timeout and the in-run vision critique never ran once. Fix: the loop emitscapturebefore awaiting the bridge answer. Also: a quality-audit residue after the first fix round now gets ONE more bounded pass (auditFixRounds: 2) before the honest disclosure. - Run 3 (edit, "fix issues"): "Stopped after 3 consecutive
invalid tool calls." Root cause: the serialized context, the audit
findings and the overlap reports all print ids as
text#abc123— the model passed that notation verbatim intoids:[...]and was rejected three times. Fix: id lists accept thetype#idalias (prefix stripped, bare id validated — the same alias discipline as the color/fontColor/textColor patch aliases), and the SECOND consecutive rejection carries an explicit recovery note (refresh ids via get_page_state, retry to spec) before a third can end the run.
Unit harness: +11 regression tests (scaled plans, floor infeasibility, occupied-canvas shrink, the emitted capture, the second audit round, the id alias, the recovery note) — 1,759/1,759.
Fixed — v0.32.7: the funding.json .well-known URL-form mismatch
- The failure:
canvix.app/.well-known/funding-manifest-urlslisted the manifest URL in exactly one form (raw.githubusercontent.com/…), but the fundingjson.org checkers do exact-string membership: the grants-directory crawl looked for thegithub.com/…/raw/refs/heads/main/…form and the official validator was handed thegithub.com/…/blob/main/…form — both reported "manifest URL … was not found in the .well-known list" while the file was live, and the directory listing kept the repository link flagged "Unverified URL". - The fix: the well-known file now lists every fetchable form of
the manifest URL (six lines — the raw forms verified byte-identical,
the blob form being GitHub's file view);
canvix.app/funding.json now serves a byte-identical copy of the
manifest (was 404); and the repository itself gained
.well-known/funding-manifest-urlsplus the schema-documentedrepositoryUrl.wellKnownin-repo verification (the official v1.1.0 schema's own pattern for repository URLs — github.com cannot serve /.well-known per repository). - Guards: the unit test asserts the six-line list, repo↔public file identity and the byte-identical domain copy; e2e smoke + the CI docker job assert both routes serve the exact bytes. Unit 1,748/1,748 (+3); e2e smoke +1 spec.
Changed — v0.32.7: spatial intelligence, intent, persistence, resilience
- 2D spatial map (spatial.ts): rotation-aware AABBs, z-order, intentional layering (a card behind its text is not a collision), section-scale band blocking with partial-occupancy disclosures, 2D free regions, text-hierarchy ladder — wired into the plan solver, tool observations, the audit and the system prompt.
- Context-aware editing (intent.ts): add / replace / reposition / restyle / redesign / remove / refine / review — deterministic, shown live in the panel. The plan-first gate fires only for create/add/redesign; a "check and fix" run is never bounced into planning new sections.
- Persistent execution + recovery: DesignAgentRun.status/state (migration 0016) — the run's brief, plan, applied actions and verification milestones persist live; a provider/network interruption marks the run interrupted and the NEXT run injects the snapshot as recovery context: complete, never re-add.
- Provider resilience (chat-resilience.ts): bounded exponential backoff for transient errors (auth/config errors fail fast), a per-provider circuit breaker, and the CONFIGURED fallback chain (user BYOK → instance slot → env/file; ZAI_NO_FALLBACK=1 opts out). Gateway-reported tokens accumulate in the run's usage.
- Verification completed: blocking audit issues (contrast, overlap, off-canvas, obscured, duplicates, empty sections) get one bounded fix round, then the re-audit is authoritative — remaining blockers end the run INCOMPLETE. Advisories (alignment, typography, hierarchy, deep margins) disclose, never block. The brief validator adopts the design engine's NFC-exact contract.
- Tests: +50 regressions (spatial, intent, resilience, loop); recovery e2e (mocked route, real editor); the live benchmark spec (CANVIX_BENCH_LIVE=1, real provider) writes docs/BENCHMARK-v0.32.7.md. Fixed: the panel crashed on a partial brief event.
- Fixed: the discuss misroute during provider outages (router.ts). The entire fix/improve family — "fix it", "fix the design", "improve this poster", "make it look cool", "it looks like shit", "redesign the poster" — fell through the heuristic lists to the model router, and when the provider was down (429/502, exactly when users retry a broken design) the catch kept the catch-all: DISCUSS. A write request became a product chat that touched nothing. The fix/improve family now classifies deterministically: whole-artifact fixes route to improve, element-level fixes ("fix the title", "change the app icon") stay edits, product talk ("improve the app", "fix the Canvix agent tool loop") stays discuss, interrogatives never create, and a new fallbackMode() classifies remaining design vocabulary by canvas state (empty → create, populated → edit) whenever the model router fails or answers garbage. +5 regressions from the live JNV Baramula poster session (26 Nov 2026).
Changed — v0.32.6: ONE agent, ZERO selectors + the canvas map
- One surface: the five-tab unified app (Chat / Generate / Write / Image / Theme) and the seven mode chips (Auto / Create / Edit / Review / Improve / Explain / Plan) are GONE — the app IS the agent. Every message is classified and executed by the agent itself. Deleted surfaces: UnifiedAIApp, DesignAgentApp ("Design agent"), MagicWriteApp, AIImageApp, AIThemeApp (their routes remain APIs).
- The canvas map: existing elements become occupied bands (merged, disjoint, refreshed after every apply). Plans are fitted into the FREE intervals between them — never on top of existing content. Infeasible plans return the exact occupancy map and the largest free interval. The plan observation shows the map ("CANVAS MAP — existing elements occupy y …; your sections were fitted into the FREE space").
- Unit 1,745/1,745 (+5 canvas-map regressions); e2e updated (wave4's AI-theme TAB test retired with its tab).
Fixed — v0.32.5: the P0 plan-validator regression (server-computed geometry)
- The failure: a valid creative brief ("Design a bold Instagram post for a coffee launch") died at three rejected plan_layout calls with ZERO elements — every rejection cost a strike, and the model was asked to redo the gap arithmetic it could not do.
- The server computes geometry now (
plan-repair.ts, pure): valid plans accepted unchanged; repairable plans AUTO-REPAIRED (heights, order, contents kept; positions/gaps computed deterministically and disclosed); infeasible plans rejected with the exact math (never fabricated). The model never re-attempts arithmetic. - Plan rejections are no longer strikes — a separate bounded budget (3 consecutive) stops honestly with the infeasibility math. Genuine failures (invalid JSON, unknown tools, other tool errors) still strike; destructive confirmation and all resource guards unchanged.
- Zero-action runs skip visual critique — both the loop's done-time vision round and the client's Phase-7 pass (a dead run used to critique the EMPTY canvas).
- A failure is never a green check (
outcome.ts): disclosed failures render with an amber alert; create/improve turns that applied nothing say so explicitly. - Agent telemetry:
[agent:telemetry]JSON lines for plan rejections/repairs and guard-exit outcomes (geometry and outcomes only — no credentials).
Added — v0.32.4: deterministic design correctness
- Hard plan validation: plan_layout REJECTS invalid geometry (gaps < 40px computed for real — the old 24px overlap slack is gone; bands beyond the page; negative y) with the exact numbers; safe-area intrusion stays a warning. Validated bands ride the plan action.
- Duplicate detection in the quality audit: near-twin texts (same normalized text + overlapping boxes / centers < 80px) and layered twin shapes (same type/size/fill + centers < 24px) are reported with both ids; intentional repetition (3-card rows, distant repeats) passes; nothing is auto-deleted.
- Plan adherence: an empty planned section is a finding.
- Wrap-up audits too: guard exits with applied changes run the audit once and disclose the residue — the live coffee run's duplicate survived precisely because the wrap-up path skipped it.
- Per-design run ledger (
DesignAgentRun, migration 0015): compact rows of what each run did, fed into the next run's system prompt; best-effort, never blocks a run. - list_fonts is real: the sanitizer has pointed at it since v0.29 but the tool never existed. Read tool over the 369-family catalog (query + cap); the prompt's font sample shows the total.
- Margin advisory: text deep in the 6% margin (>40px) is disclosed; full-bleed shapes are a design choice, not a finding.
Added — v0.32.3: plan-first, geometry ground truth, conversation memory
- Conversation history reaches the loop:
LoopDeps.history(route-sanitized, last 12 turns) enters the model conversation verbatim as[system, ...history, request]; compaction keeps the whole head — only the tool-observation middle is folded. Follow-ups like "make another one like the last one" keep their meaning. - CANVAS GEOMETRY ground-truth block in the system prompt: page
bounds, origin, y-down, the computed 6% safe area, exact element
boxes (
@(x,y) WxH), background viaset_backgroundonly. - Plan-first is structural: a create run's first element write
before any
plan_layoutis redirected once (geometry first, then colors/content); planned runs and edit runs are never bounced; never a hard block.
[Unreleased] — Unified Canvix AI hardening + the reproduction fix
The external-review hardening (v0.32.1) and the production reproduction fix (v0.32.2) — write-ups in
docs/UNIFIED-AI-MILESTONE.md.
Fixed — the production reproduction (v0.32.2): "Canvix AI ignores creative requests and loops on an empty canvas"
- Intent classification (
router.ts): social-media posts, stories, reels and platform names are first-class artifact nouns ("Design a bold Instagram post for a coffee launch" routed to EDIT because the artifact vocabulary missed them). Styling adjectives (bold/minimal/elegant/dark/colorful) are no longer edit evidence in any list — an adjective describes the requested design; the verb carries edit intent, so "Make the existing title bold" still routes to edit. "What is wrong …" joins the review guard; artifact nouns inside existing-element references ("make the poster title bold") stay edits. - The original request reaches the model (
loop.ts): the loop's conversation opened with a synthetic "User request mode: edit. Begin." instead of the user's actual words.requestis now a MANDATORYrunAgentLoopinput and becomes the first user message, verbatim — preserved through compaction, retries and tool observations. - Honest completion: a create/improve run that applied zero
design changes can no longer report success — the first such done
is bounced with build guidance, the second ends as
INCOMPLETE — no design changes were madewith aNOT completedverification; the strikes/idle/cycle/provider guards report the same honest framing. Guards unchanged (nothing bypassed, no limits raised). A pinned edit mode on an empty canvas is respected, not converted — the model explains and asks what to create instead of looping. - Regressions: 9 new unit tests (the five mandatory mode cases,
request-as-first-message, compaction survival, the scripted
reproduction with no
get_page_stateloop, the honest empty report) + a new browser e2e (unified-ai-reproduction.spec.ts) running the exact reproduction through the real editor: Auto mode sends the verbatim request unpinned, the created design saves, reopens and is editable through the real properties UI.
Added — design provenance (the contract that persists, verified)
DesignProvenancemodel (migrations0013+0014): the brief an autonomous generation was verified against, stored on the applied design — with a SERVER-SIDE verification verdict (verified,verifiedAt) that is re-checked on every design save and bound to the saved document. The design GET returns it asaiProvenanceand the editor hydrates the brief (payload-vs-brief hydration bug fixed with a regression test).- Contracts enter the store only through the design save: the
apply flow queues a pending contract and
PUT /api/designs/[id]persists + verifies it against the final saved pages. The client-suppliedPUT /api/designs/[id]/ai-provenanceis REMOVED (an authorized editor could previously store any brief with an unearnedpassed); the GET stays. GET /api/designs/[id]/ai-provenance+ the design GET: link viewers receive the shareable contract (brief, verification state) but NEVER the original generation prompt — that ships only to editors/owners (privacy hardening).mergeBriefs/normalizeStoredBrief(src/lib/agent/brief.ts): the stored contract merges with every chat-agent run on that design — union semantics, dimensions dropped (the design owns geometry after fit-pages). Restrictions and notes SURVIVE persistence; over-limit briefs are REFUSED at save time (never stored truncated or capped — no silent weakening).- Live-DB e2e (
tests/e2e/unified-ai-provenance.spec.ts): the apply→save flow, the strict server-side verdict, viewer privacy, junk/over-limit refusals, missing-id 404s.
Changed — the two agents share one foundation
- Shared provider resolution: the agent vision path and the shared
verification route (
/api/ai/agent/vision) now resolve the vision slot USER-FIRST (BYOK), matching the text slot and the design-agent route — a user's own vision provider serves their critiques. - Shared validation (now EXACT):
validateBriefenforces strict normalized equality for required texts — appended words, re-capitalization, altered punctuation and missing spaces are rejections, not matches. The agent loop's done-gate fires for edit-mode runs that carry a brief (the continuation case), and the chat agent reads the AUTHORITATIVE database brief (the design context carriesdesignId), so a client post cannot tamper with what a run is gated on. - Shared editing workflow: DesignAgent Apply sets the design's
brief and queues the pending contract (persisted + verified by the
next save) so natural-language refinement of the same design keeps
the contract, the context and full editability (the same
applyDesignActionexecutor).
Changed — ONE AI surface (the consolidation)
- The six AI-branded apps (chat copilot, design agent, Magic Write,
AI image generator, AI design plan, AI theme) are now ONE Canvix
AI app with five mode tabs — Chat / Generate / Write / Image /
Theme (
UnifiedAIApp.tsx; the tab contents are the original, unchanged app components). The AI design plan PANEL is retired — its describe → review → apply flow IS the Generate tab; the/api/ai/planroute remains available as an API.
[0.31.0] — 2026-11-25
Version reconciliation, stated not papered over: this is the first tagged release since v0.23.1 (2026-11-13). The 75 commits it carries were developed under interim labels the tags never followed — the changelog recorded v0.24–v0.29.5,
package.jsonsat at 0.29.1, and the DesignAgent work landed underv0.31labels. This tag reconciles all frames at 0.31.0 (the era label the code already uses); nothing between 0.23.1 and 0.31.0 was ever published, and tags followRELEASE-CHECKLIST.md, not the changelog's working labels. The Word Cloud plugin'sengines.canvixceiling is bumped to<0.32.0in this release — the first-party consistency suite (src/lib/plugins/firstparty.test.ts) proves the shipped bundle validates against this exact host build.
Security — stored XSS via /api/media closed (CWE-79)
- Unauthenticated stored XSS through uploaded SVG served inline from the
media store (CWE-79; reporter-assessed CVSS v3.1 6.1
AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N) — closed byfde7f25with four layers: an exact MIME allowlist at upload init (SVG/HTML/XML structurally rejected, no prefix matching), magic-byte verification at finalize (the bytes must prove the declared type), ownership enforcement on append/finalize (flat 404, no existence oracle), and hardened delivery — every media response carriesnosniffplus a sandboxing CSP, and anything the stored bytes cannot prove is served asapplication/octet-streamwithContent-Disposition: attachment, which also neutralizes media stored before the hardening. Security regression suites replay the original report across all four layers, including the 206 Range path and legacy rows. Reported by hackchang (@hackchang) (private report, 2026-11-25) — thank you for the clear write-up and the coordinated disclosure. A GitHub Security Advisory and CVE request are in coordinated disclosure with the reporter; identifiers will be linked here once public. Self-hosters on any build between 2026-10-29 and 2026-11-25 should update to v0.31.0 (this release) or later.
Added — the DesignAgent generation panel (v0.31)
- The P1 gap from
docs/DESIGN-AGENT-ACCEPTANCE-REPORT.md, closed: the autonomous design pipeline now has its dedicated user surface (2ae7e24).DesignAgentApp(apps/registry) runs the full loop in the editor — prompt → live run view (fixed stage order, elapsed time, stop via the pipeline's abort seam) → review gate → Apply. Nothing lands on the canvas unreviewed (the house rule every generative feature obeys): the review gate shows the brief contract (verbatim texts and colors), per-page enable toggles with honest geometry wireframes, brief→spec conformance failures and warnings, and the full run report — stages, model calls, revision rounds, the cycle guard, and each visual pass with what it concluded. A failed run shows its evidence (best attempt pages plus the exact unmet requirements), never a shrug and never a fake pass. fit-pages gives every applied page a deterministic canvas fit: the pipeline compiles for the format the brief demanded (e.g. 1080×1350) and the panel uniformly rescales and centers pages onto the design's canvas. 14 new tests (fit-pages invariants + client status mapping). Underneath, the full Phase B arc ships here: the DesignSpec v2 engine (wrap-aware reflow, semantic seed placement), the autonomous pipeline (plan → compile → self-correct → visual-verify, with checks outranking critique and every unavailable seam disclosed rather than faked), BYOK production wiring (POST /api/ai/design-agentriding the same provider resolution chain as the shipped design-spec normalizer), and the 22-brief instruction-fidelity benchmark. Gates: tsc clean, eslint clean, 1,693/1,693 unit tests, production build clean.
Added — FOSS United funding application (v0.29.5)
- Website ownership verification ACTIVATED (2026-11-24): after the
VPS deploy of
52eb8e0,https://canvix.app/.well-known/funding-manifest-urlswent live (200, exact manifest-URL body), and the manifest now carrieswellKnownon the projectwebpageUrl— the claim is no longer withheld. The honesty-guard unit test was flipped to assert its presence, and the validation report records the live verification. funding.jsonrewritten for the FOSS United project-grant application (fundingjson.org v1.1.0, schema-validated): four milestone plans in INR — M1 baseline & harness ₹1,30,000 · M2 design-output correctness ₹1,20,000 · M3 grounded visual review ₹1,20,000 · M4 community & final report ₹1,30,000 — ₹5,00,000 total, one-time, six months. Corrects the entity email ([email protected] — the manifest previously carried a stale address), points the projectwebpageUrlat https://canvix.app, and replaces the superseded USD 7,000 three-plan draft. The grants directory auto-refreshes from this manifest weekly; no duplicate application is submitted.CANVIX-FOSS-UNITED-PROPOSAL.md— the complete evidence-based grant proposal (22 sections: capabilities, deployment proof, self-reported adoption labeled as such, budget with the recorded ₹5,40,000 → ₹5,00,000 revision, milestone acceptance criteria, risks, sustainability, reporting commitments).FUNDING-SCOPE-MATRIX.md— the FOSS United × NLnet × unfunded × shipped allocation ledger proving no hour or deliverable is billed to two funders; funded commits will carryGrant: FOSSUnited M#trailers.public/.well-known/funding-manifest-urls— the cross-domain ownership-verification file for canvix.app (served and verified locally; the manifest'swellKnownproperty is deliberately withheld until the file is live in production).- README funding section rewritten (was: "three milestones, USD 7,000 total"); the AI-disclosure test-wall figures updated to the current 1,575 unit tests / 39 e2e specs.
docs/FUNDING-VALIDATION.mdanddocs/FUNDING-INQUIRY-DRAFT.md(validation report + status-inquiry email draft).
Fixed
- Agent v0.29.3 — the failed CANVIX poster run, root-caused and
fixed end-to-end. Reproduced from the production transcript (the
1080×1080 CANVIX promo prompt, 45 steps / 42 actions, P0 findings
after "success"): every class of failure below has a regression
test in
src/lib/agent/harness.test.ts(86 tests total).extractBriefno longer manufactures phantom mandatory strings: "Exact text only: …" produced the fake requirementonly:(and even a 300pt heading). The unquoted headline pattern now requires a capitalized payload, rejects instruction stopwords ("only", "exactly", …) and cannot cross quotes — the seven user strings are preserved verbatim.Composite deliverables are contract fields, not decoration: "a realistic editor mockup", "3 feature cards" and "glassmorphism" extract into
requiredFeaturesand validate structurally (native panel with inner elements; N semi-transparent rect+text cards; rgba fills with borders) — the client's brief validation sends element geometry sovalidate_briefchecks them against the live canvas.Structural compliance ≠ rendered compliance: the quality audit computes each text's effective backdrop (z-order + rgba compositing — intentional text-on-card layering is preserved, not flagged), reports texts obscured by opaque shapes above them, and uses the panel's client-measured text widths (canvas measureText) instead of the 0.58×fontSize glyph-average estimate. The page background is the ctx's real field only — never a guessed dominant color.
Required colors used only as bare decorative strips (thin bars with nothing on them) are flagged: strips satisfied the color check without being design.
Brief-to-layout planning replaces the reactive add/move/fix loop:
plan_layout(read-risk pseudo-tool) reserves vertical bands per section before building, the create-mode prompt requires it, and the plan is streamed to the user.Grounded vision critique runs BEFORE completion, not after: the loop asks the panel to screenshot the live canvas (the export pipeline's
captureStage, via the run bridge), critiques it with the vision slot, feeds P0/P1 findings into ONE bounded correction pass, re-captures and verifies. Unresolved P0 defects force anINCOMPLETE —summary ("NOT visually verified"); a capture timeout or unconfigured vision model is DISCLOSED, never silently skipped.Action acks fail closed: a timed-out apply ack resolves
ok:false("the client did NOT confirm the apply") instead of "assumed applied" — the model is no longer told edits landed when nobody confirmed them.The router no longer misroutes obvious build briefs to discuss: "Create a premium … promo poster for CANVIX … 3 feature cards" triggered the product-discuss guard on the words "canvix" and "feature"; artifact-noun + build-verb + not-a-question now wins.
Completion summaries are grounded: the document name (e.g. "Music Festival") is declared a file name, not the deliverable; the prompt separates "element exists" from "text is readable", and the verification line reports brief/audit/vision outcomes separately.
File-configured providers no longer 401:
makeClientdropped the config-file's companion headers (X-Token / X-User-Id / X-Chat-Id), so every provider resolved from.z-ai-configfailed with "missing X-Token header" the moment env pins were absent.v0.29.4 — chitchat can never start a build: greetings ("hi", "thanks!", "ok cool"…) route to discuss with high confidence and never reach the model router, where a provider with a bias could invent a build task (and a canned aesthetic) out of pure conversation. Real build briefs still route to create.
v0.29.4 — three new design skills installed (research-grounded, original text): Glassmorphism & Layered Surfaces (rgba fill + visible border on the same native element, contrast checked against the composited backdrop — NN/g and Axess Lab guidance), Realistic Product Mockups (window chrome + toolbar + sidebar + content as an 8–15-element native composite — one empty rectangle is a placeholder, not a mockup), and Visual Accessibility (WCAG floors, minimum type sizes, never meaning by color alone). The failed CANVIX prompt now selects poster + glassmorphism + mockups skills automatically.
v0.29.4 — the system prompt now pins grounding and verify-then-stop rules: the element list IS the live canvas (never assume empty, never re-create, never invent imagery the user did not ask for), and done is only allowed after the checks actually ran — a check that cannot run is disclosed, not claimed.
Added
BYO-MCP — personal MCP tokens (v0.25) — the MCP endpoint now has a second auth rail that needs zero operator setup: any signed-in user mints an API key with the new
mcpscope (Settings → Profile & AI keys, or one click on the dashboard's AI agents (MCP) card) and uses thatcvx_…token as the Bearer onPOST /api/mcp. The token rides the existing API-key machinery — sha256-stored, shown exactly once, revocable, and'all'-scoped keys age forward automatically. Security footprint mirrors the v1 REST rail exactly: user-token tools see and modify only the owner's designs (everygetDesignread is scoped,saveDesignre-checks ownership at the DB viaupdateManyso an id-swap between load and save can never leak a write,search_designsfilters by owner,create_design/generate_designattribute new designs to the owner, and the anonymous commons is invisible — a foreign design is a flat not-found, no enumeration). AI tools are BYOK-aware on the user rail:generate_designandvision_groundresolve the owner's saved providers first (getClientForSlotForUser), so agent work pays with the user's keys — the operator's AI is never consumed — andget_capabilities/initializehonestly describe the rail and scoping. The operator token (CANVIX_MCP_TOKEN) is unchanged: unscoped, historical behaviour, same endpoint. The dashboard card now shows both paths (personal token recommended; server token for self-hosters) andOPTIONS /api/mcpreportsuser-tokenswhen no operator token exists. Tests: 20 new unit tests (src/lib/mcp/byo-mcp.test.ts— auth matrix, scope parsing, tool isolation, rail honesty) + e2etests/e2e/byo-mcp.spec.ts(create → initialize → scoped search/get → scope-missing rejection → revocation) — full suite 1465 green.Docker self-hosting (WP1: deployment & API trust) — the one-command self-host the roadmap promised:
cp .env.docker.example .env, setPOSTGRES_PASSWORD,docker compose up -d→ Canvix + Postgres 17, app on :3000, migrations applied automatically on boot, the 366-template library syncing itself from code on first boot (no seed step, no Node toolchain, no host build). The image is a three-stage build (deps → builder → runner) around the same.next/standaloneartifact every self-hosted Node deploy already uses — Docker is just another consumer of it. The runner stays non-root (uid 1001) with dumb-init PID 1 (docker stopdrains in-flight requests) and carries exactly one native binary: the Prisma schema-engine, in an isolated/opt/migratetoolchain the entrypoint uses for migrate-on-boot (the app itself is rust-free — engineType="client" compiles queries to WASM at runtime). Two Docker-specific traps handled and documented:HOSTNAMEinjection (the standalone server bindsprocess.env.HOSTNAME || 0.0.0.0— the container id would kill it) and db-url.ts's TLS-forcing for non-localhost hosts (the compose URL pins?sslmode=disablefor the in-networkdbhostname). The migrate toolchain carries the sameeffectoverride as the app (Dependabot #9) with an install-time assertion — a vulnerable effect in the image is a build error, not a silent regression. Pre-migration databases (tables, no history) auto-baseline against0001_init, ported from db-setup.sh's documented recovery.CANVIX_RUN_MIGRATIONS=0opts out for multi-replica deploys where a separate job owns migrations. CI gains a docker job on every PR: build the image, compose up, assert/api/healthfully green (migrated + seeded — proving migrate-on-boot and the template sync), register an account through the real route (scrypt + session round-trip), landing 200, down. Local daemon-free verification:scripts/test-migrate-toolchain.sh. Full operator guide:docs/DOCKER.md.REST API + scoped API keys (Wave 6 core) — the
/api/v1REST rail. Users createcvx_…bearer keys in Settings → Profile & AI keys → API keys: pick a label and scopes (designs:read,designs:writereserved,allsugar), and the raw key is shown exactly once — only its SHA-256 is stored (same shape as sessions: a DB leak never yields usable keys). v1 surface:GET /api/v1/designs(keyset-paginated, 60/page) andGET /api/v1/designs/[id]— both owner-scoped, deliberately narrower than the browser dashboard (no ownerless shared designs to machine credentials; foreign ids are a flat 404). Revocation is a timestamp, so 401s distinguishrevoked_key/expired_key/invalid_key, and 403 saysinsufficient_scope— errors are the automation contract. Key creation is same-origin, rate-limited (10/h/IP) and capped at 20 active keys. Full documentation indocs/API.md. Unit suite (16 cases: token entropy, scope parsing — unknown scopes never silently widened — and the full auth matrix) + e2e lifecycle (create → use → revoke through the real UI and API). Dev note: the e2e caught that PrismafindUniquedoes not return relations by default — the auth lookup missedinclude: { user: true }and every valid key 401'd "owner no longer exists"; fixed and locked in.Admin: video-slot callout (roadmap §5.7) — the Logs view's slot strip now explains, when any slot is wired but video is not, that video generation is code-complete but provider-dependent: wire a text-to-video provider on the AI & models page to switch it on — nothing is broken.
Admin: Logs view e2e coverage —
/admin/logs(the "why did the AI feature fail" page) had zero e2e coverage since v0.16.3; the new spec proves denial for plain accounts, seeded AIUsage rows surfacing with status chips and scrubbed reasons, the errors-only filter, and the counts strip.Auto version snapshots before destructive ops (D5) — the five operations that can discard large amounts of work in one click (template apply, Magic Resize, Translate, Magic Layers page-replace, page delete) now save a version snapshot of the pre-op state first. The snapshot appears in Version history with an auto chip and a label naming the incoming operation ("Auto — before page delete"). Design notes: a 60-second same-reason throttle keeps a user clicking through template previews from evicting five slots; when the 30-slot list overflows, the OLDEST auto snapshot is evicted first — a manual snapshot is never dropped to make room for one (an all-manual list keeps the original 30-most-recent cut). Restoring an auto snapshot works exactly like a manual one. Unit suite covers all five seams, the throttle and both prune paths; e2e proves the page-delete loop through the real editor (delete → chip visible → restore brings the page back).
Admin: BYOK adoption stat — the console overview now answers "how many users added their own API keys": a new Own API keys stat card (distinct accounts with ≥1
UserAIProviderrow, key count, how many of the five capability slots user keys cover — the CSVslotscolumn parsed per-slot in SQL). Aggregate-only: no usernames ride along./api/admin/overviewgains a matchingbyokblock.WebP export (Wave 5 remainder, roadmap §4.3) — the fourth raster format in the export dialog, riding the browser-native encoder (zero new dependencies, the §8 discipline): the format card is feature-detected per browser and hidden where the canvas can't encode WebP — Safari accepts
image/webpintoDataURL()and then silently returns PNG bytes, so the card never appears there, and a post-capture guard refuses to save mislabelled PNG bytes under a.webpname even if the probe is bypassed. Full parity with the PNG/JPG raster path: 1× / 2× / 3× detail, current page or all-pages-per-file. Verified by a unit suite (probe honesty, PNG fallback, fail-closed encoder) and a Playwright spec (magic bytes, all-pages suffixes, card-hidden-under-stubbed-Safari).Fixed: export dialog clipping on short viewports — the option sets for GIF/PPTX made the dialog taller than a 720p screen with no scroll, leaving the download button unreachable (a pre-existing clip the new format card pushed over the edge). The dialog now caps at
calc(100vh-4rem)and scrolls its options internally.NLnet application trust layer — the repository now matches the NLnet proposal (deadline 2027-01-03):
README.mdgains a dedicated "AI & Development Disclosure" section (NLnet policy v2.0 requires prior AI-generated code to be disclosed publicly in the repo): historical development v0.1–v0.23.2 (AI-assisted rapid prototyping, all output human-reviewed, gated by 1,411 unit tests + 32 e2e specs) and the grant-funded standard — WP1–WP5 milestones human-authored, AI tools restricted to read-only review/flaw detection, with aGrant: NLnet WP#commit-trailer convention (AI review assistance, where used, is noted in the commit body — never as a co-author) so the human/assist boundary stays auditable. Linked from the canvix.app landing footer ("AI Disclosure").RELEASE-CHECKLIST.md(root) — the four-step release discipline from the roadmap's E9: bump host version → update the Word Cloud pluginenginesceiling → sweep for untracked route files (the.gitignorecasualty, with the exact audit loop) → run the full CI wall and verify on the live deployment. Cross-linked from CONTRIBUTING.md and ROADMAP.md §5.ROADMAP.md— status line to v0.23.2 / 1,411 tests; the v0.23.2 row in the shipped map; §3 rewritten as "The NLnet grant track (WP1–WP5) — the active priority order" (WP1 Docker/compose + scoped API keys, WP2 Postgres LISTEN/NOTIFY collab fan-out + op-level undo, WP3 mobile/touch editing, WP4 share-link roles +.canvixportable bundle, WP5 v1.0 quality gate + removing the vendor-lockedz-ai-web-dev-sdk), each mapped to the epics it absorbs; §6 recommended order reframed as the unfunded expression of the same sequence.
GenAI-policy alignment refinement — scope aligned with NLnet's published policy v2.0 and GenAI FAQ (verified 2026-11-14):
- README disclosure: policy link fixed (the old
nlnet.nl/policy/path 404s; correct URL isnlnet.nl/foundation/policies/generativeAI), and the grant-standard paragraph now states the exact boundary — read-only review of human-authored code and tests (defects, security issues, test-coverage gaps); AI may recommend additional test scenarios, but all test cases, code, fixes and documentation are independently human-authored; zero AI development in the funded scope; €0 for AI subscriptions/credits (non-reimbursable). - ROADMAP WP5 rescoped to "v1.0 quality gate": funded scope =
S1–S4 stabilization only (CI perf budgets, WCAG a11y audit,
self-hoster handbook, 1.0 definition pass). The vendor SDK and any
replacement client are entirely outside the funded scope (FAQ: AI
connectors stay out of funded work) — see the corrections under
"Changed" below for the precise code-level picture
(
src/lib/ai/provider.tsconstructs every AI client, BYOK included). §3 sequencing note, §5 item 1 and §6 updated to match. - WP2/WP4 language grounded in shipped work: WP2 builds on the HLC
LWW merge + deletion tombstones of v0.10.0; WP4 notes vector-text
PDF (v0.15.3) and native editable PPTX (v0.21.0) as the shipped
export track record the
.canvixopen format extends.
- README disclosure: policy link fixed (the old
Changed
- Funding-boundary corrections, verified against code and policy
(2026-11-15; follow-up to the alignment commit above):
- BYOK scope claim fixed. The previous entry said the BYOK rail
is "SDK-free"; wrong.
src/lib/ai/byok.tsstores and resolves per-user credentials, but every client — instance slots and BYOK alike — is constructed bymakeClient()insrc/lib/ai/provider.tsviaz-ai-web-dev-sdk. The vendor SDK spans every AI request today (ROADMAP §3 context note + §5 item 1 now state this precisely). - SDK removal moved out of the funded scope. Removing the SDK means writing the direct OpenAI-compatible client — that is AI connector work, and the GenAI FAQ keeps connectors outside funded work; funding the removal while leaving the replacement unfunded was an impossible split. WP5 is now the pure S1–S4 quality gate (~60 h); the whole provider track (removal + adapter, ~65 h) rides unfunded. README disclosure updated to match.
- Workstation hardware line removed (€1,200 → €0). NLnet's external-spending policy: "NLnet does not allocate grant money to basic operational IT cost, such as regular laptops, desktops/workstations, or mobile phones." The request is now labour-only.
- WP3 refocused (~100 h → ~60 h) on accessible touch/pointer semantics (WCAG pointer-target minimums) and responsive layout verification; deep gesture polish stays on the project's own cadence. Revised funded total: 420 h ≈ €12,600 at €30/h cost-recovery (~21 weeks at 20 h/week), hardware €0.
- BYOK scope claim fixed. The previous entry said the BYOK rail
is "SDK-free"; wrong.
[0.23.2] — 2026-11-13
Fixed
- Admin console audit (2026-11-19) — a full sweep of all five
console pages (zero runtime errors: console, page, HTTP) found and
fixed three defects:
- the Model slots card's chip read
X/4 wiredwith five slots configured — the v0.19 video slot never reached the hardcoded denominator, so a fully-wired instance displayed "5/4 wired". The chip now counts from the slot list itself. - the overview's AI providers card counted stored slot
bindings, not slots that actually resolve — a stale binding
(provider removed from the list) overstated the wiring, and
providersSummary()now resolves each of the five slots before counting. - the user search lowercased the query while the database
containsstayed case-sensitive, so any username stored with uppercase letters was unfindable in any case. Registration lowercases usernames, so this mostly bit instances with seeded or imported rows — the search is now genuinely case-insensitive (mode: 'insensitive'), anddocs/ADMIN.mdno longer claims "usernames are stored lowercase" as the reason it worked. Verified by a new regression spec (admin-audit-regressions.spec.ts: mixed-case search in both cases, the BYOK block, the 5-slot chip) and the existing 7-test admin suite.
- the Model slots card's chip read
- "Test video generation" answered "Unknown slot" — the video
slot joined
SLOT_ENDPOINTand the probe set. The admin console's per-slot Test buttons (v0.16.3 A3) guard against a slot map that predates the video slot (v0.19 Wave 4): clicking Test video generation on a provider pinned tovideo(e.g. VibesAI · vibes-video) answered 400 "Unknown slot — use text, vision, image or imageEdit" — the slot saved and resolved fine (v0.23.1), the Videos panel generated fine, but the one button that exists to verify the provider before trusting it refused to run. The fix teaches the whole admin surface the fifth slot, which shipped in v0.19 and was never added to any v0.16-era list:src/lib/ai/probe.ts—video: 'POST {base}/videos/generations'joinsSLOT_ENDPOINT;probeSlotgains a video branch that mirrors the feature route's exact transport (src/app/api/ai/ video/route.ts): rawfetch(the SDK has no video surface), the Sora-stylePOST /videos/generationstried first, the z-ai internalPOST /video/generationonly when that 404s, companion auth headers (ResolvedSlot.headers— the z-ai X-Token dialect) riding along. Zero-cost posture (the imageEdit philosophy): a 4xx validation rejection PROVES the endpoint exists without spending a generation; a 2xx is the full-path verdict; both-404 is a not-served verdict that names the fix.src/app/api/admin/config/ai-test/route.ts— the guard message lists video; theresolveSlotcast types againstAI_SLOTS(the one source of truth) instead of a hand-rolled four-literal union; the probe target carries the companion headers.- The admin Logs view learned the slot too (the sibling gap
found while fixing the first): the video feature route has
written
recordUsage('video', …)rows since v0.19, but they were invisible —LOG_FEATURES(filter validation + per-feature counters) and the route'sSLOT_ORDER(the slot cards) predated the slot, so video rows rendered but could not be filtered and the video slot had no card. Both lists, and the Logs UI's label maps + feature chips, now include video. - 9 regression tests: the seven video-probe verdicts (200 w/ task
id, 4xx-proves-reachable, Sora-404 → z-ai fallthrough, both-404,
401, companion headers, network failure) and the logs pair
(video filterable, video counted). Full suite 1411/1411,
tsc --noEmit+eslintclean.
[0.23.1] — 2026-11-13
Added
- Profile page + bring your own key (v0.23): every signed-in user
gets a profile dialog (dashboard → account menu → Profile & AI keys)
with their account card and their own AI providers. A user-saved key
answers its capability slots before the instance-wide chain —
per-user BYOK without touching the operator's quota:
- new
UserAIProvidermodel (migration0012_user_ai_providers_byok): label, base URL, write-only API key, slots (text/vision/image/imageEdit/video), optional per-slot model ids src/lib/ai/byok.ts— validation (reuses the admin table's rules), masked listing, per-slot resolution;provider.tsgainedresolveSlotForUserandwithProvidernow resolves the session user's slots first (anonymous path unchanged)/api/profile/ai-providers(GET/POST/PUT/DELETE) +/test— session-scoped, same-origin, rate-limited; keys are never returned/api/ai/capabilitiesis user-aware: the editor enables exactly the features the signed-in user can run on their own keys- 17 new tests (validators, slot precedence, fallback parity); full suite 1401/1401
- new
Security
- All 8 Dependabot alerts fixed and auto-closed (verified
fixedon the security tab): sharp 0.35.5 (librsvg/libheif/libvips CVEs), zod 4.6.7, deepmerge-ts 8.0.2, minimatch 11.0.8, glob 14.0.5/14.0.6 —npm auditreports 0 vulnerabilities .github/dependabot.yml— weekly grouped version updates (npm + GitHub Actions) with per-advisory security PRs, so alerts never sit unscanned again (the 2026-11 wave sat open for 29h before a rescan poke)
[0.22.1] — 2026-11-12
Added
- The trust layer (grant-application readiness — FOSS United,
GitHub Secure OSS Fund, Fal.ai, Cloudflare, Emergent Ventures):
SECURITY.md— private vulnerability disclosure to the maintainer (no public issues), scope, safe-harbor rules, response timelines, and the hardening map reporters can lean on (headers/CSP, rate limits, SSRF guards, MCP hardening, the v0.13 plugin sandbox).GOVERNANCE.md— the governance model stated plainly: solo maintainer / BDFL (Ashiq Hussain Mir), a decision table, the contribution bar, the values the project answers to (free forever, MIT, self-hosting first-class, privacy by architecture), and a bus-factor succession plan.CODE_OF_CONDUCT.md— Contributor Covenant 2.1.funding.json— a fundingjson.org v1.1.0 manifest (schema- validated) declaring the $7,000 full-time-development runway: final-year tuition ($4,000), local hardware upgrade ($2,000), and living expenses for the push to v1.0 ($1,000). Payment channel is a placeholder pending the funding organization.- README: the AI capability-slot architecture made explicit — the text / vision / image / video slots, per-slot provider resolution, and the plug-and-play path from an experimental setup to official enterprise keys (Fal.ai, Cloudflare Workers AI). The local-vs-provider table's exports row now lists PPTX and GIF.
Fixed
- All 7 open Dependabot alerts closed (dependency security wave):
sharp^0.34.3 → ^0.35.5 — clears the librsvg CVE-2026-96889, libheif, and libvips advisories (GHSA-wq5f-xc86-pv6w, GHSA-rgj7-g3m4-5g8c, GHSA-f88m-g3jw-g9cj); the tree now runs one sharp (0.35.5, libvips 8.18.7) instead of three. The MCP PNG export loader gained a one-line type fix for sharp 0.35's dual package types.zodunder@imgly/background-removal→ ^4.6.7 via npm override (GHSA-mrhx-c7xc-m3w5) — the library's dist bundles zod inline, so the override only satisfies its manifest; the app's own zod was already 4.6.7.minimatch^10.2.2 → ^11.0.8 via spec-qualified override (GHSA-g3hv-75wg-m249); eslint's out-of-range 3.1.5 is untouched.globunder@node-minify/core: pinned 10.3.3 → ^14.0.5 (GHSA-5j98-mcp5-4vw2), which also lifts its minimatch to 11.deepmerge-tsunder@prisma/config→ ^8.0.2 (GHSA-ggr8-5vv4-36mx).- Verified end-to-end on the new tree:
tsc --noEmit,eslint, 1384/1384 vitest,next build— all green.
[0.22.0] — 2026-11-11
Added
- The real sticker library — 126 authored vector stickers in 11 packs
(user request; the starter set was 40 emoji).
src/lib/stickers/ships hand-authored SVG packs — Faces (12), Hands (10), Hearts (12), Stars & Sparkles (12), Celebrate (12), Business (12), Arrows & Marks (12), Nature (12), Food & Drink (12), Frames & Badges (10), Travel (10) — one house style (ink#2D2A32, round joins, the eight-colour palette, one glossy highlight), each a self-containedviewBox 0 0 120 120document with no external refs.- New
StickerElement.svg/stickerId/altfields: vector stickers are native sticker elements; emoji stickers are unchanged (text path, PPTX-native runs, back-compat with every saved document). - Render paths, all verified: canvas draws the SVG as a Konva.Image
via the shared data-URL image cache (
lib/sticker-image.ts); video/GIF/PNG exports go throughcollectImages→buildKonvaNode(the preload cap rose 60 → 150 for sticker-heavy decks); SVG export nests the authored markup inline (vector out, the plugin-SVG pattern); PDF rides its existing raster strip; PPTX raster-embeds through the charts/tables fallback — emoji stay editable text. - The Stickers app is rebuilt: pack chips, whole-library search (names + keywords, AND semantics), per-pack grids, the emoji quick set preserved, and an honest footer count. The Elements panel's Stickers tab gains a featured-per-pack teaser row and a launcher into the full library. Landing stats strip: new "160+ stickers".
- Inserted stickers seed
altwith the library name (Wave 4 accessibility parity) and carrystickerIdprovenance. - Tests: 16 new unit tests (library contract — valid self-contained
SVG, unique ids, palette discipline, <4 KB each, search behaviour,
data-URL encoding) and a 3-spec e2e suite (
sticker-packs.spec.ts) whose pixel proof exports a PNG of a red-heart sticker page and asserts saturated red inside the sticker box and white outside. 1362 unit tests (+16).
- New
- Image-tools engine preference — provider by default, this device as
the option (user request). The BG remover and Upscale popovers now
carry an engine toggle, persisted per browser
(
canvix.image-tools.engine, newlib/image-tools-engine.ts):- Provider (default) — the configured image-edit AI does the work
server-side. BG remover posts
mode:'bg-remove'(the server prompt existed since v0.4 but the button never used it — the tool was hardwired to the local ONNX model); Upscale posts a newmode:'upscale'(AI re-render with restored detail at the provider's supported sizes, only attempted when it adds pixels) and then finishes to the advertised 2×/4× target with the deterministic Lanczos pass (lanczosResize(), new inlib/upscale.ts). - This device — the previous behaviour: ONNX segmentation cut-out (~40 MB model, first use) and pure Lanczos-3.
- Honest failure handling:
NO_PROVIDER/FEATURE_DISABLEDmakes Upscale fall back to the deterministic pass with a toast note, while BG remover explains and asks you to flip the toggle (no surprise 40 MB downloads);SOURCE_NOT_EDITABLEpoints at the This-device engine; every other provider error shows its reason inline.
- Provider (default) — the configured image-edit AI does the work
server-side. BG remover posts
- e2e: the wave-4 local-tools spec now also pins that the engine toggle exists, defaults to Provider, and that the no-provider fallback really enlarges (8→16px through the designs API) with its honest toast.
- AI video goes live — the z-ai dialect beside the Sora one (user
request;
videoGeneration:falsewas pure config, but the configured provider speaks a different contract than the Sora-style one the route implemented).src/app/api/ai/video/route.tsnow speaks both:- Sora:
POST /videos/generations→GET …/:id→GET …/:id/content. z-ai:POST /video/generation→GET /async-result?id=…(MP4 at a plain CDN url insidevideo_result). Dialect choice happens at create time — Sora first (deployed providers unchanged), z-ai when that path 404s — remembered statelessly by prefixing the task id withz:; every later poll and the content proxy routes on it. No server memory, no sticky sessions. The z-ai content proxy re-polls the async result and streams the CDN url through our origin (same-origin MP4, no CORS, no expiring links). - The provider stack learns companion auth headers (
slot.headers,providerHeaders(slot)merged into every direct fetch) — the z-ai async-result endpoint demandsX-Token(401 without it).normalizeVideoStatusunderstands both envelopes; thez:prefix is preserved on proxy URLs so the video element src keeps routing. - Verified LIVE end-to-end (
scripts/verify-video-live.ts, dev provider): capabilitiesvideoGeneration:true→ POST → z:-prefixed task → 28 polls → 4.68 MB MP4 through the same-origin proxy (ftypisom magic), 145 s total. +4 unit tests (z-ai envelope mapping).
- Sora:
- The PPTX limits wave — fonts embed, animations/transitions/SFX
carry, re-wrap safety (user request; closes the three honest
limits
docs/PPTX-EXPORT.mdcarried):- Text re-wrap safety: every text body now carries a bare
<a:normAutofit/>— when PowerPoint's line engine wraps differently and overflows the shape, it shrinks the text instead of spilling it out; when our engine already auto-fit, the measuredfontScalerides along. - Font embedding: document text faces resolve through the SAME
collector + font ladder the PDF exporter uses
(
collectTextFaces→resolveFontFaces), ride asppt/fonts/fontN.fntdata+embeddedFontLst, wired throughppt/_rels/presentation.xml.rels(font rel ids can't collide with slide/master ids). Failure degrades to the pre-v0.22 behaviour — typefaces referenced by family, viewer substitutes — andfontsEmbedded: 0in the export result is the honest signal. - Transitions: fade native (
p:fade), slide directional (p:push dir), morph → fade (the documented nearest-universal — PowerPoint's own Morph needs object-matching extensions), speeds mapped from durations. - Entrance animations ride the
p:timingtree as ONE click group (our present-mode semantics: one advance, then the sequence plays itself): first elementclickEffect, the restwithEffectat their delays. fade/rise → Fade entrance; pan/wipe → Wipe (directional filter); zoom/pop → Fade (the documented approximation — hand-built Zoom trees repair-prompt); rotate/ breathe (emphasis/loops) are dropped, documented, never silently mangled.+ transitions, sounds, animated, fontsEmbeddedin the result toast's data. - Page SFX embed as
media/sfxN.wav(fetched once per id, the media-bag posture) and wire into the transition sound slot (p:sndAc/p:stSnd) through an audio relationship on the slide. - Tested: 12 new unit tests (autofit presence, transition XML +
schema position, the timing tree — click group, delays, wipe
filters, rotate dropped honestly — SFX embedding, media
placement); a v0.22 e2e case asserts the whole package
(transition + timing +
embeddedFontLst+ fntdata + media placement) and does the LibreOffice round-trip; a node round-trip script exercises the full feature set throughsoffice --convert-to pdfwith pixel checks.
- Text re-wrap safety: every text body now carries a bare
- SFX fire in video export (closes the last documented Sound-wave
gap — "video export does not fire sfxId triggers in v1"):
buildSfxCues(new, pure) maps the present-mode triggers onto the recorder's timeline — the incoming page's transition SFX when the transition into it begins (page 0 at t=0), element SFX when the page-local animation clock crosses each delay, same-id retriggers within 60 ms collapsed (the player's guard). Sounds decode once per id through the export's own AudioContext and schedule as one-shotAudioBufferSources on the audio clock, paired with the frame loop's wall clock. SFX count as timeline audio for the engine choice (hasSfxCuesinVideoEngineInputs, the dialog mirrors it): a design with cues but no page audio rides the audio-muxing MediaRecorder instead of the silent WebCodecs path. Every step guarded — a failed fetch/decode drops that one sound, never the export; formats without an audio track (GIF, WebCodecs WebM) still carry no sound (documented indocs/SOUND.md). +12 unit tests (cue semantics, retrigger collapse, engine matrix).
Fixed
- The Word Cloud plugin refused to install on v0.22.0 itself — the
release raised the host app to 0.22.0 but left the bundled
manifest's
engines.canvixceiling at<0.22.0, so the first-party rail (correctly) rejected the plugin against its own host — the twofirstparty.test.tsassertions that pin the shipped bundle to the running build. The range widens to>=0.13.4 <0.23.0for this minor series. - PPTX media parts landed at the package root — the slide rels
say
../media/imageN.png(relative toppt/slides/_rels/), which resolves toppt/media/…, but the writer placed parts at the zip root: every image AND sound in an exported PPTX was a broken reference. Parts now land underppt/media/(asserted by unit + e2e + the round-trip script). collectTextFacescrashed on pre-series-chart documents — documents saved before the series/labels chart shape (and hostile hand-built ones) have neither field; the face walk now skips them instead of throwing during PDF/PPTX export.loadImagecrashed the export in node (SSR pass / unit tests have noImageconstructor): a missing bitmap now degrades to the placeholder paths instead of rejecting the whole export.- Landing-page counts told the v0.1.0 story — the stats strip still
advertised "15 fonts bundled / 11 starter templates" and the typography
card "15 hand-picked Google Fonts" while the shipped library is 369
fonts, 366 templates, 562 offline icons (+ the Iconify proxy) and 48
illustrations. The strip now reads 369 fonts · 366 templates · 562+
icons (the "0 watermarks" promise moved out of the strip — it already
lives in the hero badge and the open-source card), and the two feature
cards carry the real numbers.
docs/UPGRADING.md's "seeds the 110 templates" corrected to the 366-template library the same way.docs/COMPETITIVE-ANALYSIS.mdgains the five-cluster reanalysis table (post-v0.21.0) that this audit produced.
[0.21.0] — 2026-11-10
Wave 5, first slice — PPTX export (roadmap: "Export & Sharing
Professionalisation"). The presentation story that speaker notes and
presenter view started in v0.18/v0.19 now reaches the file format
itself: a design exports as a real PowerPoint package, native
editable objects and speaker notes included, written entirely in the
browser with zero new dependencies (guide:
docs/PPTX-EXPORT.md). No migration — pure client-side export.
Added
- The PPTX writer (
src/lib/pptx/): a hand-rolled OPC/ZIP writer (CRC-32, stored + raw-deflated entries through the platformCompressionStream— the same primitive the PDF image embedder uses), the OOXML skeleton builders (presentation, master, layout, compact theme, notes master/slides, doc props), and the slide mapper. - Native element mapping: text (paragraphs, rich-text spans,
bullet/numbered lists, RTL, align, line height, letter spacing,
auto-fit shrink), rect/roundRect/ellipse/triangle presets,
star/polygon as
custGeomfrom the SAMElib/shapes.tsgeometry the canvas/SVG/PDF/video renderers use, lines with dashes and arrowheads, images (PNG embed, JPEG byte-passthrough, corner radius, flips, opacity), emoji stickers, solid + gradient fills, strokes, element opacity, soft shadows, page backgrounds. - Rotation-origin re-base: Canvix rotates most element types around the box top-left (Konva semantics) while OOXML rotates around the centre — the mapper computes the post-rotation centre and places shapes pixel-identically (ellipse/star/polygon map directly). Unit-tested numerically.
- Speaker notes export: pages with notes get native notes slides + the notes master — the deck presents from PowerPoint with the notes in the presenter view.
- Per-page size overrides letterbox onto the deck size (the video export's fit-and-centre treatment; fonts/strokes/radii/ shadows scale to match).
- Raster fallback (the PDF rasterStrip pattern) for charts, tables, embeds, frames, plugin elements, audio/video cards, freehand strokes, curved/effect text and masked/filtered images — at the dialog's detail level.
- The Export dialog: a PPTX format card (editable-slides hint), all-pages toggle parity with PDF, progress + an honest result toast (editable elements · snapshots · notes pages).
Tested
- 11 new unit tests: CRC-32 known vectors; an INDEPENDENT zip reader (EOCD → central directory → local entries → DecompressionStream) round-trips stored + deflated archives; the package test asserts the full part list, content-type coverage, rels resolution, EMU sizes, hostile-text escaping, the rotation-origin re-base, per-page letterboxing, node-mode raster skipping and the no-pages refusal.
- Conversion proof: the suite writes a real smoke deck;
scripts/verify-pptx.shconverts it with headless LibreOffice (the strictest widely-available OOXML parser) and pixel-checks the render (background, ellipse, custGeom star, text, slide 2). tests/e2e/pptx-export.spec.ts: export through the dialog, download assertions, the zip cracked open with Python's zipfile — skeleton + heading as a native text run.
[0.20.0] — 2026-11-10
The Sound wave — closing the audit's Sound gap cluster in full
(guide + licence manifest: docs/SOUND.md). The beat-sync moat had
no sound source: audio elements, waveform rendering and beat
detection shipped in v0.11, but there was no way to GET a sound.
Four features, all riding existing rails (the A4 stock-connector
architecture, the chunked media store, the v0.11 audio analysis):
the CC0 library (3.1), the Freesound connector (3.2), voiceover
recording (3.3) and animation/transition SFX (3.4). No
migration — ElementAnimation.sfxId, PageTransition.sfxId and
AudioElement.credit ride as additive nullable fields; pre-sound
documents open unchanged.
Added
- Offline sound library — 16 original CC0 sounds.
public/sfx/generated byscripts/gen-sfx-pack.mjs: pure code synthesis (oscillators, shaped noise, envelopes; deterministic LCG noise so builds are reproducible — no samples, no third-party recordings, the project can actually grant CC0). Four categories (Transitions, Impacts, UI, Musical), mono 16-bit 44.1 kHz, ≤ 1.1 s each. Cataloguesrc/lib/assets/sfx-pack.tswith stable ids; unit tests pin catalogue ↔ files ↔ RIFF headers ↔ durations. - Freesound search — the fourth stock-media connector.
src/lib/stock-sound.ts+POST /api/stock-sound/search(rate bucketstocksound:search20/min, adminsoundSearchkill switch, F2b NO_PROVIDER + operator hint) + secret-freeGET /api/stock-sound/available. CC0-filtered by default (the audit's standing requirement; wider licences are an explicit request). Key resolution console-first (Stock media card →FREESOUND_API_KEYenv), 24 h in-memory response cache, status-only errors, defensive parsing. Inserts download the preview MP3 in the browser, ride the chunked media store and the full audio analysis, and store a durable credit block onAudioElement.credit(properties-bar chip — the A4 photo pattern). - Voiceover recording. The Audio panel's Record button:
getUserMedia+MediaRecorder(Opus/WebM, MP4 on Safari), 5-minute cap, live timer; permission denials surface as an honest toast. The recording rides the same insert path — waveform, BPM and beat grid bake in. - Animation + page-transition sound effects.
ElementAnimation.sfxId/PageTransition.sfxId(additive, nullable): one of the 16 pack sounds, picked in the Animate panel ("Entrance sound" / "Transition sound") with an inline audition button. Playback in Preview/Presenter: element SFX fire on the rAF clock when the animation triggers (at its delay); transition SFX fire when a page appears.prefers-reduced-motionmutes everything. Video export does not fire sfxId triggers in v1 — documented, with the autoplay-element workaround stated in the panel. - The Audio rail.
AudioPanelin the editor's left rail: library grid (audition + insert), gated Freesound search (the PhotosPanel debounce/race-guard pattern), voiceover recorder, and the uploads pointer. Panel idaudiothrough the store/rail/Editor.
Changed
- Admin console. The Stock media card gains the Freesound row
(write-only key, Test = one real CC0 probe, Clear) and is renamed
"Stock media — Pexels, Pixabay & Freesound"; feature toggles gain
the Sound search switch;
/api/ai/capabilitiesreportssoundSearch. - Stock key plumbing generalized —
StockProviderNameextends tofreesoundthrough the admin config (validation, stored keys, env fallback), and the stock card's input state became a generic per-provider record.
Tested
- 21 new unit tests: sfx-pack integrity (ids/files/RIFF/durations), sanitizeAnimation/sanitizePageTransition sfxId acceptance + hostile-id dropping, stock-sound parsing against recorded Freesound shapes (licence mapping, hostile rows dropped, cache, sanitized errors), route invariants (F2b gate, CSRF, happy path, key-never-leaks).
tests/e2e/sound-gated.spec.ts: the no-key world (available 503-gated, hint, capabilities false, rail + 16-sound grid + insert landing an audio element, voiceover surface) and the SFX picker round-trip in the Animate panel.
[0.19.0] — 2026-11-09
Wave 4 of the consolidation programme — AI Power-Up (roadmap:
docs/COMPETITIVE-ANALYSIS.md, guide: docs/AI-POWER-UP.md). Eight
features on three gradients: local image tools that work on any
image offline, text-slot features behind editable review gates, and
the video generation slot. Scoped directly after a live
verification that vibes.ai-class edit providers only edit images they
generated themselves (422 source_image_not_editable on uploads and
on re-encoded generations — byte-hash matched), so the universal path
got local. No migration this release — aiEntId/alt ride as
additive nullable element fields, slots/features ride the existing
AppConfig JSON; pre-v0.19 documents open byte-identically.
Added
- Local upscaler (Lanczos-3). "Upscale" on a selected image: 2×/4×
with a live target-size preview, output capped at 8192px per side
(factor auto-reduces). Separable Lanczos-3 with premultiplied alpha
in pure TypeScript (
lib/upscale.ts) — cut-outs keep clean edges, zero downloads, works offline on any image. Deterministic and unit-pinned. - Brush magic eraser — local pyramid diffusion. Paint over
unwanted objects with an adjustable brush; the region is
reconstructed from its surroundings by a clean-room LaMa-style
pipeline (
lib/inpaint.ts): pull-push pyramid over known pixels, boundary-constrained Jacobi diffusion at full resolution, seam feather. Zero model download; works on uploads and stock photos — exactly the images provider-backed erasers refuse. - Agentic planning with an editable review gate. Apps → AI design
plan: describe the design, pick 1–6 pages, and the text-slot model
returns a structured plan that NOTHING applies yet. The gate renders
page cards with scaled wireframe previews — toggle any page or
element, rewrite any copy inline — and Apply builds real editor
elements (
lib/design-plan.tsplanToPages, the MCPgenerate_designsemantics) through one history push. RoutePOST /api/ai/plan; hostile-input-safe normalization (clamped geometry, validated fonts/colors, ≤6 pages × ≤30 elements). - Speaker-notes generation. "Generate with AI" in the notes
popover: the page outline (titles from the largest text, bullets,
media summaries —
lib/notes-outline.ts; the model sees content, never geometry) goes toPOST /api/ai/notes, the reply renders as one editable textarea per page, Apply writes each page's notes. Route flagnotesGeneration. - AI theme generation. Apps → AI theme: a mood prompt returns a
role-tagged palette (background/surface/ink/inkSoft/accent/
accentSoft) + font pairing from the installed catalog. Preview all
six roles, Apply maps them design-wide (
lib/theme.tsapplyTheme, pure): backgrounds, text ink, shape accents, lines — images, charts and stickers are never touched. Two WCAG contrast guards (normalize- time ink swap, apply-time per-text flip). One Ctrl+Z reverts. RoutePOST /api/ai/theme, flagthemeGeneration. - Alt-text generation. The image toolbar's Alt button: editor +
Generate (one vision-slot call,
POST /api/ai/alt-text) returning a single plain sentence the user reviews/edits before Save storesImageElement.alt— riding autosave/versions/collab, feeding screen-reader landmarks, never burned into exports. FlagaltText. - Video-generation capability slot. The fifth slot (
video), speaking the OpenAI "Sora-style" async shape the VibesAI worker exposes (POST/videos/generations→ id; poll;/contentMP4). Videos panel gained a "Generate with AI" card (self-hiding without a provider): prompt → progress-polled generation → preview → Add to design downloads through a same-origin proxy, probes real dimensions + first-frame poster, inserts via the chunked media store. RoutePOST|GET /api/ai/video; starts (3/min) and polls (60/min) rate-limited separately; flagvideoGeneration; admin console slot row + kill switch. - MCP
vision_ground(canvas-screenshot vision grounding). The 21st tool: feed a canvas screenshot + page size, get a grounded element inventory — labels, roles, normalized 0..1 bounds AND page-pixel boxes, dominant colors, reading-order description — so agents reason about layout before acting withupdate_element/add_text. Pure normalizer inlib/mcp/vision-ground.ts; no-provider path points atget_design_content.
Changed
- AI-edit chains are id-based now.
/api/ai/imageand/api/ai/image-editforward the provider'simage_ent_id; the editor stores it on the element (aiEntId, additive) and sends it back assourceEntId— edit-of-edit chains survive re-encoding (the byte-hash match does not, verified live). The provider's "only edits its own generations" refusal surfaces as a structured 422SOURCE_NOT_EDITABLEwhose message points at the local tools that work on any image. - Capabilities surface.
/api/ai/capabilitiesreportsagenticPlanning,notesGeneration,themeGeneration,altText,videoGeneration(provider-gated) andupscale,brushEraser(local, always on). - Admin console. Model slots gained the Video generation row
(endpoint
videos/generations); feature toggles gained the five Wave 4 switches. Stored tables merge over the new defaults (on) — the legacy import wires the video slot too.
Tested
- 1309 unit tests (+54: upscale, inpaint, design-plan, notes-outline, theme, vision-ground, video status normalization, config slot table).
tests/e2e/wave4-ai-powerup.spec.ts: plan gate (edit + toggle + apply through the designs API), notes review, theme apply with contrast assertions, the REAL local upscaler (8→16px verified in the document), brush-eraser surface, alt-text round-trip, capabilities shape. AI routes mocked at the network layer.
[0.18.0] — 2026-11-09
Wave 3 of the consolidation programme — editor depth parity (roadmap:
docs/COMPETITIVE-ANALYSIS.md). Eight features across shape geometry,
text layout, canvas aids, document structure and presenting, with every
renderer kept in lockstep. No migration this release — everything
rides additive, nullable fields (sides, numPoints, innerRatio,
maskShape, maskSides, maskInnerRatio, autoFit, listStyle,
direction, per-page width/height/notes); pre-v0.18 documents
open byte-identically.
Added
- Parametric polygons & stars. The shape palette gained a Polygons
section (hexagon, pentagon, octagon, triangle, square, heptagon,
nonagon, decagon, 3–12 sides via the properties bar) and the star is
now parametric: 3–16 points with an adjustable spike ratio. One
geometry module (
lib/shapes.ts) generates the vertices in a 100×100 authoring box and two documented mappings place them:stretchPtsfor shapes (fills the element box, matching rect/ellipse/triangle) andscalePtsfor masks (the 2 % inset). The Konva canvas, SVG export, vector PDF export and video export all render the identical point arrays. - Image masks — 10 preset shapes + parametric polygon/starburst.
Circle, rounded, arch, triangle, diamond, pentagon, hexagon, star,
heart and blob presets plus the two parametric modes, from a Mask
picker in the image properties bar with live silhouettes. The clip
polygon rides the element (
maskShape/maskSides/maskInnerRatio— validated on render, hostile pastes degrade to none), renders via KonvaclipFuncon the canvas, a<clipPath>polygon in SVG, aW nvector clip in the PDF and the same clip group in video frames. - Text auto-fit. Canva-style: shrinks the font so the text fits its
box, never grows past the authored size, floor at 6 px. Derived at
render time through one binary search (
lib/text-fit.ts) that every renderer runs against its own measure — the canvas, SVG and PDF agree to the pixel, and the authoredfontSizeis never mutated. - Bullet & numbered lists. Any text element becomes a list
(properties bar → List): every non-empty paragraph is an item with a
hanging indent, widest-marker column, Canva-style wrapped
continuation lines. Shared layout (
lib/list-text.ts) drives the canvas, SVG and video renderers; the vector PDF takes the documented raster-strip approximation for v1 (pixel-perfect, not selectable). - RTL & complex scripts. A direction toggle (LTR/RTL) mirrors the list marker to the right edge and flips the default alignment (explicit centre stays); within-line reordering is the platform text stack's job, as it always was for Arabic/Hebrew content.
- Grid overlay + snap to grid. A zoom-bar toggle draws the grid on the stage (8–160 px cells, page-space so it zooms with the design) with an optional snap that rounds drags to the grid before element alignment. Editor preference only — never document data, never rendered in exports.
- Per-page sizes. Every page can override the design size
(properties from the page bar);
pageSize()inlib/editor-utils.tsis the one accessor every consumer goes through — canvas, preview, presenter, thumbnails, SVG, PDF MediaBoxes and video frames each fit-and-centre per page. Absent or absurd values fall back to the design size exactly as before. - Presenter view with speaker notes. Present with notes from the top bar: the current page large, the next as a thumbnail, live editable speaker notes per page (PageData.notes — never rendered on the canvas or in exports), keyboard navigation and an elapsed timer. The notes panel also lives in the page bar for authoring.
Changed
- Boot-time template top-up (operators). "The template library
ships as code" now reconciles itself: on every boot (Node runtime)
built-in templates are upserted when the database holds fewer than
the library (
src/instrumentation.ts→lib/templates/sync.ts, the same codenpm run db:seedruns). One COUNT query on a normal boot; new templates appear and nothing is ever deleted. Opt out withCANVIX_TEMPLATE_SYNC=0. This also closes the gap where an auto-deploying instance upgraded bymigrate deployalone would serve the stale template library (the exact canvix.app v0.17.0 rollout: 110 of 366 templates until the next boot). - The wordcloud plugin's engine ceiling moved to
<0.19.0.
Export parity notes
- Vector PDF: polygons, parametric stars, image masks, auto-fit and per-page MediaBoxes are first-class vector paths; list and RTL text ride the existing raster-strip fallback (documented approximation, v1). Auto-fit in the PDF uses the same measure-based binary search as the other renderers.
- SVG: full parity for every Wave 3 feature (clip-path masks, list
tspans,
direction="rtl", per-page viewBox, derived auto-fit size). - Video: pages fit-and-centre per page; lists, auto-fit, RTL mirroring, masks and parametric shapes render identically to the canvas.
[0.17.0] — 2026-11-09
The Wave 2 feature drop from the consolidation programme — the asset &
template ecosystem (see docs/COMPETITIVE-ANALYSIS.md for the roadmap).
Ten features in one release; re-scoring the Wave 1 matrix after this
wave is the acceptance bar.
Added
- Icon library — 562 offline icons + the Iconify universe online.
The Icons app grew from 12 shapes to a two-source library: a bundled
offline pack (extracted from the ISC-licensed lucide-react set at
build time by
scripts/gen-icon-pack.mjs, flattened to editable vector paths in the Canvix 100×100 box — recolour from the properties bar, full export parity in PNG/SVG/vector-PDF) and an online toggle proxying api.iconify.design (GET /api/icons?q=search and?svg=prefix:namefetch — strictly validated, 30/min rate limit, hard edge caching, inserts as image elements with full colour fidelity). Works offline; the online half degrades gracefully. - Illustration packs — 48 original flat-art pieces. Six packs
(business, people, nature, tech, abstract, festive) authored
in-house from primitives (
scripts/gen-illustrations.mjs— clean room, nothing copied), bundled offline as standalone SVGs, inserted as image elements with search and pack filters. - Font catalog ×5.8 — 63 → 369 families with on-demand loading.
The catalog moved to
lib/fonts/catalog.ts; the historic 63 stay on the preload link and every other family loads lazily viaensureFontLoaded(font dropdown hover/select, document open scan, template preview mounts). Konva stages repaint on font arrival (canvix:fonts-loadedbroadcast). The dropdown keeps Canva-style search + category pills over the full 369. - Custom font upload.
POST /api/fonts/custom(raw bytes, .ttf/.otf/.woff/.woff2, 8 MB cap, session-or-anon attribution, stored in the Media table) + client FontFace registration; the font dropdown gained an "Upload a font" button, acustomcategory pill and per-font delete. - Save as template. File → "Save as template…" persists the open
document as a private starter template (
UserTemplatetable, design-style attribution, 50-kit quota, structural validation). The editor Templates panel lists "Your templates" first, with apply and delete. - Smart templates — fields, CSV bulk fill and a REST fill API.
Templates may declare fields; text elements carry
{{key}}markers. One substitution engine (lib/templates/fields.ts— pure, tested) powers three surfaces: the editor's guided fill dialog (opens when applying a fielded template), the dashboard CSV bulk flow (upload or paste, column mapping preview, one design per row,?persist=1), andPOST /api/templates/[slug]/fillfor agents and MCP (JSON values/rows, raw CSV or multipart; render-only by default, persist opt-in; agents without browser Origin headers pass CSRF by design). 12 new field-enabled templates ship (4 certificates, 3 business cards, 2 quote posts, 2 event flyers, 1 invoice). - Server-side brand kits.
BrandKitRecord+ full CRUD at/api/brand-kits(10 kits per attribution, validated colours/ palettes/fonts/logo data-URLs). The Brand panel syncs the active kit debounced, keeps localStorage as offline fallback, and gained a kit selector with create/delete and a live sync indicator. - Preset catalog 8 → 60.
PRESET_GROUPSspans social, video, docs, print and web/marketing sizes; the dashboard's 9th quick card opens a searchable grouped browser ("More sizes") with custom-size escape hatches. - Template library 110 → 366. Two deterministic computed variants
per design (Aurora colourway, Ink typography swap — pure transforms
in
lib/templates/variants.ts, zero extra bundle bytes, stable slugs, idempotent re-seeds) plus the 12 smart templates. Whites survive colourways; field markers survive both transforms. - Schema migration 0011 —
UserTemplate+BrandKitRecordtables and the nullableTemplate.fieldscolumn. Upgrade-safe from any v0.16.5 database (new tables only;npm run db:setupapplies and re-seeds, refreshing the library to 366).
Changed
FONTSre-exported fromlib/fonts/catalog.ts(same import path vialib/editor-utils); layout preload unchanged for the original 63 families.- Dashboard template click on a smart template now substitutes EXAMPLE
values — raw
{{markers}}never reach the canvas.
[0.16.5] — 2026-11-08
[0.16.5] — 2026-11-08
Added
- Pexels & Pixabay keys in the admin console — the Stock media
card (A5). The two free stock-media keys behind the Photos and
Videos search rails are now managed on the AI & models page like
the AI providers: write-only key fields (stored keys echo as
masks only), a per-provider Test button and a per-provider Clear,
in a fixed two-provider card below Model slots. They are library
catalogs, not AI providers — the A4 decision, now manageable
without editing
.envand redeploying. Precedence mirrors every other credential in the console: a stored key wins overPEXELS_API_KEY/PIXABAY_API_KEY, clearing it restores the env fallback, and saving takes effect immediately (the key store ridesAppConfigbehind the config module's 10 s in-process cache — the same cost profile as the feature switches already sitting on every AI route). The Model-slots banner now points at the card instead of telling the operator to go edit environment variables. - Stock-key Test button — one minimal one-result search through
the provider's real search endpoint (
/v1/searchfor Pexels,/api/for Pixabay) with the effective key: the same call the Photos rail makes, so a pass there is a pass in the panel, and a 401 says "rejected the key" in plain words. Admin-only, same-origin, rate-limited to one probe per 10 s — it is one of the only console actions that spends real provider quota. The verdict never echoes the key, the request URL (Pixabay's key rides the query string) or the provider's response body.
Changed
stockPhotoProviders/stockVideoProviders/stockPhotoAvailableare now async — key resolution reads the console store first. Internal API only; the routes that consume them await, and/api/stock-photo/available+/api/stock-video/available+/api/ai/capabilitiesanswer exactly as before (booleans and provider names, never keys).
[0.16.4] — 2026-11-07
Added
- Stock photo search on Pexels/Pixabay keys — the
imageSearchAI slot is retired (A4, #44). "Find me a photo of a coffee shop" is a library query against licensed stock catalogs, not a generative one, and almost no OpenAI-compatible vendor serves theimages/searchendpoint the old slot demanded — the standing 404 behind the A3 incident. Photo search now rides the same self-hoster-key architecture as the Videos rail (v0.15 R6): Pexels + Pixabay, plain REST, one free key each, and the same two env keys (PEXELS_API_KEY/PIXABAY_API_KEY) activate both rails. Every result carries a sanitized, durable credit block (provider, author, license, source page) stored on the inserted element and shown at insert and on selection — never burned into the canvas or exports. No key configured ⇒ the Photos panel keeps its bundled library, search answers503 NO_PROVIDERwith the operator hint, everything else is untouched (the F2b pattern). No migration — stored provider tables that still carry animageSearchslot are read fine and drop it on the next save.
Fixed
- Photos categories are the results-mode exit hatch — always render (#45). A category chip could disappear behind the results header after a web search, leaving no way back to the bundled library.
[0.16.3] — 2026-11-07
Added
- Admin Logs view (
/admin/logs) — "why did the AI feature fail?" finally answerable from the console. Every AI request throughwithProvidernow writes a durable telemetry row (AIUsage, extended by migration0010_ai_request_log): feature, provider, model, outcome status, round-trip duration and a scrubbed failure reason — every outcome recorded, not just successes: provider failures carry the provider's HTTP status, and the guard exits are logged with their codes (403 rejected · 429 rate-limited · 503 disabled or unconfigured, slot named). The page leads with a slot-status strip (what each of the five capability slots resolves to right now), then the request log with live tail (5 s, pauses on hidden tabs), window / feature / outcome filters and per-feature call/error counters. Rows are swept after 90 days like TrafficStat. - Per-slot "Test" buttons on the AI & models page. The A2 test connection only proved chat worked — a chat-only provider (NVIDIA NIM et al.) passed every test while image generation 404'd in production, which is exactly the incident that prompted this release. Each slot is now probed through the endpoint it actually uses: text/vision via a minimal chat completion, image via a real minimal generation, imageEdit via a deliberately image-less probe (a 400-class "must provide images" answer PROVES the endpoint exists, costlessly), imageSearch via a one-result search. Verdicts explain themselves — a 404 says "this provider does not serve image generation; pin those slots to a provider that does". Every slot row also shows the endpoint path it exercises.
Fixed
- AI failure responses now carry the reason. The 502 body from AI
routes includes
code: "PROVIDER_ERROR"and a scrubbeddetail("404 page not found (HTTP 404)") — the same string the Logs view shows, so end users and the admin see one truth. Credential-shaped tokens (nvapi-/sk-/Bearer…) are masked before anything is logged or returned. - OpenAI-style
b64_jsonimage responses work. The SDK passes non-URL items through untouched, and the image/image-edit routes only readdata[0].base64— providers answeringb64_json(the OpenAI shape) returned "no image". Both routes now accept either field.
[0.16.2] — 2026-11-07
Fixed
- Every console/env-configured AI provider failed with "Configuration
file not found or invalid" (A2 root-cause fix). A1 injected the
resolved provider into
process.env.ZAI_BASE_URL/ZAI_API_KEYbefore callingZAI.create(), on the belief that the SDK resolved env vars. It does not — the SDK'sloadConfig()only ever reads.z-ai-configfiles (cwd → ~ → /etc). On any host without that file (the canvix.app VPS included) every "Test connection" answered 502 "Provider initialization failed" and every AI feature answered 503, no matter what was saved in the console.makeClient()(src/lib/ai/provider.ts) now constructs the SDK directly with the resolved{ baseUrl, apiKey }— the constructor takes exactly that shape, and any OpenAI-compatible endpoint works through it.
Added
- Multi-provider AI configuration (A2).
/admin's AI page now has a providers table — up to eight OpenAI-compatible endpoints (NVIDIA NIM, OpenRouter, Z.ai, Groq, OpenAI…), one write-only key each — and five capability slots (text,vision,image,imageEdit,imageSearch) that can each be pinned to a different provider + model, so Magic Write can run on one vendor while image generation runs on another. Per-slot precedence: providers table → legacy single override → env vars →.z-ai-config→ unconfigured./api/ai/capabilitiesprobes per slot; keys are preserved on edit (empty field = keep the stored credential); one click imports the A1 single-provider override into the table. Storage is one moreAppConfigJSON row (ai.providers) — no schema change. Per-row Test buttons probe a specific provider ({ providerId }body on/api/admin/config/ai-test). - Real-time traffic panel (A2).
/admin's overview now leads with a live panel fed byGET /api/admin/realtime(2 s polling, self-excluded from its own counters): requests/errors per second over the last 60 s, 5-minute request/error/active-visitor/AI-call totals, p50/p95 latency and the window's top routes. Counters live insrc/lib/admin/realtime.ts— a zero-import, hard-capped, in-memory module statically linked into the observability wrapper (cannot repeat the v0.16.1 edge-bundle regression); visitors are per-boot salted hashes, never raw IPs;CANVIX_TRAFFIC=0disables live recording together with the durable counters. Process-local by design — TrafficStat/AIUsage remain the durable record.
Changed
withProvider()handlers now receive one{ zai, model }context instead of a bare client — a slot's provider and model can no longer drift apart between resolution and the request.- MCP
generate_designuses the text slot's provider + model (was: SDK default on whatevergetZAI()resolved).
[0.16.1] — 2026-11-07
Fixed
- Self-hosted
next buildregression (A1 follow-up). A1 wired the traffic counters intowithLoggingwith a static import of@/lib/admin/traffic— the Prisma client — which broke the observability module's stdlib-only contract (v0.12.5) and with it every self-hosted production build: Next also compilessrc/instrumentation.tsfor the edge runtime, Turbopack followed the new import into Prisma's query-compiler wasm loader, andnext buildfailed with "The export default was not found in module …query_compiler_bg.postgresql.raw.wasm" (first seen on the canvix.app VPS, where the failed build also wiped.next/standaloneunder the running process — every static asset 500'd until a successful rebuild). The counter now loads lazily behind the documentedNEXT_RUNTIMEdefine — the edge compilation context folds the guard toreturnat build time, so Prisma is never traced into the edge instrumentation bundle — while runtime behaviour on Node is unchanged (fire-and-forget, error-swallowing,CANVIX_TRAFFIC=0opt-out). - CI never ran
next build. The lint-unit gate type-checked, linted and unit-tested, and the e2e suite bootsnpm run dev— so the edge-instrumentation breakage passed every check and only failed on a real deployer. lint-unit now runs the production build too (timeout raised to fit).
Changed
package-lock.jsonversion fields re-synced withpackage.json(the 0.16.0 bump missed them, so everynpm installon a deploy VPS dirtied the lockfile).
[0.16.0] — 2026-11-07
Added
- Admin console, part 1 (A1).
/admin— the operator surface for a self-hosted instance, with zero new dependencies (Prisma models, hand-rolled SVG charts, the existing stack). Operator guide and full decision record:docs/ADMIN.md. The highlights:- Fail-closed admin access. Two paths only: the
CANVIX_ADMIN_USERSenv bootstrap (set it, restart, sign in — also the lockout recovery path) or aUser.role = 'admin'granted by another admin from the console. No first-user-is-admin, no secret URL. The API re-checks every call independently of the UI (401 unsigned / 403 non-admin); mutations are same-origin guarded; self-role-change is refused. - Traffic analytics. Every API request (all routes already pass
through the
withLoggingwrapper) increments a per-day aggregate: route template, method, status, count — never ids, IPs or query strings. The Overview page shows 14-day traffic, daily-active users (userIds + hashed anon keys from dashboard/editor opens), signups and AI calls (teal ok / red failed), plus top routes and AI usage by feature. 90-day lazy retention;CANVIX_TRAFFIC=0opts out; the workerd fire-and-forget caveat is documented. - User directory. Searchable, paginated, with design counts,
active sessions and last activity per user; admin grant/revoke
with a two-step inline confirm; force sign-out (one bounded
DELETE on
Session). - AI provider & model configuration. A console override that
wins over
ZAI_BASE_URL/ZAI_API_KEY(write-only key, masked echo, half-configured states rejected), configurable text/vision/image model ids validated before use, a live connection test (1 per 10 s, 15 s circuit breaker), and seven per-feature kill switches that gate the routes and the public capabilities endpoint — a switched-off feature greys out in the editor and answers 503 before any provider work. - Instance settings. "Allow new sign-ups" answers
503 SIGNUPS_CLOSED— checked before the rate limiter so a closed instance burns none of a visitor's attempt budget. "Anonymous editing" gates anonymous design creation/saves only; reading, sharing and exporting never break. - Honest e2e without registrations. The acceptance spec seeds
its fixture users and sessions straight into Postgres (the
pgdriver already in the tree) — the suite stays inside the 5/h/IP register budget while proving the full path: gating, role round-trip, switches reaching/api/ai/capabilities, counters landing in the overview.
- Fail-closed admin access. Two paths only: the
Changed
- Prisma migration
0009_admin_console(additive):User.roledefault'user',AppConfig,TrafficStat,DailyActive. - The Word Cloud plugin's
engines.canvixrange widened to>=0.13.4 <0.17.0for this minor series.
[0.15.5] — 2026-11-07
Added
- Rich content & export, part 6 — stock video depth (R6). A
provider-gated Videos rail: configurable stock-video
connectors (Pexels + Pixabay — free self-hoster keys), license
and attribution surfaced, zero new dependencies. Decisions
and the operator guide live in
docs/STOCK-VIDEO.md; the highlights:- The F2b gate, one class over. No
PEXELS_API_KEY/PIXABAY_API_KEYon the server ⇒ the rail item never renders and/api/stock-video/*answers503 NO_PROVIDER— everything else in the editor keeps working. Availability is probed once per editor mount from a secret-free endpoint. - One normalized result set.
src/lib/stock-video.tsmaps both providers to one shape (mp4 ladder + poster + sanitized credit), parses every field defensively (unknown keys ignored,javascript:URLs can never become credit links, control characters stripped, lengths hard-capped) and caches responses in memory for 24 h per instance (Pixabay's request). - Inserts ride the existing rails. The browser downloads the chosen rendition (both CDNs are CORS-open on GET — verified, not assumed) into the chunked media store, so quota, sha256 dedupe, the 32 MB cap and the library listing all apply; a 413 or failed download falls back to the next smaller rendition automatically.
- Attribution is durable. The credit block is stored on
VideoElement.credit(it rides autosave, versions, collab and the offline merge), shown in the insert toast and as a chip in the properties bar whenever the element is selected — deliberately never rendered on canvas or burned into exports. - Honest testing without provider keys. Unit suite parses
recorded provider fixtures; the acceptance e2e runs the FULL
path (search → browser download → upload → poster probe →
element with credit) against a local mock Pexels API serving
real ffmpeg-generated renditions
(
playwright.stockvideo.config.ts, wired into CI); the default suite asserts the gated world (hidden rail + 503).
- The F2b gate, one class over. No
- Verified: tsc/eslint clean · unit 975/975 (25 new) · anonymous zero-registration e2e: gated spec + mock-provider acceptance 2/2 · full local regression 65/65 in three fresh-server batches · plugins flag-on 5/5 · production build clean.
[0.15.4] — 2026-11-06
Added
- Rich content & export, part 5 — GIF export (R5). Animated,
looping GIFs from any page range, rendered entirely in the browser
with zero new dependencies (a hand-rolled GIF89a writer + LZW
compressor, the R2/R4 house pattern). Every dependency decision is
on record in
docs/GIF-EXPORT.md; the highlights:- One render session, three engines. The GIF engine rides the
exact
createRenderSessionthe two video engines use — R2's deterministic fixed-timestep pacing and R3's frame-accurate autoplay videos apply to GIFs for free. - A real quantizer, not a first-fit hack. Median cut over 8 deterministic timeline samples (the same design always yields the same palette); each palette colour is the most-popular colour of its box, so flat fills pass through exactly. Per-pixel indexing is a 15-bit nearest-colour LUT — O(1) per pixel.
- Dithering is an option (default on): standard Floyd–Steinberg, error clamped into gamut. Turn it off for smaller files.
- Size cap + honest timing. 480/720/1080 px caps, a 25 MB byte cap checked during the encode (early abort with advice), an 1800-frame cap refused before rendering in the dialog. Delays are centiseconds and durations are reported from the actual encoded delays (15 fps = 7 cs = 14.29 effective — stated, not hidden). GIFs are silent; the dialog says so before you click.
- Verified: unit 60 new (PIL golden LZW streams decoded by an independent in-test decoder; byte-level container assertions; 4096-entry table exhaustion) · new anonymous zero-registration e2e with ffprobe as the independent parser, the page-range acceptance, and the pre-flight cap refusal.
- One render session, three engines. The GIF engine rides the
exact
[0.15.3] — 2026-11-06
Added
- Rich content & export, part 4 — vector-text PDF (R4). The PDF
export now emits real selectable, searchable text with embedded
subset fonts instead of rasterized pages, and shapes, lines,
strokes, tables, charts, embeds and frames render as true vectors
(photos keep their original JPEG bytes —
DCTDecodepassthrough). The architecture and every dependency decision are on record indocs/PDF-VECTOR-EXPORT.md; the highlights:- Text model via the SVG serializer's —
layoutRichLinespositions every run (rich spans or flat), baselines use Konva's exact measured-metrics formula, underline/strike use Konva's exact geometry, and per-glyphTJadjustments are computed from the same canvas measurements the editor wraps with, so glyph placement matches the canvas to the pixel. - Font ladder, fail-closed: embed a subset of the real Google
font (a tiny
/api/fonts/ttfroute negotiates TrueType bytes through the same css2 CDN the app already renders with — legacy-UA negotiation, weights snapped per family) → fall back to the documented per-category standard-14 face (Helvetica/Times/ Courier + WinAnsi) when offline or unreachable → rasterize the element only when glyph coverage drops below 75%. - Subsetting is hand-rolled (
src/lib/pdf/ttf.ts): used glyphs only, composite components rewritten, re-indexed cmap, rebuilt hmtx/loca/maxp, correct checksums — verified against real Google-served fonts, cross-checked by fontTools on dev machines, byte-compared through the module's own re-parser. - Per-element raster strips (the video-export Konva compositor reused) keep emoji stickers, plugin renders, filtered images, drop shadows, curved/fx/gradient text pixel-perfect — a page never degrades as a whole.
- jsPDF removed (net dependencies −1): the new ~250-line
writer covers the old raster path in 40 lines and does what no
jsPDF API exposes cleanly — per-glyph positioning, Type0
dictionaries, raw streams. 60 new unit tests (890 total), plus
an anonymous e2e asserting
pdftotextextractability.
- Text model via the SVG serializer's —
Changed
- Export dialog: the PDF format renders from design data (no more page-flipping waits during multi-page export); the quality control now sets raster detail for photos/stickers while text stays resolution-independent.
[0.15.2] — 2026-11-06
Added
- Rich content & export, part 3 — moving video in exports (R3).
Autoplay video elements render their MOVING content in exported
videos — frame-accurately — instead of the poster frame they had
shown since v0.11.
windowedSourceTime— the one source-time mapping both export engines share (pure, unit-tested): page-local t=0 → trimStart, looping wraps within the trim window, non-looping holds the final frame, a trim past the file clamps to the loaded duration, and every input is garbage-safe (never NaN, never negative).- WebCodecs engine: seek + draw per fixed timestep. Before each frame is composited, every visible autoplay video is seeked to its exact source position — seeks are deduped (same rounded target ⇒ no-op), parallel across videos and individually bounded (3 s); a seek that never completes draws the last decoded frame, so a slow video source can only make the export take longer, never drop or duplicate a frame (R2's deterministic pacing preserved).
- MediaRecorder engine: wall-clock playback. Autoplay videos play beside the page audio — segment entry seeks to trimStart and plays (muted — the export muxes page audio only; that boundary is the R3 acceptance, unchanged), segment exit pauses + resets, and the frame loop applies the trim window with the same rule the presentation rAF tick uses.
- Honest degradation everywhere: non-autoplay videos keep the
static poster render (the presentation semantic); a source that
fails to load (CORS-blocked remote, gone media id, 12 s canplay
budget missed) falls back to the poster — fail-closed, the same
rule as the image loader; decode is capped at 12 simultaneous
videos (
MAX_EXPORT_VIDEOS), the rest keep posters. Live videos render without the play chip (an editor affordance — this one is playing). - The export dialog says so before you click: "Autoplay videos export with their moving content frame-accurately."
- CPU cost, on the record: each visible autoplay video costs one seek round-trip per exported frame on the WebCodecs path (typically ~5–15 ms in Chromium — a 30 fps × 10 s page with one video ≈ 300 seeks ≈ a few extra seconds); the MediaRecorder path decodes in real time, same as presentation.
- New anonymous zero-registration e2e acceptance: a moving test-pattern video uploads through the media store and exports through BOTH engines; extracted frames at t=0.6 vs t=1.8 must differ substantially (moving content) — while the same design with autoplay OFF must stay static (the poster gate). Plus the pure mapping/filter contracts in the unit suite.
[0.15.1] — 2026-11-05
Added
- Rich content & export, part 2 — WebCodecs export pipeline (R2).
Silent designs export through
VideoEncoder(VP9 with a VP8 fallback,latencyMode: 'quality', explicit bitrate) into a hand-rolled WebM muxer — zero new dependencies.src/lib/webm-muxer.ts— an EBML writer with the ordering trap handled explicitly (small trees composed bottom-up; streamed Segment/Cluster elements get 8-byte placeholders thatfinalize()patches), 1 ms timecode scale, a cluster split policy (≤ 5 s age, keyframe splits at ≥ 1 s, int16 relative timecode ceiling, out-of-order re-base guard) and one CuePoint per cluster. 21 unit tests verify it through an INDEPENDENT mini EBML parser, plus an ffprobe cross-check that muxes real ffmpeg-encoded VP9 frames and reads the file back as matroska,webm.- Deterministic frame pacing — every frame carries its exact
frame / fpsmicrosecond stamp; there is no wall clock in the loop, so slow rendering can only make the export take longer, never drop or duplicate a frame. Backpressure ridesencodeQueueSize. - One render session, two engines — the MediaRecorder loop and the WebCodecs loop share the same canvas, Konva stages and frame compositor (extracted in this release), so they draw identical pixels.
- Engine matrix (
chooseVideoExportEngine, pure and unit-tested): page-audio designs keep MediaRecorder when it can mux audio (WebCodecs is video-only for now — Opus-in-WebM viaAudioEncoderis a documented post-R3 evaluation); silent designs get WebCodecs; WebCodecs-less browsers keep MediaRecorder; a browser with audio but no audio-muxing recorder now exports silent WebM instead of hard-failing. - The export dialog shows which engine will run before you click.
- MP4 decision point, on the record: MP4-everywhere needs a hand-rolled moov/mdat muxer (multi-week) or a ~30 KB muxing dependency — both rejected for R2; MP4 stays on the MediaRecorder path where the browser can encode H.264.
Fixed
- A float-precision trap in the muxer's vint bounds check: at
doubles ≥ 2^53 the guard
> 2**56 - 2silently never fired because2**56 - 2rounds back to2**56(16-wide spacing); the guard is now>= 2**56. Found by the unit suite before any real file was written.
[0.15.0] — 2026-11-05
Added
- Rich content & export, part 1 — rich text (R1). Per-range
styling inside a single text box: bold, italic, underline,
strikethrough, colour and links as
spans— style runs laid overTextElement.text, with the existing flat fields kept as the inherit-base.- One geometry module for all three renderers —
src/lib/rich-text.tsnormalizes, sanitizes, edits and LAYS OUT the runs (layoutRichLines: greedy word-wrap across span boundaries, hard breaks for over-wide words, textarea\nas a hard line break, trailing whitespace dropped at wraps, per-run coalescing, align-resolved line x). The editor's Konva nodes, the SVG serializer and the video-export frame builder all consume the samePositionedRun[]— the D7 charts pattern, so no renderer re-derives positions. - The editing UX — the existing textarea overlay gains a
floating selection toolbar (B / I / U / S, a colour input, a link
popover with Apply/Remove, and clear-styling) that applies to the
current selection, plus a styled mirror layer behind a transparent
textarea so the formatting is visible while editing. Every
keystroke reconciles the runs (
reconcileSpans: common prefix/suffix diff — insert, delete, cut, paste and replace all ride one path; typing at a style boundary extends the run you are inside). - Migration is lossless by construction — legacy elements have
no
spansand render through the untouched flat path; styling a range CREATES the array; clearing it returns to flat with the base fields never modified. A malformed array (text-length mismatch, over the 128-run cap) normalizes tonull— styling data can never corrupt the text. 38 new unit tests cover the module (sanitization, normalization, range ops, keystroke reconcile, layout math with a deterministic fake measure). - Security — links are http(s)-only, control-char-stripped and
length-capped (
sanitizeLink, fail-closed) on every write path: the editor toolbar, the MCPupdate_elementpatch whitelist, and the normalize pass. The MCP patch validates runs against the (possibly simultaneously patched) text and drops malformed arrays instead of storing them. - Two bugs found by the new e2e while wiring the renderers,
both fixed: the rich
Group's tight glyphclientRectput the Transformer's anchors on the text itself (a click at the element centre hit a bottom anchor and fired a phantomtransformstart, eating an undo step — now a transparent hit rect keeps the declared box exactly like the flatKonva.Text), and a blur from the textarea into the link popover committed the editing session early (blur now ignores focus moves inside the toolbar). - Honest limits, on the record — collab merge stays whole-box
LWW: two offline editors of one text box still last-writer-win
the ENTIRE element (text + spans ride together; per-span stamps
are a post-1.0 evaluation on real usage). Curved text
(
curve ≠ 0) ignores spans in all three renderers. The splice ghost-copies effect falls back to the flat path. SVG exports render links styled (blue + underline) but not as clickable<a>anchors. Gradient fills map across the whole element box via per-run point offsets. - e2e acceptance (anonymous, zero registrations): a legacy flat
element opens losslessly; bolding a range saves exactly
[{Hello, bold}, { rich world}]with the text untouched; the mirror carries<strong>while editing; ONE undo reverts the spans to null; the exported SVG contains bothfont-weight="700"andfont-weight="400"tspans; ajavascript:URL applied through the UI is stripped (never stored) while anhttps://URL survives; the properties-bar "Rich text · Clear" chip flattens the element.
- One geometry module for all three renderers —
[0.14.5] — 2026-11-05
Added
- Daily-driver depth, part 6 — even distribution (D3). Select
three or more elements and space them evenly, the Canva/Figma
"spacing" behaviour: equal gaps between element edges, the outermost
elements stay exactly where they were.
- One pure geometry module —
src/lib/distribute.tsholds the distribution math (edge-gap semantics, floats walked with integer output so rounding never drifts); the store action, the AI assistant path and the unit tests all share it. Geometry uses the element's local box, the same documented simplification the page-align modes use. - A real store action —
distributeElementsfollows thealignElementshouse pattern: ONE history entry (one undo step — the old assistant path did oneupdateElementsper element), fresh HLC stamps on touched elements only, one collabpage:replacebroadcast. - Position popover tiles — a "Distribute" section with Spacing H / Spacing V appears when three or more elements are selected (hidden below the threshold where there is nothing to space evenly).
- Assistant + plugin parity — the
distributeElementsagent action (already in the Assistant vocabulary and the plugin allowlist) now rides the same store action and geometry. Two honest fixes came with it: the old inline math measured the span to the last box's leading edge (off by its size — gaps were uneven for unequal elements), and it refused overlapping selections outright; Canva and Figma distribute those (the overlap is evened out), and now Canvix does too. - Fixed while auditing the README roadmap: the v0.14 checklist was missing its image-filters entry (shipped as 0.14.3) — added.
- One pure geometry module —
Changed
- The
distributeElementsAI/plugin action no longer refuses overlapping selections with "Elements overlap — no distribution applied"; it distributes them evenly (Canva/Figma behaviour) and reports success.
[0.14.4] — 2026-11-05
Added
- Daily-driver depth, part 5 — data-bound charts (D7). Charts
were one-shot decorations (the Apps panel exploded them into loose
rects and lines — edit one bar and the "chart" was gone). They are
now a native
chartelement whose data stays editable.- Four kinds, one element — bar (grouped or stacked), line (optional Catmull-Rom smoothing), donut (first series, centre total, adjustable hole) and scatter (flat x,y pairs on numeric axes). The toolbar converts between kinds in place; converting out of scatter reuses the y values so nothing is lost.
- One geometry module, three renderers —
src/lib/chart-geometry.tsturns the element into pure vector primitives; the editor (react-konva), the video exporter (Konva) and the SVG exporter (strings) are thin adapters over the same list, so all three render identical geometry by construction. Smooth lines are sampled in the geometry itself; anchored text uses the same wide-box trick in both Konva and SVG. - Editable after creation — the toolbar's "Edit data" popover is a spreadsheet: category labels, per-series values, series names and colours, add/remove labels and series (typing updates live; structural edits are one undo step each — the house pattern). Plus grid / values / legend toggles, text size and panel colours.
- Everywhere a chart should be — Elements panel "Charts" tab, the Apps rail (now adding the native element), the layers panel, SVG exports (annular-sector arc paths for donuts), video exports — and while wiring the video exporter, tables, frames and embed cards stopped vanishing from video exports entirely (they previously fell through to an empty group; a pre-existing parity gap closed while here).
- Safe + agent-ready — pasted charts run the hostile-input
gauntlet (kind whitelist with bar fallback, ≤ 6 series / 24
labels / finite clamped values, hole clamped); MCP gains
add_chartandupdate_elementunderstandsseries,labels,kind,barMode,holeand the display toggles.
[0.14.3] — 2026-11-05
Added
- Daily-driver depth, part 4 — the image filter gallery (D4).
The context toolbar's "Filter tint (soon)" stub is gone: image
elements now carry a filter preset + intensity, rendered live in
the editor, in video exports, and approximated in SVG exports.
- Eight presets — Original, Mono (grayscale), Warm, Cool, Vintage (sepia-lerp + black-lift), Blur (3-pass box ≈ gaussian), Sharpen (3×3 unsharp) and Vignette (radial falloff) — as a chip grid in the new Filters popover, each chip a live preview canvas of the element's own image, plus an intensity slider.
- One pixel pipeline, every renderer (
src/lib/image-filters.ts): the editor rides the existing Konva cache pipeline; the video exporter pre-bakes pixels through a Konva-exact twin (and now exports flips/rotation for image elements too — a parity gap closed while here); SVG exports emit real filter primitives (feColorMatrix/feComponentTransfer/feConvolveMatrix/feGaussianBlur, vignette as a clipped radial-gradient overlay) with each approximation documented in the module header. Adjust (brightness/contrast/saturation) now renders in exports as well — previously editor-only. - Persistent + safe:
filter/filterIntensitylive on the element (undo/redo, collab, autosave all just work); pasted elements whitelist the preset id and clamp intensity (junk resets to none, never throws);update_element(MCP) patches images' adjustments and filter fields too.
[0.14.2] — 2026-11-04
Added
- Daily-driver depth, part 3 — dashboard folders (D6). "Recent
designs" was one flat grid; every project jostled every other. Now
the caller organizes designs into folders — private, attribution-
scoped, and account-following like everything else.
Foldermodel +Design.folderId(migration 0008, additive and nullable — zero folders = "All designs", byte-for-byte the pre-v0.14 view). Deleting a folder UNFILES its designs (FKON DELETE SET NULL): a folder delete can never destroy work, live or trashed. Trashed designs keep their folder and return to it on restore.- API:
GET/POST /api/folders(list with live design counts; create with name sanitize + 50-folder ceiling) andPATCH/DELETE /api/folders/[id]— all attribution-scoped (ownerId or the canvix_anon hash), foreign ids are a flat 404 (no cross-account existence oracle), CSRF-guarded, rate-limited (folders:create/folders:updatebuckets).GET /api/designsgains?folder=<id>(caller-owned or 404) and returnsfolderId;POST /api/designsacceptsfolderIdso designs can be born filed;POST /api/designs/[id]/movefiles/unfiles (edit access on the design + ownership of the target folder — never someone else's tree). - Login/register claims this browser's anonymous folders
(
claim-folders.ts, the D1 media pattern) — organization follows the account across devices. - Dashboard UI: folder chips between the section header and the grid ("All designs" + per-folder chips with counts + "New folder"), one dialog for create/rename, chip ⋯ menu (rename / delete with an honest confirm: "designs inside are NOT deleted"), design-card ⋯ menu gains a "Move to folder" submenu (with a check on the current folder + "Remove from folder"), the section title shows the open folder, and anything created while a folder is open is born inside it. Duplicates stay in their folder when it is one of the caller's own.
- Verification: vitest 676/676 (32 new: folder list/create
scoping + sanitize + ceiling, rename/delete flat-404 matrices,
move-route authz incl. foreign-folder 404 + read-only 403,
designs
?folder=+ create-folderId paths); e2e +2 specs (anonymous full lifecycle: create → file → filter → rename → delete → designs survive at the root, API-truth asserts; and cross-attribution isolation: a second browser cannot list, mutate, filter by, or create into the first one's folders); default suite 49 specs green locally (fresh-server batches — see worklog for the fuse-watcher caveat), flag-on plugins 5/5; tsc/eslint/build clean. Zero new registrations in the new specs (the PR #26 register budget).
[0.14.1] — 2026-11-04
Added
- Daily-driver depth, part 2 — the system clipboard & cross-tab
copy (D2). Copy used to be tab-local (a module-level array): the
moment you switched tabs it was gone, and pasting anything from the
OS — a screenshot, an image copied from another site — did nothing.
Now the OS clipboard carries a Canvix envelope, and OS images paste
straight onto the canvas.
- Copy/cut mirror to the system clipboard: a JSON envelope
(
application/x-canvixcustom MIME where supported, plus the same JSON astext/plainso Firefox's writeText-only clipboard still round-trips). The internal clipboard stays the same-tab fast path — zero latency, no permissions. - One native paste pipeline (the old mod+V keydown branch is gone — keydown can't read clipboard contents): OS image file → image element through the uploads-library rail (D1) with document embed as fallback; Canvix envelope → sanitized elements; anything else → the internal clipboard. Read-only designs never paste; typing surfaces keep their default paste.
- Clipboard files are captured synchronously — the DataTransfer (and its files) is neutered the moment the handler returns, so the byte read starts inside the event and the File is rebuilt after. The envelope text is likewise read synchronously.
- Pasting is an untrusted-input surface:
sanitizePastedElementskeeps only known element types, caps every string (20 KB) / array (600) / depth (8) / element count (50), forces finite clamped geometry, strips__proto__/constructor/underscore keys, and recurses the same gauntlet through group children — the document pipeline only ever sees shapes it could have produced itself. - Ids are always remapped on paste (
pasteElements, the single insertion path) — a paste can never collide with an existing element id, locally or through collab. - Verification: 12 new unit tests (the sanitizer gauntlet: hostile types, prototype pollution, oversized payloads, depth bombs, geometry clamps, group recursion; envelope round-trip; DataTransfer stubs) + a 3-spec e2e: copy in tab A pastes in tab B with a fresh id and the paste offset; an OS image lands as an image element with a media-store src; a read-only viewer pressing paste adds nothing (API truth).
- Copy/cut mirror to the system clipboard: a JSON envelope
(
[0.14.0] — 2026-11-04
Added
- Daily-driver depth, part 1 of the v0.14 menu — the persistent
uploads library (D1). Uploads used to live two half-lives: images
embedded as data URLs inside the document (bloated designs, no
reuse, no account), audio/video in the media store but invisible
after reload. Both now share one DB-backed library that survives
reload and follows the account — upload on device A, log in on
device B, insert from the Uploads panel.
- Images join the media store: the upload rail accepts
image/*alongside audio/video (same chunked protocol, same 32 MB cap), with the original bytes kept server-side — no more silent downscaling into the document. - sha256 dedupe at finalize: identical bytes within the SAME
attribution (account or anon cookie — never across accounts, so
uploads can't be probed through someone else's library) collapse
to the existing row; the finalize response carries
deduplicated: trueand the old id. - Quota, surfaced:
CANVIX_UPLOAD_QUOTA_MB(default 256 MB) per attribution, enforced at upload-init (in-flight rows count too, so parallel uploads can't sail past the cap together) and shown in the panel footer ("42.3 MB of 256.0 MB"). - Library API:
GET /api/media/library(projection-only — never the bytes; attribution-scoped),PATCH/DELETE /api/media/library/[id](rename / remove). A foreign id is a flat 404 — no cross-account existence oracle. Removing an item clearskeepInLibraryonly: designs already referencing it keep working; the orphan GC owns reaping unreferenced rows. - Anonymous uploads follow the account: login/register claims this browser's anon-attributed media rows (scoped by the canvix_anon hash — the design-adopt lesson, with none of the eligibility subtlety).
- UploadsPanel reads the DB: grid of your files (image thumbnails from the serve route, audio/video rows with icons), click-to-insert (images keep replace-mode, audio/video re-probe their blobs for duration/peaks), inline rename, hover delete, set-as-background, upload progress, and the quota line.
- Portable SVG exports: media-store images inline to data URLs
at export time (
inlineMediaImages, deep-copy — the live document is never mutated);safeHrefaccepts the first-party/api/media/srcs. A fetch that fails degrades honestly: the relative URL stays (a visibly broken image beats silently losing content). - GC discipline: the media orphan GC skips
keepInLibraryrows (a library item is kept on purpose, not orphaned);--prune-libraryopts back in. - Verification: 23 new unit tests (library scoping/authz/CSRF,
dedupe + attribution-scoping, claim-on-login, safeHref +
inlining + no-mutation) and a 3-spec e2e acceptance
(
tests/e2e/uploads-library.spec.ts): upload → reload → second-design insert → inlined SVG export; remove-never-breaks- designs; anonymous upload claimed on register (checked from a second browser context).
- Images join the media store: the upload rail accepts
[0.13.4] — 2026-11-03
Added
- Plugin system, part 5 of 5 — the first-party validation plugin
(P5):
com.canvix.wordcloud. The plugin whose end-to-end use is the v0.13 MVP acceptance test (research §5): install → consent → generate → render → export → restyle → disable → uninstall, all on the public API, zero per-plugin host code. This closes the v0.13 plugin-system MVP.- The bundle (
public/plugins/wordcloud/): manifest v1.1 with onecloudelement kind (seed/density/mask/palette schema for the host-rendered properties card), panel + service entries, and exactly four permissions —design:read,design:write,element:plugin,storage. No network, proving the default-deny path.wordcloud.jsis one shared zero-dependency UMD script for both frames: the plugin half of the v1 RPC envelope (handshake echo, call/result correlation, host→plugin call answering) plus a mulberry32-seeded spiral layout whose SVG passes the P1 sanitizer by construction (asserted in the unit suite on hostile inputs). Widths are estimated from character classes, so output is machine-independent and determinism — the render-cache contract — holds exactly. The panel pulls page text viadesign.getSnapshot, previews with the same code the service renders with, remembers settings via namespaced storage, and generates throughaddPluginElement/updatePluginElementData. - First-party distribution (
firstparty.ts+firstparty-fetch.ts): bundled plugins ship inpublic/plugins/<slug>/and install through the SAME rail (validate → sha256-pin → consent → per-user rows) from the strict relative form/plugins/<slug>/manifest.json. The server reads the files from disk behind a synthetic origin — no network hop, so the SSRF guard's correct loopback denial never applies, andallowFirstPartyis true on that branch ONLY:com.canvix.*remains reserved to what the instance itself serves. The Apps grid gains a one-click "+ Word Cloud (bundled)" chip. On runtimes without a filesystem (Cloudflare Workers) a bundled install answers an honest error; every other plugin route is unaffected (lazy import). - The acceptance e2e (
tests/e2e-plugins/wordcloud.spec.ts, 5 specs, run flag-on via the newplaywright.plugins.config.ts, port 3100): UI install with all four consent lines asserted verbatim; mid-session install → panel handshake → page-text collection → generate → the service frame's render observed → element persisted (API truth); exported SVG embeds the real cloud; restyle through the host schema card; disable → the export degrades to the honest placeholder; signed-out viewer inert; uninstall leaves design data byte-identical. CI's e2e job runs the flag-on suite after the default one. - Plugin author docs (
docs/PLUGINS.md, ~350 lines): the trust model, a hello-world quickstart, the manifest spec, the permissions table with consent lines, the full RPC reference (both directions, error codes, caps), the element/renderer contract, packaging rules, hosting guide (incl. the bundled-plugin path for forks), the Word Cloud walkthrough, and the FAQ ("no marketplace, ever").
- The bundle (
Fixed
- Four integration gaps the validation plugin exposed — all
shipped silently in P3/P4 because every earlier e2e ran flag-off,
so no service frame or panel-driven element had ever really
mounted:
manifest.tsspoke a stale plugin API version — its privatePLUGIN_API_MINOR = 0copy was never bumped with the P4 renderer minor, so the install rail rejected every real"canvixPluginApi": "1.1"manifest. The constants now alias the RPC envelope's single source of truth.- Service frames pointed at
/api/plugins/undefined/serve/…— the install route's projection names the keyid, the service layer readinstallId; every service iframe 404'd and every plugin element rendered as a "not responding" placeholder. The projection now carries both names. - Panels could not generate elements — the panel host dropped the
broker's
calleridentity (addPluginElementalways refused) and its record carried noelementKinds(the declared kind was refused too). Both now ride the panel record, mirroring the service frame. - Mid-session installs never mounted a service frame — the
service layer fetched the install list once on editor mount.
InstalledApps now dispatches
canvix:plugins-changedafter install/uninstall/enable/disable and the layer re-fetches.
Changed
- Version 0.13.4; README plugin-system roadmap item updated with the P5 paragraph; zero new npm dependencies.
[0.13.3] — 2026-11-03
Added
- Plugin system, part 4 of 5 — plugin elements & the renderer
contract (P4). The research §4.5 milestone: an installed plugin
can now put its OWN element types on the canvas, draw them from
inside its sandbox, and have them ride every pipeline a native
element rides — save, versions, collab, offline merge, SVG/PNG/
JPG/PDF/video export — with zero per-plugin host code. 56 new
unit tests + a durability e2e; zero new npm dependencies.
- The
pluginelement (src/lib/types.ts): ONE new union member —type: 'plugin'withpluginId,kind,pluginVersionand a cappeddatarecord. All per-plugin variety lives indata; the structural move that dodges the "three independent switches" problem (§4.4). Factory +addPluginElement/updatePluginElementDatadesign actions: caller identity is stamped from the INSTALL row (a plugin can never forge another plugin's namespace or edit its elements), kinds checked against the manifest, data against the collab caps (64 KB/element). Undoable, HLC-stamped, collab-broadcast — ordinary elements, only their pixels are delegated. - Renderer contract (
broker.ts+renderer-cache.ts): service iframes answer host→pluginelements.rendercalls ({ kind, data, width, height, mode }, 10 s deadline → E_TIMEOUT → placeholder). Output is{ svg }(≤ 2 MB, through the P1 accept-or-reject sanitizer — the one place untrusted SVG enters the host) or{ raster }(base64 png/jpeg/gif/webp data URL).elements.registerRendereris service-context only and manifest-scoped. Render results ride a widened result envelope (2 MB + slack); every other result keeps the 256 KB RPC cap (enforced after correlation). - The render cache (
renderer-cache.ts): module-level store keyed by(pluginId, elementId, hash(data), size, mode)— restyles and resizes re-render, everything else is a hit; in-flight dedupe; LRU 120; transport unmount drops settled renders. Failure philosophy (§4.5/§4.9): error/timeout/missing plugin → a neutral placeholder card, never a thrown exception, never a blocked editor. - Service iframe host (
PluginServiceLayer+PluginServiceFrame): one hidden<iframe sandbox="allow-scripts">per installed plugin with elements in the open design, loading the manifest'sentry.servicethrough the DB-served CSP-pinned route; the frame's broker registers with the cache as the plugin's render transport. Frames derive purely from present elements (a plugin with no elements mounts no iframe); flag off / signed out / offline → zero iframes and placeholders. - Canvas + exports:
PluginNode(element-node) draws the sanitized data URL as a Konva Image or the placeholder card with the honest §4.9 reason (checking / disabled on this instance / install hint / disabled app / not responding). svg-export embeds sanitized svg as a nested<svg>pinned to the element box (raster output embeds as<image>); video export awaits renders into its image map; PNG/JPG/PDF ride the live stage. The ExportDialog primes renders before SVG export. Missing renderers still export a visible placeholder card — the element is never silently dropped from a file. - Properties slot (
PropertiesBar): selecting a plugin element shows a host-rendered schema card (text/number/color/ select inputs from the manifestschema— no plugin code in the toolbar) + an "Open in app" button; edits go through the same scopedupdatePluginElementDataaction. - Snapshot projection:
design.getSnapshotreturns plugin elements with theirdataverbatim (arrays and nesting included — it is the plugin's own capped output) so panels can restyle their elements;_m/bookkeeping still never crosses. - Manifest v1.1 (
canvixPluginApiminor bump): optionalentry.service(same path rules as the panel, must be infiles); declaringelements[]withoutentry.serviceis rejected at install — elements that could only ever render placeholders fail honestly, upfront. - Durability, verified end-to-end (
plugin-elements.spec.ts): a design containing plugin elements from a plugin that is not available opens without a crash on a flag-off instance, stays editable, and round-trips load → placeholder → edit → autosave with the element byte-identical at the API layer. Unit suite pins the same for offline merge (LWW by id, type-agnostic) andvalidateOpPayload. Uninstall/disable/flag-off never touch document data — the §4.9 promise, now executable.
- The
[0.13.2] — 2026-11-02
Added
- Plugin system, part 3 of 5 — the panel runtime (P3).
The host half of research §4.3/§4.8: an installed row can now
become running code — inside the boundary P1/P2 pinned. 57 new
unit tests, zero new npm dependencies.
- RPC broker (
src/lib/plugins/broker.ts): one instance per mounted iframe, and the ONLY path between plugin and host. Origin discipline by window identity (ev.source === the frame we mounted— an opaque-origin iframe cannot be named, so the object IS the origin check), one-time handshake token echoed on the first call (rides the iframe URL fragment, never the wire), 200 calls/min sliding-window budget (E_THROTTLE), default-deny dispatch against the install's consented permissions, typedBrokerErrors that stay wire-legal, andE_INTERNAL+ server-side-only logging for host failures. Full method surface:info/ping(no permission),design.getSnapshot(lossy read-only projection, RPC-capped),subscribe('selection'|'document')with ack-bounded pushes,actions.apply(the §4.3 whitelist — AI actions excluded,addPluginElementreserved for P4),storage.*,ui.notify(sanitized, 200-char cap),ui.closePanel. Read-only designs suspenddesign:writeat the broker (E_PERMISSION). - Design snapshot projection (
src/lib/plugins/snapshot.ts): whatdesign.getSnapshotreturns — geometry + small own data- background, groups projected recursively; heavy fields
(image dataURLs) omitted-and-listed, internal bookkeeping
(
_mHLC stamps,magicLayer,shadow) never crossing the boundary.
- background, groups projected recursively; heavy fields
(image dataURLs) omitted-and-listed, internal bookkeeping
(
- Namespaced plugin storage (
src/lib/plugins/plugin-storage.ts):canvix:plugin:<pluginId>:*, 256 KB per plugin, 64 KB per value, structured-clone-checked — the prefix is the isolation (one plugin can never see another's keys or the host's). - Panel iframe host (
PluginRuntime.tsx):<iframe sandbox="allow-scripts">— nothing else in the attribute — loading the DB-served entry panel with the handshake token in the fragment; mounts the broker, wires store subscriptions topushEvent, and unmount = deactivate (broker disposed, listeners removed, zero residue). - "Installed" section in Apps (
InstalledApps.tsx, lazy dynamic import — flag-off instances never download a byte): install by manifest URL, consent modal listing every requested permission verbatim (grant keeps it / remove deletes the row), per-plugin enable/disable, uninstall that never touches the design. Silent degradation: flag off (503), signed out (401) or offline → the section never renders. addImagedesign action (design-actions.ts): the §4.3 whitelist's image entry —/api/mediaid or dataURL ≤ 4 MB (png/jpeg/gif/webp), natural-size clamped, same clamps the AI path applies.- E2E regression spec (
tests/e2e/plugins-panel.spec.ts): with the flag off the built-in app grid is untouched, no plugin UI leaks, and/api/pluginsanswers 503PLUGINS_DISABLED.
- RPC broker (
[0.13.0] — 2026-11-02
Added
- Plugin system, part 1 of 5 — the security-boundary core (P1).
First milestone of the v0.13 plugin MVP, ordered exactly as the
research doc prescribes: boundary first, runtime second, DX last.
Pure library code — no routes, no UI, no DB, zero new npm
dependencies — that every later milestone composes:
- Manifest validator (
src/lib/plugins/manifest.ts): enforces every §4.1 rule with plain-language errors collected in one pass —canvixPluginApimajor/minor gates (mismatch blocks install, never a silent no-op), the id grammar withcom.canvix.*reserved for first-party, semverengines.canvixchecked against the running app, safe relative.htmlentry paths (no traversal, no schemes), element-kind/field-schema grammar withinitialDatacoherence, and an install-time HTML packaging check (no inline<script>, nojavascript:URIs, noon*=handlers — so the serve route's strict CSP stays defensible). Reserved key names (__proto__,constructor,prototype) are rejected outright. - Versioned RPC envelope (
src/lib/plugins/rpc.ts): the one bidirectional postMessage wire format (v/id/dir/method/params↔ok/result|error) with typed error codes (E_VERSION,E_MALFORMED,E_PAYLOAD,E_PERMISSION,E_METHOD,E_THROTTLE,E_NOT_FOUND,E_TIMEOUT,E_INTERNAL), strict id/method/handshake charsets, and 256 KB payload caps — unknown methods areE_METHOD, notE_PERMISSION, so misconfiguration is diagnosable. - Permission model (
src/lib/plugins/permissions.ts): the manifest-declared → consent-granted → broker-enforced catalog (design:read,design:write,element:plugin,storage,ui:notify, repeatablenetwork:<origin>), each with the verbatim plain-language line the consent screen will show, plus the §4.3 method→permission table that makes the broker default-deny by construction. - Plugin data caps (
src/lib/plugins/data-caps.ts): one clone-safety checker (JSON-typed values only, depth ≤ 12, arrays ≤ 500, strings ≤ 100 k, ≤ 60 keys, no prototype- pollution key names) at numerical parity with the collab op validator, so plugin data rides autosave/collab/jsonb unchanged. - Renderer SVG sanitizer
(
src/lib/plugins/sanitize-svg.ts): accept-or-reject — never rewrite — validation of plugin renderer output before it is rasterized on canvas or embedded in exports: 2 MB / 20 k element / depth-64 caps, an SVG tag allowlist (noscript,foreignObject,animate/set,iframe…), no event handlers orjavascript:URIs,data:-only hrefs,url()and@importpolicing in<style>andstyle=CSS, and XXE/DOCTYPE/CDATA rejections. Hardened against comment-split payloads and quadratic-backtracking inputs. - Security regression suite
(
src/lib/plugins/security-regression.test.ts): the protocol- level seed of the §6 corpus — 20 hostile manifests, 16 hostile SVG documents, RPC replay/spoof/smuggle attempts, and four cross-module attack chains (default-deny, permission→CSP flow, data→export flow, entry-HTML smuggling). Runs on every PR via the existinglint-unitgate. - Semver engine matching is a hand-rolled comparator/x-range/
hyphen/OR/caret/tilde range matcher (
semver.ts, ~200 lines) with spec-correct prerelease ordering — nosemverdependency, per the zero-dependency rule.
- Manifest validator (
[0.13.1] — 2026-11-02
Added
- Plugin system, part 2 of 5 — the install rail (P2).
The store half of research §4.2: submit → fetch → validate →
consent → store. Everything ships behind
CANVIX_PLUGINS(default off — the same opt-in pattern as the MCP token; with the flag off every plugin route answers 503PLUGINS_DISABLEDand behavior is byte-identical to v0.12.5):POST /api/plugins— install from a manifest URL. The server fetches the manifest + every declared file through the existingsafeFetchSSRF guard (DNS pinning, private- range denial, per-hop redirect revalidation), enforcing the §4.7 caps: 2 MB total bundle, ≤ 50 files, 10 s per file. Each file is sha256-pinned;.htmlfiles re-pass the P1 packaging check at install; the whole snapshot lands in one transaction (a reinstall atomically replaces the previous row — no version mixing, no orphan assets). CSRF + per-IP rate limit (plugins:install, 10/min) + session required.GET /api/plugins— the user's installs as a consent payload: name/version/author, the file list with integrity hashes, and every permission in plain language — the exact lines the consent screen will show. Never bytes.PATCH/DELETE /api/plugins/<installId>— the per-plugin enable/disable kill switch and uninstall. Uninstall deletes the row + assets (FK cascade) and never touches elements: plugin elements are plain jsonb data and degrade to placeholders, not data loss.GET /api/plugins/<installId>/serve/<path>— the asset route: DB-served, extension-allowlisted mime types, sha256 ETag with 304 revalidation,nosniff, and the per-manifest CSP from the v0.12.1 pre-stagedplugin-csp.ts— consentednetwork:origins becomeconnect-src, zero grants collapse to'none'. Documented auth decision: the route is not session-gated (sandboxed iframes cannot carry SameSite=Lax cookies); the boundary is unguessable cuids +frame-ancestors 'self'+ per-IP rate limiting + the flag, and design data never flows through it.- Migration 0006 —
PluginInstall+PluginAsset(additive only; rollback = flag off, no data removed). - Manifest validator extended with the
fileslist (the install fetch list): safe paths only, entry panel must be declared, ≤ 50 files, deduped. - New rate-limit buckets
plugins:install(10/min) andplugins:serve(600/min);.env.exampledocumentsCANVIX_PLUGINS.
[0.12.5] — 2026-11-02
Added
- Observability floor (H7) — all opt-in, off by default. The
last v0.12 epic gives self-hosters the three primitives the
roadmap research named, with privacy as the design constraint:
- Structured request logging (
CANVIX_LOG=requests): every API request emits one JSON line on stdout — method, path, status, duration (event: http_request). Query strings are deliberately never logged (they carry design ids and cursor data) and neither are IPs. Implemented as awithLogging()wrapper applied to every API route handler (29 files, ~60 handlers — designs, collab, media, auth, comments, versions, templates, health, MCP, photos and all eight AI routes); with the env unset it is a zero-behavior-change passthrough, and the SSE stream's response passes through untouched. /api/health?v=2— the observability payload: aggregate counts (live designs, users, finalized media count and bytes, version snapshots, comments), a DB latency probe (measured on the existingSELECT 1), and app version + uptime. Counts only, never ids — asserted by an e2e test that scans the payload for cuid/uuid shapes. Plain/api/healthkeeps its v1 shape (plus an explicitv: 1) so liveness probes stay as cheap as before.- Optional error webhook (
CANVIX_ERROR_WEBHOOK_URL): every unhandled request error — any route, page or server action — POSTs a JSON report (message, stack head, path, method, route type, app version, timestamp) via Next'sonRequestErrorhook in the newsrc/instrumentation.ts. One file instruments the whole app; 5-second timeout, fire-and-forget, and a failing webhook logs locally instead of taking the error path down.
- Structured request logging (
- 8 unit tests (
src/lib/observability.test.ts): the opt-in gate, passthrough-vs-logging behavior, JSON line shape, query- string redaction, error-path 500 logging + rethrow, params passthrough, and the webhook payload contract (bounded, id-free). Plus a Playwright spec for health v1/v2.
[0.12.4] — 2026-11-02
Added
- Docs & ops runbook (H6). Self-hosters get the two guides the
roadmap research called the missing floor of the operations story:
docs/BACKUP-AND-RESTORE.md— one-commandpg_dumpbackup (custom format) with the notes that actually matter in practice: the bytea media travels inside the dump (size implications, 32 MB/file cap), the Supabase session-vs-transaction-pooler pitfall for pg_dump, and cross-owner restore flags. The core is a restore drill executed and verified end-to-end, documented step-by-step with its real output: dump (753 KB, 167 designs, 110 templates, 30 media) → scratch database →pg_restore --no-owner --no-privileges→ count-and-byte verification (identical, includingSUM(size)on media) → booting the app against the restored database (/api/healthgreen, designs served) → teardown. Plus real-recovery steps and a scheduled- backup cron example.docs/UPGRADING.md— the routine upgrade path (snapshot → pull →npm ci→db:migrate:deploy→ rebuild → health check), jumping minors (cumulative migrations, one command, what to read in the CHANGELOG), and rollback guidance with the honest caveat: Prisma migrations are forward-only, so the safe path is restore-forward from the pre-upgrade snapshot — and the note that 0.9–0.12 migrations are additive, so code-only rollbacks can leave the schema migrated.scripts/media-gc.ts— media orphan GC: reports (default) or prunes (--prune,GRACE_DAYS) never-finalized uploads older than 24 h and finalized uploads no live design references anymore (elements reference media as/api/media/<id>; deleting a design intentionally keeps its media for version snapshots). Verified by a drill (scripts/media-gc-drill.ts) that plants one orphan and one referenced row and asserts exactly the orphan is pruned.
- README pointers to both guides from the Deploy section.
[0.12.3] — 2026-11-02
Added
- Rate limits & connection caps (H5). The roadmap research
noted every mutating surface except
/api/mcpaccepted unlimited traffic. Now a single limiter module (src/lib/rate-limit.ts) guards the epic's list with per-IP fixed-window budgets — designs create/update/delete (30/300/60 per min), collab events (600/min; active clients flush 150/min each), presence heartbeats (120/min), comment creation (60/min) and media upload init (30/min) — each budget ≥ 4× the heaviest legitimate client, so a working editor never notices. Rejected requests get429+Retry-After+ aRATE_LIMITEDbody and never touch the database. The SSE stream route caps concurrent connections per IP (default 6, the per-domain browser limit), releasing slots on every exit path — abort, recycle, db-timeout and consumer cancel all funnel through oneclose(). 12 unit tests cover the window math (injected clock), bucket/IP isolation, the off switch and the slot lifecycle; a mocked-route test proves POST /api/designs actually 429s and stops short of the DB. - Load probe
scripts/rate-limit-probe.sh— proves both caps against a live instance: hammers design creation until the 429 (assertingRetry-After), opens the stream cap + 1 and asserts the refusal, then verifies a fresh stream connects once slots are released (no leak). Documented for scratch instances. - README “Rate limiting” section — the caps table, the knobs
(
CANVIX_RATE_LIMITS=off,CANVIX_SSE_MAX_PER_IP), and the honest multi-instance limitation the epic demanded: counters are in-memory per instance, so an N-instance fleet enforces each cap per instance, not per deployment; the shared-store upgrade is deliberately deferred past 1.0 with the reasoning written down.
[0.12.2] — 2026-11-02
Added
- Error boundaries — a crash is never a white screen anymore (H4).
The v1.0 roadmap research flagged this as tech-debt #4: any
render-time throw in the editor tree unmounted React root-down —
a blank page, no recovery, no diagnostics. Now three boundaries
guard the app: a top-level one around
AppShellon both routes (/and/design/<id>), plus per-surface ones around the editor and the dashboard. The recovery UI offers the three escapes that actually help — Reload editor (fresh mount, URL and design id preserved), Back to dashboard (switches the app-store view and remounts the crashed surface from scratch, no reload needed) and Copy diagnostics — and the diagnostics carry exactly what a bug report needs: the design id, the last saved collab seq (from the replay cursor), save state (savedAt/saving/dirty), page and element counts, the error and its stack head, URL, timestamp and user agent. Honest scope note: boundaries catch render/lifecycle errors; event-handler and async errors were already contained by the validated-collab and db-error paths. - Dev-only crash probe (
DevCrashProbeinsrc/components/ErrorBoundary.tsx) — throws during render whenwindow.__canvixRequestDevCrash()is called, which is the only class of error a boundary can catch.NODE_ENV-gated, so the throw branch is dead code that production builds drop entirely. - Playwright spec
tests/e2e/error-boundary.spec.ts— forces a crash in a child of the editor boundary, asserts the recovery UI renders (never a white screen), that the clipboard diagnostics parse as JSON with the design id + last-saved-seq fields, that “Back to dashboard” recovers without a reload, and that the editor still opens afterwards with no collateral page errors.
Changed
reactStrictModere-enabled (wasfalsesince the pre-accounts era). The H4 epic called for a re-evaluation, and the current codebase tolerates double-invoked effects: the full Playwright suite passes unchanged under strict mode (dev server, which is where the double-invocation happens). This surfaces effect-cleanup bugs at development time instead of in production remounts.
[0.12.1] — 2026-11-02
Added
- Security headers + CSP baseline (H3). Every response from every
route class — landing/editor pages, read APIs, the health probe,
even 404s and static assets — now carries the hardening baseline
the roadmap research flagged as missing:
X-Content-Type-Options: nosniff,Referrer-Policy: strict-origin-when-cross-origin,X-Frame-Options: SAMEORIGIN(with a matchingframe-ancestors 'self'in the CSP),Strict-Transport-Security(180 days — documented that browsers ignore HSTS over plain HTTP, sohttp://self-hosters are unaffected by definition) and aPermissions-Policyturning off camera/mic/geo. The CSP itself ships as Report-Only: the policy the app needs today is written down directive by directive (Google Fonts css + files,data:/blob:images, blob workers for the background remover, TLS-onlyframe-srcfor embed cards,object-src 'none',base-uri/form-action 'self') and nothing breaks while the violation reports are reviewed — the enforcement flip is a one-line change innext.config.ts, documented in the README. The single source of truth isnext.config.ts → headers(), so Vercel, Cloudflare Workers (OpenNext), Netlify and Node standalone all serve byte-identical values. - Drafted the strict per-manifest CSP for the v0.13 plugin serve
route (
src/lib/security/plugin-csp.ts):default-src 'none',script-src 'self'(no inline scripts — the packaging rule),connect-srccollapsing to'none'unless the user consented to specific https origins, canonicalised and deduplicated, with loopback http allowed for development builds only. Unit tests pin the header byte-for-byte so the consent screen, the serve route and the P4 security suite all agree on what “strict” means. - Playwright spec
tests/e2e/security-headers.spec.ts— asserts the whole baseline on one representative URL per route class in CI (landing, design deep-link, templates/designs APIs, health, static asset), plus the CSP allowlist contents and the fact that no enforcing CSP header exists yet.
[0.12.0] — 2026-11-02
Added
- CI gate — tests finally gate what ships (H2). A new CI workflow
(
.github/workflows/ci.yml) closes the gap the v1.0 roadmap research flagged as the highest-leverage fix: the repo had 316 unit tests and 28 browser tests, but both GitHub workflows were manual-only and all three deploy pipelines (Vercel, Cloudflare Workers Builds, Netlify) publishmaindirectly — so every test ran only on a contributor's laptop. Now: every pull request runsnpm ci(with the npm cache) →tsc --noEmit→eslint .→vitest run— no database required, the check lands in minutes; every merge tomainadditionally runs the full Playwright browser suite against a real Postgres 17 service container (migrations + the 110-template seed +next dev, all inside the job), with traces uploaded on failure. The pipeline is also manually dispatchable on any branch for pre-merge e2e on risky PRs. Runtime targets: PR gate < 10 min, e2e job verified at ~4 min locally. The whole command sequence was verified end-to-end before this release: 316/316 unit, 28/28 Playwright against a fresh database. The e2e job also installs ffmpeg on the runner — the video-export test shells out toffprobe/volumedetect(and the preview test encodes a WebM fixture), and GitHub's runner images ship without ffmpeg, which the pipeline's firstmainrun caught (26 passed / 1 skipped / 1 ENOENT → whole suite once installed). - README CI badge — live build status for
mainnext to the license badge. - CONTRIBUTING: "CI & required checks" — documents what each check
runs and the one-time branch-protection setup that makes
lint-unita required status check onmain(branch protection cannot be enabled from a PR, so the exact click-path is written down), plus the contributor-facing local equivalents (npm run lint,npm run typecheck,npm run db:setup && npx playwright test).
Fixed
image-guardhappy-path test is now hermetic — the first catch of the new CI gate. The test mocked the AI SDK but not the provider-config resolution (ZAI_BASE_URL/ZAI_API_KEYenv →.z-ai-configfile chain cwd → ~ → /etc), so the "same-origin POSTs pass the guard" assertion only held on machines that carry a real provider config (dev sandbox:- while clean CI runners answered 503. The test now stubs the env
pair in
beforeEach(restored after each test), so every machine exercises the same code path.
- while clean CI runners answered 503. The test now stubs the env
pair in
Changed
- CONTRIBUTING setup flow modernized — the quick-start now matches
what CI itself runs (
npm install→npm run db:setup, the one command that applies migrations and seeds the template library) instead of the pre-v0.8db:push+db:seedtwo-step, and the stalesrc/lib/templates.tspointer now names the realsrc/lib/templates/collection-v08-*.tsfiles.
[0.11.8] — 2026-11-01
Security
- Collab rail now enforces design ownership (P0).
POST /api/collab/[designId]/eventsverified the design existed but never consulted the access rule the document rail (PUT /api/designs/[id]) enforces — so anyone holding an owned design's link could append collab ops (up to and includingpages:replace), mutating the owner's live session and riding the owner's next autosave. The route now resolves the same three-case rule (canEditDesign, extracted fromdesign-guard.tsso the two rails can never drift) with a lean column set — ownerless designs stay link-editable for everyone, owned designs accept ops from their owner only, everyone else gets 403READ_ONLY_DESIGN. Found during the v1.0 roadmap research (research/V0118-ROADMAP-RESEARCH.md§3.7). - Same-origin (CSRF) enforcement on the collab routes —
eventsandpresencewere the only mutating routes without it; a cross-site page could previously drive an authenticated owner's session cookie at the events endpoint. - Presence writes are design-gated — the presence route now 404s
for missing/trashed designs instead of upserting junk rows for
arbitrary ids. Heartbeats stay open to signed-out visitors and
read-only viewers on purpose (they are legitimate room members, and a
presence row carries no document authority — element ops go through
/events, which enforces ownership).
Fixed
- Read-only sessions no longer queue collab ops. The op emitter
skips when the store is read-only, and
CollabSessiontreats a 403 flush like 404/503 (drop the queue) instead of retrying every 400 ms — a misbehaving read-only tab can no longer spin against the 403.
Added
scripts/collab-guard-probe.sh— live API probe, 8 assertions: the anonymous/second-account/owner/cross-site flush matrix, the ownerless flow, viewer presence, and the junk-row 404.- Unit coverage for both collab routes:
events.test.ts(9 tests) +presence.test.ts(5) — 316 unit total; Playwright 28/28 green (incl. the offline-sync and presence-latency specs, proving the anonymous ownerless path is byte-for-byte unchanged).
[0.11.7] — 2026-11-01
The three findings that stayed open after the v0.11.4–v0.11.6 QA sweep
(§5.2 of research/V0114-QA-PASS.md): one interaction gap, one React
anti-pattern, one documentation debt.
Fixed
- F1 — no deselect on empty-canvas click. Clicking empty canvas kept
the current selection; only Escape (and touch) deselected. A bare click
is a zero-size marquee, and
selectInMarqueenow clears the selection for it — Canva parity (research/V0117-QA-FOLLOWUPS.md). - F5 — React render-phase update warning. Console:
"Cannot update a component (
MagicLayersDialog/TopBar) while rendering a different component (CanvasStage)". Three store writes lived insidesetStateupdaters — the draw-stroke commit (addElementinsidesetDraft), the marquee select (setSelection/clearSelectioninsidesetMarquee) and the ruler guide drop (addManualGuideinsidesetDraftGuide). Updaters run during render, so each write synchronously re-rendered other components mid-render (which component the warning names depends on subscriber order — hence the misleading "MagicLayers" attribution). All three now commit at event time, outside any updater, with local mirrors (marqueeShapeRef, the strokepoints, the guideposition) keeping the gesture data exact. Amusingly, F1 had been masking the marquee variant: a bare click early-returned before any store write. - F6 — Share dialog documented the wrong access model. The dialog
offered a decorative Only me / Anyone with the link / Public selector
that nothing enforced ("Public — listed in the community gallery"
described a gallery that does not exist). It now documents the rules
the server actually enforces (
src/lib/auth/design-guard.ts): anyone who can reach the instance can open the link; ownerless designs (created signed-out) stay link-editable; owned designs open read-only for everyone else (view-only banner, 403 on saves); there is no cloud gatekeeping — reachability is decided by the deployment. When you are viewing someone else's design, the dialog says so. - Ruler→guide initial position used the wrong coordinate (found while
verifying the guide fix):
rulers.tsx beginGuide()computed the seed position from the swapped axis — mouse X for a horizontal guide, mouse Y for a vertical one. Mid-drag the first mousemove masked it, but a bare ruler click committed a guide at a nonsense position and the dashed draft flashed one frame in the wrong place.
Changed
ShareDialogno longer reads/writes thecanvix:share:<id>localStorage preference (the old decorative selector's storage).
Added
- Playwright
qa-followups.spec.ts(5 tests): the F1 deselect click (plus re-select of the element), the marquee re-select and empty-marquee clear, stroke draw and ruler-guide drop with zero render-phase warnings, and the F6 access-model documentation.
[0.11.6] — 2026-11-01
Two QA-pass findings in panel state hygiene (§5.2 of
research/V0114-QA-PASS.md): the Photos panel kept a stale search
filtering its grid after a category switch, and the top-bar mode control
could disagree with the Tools-panel Draw toggle.
Fixed
- F2 — Photos panel search state sticks. After a web search, clicking
a category tab left the query filtering the bundled library, so "All
photos" showed the stale 6-of-42 result set until the panel was closed
and reopened. A category click now exits results mode: the query, the
visible search box (the
PanelShellsearch input is optionally controlled now), the web results and any error all clear together. - F2b — web search on a provider-less server reads as broken. With no
AI provider configured,
/api/photos/searchanswers 503NO_PROVIDER; the panel used to render that as "No web photos matched". It now says web search needs an AI provider configured on the server (pointing atZAI_BASE_URL/ZAI_API_KEY) and that the free library below still works. Other API errors surface their message. - F3 — editing-mode toggles can disagree. The top-bar "Editing mode"
control (
editingMode) and the Tools-panel Select/Draw toggle (tool) were separate states: the panel could show "Draw" pressed over a read-only canvas, and only the panel toggle reliably started drawing. Both controls now label the same derivation (interactionMode()inlib/editor-utils: viewing / draw / editing — viewing wins, then the active tool), the top-bar menu offers Draw directly, andsetToolleaves read-only viewing so either control activates drawing from any state. The Tools panel explains itself in viewing mode ("picking a tool resumes editing").
Added
src/lib/editor-utils.ts→interactionMode()+ 4 unit tests pinning the truth table (src/lib/editor-utils.test.ts).- Playwright
panel-state.spec.ts(3 tests): category-tab exit of search mode, the NO_PROVIDER configuration hint (503 mocked viapage.routeso it is deterministic on any machine), and the F3 top-bar ↔ Tools panel agreement across all four toggle paths.
[0.11.5] — 2026-11-01
A newly joined collaborator took 60–90 s to appear for clients that
were just looking at a design (QA finding F4, the one flagged most
impactful in research/V0114-QA-PASS.md). Two delays stacked: the joining
client announced nothing until its first 15 s heartbeat, and the stream
pump only pushed a frame on design events or every 20th tick — ~64 s
apart on a quiet design at the 3.2 s idle tick cadence.
Fixed
- Presence join latency — per-tick diff + announce-on-join. The pump
now queries presence every tick and compares a stable key of the
visible snapshot (
id/name/color/cursor— neverlastSeen, never row order, seesrc/lib/collab/presence-diff.ts) against the last key it actually sent; any change pushes a frame within one tick (≤ 3.2 s idle, ≤ 800 ms active) and counts as activity for the adaptive backoff.CollabSession.start()fires one presence POST immediately, so a fresh participant exists in Postgres from the first moment instead of atstart() + 15 s. Remote cursors on an idle client drop from ~64 s to ≤ 3.2 s too. - Cost: the presence
findManydoubles (every 2nd → every tick; 0.31 q/s idle / 1.25 q/s active per client — still ~3× below the pre-v0.9.2 constant) while idle frame traffic is unchanged: heartbeats and row reorderings don't touch the key, so the diff stays silent when nothing visible changed. The every-20th-tick frame remains as a keepalive.
Added
src/lib/collab/presence-diff.ts+ 13 unit tests pinning the diff-key contract (changes on join/leave/name/color/cursor; silent on lastSeen, reorder, cursor key order, null-vs-undefined cursor).- Playwright
presence-latency.spec.ts: two contexts, client A held idle past the full tick backoff, client B joins cold — A must see B within 15 s and B must see A immediately. Negative-tested: fails on the v0.11.4 code, passes with the fix. research/V0115-PRESENCE-JOIN-LATENCY.md— full analysis, cost math and resulting latency table.
[0.11.4] — 2026-11-01
Share links looked like query strings. Every design URL a user ever
copied — /?design=cmvxd70oo… — carried the app's SPA implementation
detail in the one place users actually look at it. Deep links worked,
but they didn't look like they would.
Added
- Canonical design URLs —
/design/<id>(newsrc/app/design/[id]route rendering the same app shell). The address bar now follows the app: opening a design (from the dashboard, the Projects panel, or a link) lands on/design/<id>; going home resets to/. Refresh on a design URL reopens the design. An unknown id falls back to the landing page with the URL reset — a dead path renders the app, not a blank page. src/lib/design-url.ts— one home for URL concerns:designPath,designShareUrl,readDesignIdFromLocation(path →?design=→?d=, in that order) and areplaceUrlhelper.AppShellis the extracted single-page shell shared by/and/design/[id].- Playwright suite
design-urls.spec.ts(5 tests): address-bar sync on create/back, cold-open of a canonical link, legacy query link resolution into the canonical path, Share-dialog link format, and the unknown-id fallback.
Changed
- Share dialog now generates
/design/<id>links./?design=<id>and/?d=<id>remain first-class — old links, QR codes and printed URLs keep resolving (the legacy query resolves into the canonical path once the editor opens, so the address bar self-heals). - The app store (
openEditor/goLanding/goDashboard) keeps the URL in sync viahistory.replaceState— deliberately notpushState: popstate is not routed in this shell, and replace keeps the history stack honest while giving refresh/share the URL they need.
[0.11.3] — 2026-10-30
One mobile UI bug with two loud symptoms and a quiet third one hiding in plain sight on desktop.
Fixed
- Elements panel category tabs broke out of their bar on narrow
screens — the strip was
grid grid-cols-4with a fixedh-8, but there are 7 categories: Shapes/Lines/Graphics/Stickers filled row one and Tables/Frames/Embeds wrapped into a second row that painted outside the 32px-tall bar. On a phone the Tables tab floated detached over the panel divider and content (the reported screenshot); the same overflow existed on desktop — the side panel is 320px there too — it was just less obvious against the content. The strip is now a single-row, horizontally scrollable bar (overflow-x-auto, hidden scrollbar, no horizontal scroll chaining). Every category stays reachable by swipe/scroll and keyboard (Radix roving focus scrolls the trigger into view) — nothing is hidden or dropped. - Inactive tab labels were nearly invisible in dark panels (≈1.3:1) —
the app never applies Tailwind's
.darkclass (the editor's dark chrome is hand-painted), so the shadcn Tabs defaulttext-foregroundresolved to the light-theme near-blackoklch(0.145 0 0)≈#0a0a0aon the dark bar. Tabs now set an explicittext-white/65— 7.4:1 on the white@5% bar (WCAG AA; the active white-on-purple pill is 6.6:1). - Inconsistent tab metrics — the last three tabs shipped at
text-[11px]besidetext-xssiblings (and measured 25px vs 26px tall). All seven tabs now render from one shared class: identical height, padding, font size, radius, hover and active states. - Photos & Templates filter chips wrapped unpredictably at narrow widths — same treatment: single-row swipeable chip strips that scroll full-bleed under the panel padding; chips no longer wrap or shrink. Their label colors already passed AA (7.0:1 / 8.0:1) and are unchanged.
Added
.cv-tabscrollutility (globals.css) for the single-row scroll strips:scrollbar-width: none+overscroll-behavior-x: contain.- Playwright regression suite
panels-responsive.spec.ts(7 tests): at 320 / 360 / 390 / 430px and desktop — one row, shared metrics, strip scrollable, no overlap with the divider/description/content, the last tab reachable and functional, and a computed-style WCAG contrast lock (≥ 4.5:1) on the inactive label.
[0.11.2] — 2026-10-30
Two production bugs: an editor crash with an easy-to-miss root cause, and a Cloudflare git-deploy that could never have worked.
Fixed
- Editor's Projects panel crashed the whole editor ("This page couldn't
load") —
/api/designshas returned a keyset-paginated{ designs, nextCursor }envelope since v0.9.2; the dashboard was updated back then, but the editor's left-rail Projects panel still assumed the pre-v0.9.2 bare array. The envelope object hit.filter()on first render and took down the entire React tree the moment the fetch resolved — every time, on every design list (opening a template was just the way users got to the panel). The panel now parses the envelope (first page, newest first — it's a quick switcher), and a Playwright regression test locks the flow: open a design → Projects panel → designs listed, zero page errors. - Cloudflare Workers Builds deploys failed with "Could not find
compiled Open Next config" — the git-connected pipeline runs
npm run buildthennpx wrangler deploy; wrangler detects the OpenNext project and delegates toopennextjs-cloudflare deploy, which requires the compiled.open-next/output. Butnpm run buildonly ever produced the standalone Node output — and wrangler's OpenNext delegation runs before it would execute any configuredbuild.command, so nothing in the pipeline ever built the worker. Fix:npm run buildis nowscripts/build.mjs, which detects the Workers Builds environment via its documentedWORKERS_CI=1marker and runsopennextjs-cloudflare buildthere (plainnext build+ standalone copy steps everywhere else — Vercel, Netlify and self-hosted builds are byte-identical to before). Second half of the fix:opennextjs-cloudflare buildbuilds the Next.js app by spawning the project's ownnpm run build— with the new branch that would recurse forever inside Workers CI, soopen-next.config.tsnow setsbuildCommand: "next build"to break the cycle. Verified locally:WORKERS_CI=1 npm run buildproduces.open-next/worker.js(single build pass), andnpx wrangler deployproceeds through the OpenNext delegation to the auth check (Workers Builds injects the token in the real pipeline).
Changed
- README: the Cloudflare Workers section now documents git-connected Workers Builds (keep the dashboard defaults — the build auto-detects).
[0.11.1] — 2026-10-30
Production smoke-test release: the focused v0.11.0 verification
(research/V0110-SMOKE-TEST.md) confirmed the v0.10.1 fixes hold — zero
P2002s, zero 30-second hangs across the whole probe session — and found
four real bugs in the browser-only paths that API probes and unit tests
cannot reach. All four shipped in v0.11.0's headline features and none
had ever worked end-to-end.
Fixed
- Preview never played audio/video (and could skip entry animations) —
PreviewStagemounts its Konva stage only after the ResizeObserver measures the container, but the playback effects bailed on the first run (layer ref still null) and their deps never changed afterwards. Whether media played was a commit-vs-observer race — manual testing usually won it, headless browsers deterministically lose it. AstageReadydep re-runs both effects when the stage actually mounts. - Live video frames never swapped in — the swap looked up
findOne('#id')as a KonvaImage, butVideoNoderenders a Group; every video silently kept its poster. The swap now targets the Image inside the group. - Video froze at trimStart in a
canplayseek-loop — the handler sought totrimStarton everycanplayevent; each completed seek re-firedcanplay(~130play()calls/s, playback never advancing). The trim seek now happens once, and looping videos wrap back totrimStartinstead of the source start. - Video export could record digital silence — two stacked races: the
recorder could start before
audioCtx.resume()landed, and the export render loop's tight MessageChannel yielding starves the audio element's resource-selection task (the fetch never started;readyStatestayed 0 and the pendingplay()aborted in cleanup). The export now bounded- awaits both the context resume andcanplayon every audio element before recording begins; on timeout it still exports (silent, honestly) rather than hanging. - Collab status stayed "Live" through a hard network cut — a
silently-dead SSE socket never fires
onerror, so the editor claimed Live while every flush failed and queued. The session now listens to the browser'sonline/offlineevents: an honest "Offline — edits save locally" badge appears immediately, and reconnect happens the moment the network returns instead of waiting out the backoff. - Flaky white-noise BPM unit test —
Math.random()input meant ~1 in 3 runs drew noise spurious enough to clear the detector's periodicity gate; the test now uses a seeded PRNG (5/5 stable re-runs).
Verification
scripts/smoke-v0110.ts— focused API-level production smoke: auth, ownership/read-only, the two-designs-one-browser P2002 scenario, SSE drop/reconnect/gap-free replay, idempotent retried flushes, the chunked media lifecycle, latency ceiling tracking, composite-PK DB state. 46/46 green; probe rows cleaned up afterwards.tests/e2e/v0110-smoke.spec.ts— the browser-only surface: preview plays uploaded audio AND video (playback observed, not assumed), video export muxes a non-silent audio track (ffprobe + volumedetect), an edit made offline syncs on reconnect and survives reload. 3/3 green, stable across re-runs.- Offline-merge probe 18/18 · deploy-readiness ALL GREEN · 285 unit tests.
[0.11.0] — 2026-10-29
The "sound & motion" release: native audio/video elements, a chunked
media store, and Beat Sync. Full design: research/MEDIA-AND-BEAT-SYNC.md.
Audio & video elements
- Audio renders as a waveform player card (peaks baked in at upload, so every replica draws it without the multi-MB file) with volume, loop, "play on page open" and a BPM chip when a tempo was detected.
- Video renders its poster frame on the canvas (dataURL, replicates through the document) and plays frames in preview/present, with volume, mute, loop, autoplay and a trim window.
- Media store (migration
0005): A/V files live in Postgresbyteabehind/api/media/<id>— chunked uploads (3 MB per PATCH) work within every serverless body limit; appends are offset-guarded so replayed chunks 409 instead of corrupting the stream; GET is Range-aware (206/416) with immutable caching;CANVIX_MAX_MEDIA_MB(default 32) caps file size; unfinalized uploads GC after 24 h.
Beat Sync
- Uploading audio analyzes it in-browser (pure DSP, unit-tested): onset envelope → mean-centered autocorrelation tempo (60–180 BPM, harmonic-checked toward 90–180) → phase-aligned beat grid, capped at 480 beats. No grid detected → the feature simply stays hidden.
- Any element gets a Beat popover (0–100 % pulse) when its page has a beat-carrying audio element; pulses run in preview, presentation and video export, composing with entry animations.
Playback & export
- Preview/present plays page audio, swaps video posters for live
<video>frames, and rAF-drives beat pulses off the audio clock. - Video export renders media cards + beat pulses and muxes the page audio (best-effort: needs a MediaRecorder mime with an audio codec; otherwise a correct silent video). Honest limitation: exports render the video poster, not moving frames.
Verification
- 285 unit tests (18 new: click tracks at 90/120/140/160 BPM, silence, white noise — which caught and fixed a false-tempo autocorrelation bias — grid spacing, envelope decay, source selection).
scripts/verify-media.ts— live probe, 19/19 green against the production DB: two-chunk byte-exact round-trip, offset-guard replay → 409, finalize guards, Range 206/416, immutable headers, audio element save/load round-trip, mime/size/CSRF rejections.- Offline-merge regression probe still 18/18; Cloudflare 2.14 MB gz / Netlify 19.6 MB zip unchanged.
[0.10.1] — 2026-10-29
Production hotfix: the presence P2002 storm + 30-second function hangs.
Full analysis: research/PRESENCE-P2002-POSTMORTEM.md.
Fixed
- Presence P2002 on every heartbeat —
Presencehad a primary key on the participant id alone, but identity is per-browser and shared across designs; a second open design collided with the first on every heartbeat (~15 s) and cursor update. Migration0004makes the PK(designId, id)— one browser can now be present in many designs — and the heartbeat route falls back to a plain update on a concurrent-create P2002 instead of 502ing. - Functions running to exactly 30,000 ms — the pg pool had no
acquisition timeout and no keepAlive, so one stale pooled connection
(pooler idle-drop without FIN) hung every request sharing the instance
until the platform killed it at
maxDuration. The pool now fails fast (connectionTimeoutMillis 10 s,idleTimeoutMillis 30 s, TCP keepAlive); the SSE stream closes cleanly when a tick wedges >8 s and self-recycles at 240 s (< the 300 s ceiling); aretry: 1500hint makes the client's reconnect invisible. - Duplicate events on retried flushes (latent) — the v0.10 client
retains and retries failed batches; a flush killed mid-batch could
re-insert its persisted prefix.
DesignEvent.eventIdis now stored with a unique(designId, eventId)index and flushes insert via one idempotentcreateMany({ skipDuplicates: true })— retries are exact no-ops, and a flush costs one pooler round-trip instead of up to twenty.
Verification
- Migration 0004 applied to production (composite PK + eventId dedupe
verified in
information_schema); 267/267 tests; tsc + eslint clean. - Live probe extended to 18 checks — all green against the real
database, including the incident regressions (one pid heartbeating
into two designs; a replayed batch inserting zero duplicates; each
op streaming exactly once). Zero
[collab/presence]errors in the server log afterwards. - Cloudflare 2.14 MB gz / Netlify 19.6 MB zip — unchanged, within all free-tier limits.
[0.10.0] — 2026-10-29
The "no lost work, ever" release: offline and concurrent edits merge
deterministically — Yjs-grade convergence without leaving the existing
document model. Full design rationale: research/OFFLINE-MERGE.md.
Offline editing that survives reloads
- Every collab op is stamped with a hybrid logical clock
(
w:counter:actor—src/lib/collab/hlc.ts) persisted per browser; causality-aware ordering even with skewed clocks or hours-long offline sessions. - The working document and the pending op queue persist to IndexedDB (debounced; capped 200 pages / 500 ops) — a crash, reload or offline spell loses nothing. On reopen, local work is restored when it is newer than the server's ("Recovered" chip) and its queue flushes on reconnect.
- v0.9's three data-loss windows are closed: offline edits are never
dropped (the queue persists and retries instead of discarding),
autosave no longer clobbers whole documents (see merge below), and
fresh tabs no longer replay stale events over a fresh document
(
GET /api/designs/[id]returns the event-logseq; the replay cursor survives reloads).
Deterministic merging (client AND server, one pure function)
- Elements are last-write-wins registers keyed by id, arbitrated by HLC
stamps (
_m); deletes are tombstones that ride the saved document; pages match by id (union).src/lib/collab/merge.ts— one rule, applied identically by every replica, so content converges regardless of arrival order. PUT /api/designs/[id]carriesbaseUpdatedAt; on divergence (the tab was offline while others saved) the server merges element-wise instead of overwriting and returnsmerged:true+ the merged pages.applyRemoteOpgates stale updates/adds/deletes by stamp; coarse replace ops (undo, resize, restore, template) broadcast fully-stamped copies so they win/lose deterministically instead of clobbering.- Legacy clients/documents: unstamped data reads as epoch (any stamped write beats it); legacy events get a server stamp at persist time.
Verification
- 267 unit tests (35 new: HLC monotonicity/absorption/skew, merge
matrix incl. delete-vs-edit and re-add resurrection, order-independent
applyRemoteOp, restore arbitration); tsc + eslint clean. scripts/verify-offline-merge.ts— reusable live probe (15 checks) against the production database: fast-path save, divergent-PUT merge (offline edit wins, addition kept, delete tombstoned), converging re-save, SSE stamps (client hlc verbatim, legacy server-stamped). 15/15 green.- Deploy matrix intact: Cloudflare worker 2.14 MB gz (limit 3), Netlify function zip 19.6 MB (limit 50), Node standalone live-verified.
- No migration required — stamps and tombstones ride the existing
pagesjsonb; v0.9.x databases work untouched.
Honest limitations
- Element z-order / page order follows the merging side's array; the server is the canonical convergence point (transient divergence in order only, never in content).
- A page deleted offline can re-appear when the other side held edits to it (the page set is a union; element deletes are exact). Element work is never lost — the page may need re-deleting.
- Two cursors in one text box still don't merge character-level (that is the Yjs upgrade path; the HLC stamps here are the migration seam).
[0.9.4] — 2026-10-29
The "third platform + leaner artifact" release: Netlify joins Vercel and Cloudflare Workers as a first-class deploy target, and every platform's bundle gets ~70 % smaller.
Netlify, zero-config
netlify.toml+ pinned@netlify/plugin-nextjs5.16.5 (Netlify's OpenNext-based Next.js runtime — officially supports Next.js 16). Connect the repo in the Netlify UI, setDATABASE_URL, done.- Functions run on AWS Lambda: full Node API surface, so scrypt auth,
pgsockets andsharpPNG export are all native — no runtime guards ever trip. - The exact Netlify build pipeline runs locally without an account:
npx netlify-cli build --offline.
The 70 MB → 20.8 MB function bundle (why it was 70 MB)
- Netlify's 50-MB-zipped function limit exposed that the traced
@prisma/clientshipped ~90 MB of wasm the patched client provably never loads — in BOTH copies Next traces (nft'snode_modules/…and Turbopack's hashed.next/node_modules/…):*wasm-base64*compilers for all five dialects, the oldquery_engine_bg*library-engine wasm (dead withengineType="client"), and the other dialects'query_compiler_bg.{mysql,sqlite,…}wrappers. - New
outputFileTracingExcludesinnext.config.tsremove exactly those (+ sharp's darwin/win32 binaries), keeping the live files (postgresql wrappers,raw.wasm,wasm-module.mjs) — verified by booting the rebuilt standalone against the real database: health, designs and templates all green. - Netlify function zip: 70.4 → 20.8 MB zipped (52 MB unzipped, limit 250). Cloudflare worker: unchanged 2.13 MB gzipped (limit 3). Node standalone: proportionally smaller for every self-hoster.
Deployment verification (all against the live database)
scripts/verify-deploy-readiness.ts— one command proving migrations applied, schema complete (tables/columns/indexes), data present (110 templates), and parameterized queries through the transaction pooler. Reusable before any deploy, on any host.- Production Node standalone:
/api/health{"ok":true}, landing, templates, designs, auth register/login, anonymous/api/auth/me, SSE stream sample, MCP 503 (no AI provider configured), cross-origin CSRF rejection — all verified live; probe rows cleaned up. - Cloudflare: OpenNext build +
wrangler deploy --dry-run+ workerd preview (landing 200, auth/me works, health degrades to the documented structured 503 — no crashes). - Full gate: 232/232 vitest,
tsc --noEmitclean, eslint clean.
[0.9.3] — 2026-10-29
The "run it anywhere" release: Canvix now deploys to Cloudflare Workers (free tier) with the exact same codebase that runs on Vercel/self-hosted Node — one database, zero behavioural divergence.
Prisma without native binaries (the foundation)
- Migrated to the rust-free Prisma client (dependency floor 6.11 →
6.16+; installed 6.19): no Rust query-engine binary, and it executes
on any JS runtime including workerd. The switch is
generator client { provider = "prisma-client"; engineType = "client" }—prisma-client-js+ the queryCompiler flag silently keeps the library engine (found the hard way; documented in the patch script). - Postgres access now goes through
@prisma/adapter-pg(the realpgdriver). On Cloudflare Workers pg auto-switches topg-cloudflare's socket layer and rides workerd'snodejs_compatstraight into Supabase's transaction pooler — the same URL Vercel uses. scripts/patch-prisma-wasm.mjs(runs from postinstall, idempotent, fails loudly on template drift) makes the generated client runtime-portable: the syncnew WebAssembly.Modulebecomes asyncWebAssembly.compile; workerd gets an ESM-imported.wasm(wrangler compiles it at deploy — runtime compilation is forbidden there); Node reads the raw wasm from disk. The Node import of the 2.6 MB base64 module is gone entirely (bundler tracing is relentless — Turbopack resolves even env-conditional specifiers), so the wasm ships exactly once: worker 2.13 MB gzipped vs the 3 MB free-plan cap (3.11 MB before the deduplication).- The client generates to
src/generated/prisma(gitignored, postinstall regenerates); imports are@/generated/prisma/clientin app code, relative paths in scripts. src/lib/db-url.tsgrowsdriverConnectionString()— the pg driver gets TLS defaults translated to its semantics (sslmode=require→no-verify: node-postgres currently treatsrequireasverify-full, which rejects hosted-pooler CA chains; user-pinned verify levels pass through) but not Prisma-engine-only params (pgbouncer,connection_limit); pool sizing is set in code (max: 1per process/isolate). The env-var normalization forprisma migrateis unchanged.- New script-side factory
src/lib/db-script.ts(alias-free so plaintsxruns it) used by seed, db-check, usage-forensics and the auth-e2e probes —datasourcesoverrides (unsupported by the rust-free client) are gone everywhere. - Raw-query compatibility: the rust-free client refuses Postgres catalog
namecolumns —/api/healthand the forensics script now cast to::text.
Cloudflare Workers deployment
@opennextjs/cloudflare+wranglerwired in:wrangler.jsonc(nodejs_compat +global_fetch_strictly_public, Workers assets, self-reference service binding, observability) and a dependency-freeopen-next.config.ts(no R2/KV/Images bindings needed — every Canvix route is dynamic and nonext/imageis used).npm run preview(local workerd),npm run deploy,npm run upload,npm run cf-typegen;.dev.vars.exampledocuments the secrets;.open-next,.dev.vars,src/generated/are gitignored.- Database on Workers = the Supabase transaction pooler URL (6543) — the direct endpoint is IPv6-only and workers cannot reach it.
Runtime-portable internals
- SSRF guard (
src/lib/mcp/ssrf-guard.ts):node:net'sisIPis replaced by a strict local implementation (verified againstnode:netas an oracle across a 60-case corpus, including v4-mapped v6, NAT64, compressed/full forms and malformed literals) — andnode:dns/node:http(s)/node:streamare now lazily imported. Node/Bun behaviour is byte-identical (lookup-pinned transport). On workerd the guard resolves via DNS-over-HTTPS (Cloudflare's JSON API) and validates every A/AAAA record beforefetch()runs; the wranglerglobal_fetch_strictly_publicflag backstops it. The theoretical DoH→fetch rebinding window (unpinnable on workerd) is documented in the file header. - sharp rasterizer (
src/lib/mcp/tools.ts): loaded through a non-literal specifier guarded by a loader — Node keeps it (andoutputFileTracingIncludespins it into the standalone trace for self-hosters), workerd never tries to load it. MCP PNG export degrades to a clear "use SVG" error; fetched images fall back to default dimensions. - AI provider: the
.z-ai-configfile fallback is Node-only (on workerd the unenv fs stub is swallowed by the existing try/catch — env vars via wrangler secrets are the provider source there). - Auth needed no changes: workerd implements
node:cryptoscrypt,timingSafeEqual,createHash; SSE collab is pure web streams.
Verification
- New suite
src/lib/cross-runtime.test.ts: isIP parity corpus, driverConnectionString matrix, runtime detection. - Full vitest run,
tsc --noEmit, eslint and the production Node build stay green; the Node standalone server was live-verified against the real Supabase (health, designs, templates, MCP guards). The worker builds at 2.13 MB gzipped, boots in workerd and serves the app. - Known limitation (documented): local
wrangler devin some environments (including the development sandbox this was built in) cannot complete the Postgres TLS upgrade — workerd'sstartTls()breaks after any stream-reader use (isolated with raw-socket tests across wrangler 4.100/4.145/4.155; the same dance works from Node against the same servers;node:net+node:tlsupgrade is likewise blocked by a permanently-pending internal read). Real deployments run the documented pg/pg-cloudflare path — verify withnpm run deploy+/api/health; Hyperdrive is the documented fallback. Full audit: research/CLOUDFLARE-WORKERS-PORTABILITY.md. - Bonus: two pre-existing
react-hooks/set-state-in-effectlint errors fixed (AuthDialog resets via Radix unmount; useAuth sets state from async continuations only).
[0.9.2] — 2026-10-28
The "stop the bleeding" release — evidence-based fixes for the Vercel usage spike (5h05m Fluid CPU / 29.08 GB Fast Origin Transfer over two days), each traced to a measurable driver before a line was changed:
GET /api/designsreturned every ownerless row with base64 thumbnails (~7 MB/response) → keyset-paginated (60/page + Load more), ownership scoping AND-composed with the cursor (regression-tested).GET /api/templates(~0.7 MB, public, uncached) → CDN cache headers (s-maxage=86400, SWR 604800).- SSE collab stream fired 3 Postgres queries every 800 ms per client → adaptive pump (presence every 2nd tick, MAX(id) every 5th, idle backoff 800 ms → 3.2 s, instant snap-back on activity; ~10× cheaper idle streams, unchanged editing latency).
- Presence writes throttled (cursor 120 ms → 300 ms, heartbeat 5 s → 15 s; 48.5k slow upserts/day measured on the live DB).
- AI routes: strict same-origin guard (Origin-less/foreign POSTs get 403 before any provider work) and tightened generation limits.
robots.txtdisallows/api/;/api/healthis no-store + noindex.- Infra:
scripts/usage-forensics.ts+ workflow — pg_stat_statements and table stats on demand for the next spike. - 168/168 tests green (13 new regression tests).
[0.9.1] — 2026-10-28
The "never claim someone else's work" release: claim eligibility is now enforced, CSRF is closed out, and the verification report the roadmap called for exists as executable tests.
Claim eligibility (adopt-all made safe)
- Anonymous attribution — the first anonymous design creation sets a
canvix_anoncookie (256-bit, HttpOnly, 1 year); the design row stores sha256(token) in the new indexedDesign.anonKey(migration0003_anon_attribution, purely additive). A database leak never contains usable attribution tokens. - adopt-all is scoped —
POST /api/designs/adopt-allnow claims only ownerless designs whoseanonKeymatches the caller's own browser. Another person's anonymous work and legacy (pre-attribution) rows are structurally outside the UPDATE. A browser with no attribution cookie claims nothing. - Per-design adoption — new
POST /api/designs/[id]/adoptclaims ONE ownerless design deliberately: your own browser's designs and legacy rows are claimable; a foreign browser's design answers403 NOT_ELIGIBLE; races between two claimants are resolved atomically by a conditionalupdateMany(409on loss). - Dashboard shows the honest claimable count ("Save my designs to
this account (N)" counts only browser-attributed designs), a per-design
"Save to my account" action, and — for self-hosters — a separate,
confirmation-guarded "Adopt legacy (pre-accounts) designs" bulk item
(
adopt-all { includeLegacy: true }; foreign attributions remain excluded even then). The list API exposes booleanclaimableandmineflags per design (never the hash). Dialog-driven sign-in/up now refreshes the dashboard's auth state immediately (the account chip no longer waits for a reload).
CSRF protection for cookie-authenticated writes
- Every mutating API route (
POST /api/designs,PUT/DELETEon a design, restore, adopt, adopt-all, register, login, logout) now enforces same-origin: browsers always attachOrigin(orReferer) to cross-site requests; when present it must match the request's host (x-forwarded-hosthonoured behind proxies). Non-browser clients (curl, MCP, health probes) send neither header and pass — they carry no ambient cookie authority. This is defence-in-depth on top of the existingSameSite=Laxsession cookie.
Verification (the pre-Phase-4 gate)
scripts/auth-e2e.shnow proves, against a real database: register → me → owned create → owner save → anonymous 403 → logout → revoked token replay is dead → wrong-password 401 → login → cross-origin PUT/POST rejected (CSRF) → same-origin unaffected → two anonymous browsers: adopt-all claims only the caller's own design → foreign per-design adopt refused, legacy allowed → cross-account isolation (B cannot modify/delete/adopt C's design, opens it view-only). All probe rows are removed afterwards.- New unit suites: session expiry/revocation/cookie hardening (mocked DB), CSRF guard matrix, adopt-all eligibility (the WHERE-clause invariant), per-design adopt matrix. SSRF suite extended with DNS-flip regressions (between requests and mid-redirect-chain). 152/152 tests green.
package-lock.jsonversion resynced withpackage.json(skew since 0.8.1 — tolerated by npm but confusing for tooling).- Vercel deployment fix — v0.9.0/v0.9.1 pushes failed on Vercel
(~35s, "Deployment has failed") while building clean everywhere else.
Root cause (reproduced locally): Vercel restores a cached
node_modulesbetween builds; with nopostinstallhook the Prisma client generated against the pre-v0.9 schema stayed cached, sonext buildtypechecked the newdb.user/db.session/Design.ownerIdcode against a client that lacked them and failed. Fresh installs (CI, local) regenerate the client and never see it. Fix:"postinstall": "prisma generate"(root lifecycle scripts run on every install, cached or not — Prisma's documented Vercel setup) and removal of the v0.4-era stalebun.lock(the repo is npm-first; a second, stale lockfile invites package-manager ambiguity on PaaS detection).
[0.9.0] — 2026-10-28
The "Your designs, yours" release: free accounts, per-design ownership, and the SSRF DNS-pinning close-out promised in the Phase 3 plan.
Accounts — free forever, zero dependencies
- Username + password accounts with scrypt hashing straight from
node:crypto(N=16384, r=8, p=1, per-hash random salt, parameters stored alongside the hash for future cost upgrades) — no bcrypt/argon2 native builds, no external provider, no email. A self-hoster runs the whole account system for $0. - Opaque DB-backed sessions — the cookie carries a 256-bit random
token; the
Sessionrow id is sha256(token), so a database leak never contains usable session tokens. 30-day expiry, HttpOnly + SameSite=Lax (+ Secure in production), server-side revocation on logout, and a best-effort expiry sweep on every new session. - Input rules (NIST SP 800-63B-flavoured): usernames 3–32 chars of
[a-z0-9_-]canonicalised to lowercase; passwords 8–200 with a tiny top-password blocklist. Login answers one generic error (no account enumeration) and is rate-limited (10/10min/IP); register 5/hour/IP — reusing the existing sliding-window limiter.
Per-design ownership
Design.ownerId(nullable FK →User,SetNullon user deletion, indexed). Migration0002_accountsis purely additive.- Three access cases, one helper (
src/lib/auth/design-guard.ts): ownerless designs stay link-editable (the exact pre-v0.9 behaviour — existing setups and intentionally shared designs keep working); the owner has full edit; everyone else gets view-only. - Enforced at every mutating API — save (PUT), delete (DELETE), restore,
version snapshots — with a structured
403 READ_ONLY_DESIGNbody.GET /api/designs/[id]still serves share links but now carries areadOnlyflag. - Dashboard scoping — signed-in users see their designs plus shared (ownerless) ones; anonymous visitors see ownerless designs only. New designs created while signed in are automatically owned.
- One-click migration — "Save all designs to my account" adopts every
ownerless design into the signed-in account (
POST /api/designs/adopt-all, idempotent, never touches already-owned designs). - Editor view-only mode — autosave is disabled and an amber banner explains why, instead of silently failing saves.
Collab identity
- Signed-in users automatically appear under their real username in presence, cursors and comments (the local participant identity is upgraded on login; anonymous users keep the generated names).
Security — SSRF DNS-rebinding pinning (the v0.6.1 residual, closed)
safeFetchno longer usesfetch()for the exchange: it connects vianode:http(s)with a custom DNS lookup pinned to the validated address. The guard resolves and range-checks every address, hands the connection exactly that IP, and there is no second resolution — a rebinding attack between validation and connect is now impossible. TLS keeps the real hostname for SNI/Host, so certificate validation is unaffected. The transport is injectable for tests; the suite now asserts the pinned IP on every hop (including the rebinding scenario) and exercises the real transport end-to-end against a local server.
Verification
- 115 unit tests (10 new: scrypt round-trip/salting/tamper-resistance,
username/password rules, token derivation; SSRF suite upgraded to
assert pinning).
tsc --noEmitclean, production build clean. scripts/auth-e2e.sh— boots the built standalone server against a real database and drives the whole flow with curl: register → me → owned create → owner save → anonymous403 READ_ONLY_DESIGN→ logout → me(null) → wrong-password401→ login → cleanup. Wired into the "Canvix Database Setup" workflow, so every re-run of the workflow now proves accounts + ownership against your live database before it reports success./api/healthnow also checks for theUserandSessiontables and tells you to re-runnpm run db:setupafter upgrading.
Upgrade notes
- Run
npm run db:setuponce after pulling (applies0002_accounts). Existing designs are untouched: they stay link-editable until you choose "Save all designs to my account" while signed in. - Nothing else changes — anonymous/local editing works exactly as before for anyone who never creates an account.
[0.8.0] — 2026-10-28
The "Supabase-ready & 110 Templates" release: switching your database to Supabase (or any Postgres host) is now a one-command, self-diagnosing operation, and the template library grows from 60 to 110 — still 100% free forever, no subscriptions, no paywalls.
Database: Supabase-first infrastructure
- Real migrations ship in the repo (
prisma/migrations/0001_init) —npm run db:setupapplies them plus the template seed against any Postgres host: brand-new Supabase project, Neon, RDS, Docker or local. The SQL is idempotent (IF NOT EXISTS+ guarded constraints), and the setup wrapper self-heals the "old database provisioned viadb push" case by baselining the migration history (Prisma's documented path) instead of failing with P3005. - Smart connection handling (
src/lib/db-url.ts) — copy-pasting a Supabase URI just works: TLS is auto-required for remote hosts, and the transaction pooler (…pooler.supabase.com:6543) automatically receivespgbouncer=true&connection_limit=1so Prisma's prepared statements survive. Every auto-fix is logged so nothing is silent magic. GET /api/health— one-page diagnosis: env → connectivity → migration → seed, with the exact fix printed per step (including the Supabase IPv6/pooler hint when a direct connection can't route).- Template-opening failures now explain themselves — the reported
"could not open template" dead end is gone. API errors are classified
(
DB_NOT_MIGRATED,DB_UNREACHABLE,DB_TIMEOUT), the dashboard shows a persistent setup banner with the command to run, and toasts carry the fix text. - Quieter production Prisma logs — query logging is dev-only now.
.env.examplerewritten Supabase-first; README quick start covers both pooler and direct connection styles.
Template library: 60 → 110, all free
- 50 new original premium-grade templates (designed in-house, styled
after 2026 template-platform trends — nothing copied), organized as
collections in the new
src/lib/templates/module:- social +14 — podcast quote card, real-estate new listing, bootcamp, restaurant daily special, quiet-luxury lookbook, webinar announcement, LinkedIn banner, recipe pin, birthday story, Black Friday, playlist cover, Monday motivation, flash-sale countdown story, grand opening
- presentation +8 — investor pitch (4-page system), marketing plan, course intro, agency portfolio, quarterly review, demo day, nonprofit impact, product launch keynote
- print +9 — wedding invitation, gym flyer, cafe menu, concert poster, yoga flyer, gift certificate, business card, open mic, moving sale
- documents +9 — executive & creative resumes, matching cover letter, project proposal, invoice, school newsletter, whitepaper, meeting agenda, press release
- thumbnails +7 — gaming, tech review, vlog, tutorial, podcast, fitness, cooking
- logos +3 — roastery badge, geometric tech mark, salon monogram
scripts/validate-templates.ts— structural validator (unique slugs, pages/backgrounds/element geometry) wired for CI-style checks.- Category totals now: social 33 · presentation 17 · print 19 · documents 22 · thumbnails 12 · logos 7.
[0.7.0] — 2026-10-28
The "Fast & Free Forever" release: the canvas rendering hot path is rebuilt (structural sharing, memoized nodes, O(1) history), the template library nearly triples to 60 — and the project formally commits to staying 100% free forever: no subscriptions, no paywalls, no locked features.
Rendering performance
- Structural sharing in the editor store (
src/store/editor-store.ts) — every mutation (typing, slider drags, align/flip, group/ungroup, remoteapplyRemoteOp, MCP live edits) now performs immutable updates that give new identities only to the touched page/elements; untouched objects keep their references. The old code deep-cloned the wholepagestree viastructuredCloneon every keystroke. Result: a live edit re-renders exactly oneElementNodeinstead of every node on the canvas. - O(1) undo/redo history — since pages are never mutated in place any
more, history snapshots are plain references (Immer-style structural
sharing, zero dependencies).
pushHistoryno longer clones the document; a 60-entry history of a large design costs a fraction of the old memory. - Memoized canvas nodes (
element-node.tsx) —ElementNodeno longer subscribes to the entire editor store (it reads actions at event time viagetState()), is wrapped inReact.memo, gets a stable node-ref callback, andCanvasStagepasses stable handler props — selection changes, panel toggles, collaborator cursors and remote typing no longer re-render any shape they don't affect. - Split Konva layers (
CanvasStage.tsx) — interaction chrome (transformer, snap guides, manual ruler guides, marquee, freehand draft) moved to a second<Layer>: dragging with snapping active repaints only the overlay canvas, and content edits never repaint the chrome. - Snap-guide equality guard —
handleDragMoveNodecompares guide sets by value and skipssetGuideswhen nothing visibly changed (previously every mousemove created a fresh array and re-rendered the tree). - Shared image cache (
use-loaded-image.ts) — module-level cache keyed by URL with in-flight dedup, negative caching of failures and a bounded ~300-entry eviction. Images decode once per URL instead of once per mount. perfectDrawEnabled: falseon element nodes — skips Konva's hit-canvas "perfect draw" pass during drag/transform.- Lazy template thumbnails (
TemplatesPanel.tsx) — preview stages mount viaIntersectionObserverwith a 300 px pre-roll; cards are memoized. The 60-template panel only pays canvas cost for visible cards. - Regression-locked — new
src/store/editor-store.test.ts(5 tests) asserts the identity invariants: patched-only new identities, untouched pages/elements keep references, history shares structure, snapshots never mutate in place, remote ops preserve untouched pages.
Premium template collection — all free (21 → 60)
- 39 new templates across every category, each with real copy, considered typography and Canva-grade layouts: social (flash-sale story, minimal quote, trattoria special, open house, bootcamp, webinar announcement, podcast cover, birthday story, wanderlust story, LinkedIn banner), presentation (pitch deck noir 2-pager, quarterly report, webinar 101, course welcome, product roadmap timeline, meet the team), print (neon gig poster, charity gala flyer, artisan cafe menu, spa voucher, open-house yard sign, luxe dark card, wedding thank-you, tear-off coupon), document (project proposal, community newsletter, ebook cover, tech whitepaper, press release, meeting agenda, studio invoice, case study), thumbnail (gaming, tutorial, podcast episode, unboxing) and logo (orbit tech, bloom cafe, apex fitness).
TemplateDef.badge('premium' | 'new') is a quality label only — the templates panel shows a "Premium collection · free forever" section and premium chips on cards; nothing is ever gated.- DB re-seeded (60 templates upserted by slug).
Free forever — formalized
- README gains a "Free forever — the promise" section: every feature, every template, every export is free; no Pro tier, no trials, no watermarks, ever. This is a project principle, not a launch promotion.
[0.6.1] — 2026-10-28
Hardening & hygiene release: closes a real SSRF bypass in the MCP image fetch, fixes JSON-RPC spec violations, ships the test infrastructure the 0.6.0 notes promised, and deletes ~24% of dead weight from the tree.
Security
- SSRF: redirect bypass fixed (
src/lib/mcp/ssrf-guard.ts) — the old private-host check ran on the initial URL only whilefetch()followed redirects automatically, so any public URL that 302'd tohttp://169.254.169.254/…(cloud metadata) or an internal host bypassed it.safeFetch()now follows redirects manually and re-validates every hop: protocol allow-list (nofile:/data:/…), full IPv4/IPv6 private/reserved-range checks (incl. CGNAT, link-local, v4-mapped, NAT64), intranet-name blocklist (bare dot-less hosts,.local/.internal/…), and DNS resolution where every resolved address must be public. Decimal/ octal/hex IP encodings (http://2130706433/) are normalized by the resolver and caught. Max 5 redirect hops. Known residual: DNS-rebinding TOCTOU (guard resolves, then fetch re-resolves) — documented in the source, full pinning planned with the Phase 3 auth work. - JSON-RPC
idecho fixed —tools/listanswered withid: nullinstead of echoing the request id (spec violation that breaks strict client request/response correlation). Every method now echoes correctly, covered by regression tests. - Request body cap —
/api/mcpreads bodies through a capped stream reader (1 MB, works for chunked requests too) and answers413with a JSON-RPC error (-32002) instead of buffering unbounded payloads. - Image fetch size guard — content-length is checked before the body is streamed (the old code capped only after reading the full response).
Tests — the infrastructure 0.6.0 claimed, now real
- Vitest (
npm test) — 97 unit tests: SSRF guard (range tables, DNS resolution, redirect pinning — including the exact v0.6 bypass scenario), JSON-RPC conformance (id echo, error codes, batches, notifications). scripts/mcp-e2e.sh(npm run test:mcp) — 38 live assertions over the HTTP transport: auth, initialize negotiation, tool catalogue, a full create→edit→export workflow against the database, live SSRF-guard rejections, transport hardening (invalid JSON, unknown methods, batches, the 413 cap). (0.6.0's changelog referenced this script before it existed — mea culpa.)- Playwright (
npm run test:ui) — browser smoke suite (landing → dashboard → editor canvas with react-konva mounted) plus config with auto-booted dev server;BASE_URLreuses a running instance. npm run typecheck— fasttsc --noEmitgate.
Cleanup — −45 dependencies, −40 dead files (~24% of the tree)
- Removed 39 unused shadcn/ui components (import-graph verified; the 9
actually used — button, dialog, dropdown-menu, input, popover, progress,
tabs, toast, toaster — remain;
npx shadcn add <x>restores any other). - Removed 45 unused dependencies incl.
next-auth,framer-motion,zod,@dnd-kit/*,@tanstack/react-query,react-table,recharts,date-fns,next-intl,next-themes,sonner,uuid, 19 unused Radix packages and more (dependency count 70 → 25). - Removed the vestigial Tailwind v3
tailwind.config.ts(v4 uses the CSS-first config inglobals.css;tailwindcss-animate→ already replaced bytw-animate-css). ignoreBuildErrors: false— the production build typechecks strictly again (the codebase was already clean; now it stays that way).- Fixed the 3
react-hooks/set-state-in-effectviolations surfaced by the current eslint-config-next (useSyncExternalStoreforuseIsMobile, render-time prop mirroring inColorMenu, microtask-deferred fetch in the dashboard hook) —npm run lintis fully green (0 errors, 0 warnings). - Committed
package-lock.jsonfor reproducible installs.
[0.6.0] — 2026-09-04
The Agent Edition: Canvix speaks the Model Context Protocol, so AI assistants (Claude Desktop, Cursor, ChatGPT, any MCP client) can create and edit real designs on your server — and the editor closes the remaining Canva-parity gaps with native tables, image frames, curved text and embed cards.
MCP server — AI agents drive Canvix
POST /api/mcpimplements MCP 2025-03-26 Streamable HTTP (stateless profile): JSON-RPC 2.0 requests answered with one JSON object, notifications with202 Accepted,GET→405(no server-initiated stream — spec-compliant), full lifecycle (initialize→notifications/initialized→tools/list/tools/call),ping, emptyresources/list/prompts/list, batches ≤ 32.- 20 tools, all backed by real subsystems — discover (
get_capabilities,list_templates,search_designs,get_design,get_design_content), create (create_designblank-or-template — id or slug accepted, first page auto-created), edit (add_text,add_shape,add_image,add_table,add_embed,set_background,update_element,delete_element,animate_page— the same Magic Animate engine), export (export_design: true-vector SVG server-side, PNG via sharp, JSON), collaborate (comment_on_design,list_comments) andlist_fonts. generate_design— AI-generated designs as native editable elements: the provider is asked for a structured page spec (strict JSON mode with repair + one retry), then every field is normalized/clamped (coords, hex colors, whitelisted fonts, ≤ 25 elements) before a real Design row is created. Without a provider the tool errors honestly and points at template-based creation.- Live propagation: every MCP write appends a
pages:replaceevent to the design's collab log (actoragent:mcp) — open editor sessions replay agent edits in real time; comments emitcomment:activitymarkers. - Hardening — disabled until
CANVIX_MCP_TOKENis set (503 with setup instructions otherwise); Bearer auth with timing-safe comparison; Origin validation (DNS-rebinding guard); 120 req/min/IP; SSRF-guarded image fetch (private hosts denied, 8 MB / 10 s caps, content-type allow-list) → dataURL; per-type patch whitelists with clamps; no stack traces on the wire. - Dashboard "AI agents (MCP)" card — live status probe (
OPTIONS /api/mcp), copyable endpoint + client config JSON for Claude Desktop / Cursor / any remote MCP client..env.exampledocuments the token. - Protocol E2E (
scripts/mcp-e2e.sh): 38 assertions — initialize handshake, 202 notifications, tools/list (20), auth (401), GET 405, unknown method/tool, full create → style → add (text/shape/table/embed) → update (curve) → animate → get → comment → export (svg/png/json) → delete flow, batch, parse errors, AI generation — 38/38 passing.
Tables (native, editable)
- New
tableelement: rows × cols with per-cell text/fill/bold, proportional column widths, header band, border color/width, text style — four starter styles (classic / minimal / bold / soft). - Click any cell to edit it in place (cell-scoped textarea overlay), add / remove rows & columns from the context toolbar, restyle via the Style popover.
- Renders in editor, previews, thumbnails, PNG/PDF/video exports; SVG export serializes per-cell rects + text; AI Translate now walks table cells too.
Frames (image-in-shape)
- New
frameelement: rect (with corner radius), ellipse, circle, triangle, hexagon — images clip to the shape with cover-fit (KonvaclipFunc). - Drop an upload or photo onto a frame to fill it (drop-to-fill), or use
the Fill button / shape switcher in the context toolbar. Empty frames show a
dashed placeholder. SVG export uses true vector
<clipPath>.
Curved text
TextElement.curve(−180…180°): arch up or valley down, rendered as real text-on-path (KonvaTextPath) — editable, transformable, exports to SVG<textPath>and rides PNG/PDF/video export unchanged. Curve slider in the text toolbar with live reset.
Embed cards
- New
embedelement for YouTube / Google Maps / generic links — a native vector card (tinted media band, play / pin / link glyph, host + title) that opens the URL when clicked in Preview or shared views. YouTube pulls the public thumbnail (CORS-safe, graceful fallback). Honest scope: a styled card, not an iframe.
Infrastructure
src/lib/v06-geometry.ts— pure shared geometry (arc math, table layout, frame clip paths, embed card metrics) used by BOTH the Konva renderers and the server-side SVG exporter (server-safe, no DOM imports).- SVG exporter gained table / frame (clipPath) / embed (band + glyphs) /
curved-text (defs path + textPath) serializers, all escaped and
data:/https:-only hrefs. - MCP tool schema definitions double as living API documentation for agents.
[0.5.0] — 2026-09-04
The AI-native collaborative release: Magic Layers turns flat images into editable designs, real-time multiplayer arrives with comments, designs learn to move with animations and export as SVG and video, and the AI stack gets a production-grade provider abstraction.
Magic Layers — image → editable design
- Upload (or select) a flat design and a vision model decomposes it into real, editable Canvix layers: text regions become live text elements (color, weight, approximate font size and class recovered), photo regions become cropped image elements, shapes become native shapes, and the background becomes a page background/gradient.
- The analysis returns a validated region schema (bounds, confidence 0–1,
layer order) — the client reconstructs native elements, never a raster. Each
element carries
magicLayerprovenance metadata (source region, confidence, original bounds) for future tooling. - Honest-by-design review UX: region overlays with confidence colors, per-region keep/discard toggles, low-confidence flags, model limitations surfaced in the dialog ("illustrations become image regions", "fonts matched by class").
- Server route
POST /api/ai/magic-layers: dataURL-only input, 8 MB cap,validateAnalysis()clamps every field (bounds 0..1, hex colors, whitelisted font classes, text ≤ 400 chars, ≤ 40 regions, deduped overlapping text).
Real-time collaboration
- Multiplayer editing on Postgres + SSE — an append-only
DesignEventlog (global monotonic seq) is the replication stream; clients subscribe via server-sent events (~800 ms ticks) and push ops via batched POSTs (400 ms flush, coalescedelements:updatepatches). Deployable on Vercel serverless and self-hosted Node — no WebSocket server. - Presence: colored cursors with name tags, remote selection outlines, stacked avatars + connection status (Live/Syncing/Offline) in the top bar, collaborator list popover with per-user page/selection state, editable display name (persisted anonymous identity — no account required).
- Gap-free reconnection: clients track
lastSeq; on stream drop they reconnect with?since=<seq>and replay missed events; offline edits queue and flush on recovery. Local input is never blocked (optimistic, sync in background). - Ops are small and explicit (
elements:update,element:add,page:replace,pages:replace, …) and apply through the existing store actions, so undo stays local and Konva rendering stays fast. Share links now deep-link (/?design=<id>); unknown ids stay on the landing page. - Abuse hardening: payloads ≤ 256 KB with recursive type/size/depth validation, ≤ 20 events/flush, whitelisted op kinds, presence GC (30 s offline / 24 h rows), event log pruned to 500 per design, malformed events dropped (never crash).
Comments & annotations
- First-class comments mode: click the canvas to drop a pin (clicking an element anchors the thread to it — the pin follows the element), type and post.
- Threads with replies, resolve/reopen, delete-own, collaborator avatars/colors, relative timestamps; pins keep their anchor when pages resize (coordinates stored as page fractions).
- Unread badges on the topbar icon + open/resolved/all filters in the panel.
- Live propagation rides the collab event log (
comment:activitymarkers → refetch), with optimistic local updates for the author.
Animations — Magic Animate
- Animation model on the document (
element.animation,page.transition) that is independent from Konva — pure functions of time (src/lib/animations.ts), shared by preview playback and video export. - 9 element animations — fade, rise, pan, pop, wipe, zoom, rotate, breathe — with duration, delay, easing (linear/ease/spring), direction and speed presets (slow/medium/fast); page transitions none/fade/slide/morph with 0.1–2.5 s durations.
- Magic Animate — one-click deterministic pass: headings rise, body text fades, images pan from their nearest edge, shapes pop, separators wipe, transition fades.
- Preview gains animated playback, autoplay presentation mode and a reduce-motion accessibility toggle. Static exports (PNG/JPG/PDF/SVG) ignore animations entirely.
SVG export
- True vector serialization of every element type: text (word-wrap measured via canvas 2D, per-line tspans, align/letterSpacing/decorations), shapes with gradients + rounded corners, paths (scaled from the 100×100 authoring box), lines with arrowheads, freehand strokes, images (href allowlist, rounded-clip, flips), stickers, groups, shadows (feDropShadow) and page backgrounds.
- Sanitized by construction: all text XML-escaped, path data whitelisted,
image hrefs only
data:/https:, no scripts/events/foreignObject. Multi-page exports as one file per page.
Video export (MP4/WebM)
- A real, fully-local rendering pipeline: design timeline → headless Konva frame
renderer (element animations + page transitions composited per frame) →
canvas.captureStream(0)+ manualrequestFrame()→ MediaRecorder. - Honest format detection: MP4 (H.264) where the browser supports encoding it, WebM (VP9/VP8) otherwise — the export dialog tells you which and why before you start. Real-time pacing keeps duration exact (frames drop to stay on schedule); progress bar with frame counter; nothing leaves the browser.
- Verified end-to-end: an ffprobe-clean 1080×1080 H.264 MP4 (2.8 s, ~100 KB).
AI Assistant 2.0
- The assistant now sees the live design context — elements with ids/types/ positions/styles, selection, colors and fonts in use, page dimensions.
- It answers with structured
DesignActions (addText, updateElements, moveElements, scaleElements, setHeadingsColor, setFont, setBackground, align/distribute, addPage, duplicatePage, generateImage, suggestPalette, translate, magicAnimate, balanceLayout) instead of just chat. - Double validation: the server clamps every field (hex colors, numeric ranges, id existence) and the client re-validates + resolves ids against the page before executing. Every action applies as a normal undoable edit, with an inline "Undo last change" affordance. Deterministic local fallbacks (balanceLayout, palettes) work without any provider.
AI provider abstraction & fallbacks
src/lib/ai/provider.tscentralizes: config resolution (ZAI_BASE_URL/ZAI_API_KEYenv →.z-ai-configfile → absent), capability probing, per-IP sliding-window rate limits on every AI route (429 + Retry-After) andAIUsageaccounting./api/ai/capabilities— public, secret-free feature detection; panels show "AI provider not configured" states before you try a feature, with local alternatives (background removal ONNX, deterministic palettes/layout) still working. No provider key ever reaches the browser (audited + grep-verified).- All five v0.4 AI routes refactored onto the abstraction; no behavioral change when a provider is present.
Performance
- Image downscaling on embed — uploads > 2048 px longest edge are re-encoded (alpha-preserving PNG / JPEG q0.9) before entering the document; 25 MB input cap; Magic Layers crops capped at 1024 px.
- Collaboration updates coalesce (consecutive same-id
elements:updatepatches merge in the queue), remote batches apply as single store writes, presence rows and the event log are garbage-collected, and collab cursors render in a DOM overlay that never enters Konva's pipeline. - Fixed an uncached zustand selector that caused an infinite re-render loop in the editor (Magic Layers dialog).
Infrastructure
- Prisma schema gains
DesignEvent,Presence,CommentandAIUsagemodels (backward compatible —prisma db push, no destructive migrations). - Deep links
/?design=<id>/?d=<id>open the editor directly (invalid ids fall back to the landing page). - Research docs shipped: current-state audit, AI provider audit, fresh Canva
research, collaboration architecture decision record and a full security
audit (
research/V05-SECURITY-AUDIT.md).
[0.4.0] — 2026-09-03
The Magic Suite release: AI image editing (BG remover, Magic Eraser, Enhance), Magic Resize with smart re-layout, design translation, live photo search, PostgreSQL migration and server-side version history. (Full notes in the v0.4 commit message; the feature list also lives in README.md.)
[0.3.2] — 2026-09-03
Fresh canva.com research pass (fonts, design trends 2026, feature taxonomy) plus the next tier of editor features: gradient fills, PDF export, a Photos library and AI apps.
Fonts — 15 → 63 families
- Font library expanded to 63 families across five categories with Canva-style pills + search in the font dropdown: 18 sans, 14 serif, 14 display, 14 handwriting and a new Mono category (DM Mono, JetBrains Mono, Space Mono).
- New arrivals include Raleway, Lato, Open Sans, Nunito, Quicksand, Rubik, Work Sans, DM Sans, Josefin Sans, Barlow, Manrope, Outfit, Figtree, Lora, Merriweather, Libre Baskerville, EB Garamond, Cormorant Garamond, DM Serif Display, Prata, Bitter, Fraunces, Bodoni Moda, Cinzel, Alfa Slab One, Bungee, Righteous, Ultra, Passion One, Monoton, Rye, Titan One, Luckiest Guy, Permanent Marker, Great Vibes, Sacramento, Satisfy, Kaushan Script, Alex Brush, Allura, Parisienne, Amatic SC, Shadows Into Light, Indie Flower and Kalam.
- All fonts load through one consolidated Google-Fonts stylesheet with subset weights.
Gradient fills (shapes & text)
- Linear and radial gradients on rectangles, ellipses, triangles, stars, paths and
text —
fillGradientonShapeElement/TextElement, rendered via KonvafillLinearGradient*/fillRadialGradient*with per-shape local coordinate frames. - The colour menu gains a full gradient editor: 12 preset swatches + radial chip, Linear/Radial type toggle, 0-360° angle slider, from/to colour pickers, and Remove gradient. The toolbar swatch previews the live gradient.
- Text effects that own the fill (Hollow, Outline, Neon…) intentionally skip the gradient so the effect stays intact; picking any solid colour clears the gradient.
PDF export
- Multi-page PDF download in the export dialog (jsPDF, client-side, no watermark): print-ready page-sized PDF, per-page capture at the selected quality, all-pages option, automatic landscape/portrait orientation.
Photos (new side-panel tab)
- Photos rail tab with Canva-style panel: search + category chips (Nature, Business, People, Food, Travel, Textures, Abstract), hover-to-add grid, broken tiles self-hide. Clicking places a 900×514 image element on the canvas.
- Bundled 42-photo stock library (7 categories × 6) — AI-generated for Canvix,
license-free, served locally from
public/photos/(no external requests).
AI apps (Canva AI parity)
- Magic Write app — prompt + copy kind (headline/tagline/body/caption) + tone;
generates 3 options server-side (
/api/ai/write, z-ai SDK) and adds any option to the canvas as a styled text element. - AI image generator app — prompt + style chips + size (1:1/16:9/9:16/4:3);
server-side generation (
/api/ai/image) with preview, Generate another, and add-to-canvas as an image element. - Both apps lead the Apps grid, mirroring Canva's AI-first 2026 navigation.
Templates — Design Trends 2026
- Five new templates from Canva's official 2026 trends (research doc): Prompt Playground (playful productivity), Notes App Chic (raw handwritten notes), Texture Check (tactile warm gradients), Opt Out Era (structured minimalism), Granny Wave (maximalist heritage remix) — several showcase the new gradient fills and new fonts (Fraunces, Cinzel, Kalam, Manrope, Bodoni Moda).
Guides
- Manual guides are now per-page (
ManualGuide.pageId): each page owns its own set, snapping only considers the current page's guides, and Clear guides clears just the current page.
[0.3.1] — 2026-09-03
Editor-completeness release: the remaining gap-analysis features — rulers & guides, image crop, layer renaming, version history — plus correctness fixes found by E2E.
Rulers & guides
- Rulers along the top/left of the workspace (22px strips, DPR-aware canvas ticks, adaptive major/minor ladder, pointer-tracking triangles). Toggle via File menu or Shift+R; fit-to-screen accounts for the ruler inset.
- Manual guides: drag out of either ruler to create a
#9954FFguide; drag a guide to reposition, drag it off-page (or double-click) to delete; guides act as snap targets for element edges. Right-click the page → Clear guides (n).
Image crop
- Crop dialog (toolbar button, right-click → Crop image): drag handles or draw a
brand-new region anywhere outside the current one, aspect presets (Free/Original/
1:1/4:3/3:4/16:9/9:16/3:2/2:3) with locked-ratio drawing, rule-of-thirds overlay,
live px readout, baked-in flips,
displayScale-preserving apply via canvas re-encoding; JPEG/PNG-aware output.
Layers
- Rename layers: double-click a row (or press Enter on it) — inline edit with the
purple focus ring; empty name falls back to the auto label.
namepersisted onBaseElement; groups get a dedicated icon + label.
Version history
- File → Version history: labelled snapshots per design (max 30, ~4.5MB localStorage budget with automatic pruning), restore (undo-able — current state is pushed to history first), delete, relative timestamps, pages × dimensions meta.
- Ctrl+Alt+S saves an instant snapshot.
Groups (rotation correctness)
- Fixed double-rotation on group transform (children no longer get the group's angle baked on top of the group's own rotation).
- Ungrouping a rotated group now orbits children around the group origin and transfers the rotation, so nothing jumps.
Apps & panels polish
- App cards and chart rows are now fully clickable tiles (role=button, keyboard support) — matching Canva's tile behaviour, not just the inner button.
- Tools → Layers tab reachable via role-based selectors (a11y names verified by E2E).
Editor
- New shortcuts: Shift+R (rulers), V (select tool), Ctrl+Alt+S (version snapshot); shortcut lists in the editor modal and dashboard help modal synced.
Design system
- Topbar gradient re-weighted purple→magenta dominant (
#02c0cc → #6425f0 → #9333ea → #b04fd7) per VLM visual-QA feedback.
Technical
- Type-check, ESLint, production build clean.
- E2E suite extended to 40 checkpoints (rulers, guide pull, clear-guides menu, layers panel, version history save, QR→crop pipeline) — zero console errors.
- VLM visual QA: 8.5/10 average across 13 key surfaces
(
research/canvix-v03-qa-scores.md). .gitignore: rootresearch/*.mdcurated docs are now committed by exception.
[0.3.0] — 2026-09-03
Deep visual-parity release informed by a fresh live audit of canva.com (logged-in,
stealth browser, computed-style + pixel-sampling extraction). Research artifacts:
research/CANVA-V03-RESEARCH.md, research/CANVIX-V03-GAP-ANALYSIS.md.
Editor
- Selection chrome re-skinned to measured values: border + anchors now
#7630D7with white circular handles, 2px border, 45° rotation snapping. - Alignment guides:
#9954FF, 2px. - Groups: new
groupelement type; Ctrl+G / Ctrl+Shift+G; children move/scale together and ungroup restores page positions. - Marquee (box) selection on empty canvas; space+drag / middle-mouse panning; Ctrl+A select all.
- Right-click context menus (element & page): copy/cut/paste/duplicate, layer ordering, group, lock, hide, delete, page ops — 244px menu, 32px items, r10.
- Context toolbar moved into the topbar (Canva behaviour) with 32px / r10 buttons; mobile gets a bottom contextual action bar.
- Zoom dropdown: 300%→10% presets + Fit + Fill (128px listbox, 40px items),
plus store-level
fitToScreen(). - New shortcuts: Ctrl+G/Shift+G (group), Ctrl+A, Ctrl+L (lock),
]/[(layers).
Text
- 10 text effects (Drop, Lift, Glow, Hollow, Outline, Background, Splice, Neon, Echo, None) in a 3-column grid with live "Ag" previews.
- FontDropdown: search, category pills, live font previews, favourites star.
- Full toolbar: size stepper, colour, B/I/U/S, Uppercase, alignment, spacing (letter/line sliders), transparency slider.
uppercase+justifymodel fields.
Colour
- Canva-style ColorMenu: header + hex search, spectrum/eyedropper/current quick row, Brand Kit swatches, 4×7 default solids, gradient rows (background context).
Panels
- Position popover: 2×2 arrange tiles, 6 align-to-page tiles, W/H/X/Y/Rotate with ratio lock.
- Templates panel: search, category chips, recommended section, skeletons, preview modal, one-click apply.
- Brand kit 2.0: palettes, logo uploads, “apply brand style to page” (nearest-colour remap + brand font swap).
- Elements panel: search, polygons, 11 new graphics, grouped categories.
- Uploads panel: replace-mode when an image is selected, set-image-as-background, empty state; drag-and-drop images onto canvas.
Apps
- Registry-driven apps ecosystem (
apps/registry.tsx): Charts (bar/line/donut), QR generator (colour + size + add to canvas), Icons (colourable), Colour palette generator (analogous/complementary/triad/monochrome), Placeholder text (lorem/real-feel), Stickers.
Dashboard
- Account avatar menu, Help & shortcuts modal (via Get-help FAB), skeleton loading for recent designs, toast notifications.
Design system
- New tokens:
--cv-selection #7630D7,--cv-guide #9954FF,--cv-menu, slider fill. - New shared classes:
cv-menu,cv-menu-item,cv-tbtn,cv-pop,cv-slider,cv-tip,cv-swatch,cv-skeleton,cv-toast. - Dialogs: 28px radius. Rail tooltips with 600ms delay. Focus-visible rings.
Media
- Image adjustments (brightness/contrast/saturation via Konva filters), horizontal &
vertical flips,
replaceSelectedImage,addImageAt,readImageFilehelpers.
Technical
qrcodedependency added.- Type-check, ESLint and production build clean; full E2E pass (29 checkpoints, zero console errors); VLM visual parity 8.5–9/10 across key surfaces.
[0.2.0] — 2026-08-31
Canva-accurate dark re-skin from live-site research: gradient topbar, 8-tab rail, text effects (5), freehand draw, brand kit, charts, preview, share, resize, Canva-style dashboard & mobile polish.
[0.1.0] — 2026-08-30
Initial release: Konva.js editor (text/shapes/lines/graphics/stickers/images), smart snapping, layers, templates, dashboard, autosave, PNG/JPG export, responsive mobile/tablet/desktop UI.
Evaluation note — v0.32.7
The live benchmark spec exists (tests/e2e/live-agent-benchmark.spec.ts,
CANVIX_BENCH_LIVE=1, writes docs/BENCHMARK-v0.32.7.md itself). Both
session attempts were cut short by the provider gateway's real rate
limits; no completion rates are claimed and the milestone PR was not
merged on mocked results alone.
v0.34.0-a · the PR #95 reconciliation — spatial intelligence, intents, persistent runs, provider resilience, authoritative re-audit
PR #95 (feat/v0327-spatial-resilience, 196c502) developed in parallel to main's v0.32.8/v0.33.x and was never merged; this merge folds its architecture into the v0.33.1 base on feat/v0340-quality-convergence:
- spatial.ts — rotation-aware AABBs, z-order, INTENTIONAL layering (card-behind-text is not a collision), section-scale band blocking, 2D free regions, the hierarchy ladder.
- intent.ts — add/replace/reposition/restyle/redesign/remove/refine/ review classification; the plan-first gate now fires only for create/add/redesign (SSE intent event + panel display).
- persistent execution — DesignAgentRun.status/state (migration 0016); live persistence via the loop's persistRun; an interrupted run's next message gets the snapshot as recovery context.
- provider resilience — chat-resilience.ts: bounded exponential backoff, per-provider circuit breaker, the CONFIGURED fallback chain (BYOK → instance → env/file), gateway token accounting — SUPERSEDES v0.33.0's inline chat retry (route.ts).
- authoritative re-audit — exactly ONE fix round, then the re-audit is authoritative: remaining BLOCKING issues end the run INCOMPLETE (never a success claim); advisories disclose only. The v0.32.8 "second fix round + disclosed residue" contract is retired (tests updated; the superseded describe dropped).
- router: the fix/improve family classifies deterministically — a write request never needs a provider to be classified (the discuss-misroute fix), plus 5 regressions from the live session.
Merge resolution notes: 5 conflicted files; the PR's side taken for the audit-round contract (the user's mandate rejects disclosed- unfixed residue), ours kept for plan scaling/capture emission/ type#id alias/recovery note + all v0.33.x work; the harness union keeps both suites (180/180) with the superseded contract tests updated to the INCOMPLETE verdict.
Verified on the branch: typecheck, lint, build green; full suite 1,830/1,830 (131 files — +spatial +intent +chat-resilience).
feat(v0.34.0): the deterministic correction engine — convergence in code, authoritative execution, semantic verification, batch placements
The v0.33.1 live repro terminated via the idle guard with 12 disclosed-unfixed audit issues; every one was mechanically repairable. This milestone makes the run CONVERGE instead of disclosing residue (plus the reconciliation merge of PR #95 above):
- repair.ts — the deterministic correction engine. Covered texts are RAISED above their opaque coverers (reorderLayers, never moved or rewritten); entirely-off-canvas elements are clamped back inside (deliberate full-bleed is never touched); unreadable text gets the first passing fill from a deterministic ladder (white → black → ±25%/±50% shades of the authored fill — the palette survives when possible); sliver assets scale to visibility keeping aspect + centre. Locked elements and intentional layering are never touched; nothing repairs without a matching audit issue class (never speculative). The engine VERIFIES reality rather than trusting issue strings (a "low contrast" claim that computes to 3.17:1 is not "repaired").
- Loop wiring — repair before the LLM round. The audit round now plans + applies the deterministic repair through the same acked bridge as model actions (undoable, authoritative), re- audits, and only sends the REMAINING blocking issues to the model's single fix round. The repair is disclosed as an observation and counted in the verification log.
- Authoritative adds (client). An add action is confirmed against the store — the element count must actually grow; an apply that produced no change acks FAIL (addStockPhoto downloads asynchronously and is disclosed; addPage adds a page).
- Semantic illustration verification. The illustration concept is extracted from the brief ("central TECHNOLOGY illustration" → technology); qualification is IMAGE elements only at ≥10% of the page, and a named asset must relate to the concept (stemmed word match against the name/alt — illustrations now stamp "Circuit board (tech pack)"). An arbitrary birthday-cake photo no longer satisfies a technology-illustration requirement by area. Unnamed elements still qualify by area — the vision round judges their relevance. The composition prompt respects minimalism.
- add_many — batch placements. Up to 10 placement tools (add_text/add_shape/add_sticker/add_icon/add_illustration/ add_image/add_qr) in ONE round-trip; every item is sanitized exactly as a direct call and one bad item rejects the whole batch with its index (never a partial apply). A full poster lands in ~4-6 calls instead of 20+ single placements.
Verified on the branch: harness 188/188 (+13; the repair engine 8, batch 5, semantic 2, the live integration 1 — covered text + low contrast repaired in code, re-audit authoritative-clean, done accepted, zero extra model turns); full suite 1,846/1,846 across 132 files; typecheck, lint and production build green.
Fixed — v0.34.1: the wrap-up repair — a guard exit fixes what code can fix before disclosing
The 27 Nov live evaluation (the NEON after-run, 38 steps · 40 actions) ended at the CYCLE guard with 12 disclosed-unfixed low-contrast issues — every one a fill-ladder fix. The deterministic repair only ran on the DONE path; a run that wraps at a guard exit (idle/cycle/strikes) never reached it. guardExit now plans + applies the deterministic repair FIRST (no model round-trip — the run is ending anyway; the repairs ride the same acked bridge, undoable + authoritative), re-audits, and discloses only the genuine residue. The wrap-up message says "residue after the deterministic repair".
Harness: +1 regression (the cycle-guard wrap-up with contrast residue applies the repair through the bridge, re-audits, then discloses) — 1,847/1,847 across the full suite.