A draft's link tells visitors to ask for an updated link, and tells its own organizer the same
维护者通常 1 天内回复
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 56/100
- Issue 类型
- 功能
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- next.js, typescript
调研方向
Start with the draft branch in src/app/s/[slug]/page.tsx, then read getOrganizerSession in src/auth/session.ts and the workspace access checks in src/services/signups.ts. Trace the existing SignupStateMessage and draft Build link patterns before adding the guarded lookup. Verify visitor, workspace member, and other workspace views, add the requested DB cases, and run the listed checks; pnpm build should still show /s/[slug] as dynamic.
由索引模型根据 Issue 内容生成。
描述
Needs your OK: this changes what a draft's public link says. Visitors get new words, and a signed-in organizer who can open the draft gets a note and a link back to it. Swap pipeline:proposed for pipeline:ready to have it built.
What happens
Opening a draft's public link shows the received === 'draft' branch of PublicSignupPage in src/app/s/[slug]/page.tsx:
This signup isn’t ready yet
The organizer hasn’t published this signup yet. Check back soon or ask them for an updated link.
- "Ask them for an updated link" is wrong.
createSignupsets the slug once, and publishing changes only the status. The same link works as soon as the signup is published. A visitor who asks for a new link gets the same one back. An organizer who is asked may think the link they sent is broken. - The organizer gets the visitor's message too. The page never reads the organizer's session. An organizer who opens their own draft's link sees "ask them for an updated link", with nothing to say it's their draft, that people can't see it yet, or where to publish it.
#578 takes the public link out of a draft's header, so organizers will reach this page less often. They still get the link in other ways: as links.public from the AI connector tools, from Magic Compose and from the API, or as a link they copied earlier.
To see it: on a fresh local instance, create a signup by hand and don't publish it. Open /s/<its slug> in a private window, then in the window where you're signed in. Both show the visitor message.
Fix, in outline
- Visitors: keep the title. Change the body to say the link will work once the signup is published (wording under "Choices this makes").
- Organizers: in the draft branch only, read the session with
getOrganizerSession(src/auth/session.ts). If there is one, call a new guarded read insrc/services/signups.ts, sayfindDraftForOrganizer(db, actor, slug). It finds the live draft by slug, callsrequireWorkspaceAccess(actor, row.workspaceId), and returns only the id. Treat aforbiddenas not found. - When it finds the draft, render
SignupStateMessagewith the organizer's words and anactionlink to/app/signups/<id>/build. - Otherwise, show the visitor message.
Watch for
- Read the session only in the draft branch. An open or closed signup's page must not call
auth()or depend on an organizer session. Participants aren't users, and that page is their hot path. - Don't put the id in
getPublicSignup's error.GET /api/public/signups/[slug]sends that error back unchanged, so an id in itsdetailswould reach anyone who asks. Keep the organizer lookup as its own guarded read. - Policy. The new read calls
requireWorkspaceAccessbefore it returns anything. A signed-in organizer from another workspace sees the visitor message. - Caching. The page already reads cookies for returning participants and renders per request. Check that
pnpm buildstill lists/s/[slug]as dynamic (ƒ). - No new cookie or stored data. The cookies page already says the Auth.js session cookie "keeps organizers signed in". Check that it still reads true. The privacy and terms pages need no change.
- Overlap with #578. It removes the help article's "Until you publish, it only says the signup isn't ready." and the draft-link check in
tests/e2e/help/create-and-publish-a-signup.spec.ts, which matches/isn.t ready yet/. Whichever lands second merges. - The AI connector texts.
src/mcp/instructions.tsand thecreate_signupdescription insrc/mcp/tools/signups-write.tssaylinks.public"only says the signup is not ready yet". That stays true for visitors. - The archived message ("ask for a new link") is a separate case and stays as it is.
- CHANGELOG entry.
Choices this makes
- The visitor's words: "The organizer hasn’t published it yet. This link will work once they do, so check back later." Default: these words. They drop the request for a new link and say what's true.
- The organizer's words: title "Only you can see this draft". Body: "People who open this link see “This signup isn’t ready yet” until you publish it. The link stays the same." Link: "Open your draft". Default: these words. The title matches the draft header's line in #578.
- Who gets the organizer note: any member of the signup's workspace, viewers included. Default: any member (
requireWorkspaceAccess, notrequireWorkspaceWrite). A viewer can still open the draft, and Publish already tells a viewer "You don’t have edit access." - Where the link goes: the Build tab, where Publish is. Default: Build. The preview page has no Publish button.
- A line for everyone instead of reading the session ("Made this signup? Sign in to publish it."): Default: no. It shows organizer instructions to every visitor, and still doesn't tell the organizer that this is their draft.
Done when
- A signed-out visitor who opens a draft's link sees the new words, with no request for an updated link.
- A signed-in member of the signup's workspace sees the organizer note, with a link to the draft's Build tab.
- A signed-in organizer from another workspace sees the visitor message.
- An open signup's page reads no session: the session is read only in the draft branch.
- A DB test covers the new read for a member, a non-member, a published signup and a deleted draft.
pnpm lint && pnpm typecheck && pnpm knip && pnpm testandpnpm test:dbpass.
Found by the UX walkthrough (scenario O1) on 2026-10-24, and checked against the code on main at 4ed27a9.
Generated by Claude Code
- 主要语言
- TypeScript
- 星标
- 19
- 派生
- 4
- 平均合并
- 21 小时 3 分钟
- 30 天内合并 PR
- 176
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
richshaw/OpenSignup 的其他 Issue
-
enhancement pipeline:proposed pipeline:ux
难度 2/5 1-3 小时 新手友好度 72/100
richshaw/OpenSignup#654 ·
维护者通常 1 天内回复
-
The help pages never say "pause", so organizers looking for it miss Close or reopen a signup可能已有人在做 @richshaw 今天认领。 未关闭enhancement pipeline:building pipeline:ux
难度 2/5 1-3 小时 新手友好度 82/100
richshaw/OpenSignup#653 · 已指派 1 人 ·
维护者通常 1 天内回复
-
enhancement pipeline:proposed pipeline:ux
难度 2/5 1-3 小时 新手友好度 78/100
richshaw/OpenSignup#652 ·
维护者通常 1 天内回复
-
SMTP timeout notes in smtp.ts and the changelog describe nodemailer 10.0, not 10.1可能已有人在做 @agammann 于 2 天前认领。 未关闭enhancement good first issue pipeline:ready
难度 2/5 1-3 小时 新手友好度 82/100
richshaw/OpenSignup#645 ·
维护者通常 1 天内回复
-
enhancement pipeline:proposed pipeline:ux
难度 2/5 1-3 小时 新手友好度 76/100
richshaw/OpenSignup#589 ·
维护者通常 1 天内回复
查看 richshaw/OpenSignup 的全部 Issue
相似的 Issue
-
calcite-ui-icons enhancement impact - p3 - not time sensitive needs triage
难度 2/5 1-3 小时 新手友好度 67/100
Esri/calcite-design-system#15467 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
diegosouzapw/OmniRoute#18390 ·
-
难度 2/5 1-3 小时 新手友好度 65/100
-
难度 1/5 1-3 小时 新手友好度 86/100
guilhermerodz/input-otp#157 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 82/100
davidjerleke/embla-carousel#1414 ·
维护者通常 4 天内回复