Repository navigation
[DONE] 로그인한 사람의 머리줄에 쪽을 열 때마다 「Sign in」 이 잠깐 뜨지 않는다 - #288
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EiXnECnHAmZVVvr8jAQd6V
A signed-in page opened on "Sign in" for 0.6-0.9 s on a phone and then swapped in the handle, moving the page. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EiXnECnHAmZVVvr8jAQd6V
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EiXnECnHAmZVVvr8jAQd6V
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EiXnECnHAmZVVvr8jAQd6V
patternflow-bot
marked this pull request as ready for review
October 26, 2026 17:40
This was referenced Oct 26, 2026
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
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_01EiXnECnHAmZVVvr8jAQd6V
커뮤니티 머리줄은 브라우저가 세션을 받아올 때까지 「Sign in」 을 그렸어요. 이제 레이아웃이 서버에서 이미 읽은 이름을 그려요. 머지하면 로그인한 사람이 쪽을 열 때마다 폰 머리줄이 두 줄에서 한 줄로 줄며 본문을 40px 끌어올리던 일(390px CLS 0.049)이 없어져요.
좋아지는 것: 로그인하면 커뮤니티 머리줄이 처음부터 내 이름이다 — 폰에서 쪽이 위로 튀지 않는다
할 일
AuthStatus.test.tsx: dev 의 파일로 2개 빨강, 고친 뒤 5개 초록한 일
components/community/AuthStatus.tsx가serverUser를 받아요. 레이아웃이getSession으로 이미 읽은 사람의name,username,displayUsername셋이에요. 브라우저의useSession이 첫 답을 낼 때까지는 그 사람을 그리고, 첫 답 뒤로는 브라우저의 답만 따라요.app/community/layout.tsx가 그 셋을 넘겨요. user 를 통째로 넘기면 이메일까지 쪽에 실려서 셋만 골랐어요.새
components/community/AuthStatus.test.tsx는useSession을{ data: null, isPending: true }로 흉내 내요. 기다리는 동안 「@ada」 링크가/community/u/ada로 가는지, 서버 HTML(renderToString)에 「Sign in」 이 없는지, 서버가 아무도 못 봤으면 「Sign in」 인지, 답이 오면 브라우저의 이름을 따르는지, 답이 「로그아웃」 이면 뒤의 다시 묻기에서도 옛 이름이 돌아오지 않는지를 봐요.증거
get-session을 3초 붙잡고load뒤 1.5초에 찍었어요. 브라우저가 아직 답을 받지 못한 때예요.Pi 와 같은
NEXT_PUBLIC_COMMUNITY_URL,NEXT_PUBLIC_BUILD_ENABLED로 빌드하고, 스크래치 DB 에 ada 가 가입해 공개 패턴 다섯을 HTTP 로 올렸어요. 고치기 전은 같은 DB 를 dev 의 두 파일로 다시 빌드한 서버에서 쟀어요. playwright-core 1.56.1 로 ada 의 쿠키를 들고 쪽마다 세 번 열어 4초씩 봤어요. 서버 HTML 은 같은 쿠키로 받은 머리줄을 읽었어요.1440 에선 머리줄이 두 판 다 70px 한 줄이라 「Sign in」 이 「@ada」 로 글만 바뀌었어요. 거기 남은 CLS 0.033~0.038 은 펌웨어 띠가 하이드레이션 뒤에 나오는 몫(후보 13위)이고 dev 와 같아요. 로그아웃한 서버 HTML 은 두 쪽 다 그대로 「Sign in」 이에요.
새 시험을 dev 의
AuthStatus.tsx로 돌렸을 때:고친 뒤:
다섯 검사(
web/에서,2194316):dev(
442c39c, #282 는incoming/만 고쳤어요)를 merge 한0143da4에서 typecheck, 새 시험 5개,check:drift를 다시 돌려 통과했고, GitHub 의 Web CI 와 Drift checks 도 초록이에요.실행법
로그인한 채 폰 폭으로
/community/decks를 새로 고치면 머리줄이 처음부터 「@이름」 한 줄이에요.가정
isPending을 켜요(node_modules/better-auth/dist/client/query.mjs의onRequest,isPending: currentValue.data === null).isPending만 보면 다른 탭에서 로그아웃한 뒤 창에 초점이 돌아올 때마다 옛 이름이 잠깐 돌아와요. 마지막 시험이 그 경우예요.AuthStatus.tsx:20,:22의 둘은 이 줄을 고치며 같이 빠졌어요. 바꾼 줄이 그 자리라서예요. Better Auth 의 세션 타입에username과displayUsername이 이미 있어서 typecheck 가 그대로 통과해요. 레이아웃의 것(layout.tsx:75~:76)과 나머지 셋은 34위 몫으로 남겼어요.layout.tsx:122는 [DONE] 커뮤니티 쪽이 Pattern Lab 코드 218 KB 를 뒤에서 받지 않는다 #286 뒤로:127이었어요.isMobile없이 쟀어요.isMobile과hasTouch를 켜면 두 판 모두, 펌웨어 띠의 119px 밀림까지 CLS 가 0 으로 나와요. 본문 y 로는 dev 의 40px 끌어올림이 그대로 보였어요. 후보 줄의 0.049 와 0.038 은isMobile없이 잰 값과 같아요.Changelog
Web
경험
언제: Playwright 로 폰 폭의 레이아웃 이동(CLS)을 잴 때
교훈:
isMobile과hasTouch를 켠 컨텍스트에선 layout-shift 가 하나도 잡히지 않아 CLS 가 늘 0 이니, CLS 는isMobile없이 390 폭으로 재고 요소의 y 를 rAF 로 따로 적어 맞춰 봐요근거: #288 에서 dev 의 머리줄이 104px 에서 64px 로 줄어 본문이 40px 올라갔는데
isMobile로는 CLS 0.000 이었고, 끄니 후보 표와 같은 0.049 가 나왔어요바퀴
바퀴 117 · 후보 12 「로그인한 사람의 머리줄에 쪽을 열 때마다 「Sign in」 이 잠깐 뜨지 않는다」
다음 바퀴
https://claude.ai/code/session_01EiXnECnHAmZVVvr8jAQd6V
Generated by Claude Code