Repository navigation
Preview mode in the public form app - #270
Conversation
With ?preview=1 on the form page, the app asks for a preview session, starts at ?block= when that question is shown, skips uploads, the redirect and the "Leave site?" prompt, and shows its error state when the server refuses the preview. It tells the parent window which question shows and goes to a question the parent asks for, both on the same origin only. An embed on another site never runs a preview. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PhilReinking
left a comment
There was a problem hiding this comment.
OK at c7f91b3. No CI (stacked), local runs: Vitest 252, lint, vue-tsc, build, PHP suite on MariaDB 729 passed / 9 skipped.
8 new tests fail on the base. Beyond that: the form posts only to its own origin and listens only to its parent on that origin. An embed never enters preview (iptSettings is only on the form page). A guest or another team gets "Form not found". A question that isn't shown is ignored as a start.
…-app # Conflicts: # CHANGELOG.md
PhilReinking
left a comment
There was a problem hiding this comment.
OK at 8317c2b, CI green. The merge of main changes only CHANGELOG.md by hand: main's #262 and #266 lines stay as on main, and the #270 line follows them. The PR's own diff against main is byte for byte the reviewed one from c7f91b3. Main has since moved on with #278 (API doc text and rule checks only). A trial merge with it is clean and keeps every changelog line.
The editor's live preview will show the public form page in a frame. With
?preview=1on that page, the app now runs as a preview and uses the preview session from #266, so nothing is stored. Outside preview nothing changes.Part of BITS-285
?block=<uuid>when that question is shown, else at the first one. Back goes to the question before it.input:preview:blockwhen a question shows, goes to a question oninput:preview:goto.?preview=1in its URL.Tested: Vitest, lint, vue-tsc, build, PHP suite on MariaDB, locally (stacked PR, no CI). New tests fail without the change. In a browser: previews store nothing, guests are refused.
Not tested: the editor's preview panel (next part), and an embed on a page whose URL has
?preview=1.🤖 Generated with Claude Code