Repository navigation
[DONE] 커뮤니티의 펌웨어 안내 띠가 첫 그림부터 쪽에 있어서, 하이드레이션 뒤에 쪽 전체를 아래로 밀지 않는다 - #289
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01M3FRpN2cp7bV3HfRKRqsNS
The banner came in at hydration and pushed the page down 119px on a phone. A dismissal now goes into a cookie too, and the layout reads it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01M3FRpN2cp7bV3HfRKRqsNS
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01M3FRpN2cp7bV3HfRKRqsNS
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01M3FRpN2cp7bV3HfRKRqsNS
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01M3FRpN2cp7bV3HfRKRqsNS
patternflow-bot
marked this pull request as ready for review
October 26, 2026 18:23
engmung
pushed a commit
to engmung/Patternflow
that referenced
this pull request
Oct 27, 2026
engmung
pushed a commit
to engmung/Patternflow
that referenced
this pull request
Oct 27, 2026
Patternflow-lab#268 Patternflow-lab#271 Patternflow-lab#275 Patternflow-lab#276 Patternflow-lab#277 Patternflow-lab#279 Patternflow-lab#280 Patternflow-lab#281 Patternflow-lab#283 Patternflow-lab#284 Patternflow-lab#285 Patternflow-lab#286 Patternflow-lab#287 Patternflow-lab#288 Patternflow-lab#289 Patternflow-lab#290 Patternflow-lab#291 Patternflow-lab#292 Patternflow-lab#293 Patternflow-lab#294 Patternflow-lab#295 Patternflow-lab#296 Patternflow-lab#297 Patternflow-lab#298 Patternflow-lab#299 Patternflow-lab#300 Patternflow-lab#301 Patternflow-lab#302 Patternflow-lab#303
9 tasks done
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.
lsh / https://claude.ai/code/session_01M3FRpN2cp7bV3HfRKRqsNS
커뮤니티의 펌웨어 띠는 닫았는지를 브라우저만 알아서 하이드레이션 뒤에야 나왔어요. 이제 닫으면 쿠키에도 적고 레이아웃이 서버에서 읽어서, 닫지 않은 사람에겐 띠가 서버 HTML 부터 있어요. 머지하면 커뮤니티 쪽을 열 때마다 폰에서 본문이 119px, 데스크톱에서 55px 뒤늦게 밀리던 일(390px CLS 0.141)이 없어져요.
좋아지는 것: 커뮤니티 쪽이 열리자마자 펌웨어 띠가 제자리에 있다 — 본문이 뒤늦게 밀리지 않는다
할 일
## 바퀴)의 댓글 · 리뷰 · 줄 댓글: 하나도 없음12위는 바퀴 106117([DONE] 회원이 표시 이름을 남의 이름으로 바꿔 카드와 라이선스 머리에 그 사람으로 나오지 못한다 #275~[DONE] 로그인한 사람의 머리줄에 쪽을 열 때마다 「Sign in」 이 잠깐 뜨지 않는다 #288)이 했고, 13위가 남은 줄 23개 가운데 맨 위FirmwareNotice.test.tsx: dev 의 두 파일로 4개 빨강, 고친 뒤 5개 초록한 일
새
lib/community/firmwareNotice.ts에 띠가 말하는 판(manifest.version), 쿠키 이름pf-firmware-notice, 값이 이번 판을 닫는지 보는firmwareNoticeDismissed를 두었어요.FirmwareNotice.tsx는 클라이언트 컴포넌트라서, 서버 컴포넌트인 레이아웃이 거기서 이름을 가져오면 글 대신 참조를 받아요. 그래서 따로 뺐어요.components/community/FirmwareNotice.tsx는serverDismissed를 받아useSyncExternalStore의 서버 값으로 써요. 전엔() => true였어요. 브라우저 값은 쿠키와 localStorage 가운데 하나라도 이번 판이면 「닫음」이에요. ✕ 를 누르면 둘 다에 적어요. 쿠키는Path=/community; Max-Age=31536000; SameSite=Lax이고 https 면Secure를 붙여요. localStorage 에만 닫음이 있는 사람(이 PR 전에 닫은 사람)은 처음 여는 쪽에서 쿠키를 적어요.app/community/layout.tsx는cookies()로 그 쿠키를 읽어 넘겨요. 레이아웃은 이미headers()를 불러 요청마다 그려지니 캐시는 그대로예요.새
components/community/FirmwareNotice.test.tsx는 레이아웃을 진짜로renderToString해요. 흉내 내는 것은next/headers, 세션, DB, 머리줄의 다른 컴포넌트 다섯이에요. 쿠키가 없으면 띠가 있는지, 이번 판 쿠키면 없는지, 지난 판(v3.10.4) 쿠키면 다시 있는지 봐요. ✕ 가 쿠키와 localStorage 에 적는지, localStorage 에만 닫음이 있으면 서버 HTML 의 띠를 하이드레이션이 걷고 쿠키를 적는지도 봐요.증거
스크립트를 끈 첫 그림이에요. 하이드레이션 전에 보이는 쪽이 이거예요. 닫은 적 없는 사람의
/community/patterns예요.Pi 와 같은
NEXT_PUBLIC_COMMUNITY_URL,NEXT_PUBLIC_BUILD_ENABLED로 dev(0ef615c)와 이 PR 을 따로 빌드했어요. 스크래치 DB 마다 다섯 사람이 HTTP 로 가입해 공개 패턴 스물다섯을 올렸어요. playwright-core 1.56.1 로 네 쪽(/community,/community/patterns,/community/decks,/community/p/<id>)을 경우마다 세 번씩 새 컨텍스트로 열어 4초 봤어요. 머리줄 y 는main header의 위치를 rAF 로 적은 것이에요.그 「이 PR 전에 닫음」 사람이 한 컨텍스트로 이어서 열면(390):
닫은 적 없는 사람이 ✕ 를 누르면(390):
서버 HTML 만
curl로 받으면:새 시험을 dev 의
FirmwareNotice.tsx와layout.tsx로 돌렸을 때:고친 뒤:
다섯 검사(
web/에서,5188651):e49c1f3은 주석의 줄표 하나와 레이아웃의 import 차례만 바꿨어요. 거기서 lint, typecheck, 새 시험과linkPrefetch.test.ts를 다시 돌려 통과했어요.실행법
새 창(쿠키 없음)에서 폰 폭으로
/community/decks를 열면 띠가 처음부터 머리줄 위에 있고 본문이 움직이지 않아요. ✕ 를 누르고 새로 고치면 띠 없이 열려요.가정
/community예요. 띠는 커뮤니티 레이아웃에만 있어서 다른 쪽 요청엔 실리지 않아요(/terms요청으로 확인했어요).v3.11.0)만 들어요. 서버는 읽기만 하고 남기지 않아요./terms9절 「What we store」 는 서버가 남기는 것을 적는 절이라 줄을 더하지 않았어요.useDismissed문서 주석은 서버 값이 「닫지 않음」 이라 했는데 코드는() => true였어요. 주석을 지금 코드대로 고쳤어요.FirmwareNotice.tsx:44·:31:45·:52:58과layout.tsx:80은 그대로였어요.<FirmwareNotice />는:84에 있었어요.isMobile없이 쟀어요. 후보 줄의 0.141 과 같은 값이 나왔어요. 후보 줄의 「로그인하면 0.1450.183」 은 [DONE] 로그인한 사람의 머리줄에 쪽을 열 때마다 「Sign in」 이 잠깐 뜨지 않는다 #288 뒤로 0.1410.142 예요. 머리줄이 처음부터 한 줄이 되어서예요.Changelog
Web
경험
언제: Vitest 에서
useSyncExternalStore의 서버 값과 하이드레이션 뒤 바뀜을 시험할 때교훈: testing-library 의
render는 새로 그려서 서버 값을 건너뛰니,renderToString한 HTML 을 container 에 넣고render(…, { container, hydrate: true })를act안에서 돌려 하이드레이션 길을 봐요근거: #289 에서 localStorage 에만 닫음이 있는 사람의 띠가 서버 HTML 에 있다가 하이드레이션에 빠지고 쿠키를 적는지를 이렇게 시험했어요
바퀴
바퀴 118 · 후보 13 「펌웨어 안내 띠가 첫 그림부터 쪽에 있어서, 하이드레이션 뒤에 쪽 전체를 아래로 밀지 않는다」
다음 바퀴
response.json()으로 읽는 28곳이 502 HTML 에 던져 끊긴 때와 같은 글을 보여요.https://claude.ai/code/session_01M3FRpN2cp7bV3HfRKRqsNS
Generated by Claude Code