screentinker/server
ScreenTinker 4cc8ccb67e fix(ai): keep generated designs inside the canvas (#41)
Text could run off the edge (long/large headlines, nowrap) and shapes placed at
the far edge (e.g. a bottom band at y=100) spilled over.

- Server-side fit pass on every generated element: shrink text fontSize so it
  fits the canvas width (chars*fontSize*0.075, tuned for bold/uppercase
  headlines) and height (incl. line-height), then nudge x/y within 4% margins;
  clamp shapes so x+width<=100 and y+height<=100. Deterministic - doesn't rely on
  the model getting layout right.
- Designer preview: vw -> cqw (+ container-type on the canvas) so text scales to
  the canvas, not the browser window. The preview was overstating size vs what
  actually publishes; now it matches. Published widget keeps vw (scales on the
  player).

Verified: Playwright DOM check shows zero elements overflowing the canvas after
generation; unit test asserts long text is shrunk + repositioned in-bounds. 62/62.
2026-06-09 12:51:23 -05:00
..
config fix: log real client IPs through Cloudflare instead of CF edge 2026-05-07 15:26:37 -05:00
db feat(ai): AI content design in the Designer, BYO endpoint (#41 Phase 1) 2026-06-09 12:23:55 -05:00
lib feat(ai): AI content design in the Designer, BYO endpoint (#41 Phase 1) 2026-06-09 12:23:55 -05:00
middleware fix(security): patch quick-win findings from the codebase review 2026-06-08 19:02:19 -05:00
player fix(player-web): don't optimistic-render fullscreen when layout is unknown 2026-06-09 08:30:58 -05:00
routes fix(ai): keep generated designs inside the canvas (#41) 2026-06-09 12:51:23 -05:00
services feat(signup): T+3 activation nudge for users with zero paired screens 2026-05-30 20:28:24 -05:00
test fix(ai): keep generated designs inside the canvas (#41) 2026-06-09 12:51:23 -05:00
ws feat(debug): live per-device debug logging toggle on the device screen 2026-06-08 21:49:03 -05:00
.gitignore feat(email): Microsoft Graph send + alert spam protection + preferences UI 2026-05-12 18:16:40 -05:00
config.js feat(signup): optional org-on-create for self-service signups (#12) 2026-06-05 11:16:27 -05:00
package-lock.json feat(email): Microsoft Graph send + alert spam protection + preferences UI 2026-05-12 18:16:40 -05:00
package.json test(admin): node:test coverage for Add User + role gating 2026-06-05 11:23:06 -05:00
server.js feat(ai): AI content design in the Designer, BYO endpoint (#41 Phase 1) 2026-06-09 12:23:55 -05:00