Repository navigation
[1.95] 구형 v2 경로 제거와 fixture 모드 명시화 - #314
Merged
Merged
Conversation
…tPanel/ChatMessages/ThinkingBar 순환 문구, 직접 크레딧 차감, Note 선생성·제목 생성, 구형 conversation 호출과 mock (1.95) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…fixture), 기본은 실제 Server proxy, 운영 build에서 MSW worker 제외, README 두 모드 실행법 (1.95) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
6 tasks done
Member
Author
|
CI run 39385603000 통과: test 22 files 843 passed / 2 skipped(로컬 첫 실행의 1.94 timing flake는 CI에서 재현되지 않음), 변경 파일 eslint |
…E_URL 빈 값 fallback, auth mock 포함 주석·README 정정, fixture 새 Note 한계 명시, 미사용 SparkleIcon 삭제 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
|
리뷰 1회차 반영 |
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.
📌 관련 이슈
🏷️ PR 타입
📝 작업 내용
1.94 뒤 화면이 쓰지 않는 구형 v2 대화 경로를 지우고, 개발 서버의 MSW 자동 실행을
VITE_API_MODE명시 선택으로 바꿨다. 새 기능은 없다.1. 구형 v2 경로 제거 (
02d66c5)각 항목은 지우기 전에 grep으로 사용처를 확인했다. 지운 것은 모두 화면 import 0건이었고, 다른 기능이 쓰는 코드는 남겼다.
editor/types/sse_types.ts,editor/utils/parse_sse_stream.tseditor_typesre-export 제거chat/hooks/useChatMessages.tshooks/index.tsexport 제거rightpanel/{RightPanel,ChatMessages,ThinkingBar}.tsxMessageContent·MessageAttachments·chat/types/chat_types.ts·rightpanel/index.ts도 삭제editor_apicreateConversation·createConversationJson·getConversationDetail,useEditorQueriesuseCreateConversation·useConversationDetailconversation_types)도 삭제useUseCredit,credit_api.useCredit,CreditUsageRequest/Result·CreditBalanceDtouseCreditHistory, 프로필 credit,creditKeys)는 유지createNote·useCreateNote·generateNoteTitle,CreateNoteRequest/Response·GenerateTitleRequest와 그 응답 하위 타입getNoteDetailWithAllConversations·useNoteDetail({ fetchAllConversations })useChatMessages만 썼다)useHomeSendFirstMessageState(location.state 첫 대화)editor.tsPOST /api/conversationsSSE·GET /api/conversations/:id·토큰 시나리오,notes.tsPOST /api/notes,credit.tsPOST /api/credits/use남긴 것 (S08 밖 사용처)
searchConversations와 검색 타입: 검색(useConversationSearch)이 쓴다.uploadCanvasImage·getTools·useNoteAssets: 입력창·@·#메뉴가 쓴다.NoteDetailResponse.conversations타입: 노트 상세 API 응답 형태다.useNoteDetail은 ChatPage 제목과 StorageContent가 쓴다.features/assets/utils/upload_attachments.ts: 현재 사용처 0건이다(삭제된useChatMessages만 썼다). 첨부 전송은 S09 범위라 남겼다 — S09 인계: 재사용하거나 지운다.SparkleIcon(삭제된ChatMessages만 씀)은 1회차 리뷰 뒤 삭제했다.2. 개발 API 모드 명시 선택 (
6b370bc)src/app/api_mode.tsresolveApiMode:server면 server,fixture면 fixture다.fixtures같은 오타가 조용히 다른 모드로 가지 않게 하려는 것이다.vite.config.ts가serve일 때 같은 함수로 검사해, 잘못된 값이면pnpm run dev시작이 실패한다.main.tsx:import.meta.env.DEV && resolveApiMode(VITE_API_MODE) === "fixture"일 때만./mocks/browser를 동적 import해 worker를 시작한다.pnpm run dev는 MSW 없이 vite proxy로DEV_API_PROXY_TARGET(기본http://localhost:8080)에 간다.src/mocks/handlers.ts):createBrowserRunFixtureServer()를 그대로 쓴다. 위치는src/features/run/session/mocks/에 두어 1.93·1.94 테스트 import를 건드리지 않았다.BASE_URL은 API client처럼VITE_API_BASE_URL || ""다.vite.config.ts에 build 전용 plugin을 넣어public/mockServiceWorker.js를dist에서 지운다. public 파일은 그대로 복사되기 때문이다.VITE_API_BASE_URL, 필수 OAuth 변수,DEV_API_PROXY_TARGET)와 두 모드 실행법 표를 넣었다.✅ 체크리스트
공통
pnpm tsc --noEmit타입 체크를 통과했습니다 (tsc -p tsconfig.app.json,tsconfig.test.json,tsconfig.node.json,pnpm run build의tsc -b)worktree-task-1.95사용인증 관련 변경 시
🧪 검증
grep 결과 (DoD)
src/**테스트 밖)에서 v2 SSE·토큰 상태·순환 문구·직접 차감·Note 선생성 경로는 0건이다.src/test/contracts/에는isStream2건이 있다(requests/invalid/unknown-field.json:6,build_fixtures.py:1111). 둘 다 모르는 필드를 거부하는지 보는 invalid fixture라 제거 대상이 아니다.typeof content === "string"류)도 0건이다.text/event-stream을 읽는 코드는features/run(v1 parser) 하나뿐이다.운영 build 산출물
pnpm run build뒤grep -rlE 'msw|setupWorker|mockServiceWorker|createBrowserRunMockServer|VITE_API_MODE|browser_run_stream' dist가 0건이다.dist목록:assets favicon.svg fonts index.html landing pdf.worker.min.mjs.dist/mockServiceWorker.js가 있었다.두 모드 브라우저 확인
vite --port 5195와 headless Chromium으로 확인했다(OAuth env는 더미 값).fetch('/api/conversations/1/messages?limit=1')을 보냈다.localhost:8080으로 보냈고ECONNREFUSED→ 500이 났다(로컬 Server 미기동).VITE_API_MODE=fixture: 같은 요청에 다음을 확인했다.[MSW] Mocking enabled, 등록 1개, 페이지 controlled.VITE_API_MODE=fixtures(오타):VITE_API_MODE는 "server" 또는 "fixture"여야 합니다오류가 났고, MSW는 등록되지 않았다.로컬 실행
pnpm test(flock): 22 files, 843 passed / 2 skipped. 새src/app/api_mode.test.ts3건 포함.conversation_screen.test.tsx의 "홈 첫 질문" 1건이 실패했다.eslint --max-warnings=0,prettier --check통과.pnpm run build(flock) 통과(기존 chunk 크기 경고만).CI 결과는 코멘트로 남긴다.
📎 기타 참고사항
1.96 인계 — 실행법
실제 Server 연결(기본): 로컬 Server를
http://localhost:8080에 띄운 뒤pnpm run dev. 다른 Server는.env.local의DEV_API_PROXY_TARGET으로 지정한다.fixture:
VITE_API_MODE=fixture pnpm run dev.fixture run Server는 페이지 메모리에 있어 새로고침하면 run이 사라진다.
이 worktree처럼
.env가 없으면auth_api가 OAuth env 누락으로 import 시점에 throw해 앱이 뜨지 않는다(기존 동작). README에 필수로 적었다.fixture 모드에서 대화로 새로 생긴 Note(9001~)는 노트 목록·상세 mock에 없다(1.94부터 있던 한계). 제목이 기본값으로 보이고, 이름 변경·삭제는 proxy로 나가 실패한다. README에 적었다.
리뷰 1회차 반영 (
1f45c4b)BASE_URLfallbackVITE_API_BASE_URL || ""로 바꿨다..env없는 상태로 fixture를 띄워GET /api/users/me가 mock 200을 받는 것을 확인했다(전에는undefined/api/...라 bypass)VITE_API_MODEVITE_API_MODE=fixtures vite→error when starting dev server: Error: VITE_API_MODE는 …, exit 1SparkleIcon삭제.upload_attachments는 S09 인계로 명시conversationstest ! -e dist/mockServiceWorker.js를 추가isStream2건(unknown-field 거부 fixture)을 명시로컬 결과:
pnpm test22 files 843 passed / 2 skippedtscapp·node 통과pnpm run build통과.distgrep 0건, worker 없음🤖 Generated with Claude Code