- Add 1536x864, 864x1536, 2048x1152, 1152x2048, 2560x1440 to the size
dropdown. 2560x1440 is the OpenAI cookbook's recommended upper
widescreen reliability boundary
- Note that sizes above 2560x1440 are experimental and the max-edge
rule is strictly <3840 (3840x2160 is out, use 3824x2144 instead)
- 1920x1080 is invalid because 1080 isn't a multiple of 16 — captured
in AGENTS.md alongside the full constraint set so future agents stop
proposing it
- BASE_URL, API_KEY, MODEL now read from process.env (Bun auto-loads .env)
- requireEnv() fails fast at startup if any is missing
- request body simplifies to { prompt, size, referenceImages? }
- client drops the three fields from form and localStorage
- add .env.example as the variable-name source of truth
- AGENTS.md notes the 0.0.0.0 bind now exposes the upstream quota to
anyone reachable on the network
Server (index.ts):
- migrate to Hono streamSSE, mounted under Bun.serve fetch handler
- idleTimeout: 255 fixes the silent Bun 10s timeout that killed SSE
responses before the first keepalive could fire (root cause of the
empty EventStream tab)
- stream.onAbort wires an AbortController into upstream fetch signal
- 15s : keepalive raw SSE comments for Cloudflare 120s headroom
- decodeDataUrl returns Uint8Array<ArrayBuffer> for DOM Blob types
- chromeDevToolsAutomaticWorkspaceFolders: false silences the
'Unable to add filesystem' warning in sandboxed browsers
Client (client.ts new):
- extracted from inline <script> — Bun only bundles external script src,
not inline module imports, so node_modules bare specifiers must live
in their own file
- @microsoft/fetch-event-source replaces hand-rolled fetch +
ReadableStream parsing; supports POST + body + signal natively
- client aborts the loop on event:done so fetchEventSource doesn't retry
Build:
- drop unused react/react-dom/@types/react* deps (KISS)
- add 'DOM', 'DOM.Iterable' to tsconfig lib for client.ts