Repository navigation
[DONE] 커뮤니티에서 Lab 으로 연 패턴을 손대지 않고 다시 올려도 크기 검사에 막히지 않는다 - #152
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WVX967x95TPzbEiTm15jot
The API strips the stored header and footer before it checks the cap, so a fork reopened from the community was refused by the modal and not the server. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WVX967x95TPzbEiTm15jot
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WVX967x95TPzbEiTm15jot
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WVX967x95TPzbEiTm15jot
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WVX967x95TPzbEiTm15jot
patternflow-bot
marked this pull request as ready for review
October 22, 2026 03:19
This was referenced Oct 22, 2026
engmung
pushed a commit
to engmung/Patternflow
that referenced
this pull request
Oct 22, 2026
engmung
pushed a commit
to engmung/Patternflow
that referenced
this pull request
Oct 22, 2026
Patternflow-lab#108 Patternflow-lab#109 Patternflow-lab#110 Patternflow-lab#111 Patternflow-lab#112 Patternflow-lab#113 Patternflow-lab#114 Patternflow-lab#115 Patternflow-lab#116 Patternflow-lab#117 Patternflow-lab#118 Patternflow-lab#119 Patternflow-lab#120 Patternflow-lab#121 Patternflow-lab#122 Patternflow-lab#123 Patternflow-lab#124 Patternflow-lab#125 Patternflow-lab#126 Patternflow-lab#127 Patternflow-lab#128 Patternflow-lab#130 Patternflow-lab#131 Patternflow-lab#132 Patternflow-lab#133 Patternflow-lab#134 Patternflow-lab#135 Patternflow-lab#136 Patternflow-lab#137 Patternflow-lab#138 Patternflow-lab#139 Patternflow-lab#140 Patternflow-lab#141 Patternflow-lab#142 Patternflow-lab#144 Patternflow-lab#145 Patternflow-lab#146 Patternflow-lab#147 Patternflow-lab#148 Patternflow-lab#149 Patternflow-lab#150 Patternflow-lab#151 Patternflow-lab#152 Patternflow-lab#153 Patternflow-lab#154 Patternflow-lab#155 Patternflow-lab#156 Patternflow-lab#157 Patternflow-lab#158 Patternflow-lab#159
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_01WVX967x95TPzbEiTm15jot
커뮤니티에서 Lab 으로 연 패턴을 손대지 않고 다시 올리면, 공유 창이 라이선스 머리말과 꼬리말까지 세어서 서버가 받아 줄 패턴을 「100 KB of code」로 먼저 막았어요. 머지하면 창이 서버처럼 그 둘을 떼고 재요. 본문 99,700자인 포크와 작성자가 고치러 다시 연 글이 그대로 올라가요.
좋아지는 것: 상한 가까운 패턴도 Lab 에서 그대로 다시 올라간다 — 서버가 받는 패턴을 창이 막지 않는다
할 일
8 은 바퀴 4552 가 했고, 9 를 맡아요. dev(9064c6d)의PublishModal.tsx:152는 아직code.length를 재요PublishModal.tsx고치기한 일
web/src/components/community/PublishModal.tsx의 크기 검사가code.length대신 이 길이를 재요.두 서버 라우트(
app/api/community/patterns/route.ts:142,patterns/[id]/route.ts:287)가cleanCode에 넘기는 값과 같은 식이에요. 그래서 창과 서버가 어떤 입력에서든 같은 길이를 봐요. 거절 글의 KB 도 이 길이로 적어요.PublishModal.test.tsx에 시험 셋을 더했어요. 본문 99,700자를buildStoredPatternCode로 포크처럼 감싸면 100,251자예요. 이걸 포크로 올리면 요청이 한 번 나가고,editOf로 다시 열어 고치면PATCH /api/community/patterns/p1이 나가요. 본문이 100,600자면 지금처럼 요청 없이 「This pattern is 101 KB of code」로 막아요.증거
새 시험을 dev 의
PublishModal.tsx에 돌렸어요(워크트리에 시험 파일만 옮겨서).이 브랜치에선
✓ src/components/community/PublishModal.test.tsx (6 tests)예요.dev(
9064c6d)와 이 브랜치를COMMUNITY_ENABLED=1과NEXT_PUBLIC_COMMUNITY_URL을 주고 각각 빌드해 3101, 3100 에 띄웠어요.@ada가 API 로 본문 99,700자인 원작을 올리면 서버가 머리말과 꼬리말을 붙여 100,157자로 저장해요. 그다음 390px 와 1440px 에서@ada는 패턴 쪽의 「Edit in Pattern Lab」 → Lab 의 Update → 「Update this pattern」을,@grace는 「Open in Pattern Lab」 → Share → 제목을 넣고 「Publish to the wall」을 눌렀어요.이 브랜치의 데이터베이스에 남은 길이예요. 서버가 잰 길이(떼고 난 길이)는 다 100,000 밑이에요.
web/에서 다섯 검사의 끝줄이에요.check:ci의links-absolute와roadmap은gh로그인이 없는 컨테이너라skipped예요.npm run check:voice는 「read: 97 added lines in 2 files · nothing found」예요.실행법
cd web npx vitest run src/components/community/PublishModal.test.tsx가정
CODE_MAX * 2문턱까지 그대로 옮겼어요. 그 위에선 서버도 떼지 않고 재서 거절하니, 창도 같은 답을 내요.code_length는 그대로 감싼 길이예요. 분석 값이 바뀌면 지난 값과 견줄 수 없어서 두었어요.@matrix와@knobs줄을 더해요. 본문 99,700자가 99,789자가 됐고, 여전히 상한 밑이에요.click()이 처리기를 부르지 못했어요. 이 컨테이너는 편집기(Monaco)를 받는 CDN 에 닿지 못해요. 그래서 그 단추만dispatchEvent("click")로 눌렀어요. Lab 안의 단추와 창의 단추는 그냥 눌렀어요.Math.round). dev 에서도 감싼 길이로 같은 글이 났어요(위 사진). 고치지 않았어요.Changelog
Web
경험
언제: 바퀴에서 커뮤니티 패턴 쪽의 「Open in Pattern Lab」이나 「Edit in Pattern Lab」을 브라우저로 눌러 Lab 까지 잴 때
교훈: Playwright
click()대신locator.dispatchEvent("click")로 누른다.click()은 sessionStorage 에 handoff 를 쓰지 못하고 쪽에 그대로 남는다근거: #152 에서
click()뒤 25초를 기다려도 주소가/community/p/…였고sessionStorage가 비어 있었어요. 편집기 CDN 이 막혀 「Monaco initialization: error」가 난 쪽이었고, 같은 단추의onClick을 부르자/pattern-lab?from=community로 갔어요바퀴
바퀴 53 · 후보 9 「커뮤니티에서 Lab 으로 연 패턴을 손대지 않고 다시 올려도 크기 검사에 막히지 않는다」
다음 바퀴
PATCH {"license":"MIT"}가 200 이고 소스의 SPDX 줄이 MIT 로 바뀌어요.https://claude.ai/code/session_01WVX967x95TPzbEiTm15jot
Generated by Claude Code