fix(publish): give the recovery panel its own token field - #752
Merged
Merged
Conversation
Checking the remote needs the publish token again in a deployment that takes the credential from the request. The panel pointed at the page's token field, but a change there resets the publish form and the failure the panel hangs on, so the panel disappeared and only the blind reset was left. Ask for the token inside the panel, use it for one remote check, and send a reset without it. Closes #749 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
yeongseon
approved these changes
Oct 5, 2026
yeongseon
left a comment
Collaborator
There was a problem hiding this comment.
diff 를 읽었고 CLEAN 이라 승인합니다. 이번에는 패널뿐 아니라 그것을 쓰는 페이지의 흐름까지 읽었습니다.
- 페이지 수준 테스트가 #749 의 경로를 그대로 탑니다: 게시 →
publish_state_unknown→ 토큰 없이 원격 확인은 나가지 않음 → 패널의 칸에 토큰을 넣어도 패널이 남아 있음 → 원격 확인이 그 토큰을 헤더에 실어 한 번 나감. - reset 은 토큰을 보내지도 소모하지도 않습니다. Builder 의 reset 이 원격을 읽지 않는다는 근거도 적혀 있습니다.
- 토큰은 한 요청 뒤 비워지고, storage 에 남지 않는 것을 테스트가 확인합니다.
본문이 남긴 것 — 패널이 떠 있는 동안 페이지의 토큰 칸이나 destination 을 바꾸면 패널이 사라진다 — 은 기존 동작이고, 같은 게시를 다시 실행하면 돌아옵니다. 지금은 그대로 두고, 화면 확인(#748)에서 어색하면 그때 다룹니다.
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.
Closes #749
문제
게시 자격 증명을 요청에서 받는 배포(
publish_credential: request)에서 복구 패널의 원격 확인은 토큰이 다시 필요하다. 패널은 "위에 토큰을 다시 입력하라"고 안내했는데, 페이지의 토큰 칸은 값이 바뀌면 게시 폼을 처음으로 되돌린다(setConfirmation(undefined); publish.reset()). 패널은 바로 그 두 상태에 걸려 있어서, 안내를 따르면 패널이 사라지고 남는 것은 원격을 보지 않는 기록 초기화뿐이었다. #744 에서 제가 넣은 결함이다.변경
features/publish/PublishRecoveryPanel.tsxneedsCredential일 때 패널 안에 자체 토큰 칸을 둔다. 페이지의 토큰과 같은 규칙이다: 메모리에만 두고, 원격 확인 한 번에 실어 보낸 뒤 바로 비운다. 헤더에 실을 수 없는 값이면 버튼을 막고 보내지 않는다.publish_api.py의reset_publish_receipt본문에 자격 증명을 쓰는 곳이 없다 — 코드를 읽어 확인했고 실제 Builder 로 돌려 보지는 않았다).takeCredentialprop 은 없앴다.pages/BuildPublishPage.tsx:takePublishCredential제거. 페이지의 토큰 칸과 게시 흐름은 그대로다.이슈가 제시한 두 방법 중 "패널에 자체 토큰 칸"을 골랐다. 다른 쪽(토큰이 바뀌어도
publish_state_unknown상태 유지)은 페이지 토큰 칸의 기존 규칙 — 토큰이 바뀌면 준비 상태를 다시 확인한다(#615) — 과 얽힌다.테스트 (
__tests__/publishRecovery.test.tsx)publish_state_unknown→ 토큰 없이 원격 확인은 나가지 않고 안내만 → 패널의 칸에 토큰 입력 후에도 패널이 남아 있음 → 원격 확인이 그 토큰을 헤더에, destination 을 본문에 실어 한 번 나감 →confirmed표시, 재게시 버튼 없음, 토큰은 storage 에 없음.DELETE로 나가고 입력한 토큰은 칸에 남는다.검증
npx vitest run __tests__/publishRecovery.test.tsx→Tests 18 passed (18).Tests 131 passed (131).npx tsc --noEmit, eslint 출력 없음.남는 것
사용자가 복구 패널이 떠 있는 동안 페이지의 토큰 칸이나 destination 을 바꾸면 패널은 여전히 사라진다(게시 폼을 처음으로 되돌리는 기존 동작). 기록은 Builder 에 남아 있으므로 같은 게시를 다시 실행하면
publish_state_unknown과 함께 패널이 돌아오지만, 그 경로를 테스트로 고정하지는 않았다.🤖 Generated with Claude Code