Skip to content

๐Ÿ› ์ด๋ฉ”์ผ ๋กœ๊ทธ์ธ ์‹คํŒจ ์‹œ ํ† ์ŠคํŠธ๊ฐ€ ํ‘œ์‹œ๋˜์ง€ ์•Š๋Š” ๋ฌธ์ œ ์ˆ˜์ • - #614

Merged
manNomi merged 3 commits into
mainfrom
fix/login-error-toast
Aug 1, 2026
Merged

๐Ÿ› ์ด๋ฉ”์ผ ๋กœ๊ทธ์ธ ์‹คํŒจ ์‹œ ํ† ์ŠคํŠธ๊ฐ€ ํ‘œ์‹œ๋˜์ง€ ์•Š๋Š” ๋ฌธ์ œ ์ˆ˜์ •#614
manNomi merged 3 commits into
mainfrom
fix/login-error-toast

Conversation

@manNomi

@manNomi manNomi commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

์š”์•ฝ

  • ์ด๋ฉ”์ผ ๋กœ๊ทธ์ธ ์‹คํŒจ(401) ์‹œ ์‚ฌ์šฉ์ž์—๊ฒŒ ์•„๋ฌด ํ”ผ๋“œ๋ฐฑ๋„ ํ‘œ์‹œ๋˜์ง€ ์•Š๋˜ ๋ฌธ์ œ๋ฅผ ์ˆ˜์ •ํ–ˆ์Šต๋‹ˆ๋‹ค.
  • showIconToast์— ์ค‘๋ณต ์–ต์ œ(dedupe) opt-out ์˜ต์…˜์„ ์ถ”๊ฐ€ํ•ด, ์—ฐ์† ์žฌ์‹œ๋„ ์‹œ์—๋„ ํ† ์ŠคํŠธ๊ฐ€ ๋งค๋ฒˆ ๋…ธ์ถœ๋˜๋„๋ก ํ–ˆ์Šต๋‹ˆ๋‹ค.

์›์ธ

๋กœ๊ทธ์ธ ์‹คํŒจ ์‹œ ํ† ์ŠคํŠธ๋ฅผ ๋„์šฐ๋Š” ์ฝ”๋“œ ๊ฒฝ๋กœ๊ฐ€ ์„ธ ๊ฒน์œผ๋กœ ๋ง‰ํ˜€ ์žˆ์—ˆ์Šต๋‹ˆ๋‹ค.

  1. ์ „์—ญ MutationCache.onError๊ฐ€ status 401์ด๋ฉด "์ธ์ฆ ์˜ค๋ฅ˜๋Š” ์ธํ„ฐ์…‰ํ„ฐ ๋ฆฌ๋‹ค์ด๋ ‰ํŠธ ํ† ์ŠคํŠธ์—์„œ๋งŒ ์ฒ˜๋ฆฌ"๋ผ๋Š” ์ด์œ ๋กœ early return ํ•ฉ๋‹ˆ๋‹ค. (apps/web/src/lib/react-query/queryClient.ts)
  2. ๊ทธ๋Ÿฌ๋‚˜ ๋กœ๊ทธ์ธ API(/auth/email/sign-in)๋Š” publicAxiosInstance๋ฅผ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค. ํ† ์ŠคํŠธ๋ฅผ ๋„์šฐ๋Š” ์‘๋‹ต ์ธํ„ฐ์…‰ํ„ฐ(redirectToLogin)๋Š” axiosInstance์—๋งŒ ๋“ฑ๋ก๋˜์–ด ์žˆ๊ณ  publicAxiosInstance์—๋Š” ์ธํ„ฐ์…‰ํ„ฐ๊ฐ€ ์—†์–ด, 1๋ฒˆ ์ฃผ์„์˜ ์ „์ œ๊ฐ€ ๋กœ๊ทธ์ธ์— ๋Œ€ํ•ด์„œ๋งŒ ์„ฑ๋ฆฝํ•˜์ง€ ์•Š์•˜์Šต๋‹ˆ๋‹ค.
  3. usePostEmailAuth์—๋Š” ๋กœ์ปฌ onError ํ•ธ๋“ค๋Ÿฌ๊ฐ€ ์—†์—ˆ์Šต๋‹ˆ๋‹ค.

๊ทธ ๊ฒฐ๊ณผ ๋น„๋ฐ€๋ฒˆํ˜ธ๋ฅผ ํ‹€๋ฆฌ๋ฉด ๋ฒ„ํŠผ์ด ๋กœ๊ทธ์ธ ์ค‘... โ†’ ๋กœ๊ทธ์ธ์œผ๋กœ ๋˜๋Œ์•„์˜ฌ ๋ฟ, ์–ด๋–ค ์•ˆ๋‚ด๋„ ํ‘œ์‹œ๋˜์ง€ ์•Š์•˜์Šต๋‹ˆ๋‹ค.

๋ณ€๊ฒฝ ๋‚ด์šฉ

apps/web/src/apis/Auth/postEmailLogin.ts

  • onError๋ฅผ ์ถ”๊ฐ€ํ•ด ์‹คํŒจ ์‹œ ํ† ์ŠคํŠธ๋ฅผ ๋…ธ์ถœํ•ฉ๋‹ˆ๋‹ค. ๋ฉ”์‹œ์ง€๋Š” ์„œ๋ฒ„ ์‘๋‹ต(error.response?.data?.message)์„ ์šฐ์„  ์‚ฌ์šฉํ•˜๊ณ , ์—†์œผ๋ฉด "์ด๋ฉ”์ผ ๋˜๋Š” ๋น„๋ฐ€๋ฒˆํ˜ธ๋ฅผ ํ™•์ธํ•ด์ฃผ์„ธ์š”."๋กœ ํด๋ฐฑํ•ฉ๋‹ˆ๋‹ค.
  • 401 ์™ธ status์—์„œ ์ „์—ญ ํ† ์ŠคํŠธ์™€ ์ค‘๋ณต๋˜์ง€ ์•Š๋„๋ก meta: SKIP_GLOBAL_ERROR_TOAST_META๋ฅผ ์ง€์ •ํ–ˆ์Šต๋‹ˆ๋‹ค. (๊ธฐ์กด postSchoolEmail.ts ํŒจํ„ด ์žฌ์‚ฌ์šฉ)
  • ๋ฆฌ๋‹ค์ด๋ ‰ํŠธ๋Š” ์ถ”๊ฐ€ํ•˜์ง€ ์•Š์•˜์Šต๋‹ˆ๋‹ค. ๋กœ๊ทธ์ธ ํŽ˜์ด์ง€์— ๊ทธ๋Œ€๋กœ ๋จธ๋ฌด๋ฆ…๋‹ˆ๋‹ค.

apps/web/src/lib/toast/showIconToast.tsx

  • ์„ธ ๋ฒˆ์งธ ์ธ์ž๋กœ { dedupe?: boolean }(๊ธฐ๋ณธ๊ฐ’ true)๋ฅผ ์ถ”๊ฐ€ํ–ˆ์Šต๋‹ˆ๋‹ค.
  • ๊ธฐ์กด activeToastKeys๋Š” icon:message ํ‚ค๋กœ 3.5์ดˆ๊ฐ„ ๋™์ผ ํ† ์ŠคํŠธ๋ฅผ ์–ต์ œํ•˜๋Š”๋ฐ, ๋กœ๊ทธ์ธ ์‹คํŒจ์ฒ˜๋Ÿผ ๊ฐ™์€ ์—๋Ÿฌ๋กœ ์ฆ‰์‹œ ์žฌ์‹œ๋„ํ•˜๋Š” ์ผ€์ด์Šค์—์„œ๋Š” ๋‘ ๋ฒˆ์งธ ์‹œ๋„๋ถ€ํ„ฐ ํ† ์ŠคํŠธ๊ฐ€ ๋œจ์ง€ ์•Š๋Š” ๋ฌธ์ œ๊ฐ€ ์žˆ์—ˆ์Šต๋‹ˆ๋‹ค.
  • ๊ธฐ์กด ํ˜ธ์ถœ๋ถ€๋Š” ์ธ์ž๋ฅผ ๋„˜๊ธฐ์ง€ ์•Š์œผ๋ฏ€๋กœ ๋™์ž‘์ด ๊ทธ๋Œ€๋กœ ์œ ์ง€๋˜๋ฉฐ, ๋กœ๊ทธ์ธ ์‹คํŒจ์—์„œ๋งŒ opt-out ํ•ฉ๋‹ˆ๋‹ค.

๋ฒ”์œ„ ๋ฐ– (์˜๋„์ ์œผ๋กœ ์ œ์™ธ)

  • 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)
  • ์ปค๋ฐ‹ ์‹œ pre-commit ํ›…์˜ ci:check(lint:check + typecheck:ci) ๋‘ ์ปค๋ฐ‹ ๋ชจ๋‘ ํ†ต๊ณผ

๐Ÿค– Generated with Claude Code

@manNomi
manNomi requested a review from wibaek as a code owner August 1, 2026 04:19
@vercel

vercel Bot commented Aug 1, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
solid-connect-university-web Ready Ready Preview Aug 1, 2026 6:40am
solid-connection-web Ready Ready Preview Aug 1, 2026 6:40am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
solid-connect-web-admin Skipped Skipped Aug 1, 2026 6:40am

@github-actions github-actions Bot added the web label Aug 1, 2026
@coderabbitai

coderabbitai Bot commented Aug 1, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. ๐ŸŽ‰

โ„น๏ธ Recent review info
โš™๏ธ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: b1e23679-6dcb-41f2-85e6-220e1092435c

๐Ÿ“ฅ Commits

Reviewing files that changed from the base of the PR and between e96a187 and 51a4426.

๐Ÿ“’ Files selected for processing (2)
  • apps/web/src/apis/Auth/postEmailLogin.ts
  • apps/web/src/app/login/LoginContent.tsx
๐Ÿ’ค Files with no reviewable changes (1)
  • apps/web/src/app/login/LoginContent.tsx
๐Ÿšง Files skipped from review as they are similar to previous changes (1)
  • apps/web/src/apis/Auth/postEmailLogin.ts

Walkthrough

  1. ํ† ์ŠคํŠธ ์ค‘๋ณต ์ œ์–ด ํ™•์žฅ
    showIconToast์— dedupe ์˜ต์…˜์„ ์ถ”๊ฐ€ํ–ˆ์Šต๋‹ˆ๋‹ค. false์ด๋ฉด ์ค‘๋ณต ์ฐจ๋‹จ๊ณผ cooldown ํ‚ค ์‚ญ์ œ ์˜ˆ์•ฝ์„ ๊ฑด๋„ˆ๋œ๋‹ˆ๋‹ค.

  2. ์ด๋ฉ”์ผ ๋กœ๊ทธ์ธ ์˜ค๋ฅ˜ ํ‘œ์‹œ ๋ณ€๊ฒฝ
    ์„œ๋ฒ„ ์˜ค๋ฅ˜ ๋ฉ”์‹œ์ง€๋ฅผ ์šฐ์„  ํ‘œ์‹œํ•ฉ๋‹ˆ๋‹ค. ๋ฉ”์‹œ์ง€๊ฐ€ ์—†์œผ๋ฉด ์ƒํƒœ ์ฝ”๋“œ๋ณ„ ๋˜๋Š” ๊ธฐ๋ณธ ๋ฌธ๊ตฌ๋ฅผ ํ‘œ์‹œํ•ฉ๋‹ˆ๋‹ค. ๊ฐ ๋กœ๊ทธ์ธ ์‹œ๋„์—์„œ ํ† ์ŠคํŠธ๊ฐ€ ํ‘œ์‹œ๋˜๋„๋ก dedupe: false๋ฅผ ์ „๋‹ฌํ•ฉ๋‹ˆ๋‹ค.

  3. ๋กœ๊ทธ์ธ ์ž…๋ ฅ ์ œ์ถœ ์ฒ˜๋ฆฌ ์ •๋ฆฌ
    ์ด๋ฉ”์ผ๊ณผ ๋น„๋ฐ€๋ฒˆํ˜ธ ์ž…๋ ฅ ํ•„๋“œ์˜ ์ˆ˜๋™ Enter ํ‚ค ์ฒ˜๋ฆฌ๋ฅผ ์ œ๊ฑฐํ–ˆ์Šต๋‹ˆ๋‹ค. ๊ธฐ์กด ํผ ์ œ์ถœ ํ๋ฆ„์„ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Suggested reviewers: wibaek

๐Ÿšฅ Pre-merge checks | โœ… 5
โœ… Passed checks (5 passed)
Check name Status Explanation
Title check โœ… Passed ์ด๋ฉ”์ผ ๋กœ๊ทธ์ธ ์‹คํŒจ ์‹œ ํ† ์ŠคํŠธ๊ฐ€ ํ‘œ์‹œ๋˜์ง€ ์•Š๋Š” ๋ฌธ์ œ๋ฅผ ์ˆ˜์ •ํ•œ๋‹ค๋Š” ํ•ต์‹ฌ ๋ณ€๊ฒฝ์„ ๋ช…ํ™•ํ•˜๊ฒŒ ์„ค๋ช…ํ•ฉ๋‹ˆ๋‹ค.
Description check โœ… Passed ๋ณ€๊ฒฝ ๋‚ด์šฉ, ์›์ธ, ๋ฒ”์œ„, ๊ฒ€์ฆ ๊ฒฐ๊ณผ๋ฅผ ๊ตฌ์ฒด์ ์œผ๋กœ ์„ค๋ช…ํ•˜๋ฉฐ ์ž‘์—… ๋‚ด์šฉ๊ณผ ํŠน์ด ์‚ฌํ•ญ์„ ๋Œ€๋ถ€๋ถ„ ์ถฉ์กฑํ•ฉ๋‹ˆ๋‹ค.
Docstring Coverage โœ… Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check โœ… Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check โœ… Passed Check skipped because no linked issues were found for this pull request.
โœจ Finishing Touches
๐Ÿ“ Generate docstrings
  • Create stacked PR
  • Commit on current branch
๐Ÿงช Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/login-error-toast

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.

โค๏ธ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๐Ÿ’ก 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;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 });

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 ๐Ÿ‘ย / ๐Ÿ‘Ž.

@vercel
vercel Bot temporarily deployed to Preview โ€“ solid-connect-web-admin August 1, 2026 06:36 Inactive
@manNomi
manNomi merged commit 97f1cb0 into main Aug 1, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant