Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

A draft's link tells visitors to ask for an updated link, and tells its own organizer the same

未关闭
#583 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@richshaw 已经在做这个了。

开始于 2026年10月27日。

  • #690 来自 @richshaw —— 未关闭

评估

难度
4/5
预计耗时
3-5 天
新手友好度
56/100
Issue 类型
功能
描述清晰度
描述清楚
活跃度
活跃

调研方向

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 内容生成。

描述

bug pipeline:proposed pipeline:ux

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. createSignup sets 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 in src/services/signups.ts, say findDraftForOrganizer(db, actor, slug). It finds the live draft by slug, calls requireWorkspaceAccess(actor, row.workspaceId), and returns only the id. Treat a forbidden as not found.
  • When it finds the draft, render SignupStateMessage with the organizer's words and an action link 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 its details would reach anyone who asks. Keep the organizer lookup as its own guarded read.
  • Policy. The new read calls requireWorkspaceAccess before 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 build still 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.ts and the create_signup description in src/mcp/tools/signups-write.ts say links.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, not requireWorkspaceWrite). 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 test and pnpm test:db pass.

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 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

richshaw/OpenSignup 的其他 Issue

查看 richshaw/OpenSignup 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。