Repository navigation
[DONE] 서버가 거절한 좋아요가 말없이 되돌아가지 않고 까닭을 보인다 - #294
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EexebwGmxDtbqRMCdvR8ow
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EexebwGmxDtbqRMCdvR8ow
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EexebwGmxDtbqRMCdvR8ow
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EexebwGmxDtbqRMCdvR8ow
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EexebwGmxDtbqRMCdvR8ow
patternflow-bot
marked this pull request as ready for review
October 26, 2026 20:42
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_01EexebwGmxDtbqRMCdvR8ow
패턴 쪽의 좋아요 단추와 벽 카드의 하트는 서버가 거절하면 켜졌다가 말없이 꺼졌어요. 그래서 429 가 눌러도 안 먹는 단추로 읽혔어요. 머지하면 둘 다 되돌리면서 까닭을 보여요. 서버가 보낸 글(「Too many likes — slow down a moment.」)이 있으면 그 글이고, 프록시 쪽이 답했으면 「Like not saved (HTTP 502).」 예요.
좋아지는 것: 좋아요가 안 먹으면 까닭이 보인다 — 눌러도 안 되는 단추로 읽히지 않는다
LikeButton.tsx와PatternCard.tsx의 실패 갈래가readApiError로 까닭을 보이기한 일
components/community/LikeButton.tsx는 실패 갈래(dev:47:51)에서readApiError(response, "Like not saved")를 불러 그 글을 단추 옆에role="alert"로 둬요. fetch 가 아무 데도 닿지 못한catch(:55:58)는 다른 커뮤니티 글 칸처럼 「Network error.」 예요. 글은 다음에 누를 때 지워져요. 제목 줄(.metaTitleRow)이 줄을 바꾸는 flex 라서, 폰에서는 제목 아래로 내려가요. 글 꼴은 새.likeNote예요(mono 12px,--pfc-danger).components/community/PatternCard.tsx는 같은 두 갈래(dev:190:194,:198:201)에서 그 글을 카드에 이미 있던 쪽지 자리에 띄워요. 덱이 찼을 때 「Deck is full.」 이 2.5초 뜨던 자리예요. 이제 덱과 좋아요가 같이 쓰니 이름을deckNote에서cardNote로 바꿨어요. 쪽지를 띄우는flashNote는 앞 쪽지의 타이머를 지우고 새로 2.5초를 재요. 전에는 타이머를 지우지 않아서, 앞 쪽지의 타이머가 뒤 쪽지를 일찍 지울 수 있었어요.시험은 새
components/community/likeErrors.test.tsx예요. 두 단추에 429 JSON, HTML 502, 끊김을 주고role="alert"의 글과 되돌린aria-pressed, 수를 봐요. 받아들인 좋아요엔 글이 없는지도 봐요.증거
이 브랜치와 dev 의 세 파일(
LikeButton.tsx,PatternCard.tsx,Community.module.css)을 따로next build했어요.NEXT_PUBLIC_BUILD_ENABLED=1이고,NEXT_PUBLIC_COMMUNITY_URL은 띄운 서버http://localhost:3100이에요. 스크래치 DB 에 ada 와 프리셋 코드로 된 공개 패턴 셋을 HTTP 로 넣고, ada 로 패턴 쪽과/community/patterns를 열었어요. Playwrightcontext.route가 좋아요 POST 하나에만 경로가 쓰는 429 와{"error":"Too many likes — slow down a moment."}를 돌려줬어요. 나머지는 진짜 서버가 답했어요.새 시험을 dev 의 두 컴포넌트로 돌렸을 때:
이 브랜치에서:
다섯 검사(
web/에서):links-absolute와roadmap은 이 컨테이너에gh로 원래 레포를 읽을 길이 없어서skipped예요. PR 의drift.yml이 다시 돌려요. 문서는 고치지 않아서check:human-lock은 돌리지 않았어요.PR 의 검사는
6cee6b3에서Drift checks와Web CI둘 다 success 예요.실행법
# web/ 에서 npx vitest run src/components/community/likeErrors.test.tsx화면으로 보려면 커뮤니티에 로그인해 패턴 쪽을 열고, 개발자 도구에서
POST /api/community/patterns/<id>/like를 막은 뒤 LIK 단추를 눌러요. 막으면 「Network error.」 이고, 1분 안에 61번 누르면 서버의 429 글이에요.가정
role="alert"예요. 33위는 이미 있는 오류 자리 29곳에 이 역할을 다는 줄이고, 이번 바퀴는 새로 만든 두 자리에만 달았어요. 33위는 그대로 남아요.role="alert"를 세면 빈 것이 하나 더 나와요. Next 의 경로 안내(__next-route-announcer__)라서 표에서 뺐어요.NEXT_PUBLIC_COMMUNITY_URL은 Pi 의 주소 대신 띄운 서버의 주소예요. Pi 의 주소로 빌드하면 localhost 의 쪽이 좋아요를 그 주소로 보내요(crossOriginCommunityBase).PatternCard.tsx:101:107(dev:96:102)의fetchPatternHeader는 아직ok를 보지 않고 몸을 JSON 으로 읽어요. 덱에 넣을 때 프록시 쪽이 답하면 그 까닭이 사라져요. [DONE] 서버가 HTML 오류 쪽을 돌려줘도 커뮤니티 글 칸이 「Network error.」 대신 서버가 몇 번으로 답했는지 말한다 #292 「가정」의 남은 19곳 가운데 하나예요.Changelog
Web
경험
언제: 커뮤니티 쪽의 오류 글을 Playwright 로
getByRole("alert")해서 셀 때교훈: Next 의 경로 안내가 쪽마다 빈
role="alert"하나를 두니,allInnerTexts()에서 빈 글을 빼고 세요근거: #294 에서 dev 빌드의 패턴 쪽이 글 없이도 alert 하나(
"")를 돌려줘서, 빼지 않았으면 「고치기 전」 도 alert 가 있다고 읽혔어요바퀴
바퀴 123 · 후보 18 「서버가 거절한 좋아요가 말없이 되돌아가지 않고 까닭을 보인다」
다음 바퀴
BodyComposer.tsx:34의previewing이 글이 비어도 그대로라 올린 뒤 글 칸이 사라져요.safeHref를 부르는 시험이 0곳이고, 각주 링크가target="_blank"로 같은 쪽을 새 탭에 열어요.useDialog를 쓰지 않아 Esc 가 아무것도 하지 않아요.https://claude.ai/code/session_01EexebwGmxDtbqRMCdvR8ow
Generated by Claude Code