๐ ์ด๋ฉ์ผ ๋ก๊ทธ์ธ ์คํจ ์ ํ ์คํธ๊ฐ ํ์๋์ง ์๋ ๋ฌธ์ ์์ - #614
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
|
No actionable comments were generated in the recent review. ๐ โน๏ธ Recent review infoโ๏ธ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: ๐ Files selected for processing (2)
๐ค Files with no reviewable changes (1)
๐ง Files skipped from review as they are similar to previous changes (1)
Walkthrough
Estimated code review effort: 3 (Moderate) | ~20 minutes Suggested reviewers: ๐ฅ Pre-merge checks | โ 5โ Passed checks (5 passed)
โจ Finishing Touches๐ Generate docstrings
๐งช Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
๐ก Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e96a187960
โน๏ธ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with ๐.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| }, 100); | ||
| }, | ||
| onError: (error) => { | ||
| const message = error.response?.data?.message || EMAIL_LOGIN_FAILURE_MESSAGE; |
There was a problem hiding this comment.
Use a non-credential fallback for transport failures
When the request fails without a response or response messageโfor example while offline, on timeout, or because of a CORS failureโthis always tells the user to check their credentials. The new mutation metadata also suppresses the global handler, which previously surfaced the Axios error message for these non-401 failures, so users now receive misleading recovery guidance; reserve the credential fallback for authentication responses and retain a connectivity/general fallback for other failures.
Useful? React with ๐ย / ๐.
|
|
||
| // ๋ก๊ทธ์ธ ์คํจ๋ ์ฌ์ฉ์๊ฐ ์๊ฒฉ์ฆ๋ช ์ ๊ณ ์ณ ๊ณง๋ฐ๋ก ์ฌ์๋ํ๋ ๊ฒฝ์ฐ๊ฐ ๋ง์ | ||
| // ๋์ผ ๋ฉ์์ง ์ต์ (dedupe)๋ฅผ ๋๊ณ ๋งค ์๋๋ง๋ค ํ ์คํธ๋ฅผ ๋ ธ์ถํ๋ค. | ||
| showIconToast("logo", message, { dedupe: false }); |
There was a problem hiding this comment.
Prevent duplicate toasts for Enter submissions
When a user submits the login form with Enter, LoginContent.tsx invokes handleSubmit(onSubmit)() in its input onKeyDown handler and then allows the same key event to perform the form's native submit, producing two mutations before isPending can re-render the form. With deduplication explicitly disabled here, both error callbacks now render identical stacked toasts for a single keypress; remove/coalesce the duplicate submission path or otherwise suppress errors from the same user action while still allowing later retries.
Useful? React with ๐ย / ๐.
์์ฝ
showIconToast์ ์ค๋ณต ์ต์ (dedupe) opt-out ์ต์ ์ ์ถ๊ฐํด, ์ฐ์ ์ฌ์๋ ์์๋ ํ ์คํธ๊ฐ ๋งค๋ฒ ๋ ธ์ถ๋๋๋ก ํ์ต๋๋ค.์์ธ
๋ก๊ทธ์ธ ์คํจ ์ ํ ์คํธ๋ฅผ ๋์ฐ๋ ์ฝ๋ ๊ฒฝ๋ก๊ฐ ์ธ ๊ฒน์ผ๋ก ๋งํ ์์์ต๋๋ค.
MutationCache.onError๊ฐ status 401์ด๋ฉด "์ธ์ฆ ์ค๋ฅ๋ ์ธํฐ์ ํฐ ๋ฆฌ๋ค์ด๋ ํธ ํ ์คํธ์์๋ง ์ฒ๋ฆฌ"๋ผ๋ ์ด์ ๋ก early return ํฉ๋๋ค. (apps/web/src/lib/react-query/queryClient.ts)/auth/email/sign-in)๋publicAxiosInstance๋ฅผ ์ฌ์ฉํฉ๋๋ค. ํ ์คํธ๋ฅผ ๋์ฐ๋ ์๋ต ์ธํฐ์ ํฐ(redirectToLogin)๋axiosInstance์๋ง ๋ฑ๋ก๋์ด ์๊ณpublicAxiosInstance์๋ ์ธํฐ์ ํฐ๊ฐ ์์ด, 1๋ฒ ์ฃผ์์ ์ ์ ๊ฐ ๋ก๊ทธ์ธ์ ๋ํด์๋ง ์ฑ๋ฆฝํ์ง ์์์ต๋๋ค.usePostEmailAuth์๋ ๋ก์ปฌonErrorํธ๋ค๋ฌ๊ฐ ์์์ต๋๋ค.๊ทธ ๊ฒฐ๊ณผ ๋น๋ฐ๋ฒํธ๋ฅผ ํ๋ฆฌ๋ฉด ๋ฒํผ์ด
๋ก๊ทธ์ธ ์ค...โ๋ก๊ทธ์ธ์ผ๋ก ๋๋์์ฌ ๋ฟ, ์ด๋ค ์๋ด๋ ํ์๋์ง ์์์ต๋๋ค.๋ณ๊ฒฝ ๋ด์ฉ
apps/web/src/apis/Auth/postEmailLogin.tsonError๋ฅผ ์ถ๊ฐํด ์คํจ ์ ํ ์คํธ๋ฅผ ๋ ธ์ถํฉ๋๋ค. ๋ฉ์์ง๋ ์๋ฒ ์๋ต(error.response?.data?.message)์ ์ฐ์ ์ฌ์ฉํ๊ณ , ์์ผ๋ฉด"์ด๋ฉ์ผ ๋๋ ๋น๋ฐ๋ฒํธ๋ฅผ ํ์ธํด์ฃผ์ธ์."๋ก ํด๋ฐฑํฉ๋๋ค.meta: SKIP_GLOBAL_ERROR_TOAST_META๋ฅผ ์ง์ ํ์ต๋๋ค. (๊ธฐ์กดpostSchoolEmail.tsํจํด ์ฌ์ฌ์ฉ)apps/web/src/lib/toast/showIconToast.tsx{ dedupe?: boolean }(๊ธฐ๋ณธ๊ฐtrue)๋ฅผ ์ถ๊ฐํ์ต๋๋ค.activeToastKeys๋icon:messageํค๋ก 3.5์ด๊ฐ ๋์ผ ํ ์คํธ๋ฅผ ์ต์ ํ๋๋ฐ, ๋ก๊ทธ์ธ ์คํจ์ฒ๋ผ ๊ฐ์ ์๋ฌ๋ก ์ฆ์ ์ฌ์๋ํ๋ ์ผ์ด์ค์์๋ ๋ ๋ฒ์งธ ์๋๋ถํฐ ํ ์คํธ๊ฐ ๋จ์ง ์๋ ๋ฌธ์ ๊ฐ ์์์ต๋๋ค.๋ฒ์ ๋ฐ (์๋์ ์ผ๋ก ์ ์ธ)
queryClient.ts์ ์ ์ญ 401 skip ๋ก์ง:axiosInstance๊ฒฝ์ ์์ฒญ์ ๋ํด์๋ ์ฌ์ ํ ์ฌ๋ฐ๋ฅด๋ฏ๋ก ๊ทธ๋๋ก ๋์์ต๋๋ค.apps/university-web(๋ฆฌ๋ผ์ดํธ ์งํ ์ค),apps/admin, ์นด์นด์ค/์ ํ ๋ก๊ทธ์ธ ํ .๊ฒ์ฆ
pnpm --filter @solid-connect/web run typecheckํต๊ณผpnpm --filter @solid-connect/web run lintํต๊ณผ (biome 473 files)ci:check(lint:check + typecheck:ci) ๋ ์ปค๋ฐ ๋ชจ๋ ํต๊ณผ๐ค Generated with Claude Code