feat(drafts): drafts list and public shared-draft pages - #108
Open
douglance wants to merge 1 commit into
Open
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
douglance
force-pushed
the
siwe/drafts-pages
branch
from
August 19, 2026 21:02
59f8815 to
bdb101a
Compare
douglance
force-pushed
the
siwe/drafts-pages
branch
from
August 20, 2026 16:45
bdb101a to
9bdbce1
Compare
fionnachan
force-pushed
the
siwe/drafts-pages
branch
from
August 20, 2026 16:55
9bdbce1 to
e46c30d
Compare
douglance
force-pushed
the
siwe/drafts-pages
branch
from
August 24, 2026 16:26
e46c30d to
a730acf
Compare
Adds /drafts (own drafts: open in the form, publish, copy share link, delete) and /drafts/shared/[slug] (public read plus the mark-submitted form). Between them these cover the eight draft routes the UI previously never called. Extracts SignInGate from ProfileEditor rather than copying its connect-then-sign-in preamble into a second page. Gating at the boundary means both surfaces can assume a session exists instead of each carrying its own early returns, and ProfileEditor loses ~45 lines along with four now-unused session fields. The siwe-sign-in and siwe-error testids move with the markup, so the existing profile spec is unaffected. The shared view renders draft markdown through getProposalPreviewRehypePlugins(), which orders rehypeRaw before rehypeSanitize. That ordering is load-bearing here: the body is authored by anyone who can create a draft and this page is public and unauthenticated, so sanitizing before raw HTML is expanded would let raw HTML through unsanitized. Publish and delete confirm on the row itself rather than in a dialog, so it is never ambiguous which draft is about to change. Both are irreversible. Verified: lint clean, tsc clean, 1251 unit tests, build emits /drafts static and /drafts/shared/[slug] on demand.
douglance
force-pushed
the
siwe/drafts-pages
branch
from
August 27, 2026 18:08
a730acf to
dd0b178
Compare
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.
Adds
/drafts(own drafts: open in the form, publish, copy share link, delete) and/drafts/shared/[slug](public read plus the mark-submitted form). Between them these cover the eight draft routes the UI previously never called.SignInGate
Extracted from
ProfileEditorrather than copying its connect-then-sign-in preamble into a second page. Gating at the boundary means both surfaces can assume a session exists instead of each carrying its own early returns, andProfileEditorloses ~45 lines plus four now-unused session fields. Thesiwe-sign-inandsiwe-errortestids move with the markup, so the existing profile spec is unaffected.Markdown plugin ordering is load-bearing here
The shared view renders draft markdown through
getProposalPreviewRehypePlugins(), which ordersrehypeRawbeforerehypeSanitize. This body is authored by anyone who can create a draft and the page is public and unauthenticated, so sanitizing before raw HTML is expanded would let raw HTML through unsanitized.Note
components/proposal/ProposalDetail.tsxuses the opposite order inline. Out of scope for this PR — it renders on-chain proposal descriptions — but worth a look.Confirmations
Publish and delete confirm on the row itself rather than in a dialog, so it's never ambiguous which draft is about to change. Both are irreversible.
Verified: lint clean, tsc clean, 1251 unit tests, build emits
/draftsstatic and/drafts/shared/[slug]on demand.