Repository navigation
feat(api): return publicUrl and editorUrl on v1 form responses - #223
Merged
Merged
Conversation
The web builds every form link with publicFormPath. The API is about to hand the same link to agents, so the rule moves to @quill/shared (with an editor path and a formLinks helper that joins both onto PUBLIC_APP_URL), and the web module re-exports it instead of keeping its own copy. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Josue Hernandez <josue@daptatech.com>
getAccountPublicCode returns the vanity slug when claimed, else the short code: the first segment of a form link, as the dashboard builds it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Josue Hernandez <josue@daptatech.com>
Create, get, list (each item), update, slug, duplicate and publish now carry the form's public link and its builder link, built with the shared publicFormPath on PUBLIC_APP_URL and the workspace's canonical code. Both are null when PUBLIC_APP_URL is empty. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Josue Hernandez <josue@daptatech.com>
…STALE A guarded PUT or publish that loses the optimistic lock answers 409 with the form as it is now. That `current` was masked but had no links, so it was the one form in the admin API without `publicUrl`/`editorUrl`. `unwrapGuarded` now takes the controller's `formView` to shape it like every other response. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Josue Hernandez <josue@daptatech.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Every form returned by the v1 admin API now carries
publicUrl(the link respondents open) andeditorUrl(the builder link), so API clients and agents can share or open a form without rebuilding URLs themselves. Both arenullwhenPUBLIC_APP_URLis not configured.Changes
@quill/shared: the public form link rule moves into a sharedform-linksmodule (publicFormPath,formEditorPath), used by the API and already matching the web.@quill/db: new read for one workspace's canonical public code, so links use the vanity slug once the workspace claims one.apps/api: list, get, create, update, slug rename, duplicate and publish responses include both links; the list reads the account once.currentwith both links too.@quill/sharedand@quill/db.How it was tested
pnpm test: 16/16 tasks pass (api 740, web 1208, db 348, shared 80).PUBLIC_APP_URLempty or unset.pnpm changeset statusOK.Review notes
An independent review found that the 409 STALE
currentform was the only admin API form without the links. Fixed in c70d70b with a test that fails without the fix. Follow-ups left out of scope: per-route OpenAPI wording (#57) and switching the web toformEditorPath.Coordination
Parallel API v1 PRs (#55, #57) may touch the same OpenAPI description lines and
developer-docs.tsx; expect a small conflict there when merging in sequence.🤖 Generated with Claude Code