Skip to content

[DONE] 지워졌거나 비공개인 패턴, 덱, 프로필 링크가 커뮤니티 안에서 까닭을 말한다 - #284

Merged
patternflow-bot merged 5 commits into
devfrom
claude/lsh-pf-round113-xoxwcf
Oct 26, 2026
Merged

patternflow-bot merged 5 commits into
devfrom
claude/lsh-pf-round113-xoxwcf

Conversation

@patternflow-bot

@patternflow-bot patternflow-bot commented Oct 26, 2026 •

Copy link
Copy Markdown

lsh / https://claude.ai/code/session_0144197Fr8EzfnY6hHMpFpaU

커뮤니티에 404 쪽을 따로 두고, 패턴 · 덱 · 프로필 쪽의 메타데이터도 없는 줄에서 404 를 내게 했어요. 머지하면 지워졌거나 남이 비공개로 돌린 패턴 · 덱, 없는 프로필 주소가 크림색 「404」 와 첫 화면 링크 대신 커뮤니티 머리와 탭 바 안에서 까닭을 말하고 「Browse patterns →」 로 벽에 돌아가요. 없는 줄의 탭 제목도 「Not found / Patternflow Community」 가 돼요.

좋아지는 것: 지워진 패턴 링크가 커뮤니티 안에서 까닭을 말한다 — 첫 화면으로 튕기지 않고 벽으로 돌아간다

한 일

  • web/src/app/community/not-found.tsx 를 새로 뒀어요. 커뮤니티의 빈 상태 판(emptyPanel)을 그대로 써서 「404 · not here」, h1 「Nothing at this address.」, 「Whatever was here has been deleted, or its owner made it private. A mistyped link lands here too.」, /community/patterns 로 가는 「Browse patterns →」 하나를 그려요. 커뮤니티 레이아웃 안에서 그려져서 머리, 메뉴, 탭 바, 바닥 줄이 남아요. metadata 로 탭 제목을 「Not found / Patternflow Community」 로 둬요.
  • app/community/p/[id]/page.tsx, d/[id]/page.tsx, u/[username]/page.tsx 의 generateMetadata 가 줄이 없으면 {} 대신 notFound() 를 불러요. 쪽 본문만 404 를 내면 브라우저 탭은 레이아웃의 「Community / Patternflow」 를 그대로 읽어요(아래 「가정」 첫 줄). 비공개 줄은 지금처럼 {} 예요.
  • web/src/app/community/not-found.test.tsx 는 렌더 시험 둘과 메타데이터 시험 다섯이에요. 렌더 시험은 h1 글, 링크가 /community/patterns 하나뿐인지, 탭 제목을 봐요. 메타데이터 시험은 빈 스크래치 DB 에 ada 와 비공개 패턴 · 덱을 넣고 세 쪽의 진짜 generateMetadata 를 돌려요. 없는 패턴 · 덱 · 프로필은 404 로 던지고, 비공개 패턴 · 덱은 {}, 있는 프로필은 「@ada / Patternflow Community」 예요.

증거

폰 390 · 지운 패턴 주소 · 고친 뒤
폰 390 · 지운 패턴 주소 · 고치기 전
데스크톱 1440 · 지운 패턴 주소 · 고친 뒤
폰 390 · 없는 프로필 · 고친 뒤

Pi 와 같은 NEXT_PUBLIC_COMMUNITY_URL, NEXT_PUBLIC_BUILD_ENABLED 로 빌드하고, 스크래치 DB 에 ada 와 eve, ada 의 비공개 패턴 「Night bus window」 와 비공개 덱 「Late set」, 공개로 올렸다 지운 「Grid」 를 HTTP 로 넣었어요. playwright-core 1.56.1 로 손님이 연 뒤의 document.title 과 h1 이에요. 390(isMobile, hasTouch)과 1440 이 같았고, 가로 넘침은 다 390/390, 1440/1440 이에요. 고치기 전은 같은 DB 에 dev 를 다시 빌드해서 쟀어요.

                                    dev                                       이 PR
/community/p/<지운 Grid>           404 "Community / Patternflow" · "404"     404 "Not found / Patternflow Community" · "Nothing at this address."
/community/p/0000000000000000      404 "Community / Patternflow" · "404"     404 "Not found / Patternflow Community" · "Nothing at this address."
/community/u/nobody404             404 "Community / Patternflow" · "404"     404 "Not found / Patternflow Community" · "Nothing at this address."
/community/d/0000000000000000      404 "Community / Patternflow" · "404"     404 "Not found / Patternflow Community" · "Nothing at this address."
/community/p/<ada 의 비공개>       404 "Community / Patternflow" · "404"     404 "Community / Patternflow" · "Nothing at this address."

dev 는 「RETURN TO MAIN」(/)만 보였고, 이 PR 은 커뮤니티 머리, 탭 바, 바닥 줄과 「Browse patterns →」(/community/patterns)를 보여요. 주인 쪽은 그대로예요.

손님 · eve  /community/p/<ada 의 비공개>   404 · "Nothing at this address."
손님 · eve  /community/d/<ada 의 비공개>   404 · "Nothing at this address."
ada         /community/p/<ada 의 비공개>   200 "Community / Patternflow" · "Night bus window"
ada         /community/d/<ada 의 비공개>   200 "Community / Patternflow" · "Late set"
손님        /community/p/<공개 Tide>        200 "Tide / Patternflow Community" · "Tide"
손님        /community/u/ada                200 "@ada / Patternflow Community" · "@ada"

curl 로 받은 네 주소(없는 패턴, 프로필, 덱, 운영자가 아닌 eve 의 /community/reports)는 다 404 에 <title>Not found / Patternflow Community</title> 였고, RSC 데이터에 "href":"/community/patterns","className":"…emptyCta" 가 있었어요. HTML 본문은 비어 있어요. Next 16 은 쪽이 껍데기 안에서 notFound() 를 던지면 <html id="__next_error__"> 껍데기를 보내고 브라우저가 RSC 데이터로 그려서예요. dev 의 뿌리 404 도 같은 길이에요.

새 시험을 dev 의 세 쪽으로 돌렸을 때:

 FAIL  src/app/community/not-found.test.tsx > a gone row's metadata > 404s for a pattern that is not there
AssertionError: promise resolved "{}" instead of rejecting
 FAIL  src/app/community/not-found.test.tsx > a gone row's metadata > 404s for a deck that is not there
AssertionError: promise resolved "{}" instead of rejecting
 FAIL  src/app/community/not-found.test.tsx > a gone row's metadata > 404s for a profile that is not there
AssertionError: promise resolved "{}" instead of rejecting
      Tests  3 failed | 4 passed (7)

not-found.tsx 까지 없는 dev 에선 Failed to resolve import "./not-found" 로 파일째 빨개요. 고친 뒤:

 ✓ src/app/community/not-found.test.tsx (7 tests) 1417ms
      Tests  7 passed (7)

다섯 검사(web/ 에서, 9e0fd85):

npm ci                              → exit 0
npm run lint -- --max-warnings=0    → exit 0
npm run typecheck                   → exit 0
npm run build                       → ✓ Compiled successfully in 15.1s · exit 0
npm run check:ci                    → Test Files 111 passed (111) · Tests 1380 passed (1380)
                                      drift: passed 14, skipped 2 (links-absolute, roadmap) · exit 0
npm run check:voice                 → check:voice: nothing found

실행법

# web/ 에서
npx vitest run src/app/community/not-found.test.tsx
NEXT_PUBLIC_COMMUNITY_URL=http://localhost:3100 NEXT_PUBLIC_BUILD_ENABLED=1 npm run build
COMMUNITY_ENABLED=1 COMMUNITY_DB_PATH=<스크래치>/community.db BETTER_AUTH_SECRET=<아무 글> BETTER_AUTH_URL=http://localhost:3100 npx next start -p 3100
curl -s -o /dev/null -w "%{http_code}\n" http://localhost:3100/community/p/0000000000000000

가입은 /api/auth/sign-up/email, 패턴과 덱은 /api/community/patterns, /api/community/decks 에 visibility: "private" 로, 지우기는 DELETE /api/community/patterns/<id> 로 했어요. playwright-core 는 스크래치 폴더에 깔았고 package.json 은 그대로예요.

가정

  • 표의 고칠 곳은 not-found.tsx 하나였어요. 그 파일만 두고 빌드하니 curl 이 받은 HTML 머리는 「Not found / Patternflow Community」 였는데 브라우저 탭은 다섯 주소 모두 「Community / Patternflow」 였어요. 브라우저가 그리는 RSC 데이터의 머리는 쪽의 generateMetadata 가 정하고, 그 함수가 없는 줄에 {} 를 돌려줘서예요. 까닭 칸이 탭 제목을 꼽아서 세 쪽의 generateMetadata 한 줄씩을 이 바퀴에 넣었어요.
  • 남의 비공개 패턴과 덱은 판은 이 404 인데 탭은 「Community / Patternflow」 그대로예요. 메타데이터에서 보는 사람을 가리려면 세션을 한 번 더 읽어야 하고, 주인의 탭도 일부러 그 이름이라 뒀어요.
  • 글 하나가 패턴, 덱, 프로필을 다 말해요. 프로필엔 비공개가 없지만 지운 계정은 이 글에 맞아요. 운영자가 아닌 사람이 연 /community/reports, /community/featured 도 이 판을 그려요. 대기열이 있다는 말은 이 판에 없어요.
  • 표 밖: 운영자가 아닌 사람이 /community/reports 를 열면 판은 이 404 인데 탭은 「Reports / Patternflow Community」, /community/featured 는 「Marquee / Patternflow Community」 예요. 두 쪽의 고정 metadata 때문이에요. reports/page.tsx:29~:30 주석은 대기열이 있다는 걸 손님에게 알리지 않으려고 404 를 낸다고 해요.
  • 표 밖: /community/nothing-here 처럼 커뮤니티 안의 모르는 주소는 맞는 길이 없어서 여전히 뿌리 404(탭 「Patternflow — An LED synthesizer」, 「404」)예요. not-found.tsx 는 notFound() 를 부른 쪽만 받아요.

Changelog

Web

  • A deleted or private community link says so inside the community. Pattern, deck and profile pages that 404 fell through to the site's root page, a bare "404" linking to the landing page. They now keep the community header and tabs, say the page was deleted or made private, link to the patterns wall, and title the tab "Not found" when the row is gone.

경험

언제: Next 16 에서 동적 쪽이 notFound() 를 부를 때 탭 제목을 잴 때
교훈: curl 로 받은 HTML 머리의 <title> 은 오류 껍데기 몫이라 브라우저 탭과 다를 수 있으니, 탭 제목은 Playwright 로 연 뒤 document.title 로 재요
근거: #284 에서 not-found.tsx 의 metadata 만 두니 curl 은 「Not found / Patternflow Community」, 브라우저 탭은 「Community / Patternflow」 였고, 쪽의 generateMetadata 가 notFound() 를 부르자 탭도 바뀌었어요

바퀴

바퀴 113 · 후보 8 「지워졌거나 비공개인 패턴, 덱, 프로필 링크가 커뮤니티 안에서 까닭을 말한다」

다음 바퀴

  • 9위 「머리줄의 알림 수가 알림 쪽을 열면 사라지고, 쪽에 보이지 않는 알림은 세지 않는다」: 레이아웃이 수를 한 번만 읽고, 세는 쿼리가 목록의 거르기를 따르지 않아요.
  • 10위 「커뮤니티 쪽이 Pattern Lab 코드 218 KB 를 뒤에서 받지 않는다」: 머리의 /pattern-lab Link 가 Lab 덩이 여덟을 미리 받아요.
  • 11위 「빌드 경로 둘이 이상한 몸과 이름에 500 이나 빈 200 대신 400 과 404 를 돌려주고, 처음 시험을 얻는다」: {patterns:[null]} 이 CORS 없는 500, ?file=__proto__ 가 빈 200 이에요.

https://claude.ai/code/session_0144197Fr8EzfnY6hHMpFpaU


Generated by Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0144197Fr8EzfnY6hHMpFpaU
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0144197Fr8EzfnY6hHMpFpaU
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0144197Fr8EzfnY6hHMpFpaU
@patternflow-bot patternflow-bot changed the title [WIP] 113바퀴 — 이번 바퀴에 고칠 것을 고르는 중 [WIP] 지워졌거나 비공개인 패턴, 덱, 프로필 링크가 커뮤니티 안에서 까닭을 말한다 Oct 26, 2026
@patternflow-bot patternflow-bot changed the title [WIP] 지워졌거나 비공개인 패턴, 덱, 프로필 링크가 커뮤니티 안에서 까닭을 말한다 [DONE] 지워졌거나 비공개인 패턴, 덱, 프로필 링크가 커뮤니티 안에서 까닭을 말한다 Oct 26, 2026
@patternflow-bot
patternflow-bot marked this pull request as ready for review October 26, 2026 15:39
@patternflow-bot
patternflow-bot merged commit 1ef2731 into dev Oct 26, 2026
2 checks passed
@patternflow-bot
patternflow-bot deleted the claude/lsh-pf-round113-xoxwcf branch October 26, 2026 15:39
engmung pushed a commit to engmung/Patternflow that referenced this pull request Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants