Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

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

Abierto
#583 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
56/100
Tipo de issue
Nueva funcionalidad
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
next.js, typescript

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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

Lenguaje dominante
TypeScript
Estrellas
19
Forks
4
Merge medio
20 h 9 min
PR fusionados (30 d)
156

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de richshaw/OpenSignup

Todos los issues de richshaw/OpenSignup

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.