Skip to content

[DONE] Preview 에서 댓글을 올리면 글 칸이 Write 로 돌아온다 - #295

Merged
patternflow-bot merged 4 commits into
devfrom
claude/patternflow-round-124-8my9mh
Oct 26, 2026
Merged

patternflow-bot merged 4 commits into
devfrom
claude/patternflow-round-124-8my9mh

Conversation

@patternflow-bot

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

Copy link
Copy Markdown

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

댓글을 쓰고 Preview 를 누른 뒤 Post 하면 댓글은 올라가는데, 그 뒤 글 칸 자리에 빈 점선 상자만 남았어요. Preview 탭은 고른 채 흐리게 꺼져 있어서, 다음 댓글을 쓰려면 「Write」 를 찾아 눌러야 했어요. 머지하면 Post 뒤에 글 칸이 비어서 Write 로 돌아와요.

좋아지는 것: 미리 보고 올린 뒤 바로 다음 댓글을 쓴다 — Write 를 찾아 누르지 않는다

한 일

components/community/BodyComposer.tsx 는 previewing 을 글과 따로 들고 있었어요. CommentSection 이 Post 뒤에 setBody("") 로 글을 비워도 previewing 은 true 로 남았고, 그래서 빈 PostBody 를 미리보기 상자에 그렸어요. Preview 탭은 글이 비면 disabled 라서 고른 채 꺼져 있었어요.

이제 그리는 동안 글이 비었는데 previewing 이면 false 로 돌려요. AuthStatus.tsx:33 의 answered 와 HeroScene.tsx 의 picked 가 이미 쓰는 꼴(조건을 건 렌더 중 setState)이에요. 상태를 돌려 두니 다음 글자를 칠 때 옛 미리보기가 다시 뜨지 않아요. 글이 있는지는 hasText 하나로 셈해서 Preview 탭의 disabled 도 같이 읽어요.

시험은 새 components/community/BodyComposer.test.tsx 예요. 미리보기 중에 글을 비우면 글 칸과 Write 가 돌아오는지, 그 뒤 한 글자를 쳐도 Write 에 머무는지, 글이 있으면 미리보기가 그대로인지 봐요. 마지막 하나는 CommentSection 을 그대로 그려 쓰고, Preview, Post(201) 차례로 눌러 빈 글 칸이 Write 로 돌아오는지 봐요.

증거

폰 390 · Preview 에서 Post 한 뒤 · 고친 뒤
데스크톱 1440 · Preview 에서 Post 한 뒤 · 고친 뒤
폰 390 · Preview 에서 Post 한 뒤 · 고치기 전
데스크톱 1440 · Preview 에서 Post 한 뒤 · 고치기 전

이 브랜치와 dev 의 BodyComposer.tsx 를 따로 next build 했어요. NEXT_PUBLIC_BUILD_ENABLED=1 이고 NEXT_PUBLIC_COMMUNITY_URL 은 띄운 서버 http://localhost:3100 이에요. 스크래치 DB 에 ada 와 프리셋 0510 코드로 된 공개 패턴 하나를 HTTP 로 넣었어요. Playwright 가 ada 로 패턴 쪽을 열어 글을 쓰고, Preview 와 Post 를 차례로 누르고, 댓글 수가 늘기를 기다린 뒤 글 칸을 쟀어요. 서버는 가로채지 않았어요.

                    dev                                         이 브랜치
390  Post 뒤        글 칸 없음 · 빈 점선 상자 84px                 글 칸 "" · 84px (Post 전과 같음)
                    Write false · Preview true · Preview 꺼짐     Write true · Preview false · Preview 꺼짐
1440 Post 뒤        글 칸 없음 · 빈 점선 상자 84px                 글 칸 "" · 84px (Post 전과 같음)
                    Write false · Preview true · Preview 꺼짐     Write true · Preview false · Preview 꺼짐

새 시험을 dev 의 BodyComposer.tsx 로 돌렸을 때:

   × BodyComposer > goes back to Write when its text is cleared while previewing
     → Unable to find an accessible element with the role "textbox" and name "Comment"
   × BodyComposer > stays on Write as the next text is typed
     → Unable to find an accessible element with the role "textbox" and name "Comment"
   ✓ BodyComposer > keeps the preview while the text is there
   × posting from Preview > brings the comment field back empty, on Write
     → Unable to find an accessible element with the role "textbox" and name "Comment"
      Tests  3 failed | 1 passed (4)

이 브랜치에서:

 ✓ src/components/community/BodyComposer.test.tsx (4 tests)
 ✓ src/components/community/CommentSection.test.tsx (6 tests)
      Tests  10 passed (10)

다섯 검사(web/ 에서):

npm ci                              added 1024 packages, and audited 1025 packages in 47s
npm run lint -- --max-warnings=0    exit 0 (출력 없음)
npm run typecheck                   exit 0 (출력 없음)
npm run build                       exit 0
npm run check:ci                    Test Files 122 passed (122) · Tests 1485 passed (1485) · skipped links-absolute · skipped roadmap · exit 0
npm run check:voice                 check:voice: nothing found (브랜치와 이 본문)

links-absolute 와 roadmap 은 이 컨테이너에 gh 로 원래 레포를 읽을 길이 없어서 skipped 예요. PR 의 drift.yml 이 다시 돌려요. 문서는 고치지 않아서 check:human-lock 은 돌리지 않았어요.

PR 의 검사는 fb3fa5f 에서 Drift checks 와 Web CI 둘 다 success 예요.

실행법

# web/ 에서
npx vitest run src/components/community/BodyComposer.test.tsx

화면으로 보려면 커뮤니티에 로그인해 패턴 쪽을 열고, 댓글을 쓴 뒤 Preview 와 Post 를 차례로 눌러요. 글 칸이 비어서 Write 로 돌아와요.

가정

  • 글 칸이 돌아오면 Post 전과 같은 84px 예요. useAutoGrow 는 미리보기 동안 "" 를 받고, 돌아온 뒤에도 글이 "" 라 다시 재지 않아요. 빈 칸은 .commentForm .bodyComposer .postBodyInput 의 min-height: 84px 가 높이를 정해서 다시 재도 같은 값이에요. 위 표의 84px 가 그 값이에요.
  • 글 칸이 돌아올 때 초점은 옮기지 않았어요. 글 칸으로 옮기면 폰에서 Post 뒤마다 자판이 올라와요.
  • 줄의 :56, :67 은 따로 고치지 않았어요. :56 의 disabled 는 hasText 를 읽게 바꿨고, :67 의 갈림은 돌려 둔 previewing 을 그대로 읽어요.

Changelog

Web

  • Posting a comment from Preview brings the field back. The comment went up and the field stayed an empty preview box with the Preview tab still picked and greyed out; it now clears to Write, ready for the next comment.

경험

언제: 바퀴에서 띄운 next start 를 Bash 로 멈출 때
교훈: pkill -f "next start …" 나 kill $(pgrep -f next-server) 를 쓰지 말고 next start 의 pid 를 받아 kill <pid> 해요, -f 는 그 명령을 돌리는 셸의 명령줄에도 맞아서 셸이 같이 죽어요
근거: #295 에서 두 번 다 exit 144 로 셸이 죽어 뒤 명령(dev 판 빌드, 사진 커밋)이 돌지 않았어요

바퀴

바퀴 124 · 후보 19 「Preview 에서 댓글을 올리면 칸이 Write 로 돌아온다」

다음 바퀴

  1. 20위 「댓글 마크다운이 머리 주석이 말한 시험을 얻고, 같은 쪽 링크가 새 탭으로 열리지 않는다」: safeHref 를 부르는 시험이 0곳이고, 각주 링크가 target="_blank" 로 같은 쪽을 새 탭에 열어요.
  2. 21위 「덱과 보내기 창 여섯이 Esc 로 닫히고, 열리면 초점이 창 안으로, 닫히면 연 단추로 간다」: 여섯 창이 useDialog 를 쓰지 않아 Esc 가 아무것도 하지 않아요.
  3. 22위 「패턴 쪽에서 화살표 키 한 번이 노브를 0.001 대신 기기 한 칸만큼 돌린다」: 범위 칸이 step="0.001" 이라 Knob 1 을 끝에서 끝까지 돌리는 데 화살표 1,000번이 들어요. Lab 은 knobArrowValue 로 48번이에요.

https://claude.ai/code/session_01J5j7aPV1oKscciRBA8cSh8


Generated by Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J5j7aPV1oKscciRBA8cSh8
Posting from Preview left an empty preview box with the tab greyed out.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J5j7aPV1oKscciRBA8cSh8
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J5j7aPV1oKscciRBA8cSh8
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J5j7aPV1oKscciRBA8cSh8
@patternflow-bot patternflow-bot changed the title [WIP] 바퀴 124 — 커뮤니티 후보 표의 다음 줄 [WIP] Preview 에서 댓글을 올리면 글 칸이 Write 로 돌아온다 Oct 26, 2026
@patternflow-bot patternflow-bot changed the title [WIP] Preview 에서 댓글을 올리면 글 칸이 Write 로 돌아온다 [DONE] Preview 에서 댓글을 올리면 글 칸이 Write 로 돌아온다 Oct 26, 2026
@patternflow-bot
patternflow-bot marked this pull request as ready for review October 26, 2026 21:01
@patternflow-bot
patternflow-bot merged commit 2ef77db into dev Oct 26, 2026
2 checks passed
@patternflow-bot
patternflow-bot deleted the claude/patternflow-round-124-8my9mh branch October 26, 2026 21:02
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