Skip to content

Conversation

@manNomi
Copy link
Contributor

@manNomi manNomi commented Feb 2, 2026

์š”์•ฝ

์ตœ๊ทผ ์ œ๊ธฐ๋œ 5๊ฐœ์˜ ๋ฒ„๊ทธ ์ด์Šˆ๋ฅผ ์ˆœ์ฐจ์ ์œผ๋กœ ์ˆ˜์ •ํ•˜๊ณ , ์ฝ”๋“œ ๋ฆฌ๋ทฐ ํ”ผ๋“œ๋ฐฑ์„ ๋ฐ˜์˜ํ•˜์—ฌ ์‚ฌ์šฉ์ž ๊ฒฝํ—˜์„ ๊ฐœ์„ ํ–ˆ์Šต๋‹ˆ๋‹ค.

์ˆ˜์ • ๋‚ด์—ญ

โœจ #409: ๋ฉ˜ํ‹ฐ ์‹ ์ฒญํ•˜๊ธฐ โ†’ ๋ฉ˜ํ† ๋ง ์‹ ์ฒญํ•˜๊ธฐ ํ…์ŠคํŠธ ๋ณ€๊ฒฝ

  • ๋ฉ˜ํ†  ์นด๋“œ์˜ ์‹ ์ฒญ ๋ฒ„ํŠผ ํ…์ŠคํŠธ๋ฅผ "๋ฉ˜ํ‹ฐ ์‹ ์ฒญํ•˜๊ธฐ"์—์„œ "๋ฉ˜ํ† ๋ง ์‹ ์ฒญํ•˜๊ธฐ"๋กœ ๋ณ€๊ฒฝ
  • ํŒŒ์ผ: apps/web/src/components/mentor/MentorCard/index.tsx

๐ŸŽจ #408: ํ•ฉ๊ฒฉ ๋ ˆ์‹œํ”ผ ์ €์žฅ ๋ฒ„๊ทธ ์ˆ˜์ • ๋ฐ ํ…์ŠคํŠธ ์ƒ‰์ƒ ๊ฐœ์„ 

  • ํ•ฉ๊ฒฉ ๋ ˆ์‹œํ”ผ ์ดˆ๊ธฐ๊ฐ’์ด ๋นˆ ๋ฌธ์ž์—ด๋กœ ํ•˜๋“œ์ฝ”๋”ฉ๋˜์–ด ์ €์žฅ๋˜์ง€ ์•Š๋˜ ๋ฒ„๊ทธ ์ˆ˜์ •
  • passTip ํ•„๋“œ๋ฅผ myMentorProfile์—์„œ ์˜ฌ๋ฐ”๋ฅด๊ฒŒ ๋กœ๋“œํ•˜๋„๋ก ์ˆ˜์ •
  • ํ…์ŠคํŠธ ์ž…๋ ฅ ์‹œ ์ƒ‰์ƒ์ด ํšŒ์ƒ‰์—์„œ ๊ฒ€์ •์ƒ‰์œผ๋กœ ๋ณ€๊ฒฝ๋˜๋„๋ก ๊ฐœ์„ 
  • ํŒŒ์ผ:
    • apps/web/src/types/mentor.ts
    • apps/web/src/app/mentor/modify/_ui/ModifyContent/_hooks/useModifyHookForm.ts
    • apps/web/src/app/mentor/modify/_ui/ModifyContent/index.tsx

๐Ÿ’พ #407: ๋ฉ˜ํ†  ์•„ํ‹ฐํด ์ €์žฅ ๊ฐœ์„ 

  • ์•„ํ‹ฐํด ์ €์žฅ ์‹œ mutation ์„ฑ๊ณต ํ›„์—๋งŒ ๋ชจ๋‹ฌ์ด ๋‹ซํžˆ๋„๋ก ์ˆ˜์ •
  • URL ์œ ํšจ์„ฑ ๊ฒ€์‚ฌ ์Šคํ‚ค๋งˆ ๊ฐœ์„  (z.union ์‚ฌ์šฉ)
  • ์ €์žฅ ์‹คํŒจ ์‹œ ์‚ฌ์šฉ์ž๊ฐ€ ์—๋Ÿฌ ๋ฉ”์‹œ์ง€๋ฅผ ๋ณผ ์ˆ˜ ์žˆ๋„๋ก ๊ฐœ์„ 
  • ํŒŒ์ผ:
    • apps/web/src/components/mentor/ArticleBottomSheetModal/hooks/useArticleSchema.ts
    • apps/web/src/components/mentor/ArticleBottomSheetModal/lib/schema.ts

๐Ÿ’„ #406: ๋ฉ˜ํ†  ๋Œ€๊ธฐ ํŽ˜์ด์ง€ UI ๊ฐœ์„ 

  • ๊ณผ๋„ํ•œ ํŒจ๋”ฉ ์ œ๊ฑฐ (p-4 โ†’ ์ œ๊ฑฐ)
  • ํ…์ŠคํŠธ ํ‘œํ˜„ ๋ณ€๊ฒฝ: "{nickname} ๋‹˜" โ†’ "{nickname} ๋ฉ˜ํ† "
  • ํŒŒ์ผ: apps/web/src/app/mentor/waiting/_ui/WaitingContent/index.tsx

๐Ÿ”„ #405: ์ปค๋ฎค๋‹ˆํ‹ฐ ํŽ˜์ด์ง€ ISR Revalidate ์ถ”๊ฐ€

  • ๊ฒŒ์‹œ๊ธ€ ์ƒ์„ฑ ์™ธ์— ์ˆ˜์ • ๋ฐ ์‚ญ์ œ ์‹œ์—๋„ ISR revalidate ํŠธ๋ฆฌ๊ฑฐ ์ถ”๊ฐ€
  • ์ปค๋ฎค๋‹ˆํ‹ฐ ํŽ˜์ด์ง€๊ฐ€ ํ•ญ์ƒ ์ตœ์‹  ์ƒํƒœ๋ฅผ ๋ฐ˜์˜ํ•˜๋„๋ก ๊ฐœ์„ 
  • ํŒŒ์ผ:
    • apps/web/src/apis/community/patchUpdatePost.ts
    • apps/web/src/apis/community/deletePost.ts
    • apps/web/src/app/community/[boardCode]/[postId]/modify/PostModifyForm.tsx
    • apps/web/src/app/community/[boardCode]/[postId]/KebabMenu.tsx

์ฝ”๋“œ ๋ฆฌ๋ทฐ ๋ฐ˜์˜ ์‚ฌํ•ญ

๐Ÿ“‹ ํผ ์œ ํšจ์„ฑ ๊ฒ€์‚ฌ ๊ฐœ์„ 

  • ์ž…๋ ฅ ํ•„๋“œ ์œ ํšจ์„ฑ ๊ฒ€์‚ฌ ๋กœ์ง ๊ฐ•ํ™”
  • ์—๋Ÿฌ ๋ฉ”์‹œ์ง€ ๋ช…ํ™•ํ™”

๐Ÿ”˜ ์งˆ๋ฌธ ํ† ๊ธ€ ๊ธฐ๋Šฅ ๊ฐœ์„ 

  • ํ† ๊ธ€ ์ƒํƒœ ๊ด€๋ฆฌ ์ตœ์ ํ™”
  • ์‚ฌ์šฉ์ž ์ธํ„ฐ๋ž™์…˜ ๊ฐœ์„ 

โณ ๋Œ€๊ธฐ UI ํ…์ŠคํŠธ ๋ฐ ์นด์šดํŠธ ๊ฐœ์„ 

  • ๋Œ€๊ธฐ ์ƒํƒœ ๋ฉ”์‹œ์ง€ ๋ช…ํ™•ํ™”
  • ์นด์šดํŠธ ํ‘œ์‹œ ์ •ํ™•์„ฑ ํ–ฅ์ƒ

๐Ÿ–ฑ๏ธ ์ž…๋ ฅ ์ค‘ ์™ธ๋ถ€ ํด๋ฆญ ์ฒ˜๋ฆฌ

  • ์ž…๋ ฅ ํ•„๋“œ ํฌ์ปค์Šค ์ƒํƒœ ๊ด€๋ฆฌ ๊ฐœ์„ 
  • ์™ธ๋ถ€ ํด๋ฆญ ์‹œ ์ ์ ˆํ•œ ์ฒ˜๋ฆฌ ๋กœ์ง ์ถ”๊ฐ€

๐Ÿ“ maxLength ์†์„ฑ ์ถ”๊ฐ€

  • ์ž…๋ ฅ ํ•„๋“œ์— ์ ์ ˆํ•œ ์ตœ๋Œ€ ๊ธธ์ด ์ œํ•œ ์ ์šฉ
  • ์‚ฌ์šฉ์ž ์ž…๋ ฅ ๋ฒ”์œ„ ๋ช…ํ™•ํ™”

๐ŸŽฃ Hook ๋ฐ˜ํ™˜๊ฐ’ ์ตœ์ ํ™”

  • ์ปค์Šคํ…€ ํ›…์˜ ๋ฐ˜ํ™˜๊ฐ’ ๊ตฌ์กฐ ๊ฐœ์„ 
  • ๋ถˆํ•„์š”ํ•œ ์ƒํƒœ ์ œ๊ฑฐ ๋ฐ ์„ฑ๋Šฅ ์ตœ์ ํ™”

๊ฒ€์ฆ

  • โœ… ํƒ€์ž… ์ฒดํฌ ํ†ต๊ณผ
  • โœ… ๊ฐ ์ด์Šˆ๋ณ„๋กœ ์›์ž์  ์ปค๋ฐ‹ ์ƒ์„ฑ
  • โœ… ์ปค๋ฐ‹ ๋ฉ”์‹œ์ง€ ์ด๋ชจ์ง€ ๊ทœ์น™ ์ค€์ˆ˜
  • โœ… ์ฝ”๋“œ ๋ฆฌ๋ทฐ ํ”ผ๋“œ๋ฐฑ ๋ฐ˜์˜ ์™„๋ฃŒ

๊ด€๋ จ ์ด์Šˆ

Closes #405, Closes #406, Closes #407, Closes #408, Closes #409

@vercel
Copy link

vercel bot commented Feb 2, 2026

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

Project Deployment Actions Updated (UTC)
solid-connect-web-admin Error Error Feb 2, 2026 4:50pm
solid-connection-web Ready Ready Preview, Comment Feb 2, 2026 4:50pm

@coderabbitai
Copy link

coderabbitai bot commented Feb 2, 2026

Walkthrough

  1. ๊ฒŒ์‹œ๋ฌผ ์‚ญ์ œ/์ˆ˜์ •์— ISR ์žฌ๊ฒ€์ฆ ์ถ”๊ฐ€
    • ๊ฒŒ์‹œ๋ฌผ ์‚ญ์ œ ๋ฐ ์ˆ˜์ • ํ›…์— accessToken ๊ธฐ๋ฐ˜์˜ /api/revalidate ํ˜ธ์ถœ์„ ์ถ”๊ฐ€ํ•ด ๋ณด๋“œ๋ณ„ ISR์„ ํŠธ๋ฆฌ๊ฑฐํ•˜๋„๋ก ๋ณ€๊ฒฝํ–ˆ์Šต๋‹ˆ๋‹ค.
  2. deletePost ํ˜ธ์ถœํ˜•์‹ ๋ณ€๊ฒฝ
    • ์‚ญ์ œ ๋ฎคํ…Œ์ด์…˜์ด ์ด์ œ ๋‹จ์ผ postId ๋Œ€์‹  { postId, boardCode } ๊ฐ์ฒด๋ฅผ ๋ฐ›๋„๋ก ์ž…๋ ฅ ํ˜•ํƒœ๊ฐ€ ๋ณ€๊ฒฝ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.
  3. UI ๋ฐ ํผ ๋™์ž‘ ๊ฐœ์„ 
    • ๊ฒŒ์‹œ๋ฌผ ์ˆ˜์ • ํผ์— ํด๋ผ์ด์–ธํŠธ ๊ฒ€์ฆ๊ณผ boardCode ํฌํ•จ ์ „์†ก์„ ์ถ”๊ฐ€ํ–ˆ๊ณ , ์งˆ๋ฌธ/์ž์œ  ํ† ๊ธ€๊ณผ ํ† ์ŠคํŠธ ์•Œ๋ฆผ์„ ๋„์ž…ํ–ˆ์Šต๋‹ˆ๋‹ค.
  4. ๋ฉ˜ํ†  ๊ด€๋ จ ์†Œ์†Œํ•œ ์ˆ˜์ •
    • passTip ์ดˆ๊ธฐ๊ฐ’ ์ฒ˜๋ฆฌ ๋ณด์ •, ํ…์ŠคํŠธ/์Šคํƒ€์ผ ์กฐ์ •, ํƒ€์ž…์— passTip optional ์ถ”๊ฐ€ ๋“ฑ UI์™€ ํƒ€์ž… ์„ ์–ธ์ด ์ผ๋ถ€ ์กฐ์ •๋˜์—ˆ์Šต๋‹ˆ๋‹ค.
  5. ์•„ํ‹ฐํด ๋ชจ๋‹ฌ ๋ฐ ์Šคํ‚ค๋งˆ ์ •๋ฆฌ
    • ์•„ํ‹ฐํด ์ƒ์„ฑ/์ˆ˜์ • ๋ฎคํ…Œ์ด์…˜์˜ ์„ฑ๊ณต ์ฝœ๋ฐฑ์œผ๋กœ ๋ชจ๋‹ฌ ๋‹ซ๊ธฐยท๋ฆฌ์…‹์„ ์ฒ˜๋ฆฌํ•˜๋„๋ก ๋ณ€๊ฒฝํ•˜๊ณ  URL ๊ฒ€์ฆ ์Šคํ‚ค๋งˆ๋ฅผ ๋ช…์‹œ์ ์œผ๋กœ ์žฌ๊ตฌ์„ฑํ–ˆ์Šต๋‹ˆ๋‹ค.

Estimated code review effort

๐ŸŽฏ 3 (Moderate) | โฑ๏ธ ~30 minutes

Suggested reviewers

  • wibaek
  • enunsnv
  • khwww
๐Ÿšฅ Pre-merge checks | โœ… 5
โœ… Passed checks (5 passed)
Check name Status Explanation
Title check โœ… Passed PR ์ œ๋ชฉ์ด ์ด์Šˆ #405-#409 ์ˆ˜์ •์ด๋ผ๋Š” ์ฃผ์š” ๋ณ€๊ฒฝ์‚ฌํ•ญ์„ ๋ช…ํ™•ํ•˜๊ฒŒ ์š”์•ฝํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค.
Description check โœ… Passed PR ์„ค๋ช…์ด ํ•„์ˆ˜ ์„น์…˜(๊ด€๋ จ ์ด์Šˆ, ์ˆ˜์ • ๋‚ด์—ญ, ๊ฒ€์ฆ)์„ ๋ชจ๋‘ ํฌํ•จํ•˜๋ฉฐ ๊ฐ ์ด์Šˆ๋ณ„๋กœ ์ƒ์„ธํ•˜๊ฒŒ ๊ธฐ์ˆ ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค.
Linked Issues check โœ… Passed ์ฝ”๋“œ ๋ณ€๊ฒฝ์‚ฌํ•ญ์ด ๋งํฌ๋œ 5๊ฐœ ์ด์Šˆ(#405-#409)์˜ ์š”๊ตฌ์‚ฌํ•ญ์„ ๋ชจ๋‘ ์ถฉ์กฑํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค.
Out of Scope Changes check โœ… Passed ๋ชจ๋“  ๋ณ€๊ฒฝ์‚ฌํ•ญ์ด ๋งํฌ๋œ 5๊ฐœ ์ด์Šˆ์˜ ๋ฒ”์œ„ ๋‚ด์— ์žˆ์œผ๋ฉฐ ์ถ”๊ฐ€์ ์ธ ๋ฒ”์œ„ ์™ธ ๋ณ€๊ฒฝ์€ ์—†์Šต๋‹ˆ๋‹ค.
Docstring Coverage โœ… Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

โœ๏ธ Tip: You can configure your own custom pre-merge checks in the settings.

โœจ Finishing touches
  • ๐Ÿ“ Generate docstrings
๐Ÿงช Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/issues-405-409

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 and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

๐Ÿค– Fix all issues with AI agents
In `@apps/web/src/apis/community/deletePost.ts`:
- Around line 20-34: The revalidation call in revalidateCommunityPage currently
awaits fetch but doesn't check HTTP status, so 4xx/5xx responses silently
succeed; update revalidateCommunityPage to capture the fetch response, check
response.ok, and if false log or throw an error including response.status and
response.statusText (or response.text()) so failed ISR revalidations are
visible; ensure this handling occurs after the fetch and before returning from
revalidateCommunityPage.

In `@apps/web/src/apis/community/patchUpdatePost.ts`:
- Around line 19-33: The fetch in revalidateCommunityPage currently treats all
HTTP responses as success; update the function to check the Response.ok after
the await fetch (in revalidateCommunityPage) and handle non-ok responses by
throwing or logging a descriptive error (include response.status and response
text) so the existing try/catch can surface failures; ensure the
Authorization/header/body logic remains unchanged and that failures end up
logged or rethrown for callers to observe.
๐Ÿงน Nitpick comments (2)
apps/web/src/components/mentor/ArticleBottomSheetModal/hooks/useArticleSchema.ts (2)

109-113: 2. handleModalClose์—์„œ์˜ ์ค‘๋ณต ์ดˆ๊ธฐํ™”

handleModalClose ํ•จ์ˆ˜์—์„œ reset()๊ณผ setImagePreview(null)์„ ์ง์ ‘ ํ˜ธ์ถœํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ๊ทธ๋Ÿฌ๋‚˜ Line 66-69์˜ useEffect๊ฐ€ isOpen์ด false๊ฐ€ ๋  ๋•Œ ์ด๋ฏธ ๋™์ผํ•œ ์ดˆ๊ธฐํ™”๋ฅผ ์ˆ˜ํ–‰ํ•ฉ๋‹ˆ๋‹ค.

handleClose()๊ฐ€ ๋‚ด๋ถ€์ ์œผ๋กœ isOpen์„ false๋กœ ์„ค์ •ํ•œ๋‹ค๋ฉด, ์—ฌ๊ธฐ์„œ์˜ reset()๊ณผ setImagePreview(null) ํ˜ธ์ถœ์€ ์ค‘๋ณต๋ฉ๋‹ˆ๋‹ค. ์ฝ”๋“œ ์ผ๊ด€์„ฑ์„ ์œ„ํ•ด ์ •๋ฆฌ๋ฅผ ๊ณ ๋ คํ•ด ๋ณด์„ธ์š”.

โ™ป๏ธ ๊ฐ„์†Œํ™” ์ œ์•ˆ
  const handleModalClose = () => {
    handleClose();
-   reset();
-   setImagePreview(null);
  };

88-106: โœ… ์ข‹์€ ๋ณ€๊ฒฝ์ž…๋‹ˆ๋‹ค. ์—๋Ÿฌ ์ฒ˜๋ฆฌ๊ฐ€ mutation ํ›…์— ์ž˜ ๊ตฌํ˜„๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค.

usePostAddArticle๊ณผ usePutModifyArticle ํ›…์„ ํ™•์ธํ•œ ๊ฒฐ๊ณผ, ๋‘ ํ›… ๋ชจ๋‘ onError ์ฝœ๋ฐฑ์—์„œ toast๋ฅผ ํ†ตํ•œ ์—๋Ÿฌ ํ”ผ๋“œ๋ฐฑ์„ ์ด๋ฏธ ์ฒ˜๋ฆฌํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. Mutation ์„ฑ๊ณต ์‹œ์—๋งŒ ๋ชจ๋‹ฌ์„ ๋‹ซ๊ณ  ํผ์„ ๋ฆฌ์…‹ํ•˜๋„๋ก ๊ฐœ์„ ํ•˜์‹  ๋ถ€๋ถ„๋„ PR ๋ชฉํ‘œ์— ๋งž๊ฒŒ ์ž˜ ๊ตฌํ˜„๋˜์—ˆ์Šต๋‹ˆ๋‹ค.

๋‹ค๋งŒ ํ•˜๋‚˜์˜ ์ตœ์ ํ™” ์ ์„ ์ œ์•ˆํ•ฉ๋‹ˆ๋‹ค:

  1. ์ค‘๋ณต reset() ์ œ๊ฑฐ ์ œ์•ˆ
    • onSuccess์—์„œ reset() ํ˜ธ์ถœ ํ›„ handleClose()๊ฐ€ isOpen์„ false๋กœ ๋ณ€๊ฒฝํ•˜๋ฉด, useEffect (line 52-69)๊ฐ€ ๋‹ค์‹œ reset()์„ ํ˜ธ์ถœํ•ฉ๋‹ˆ๋‹ค.
    • ๋™์ž‘์—๋Š” ๋ฌธ์ œ์—†์œผ๋‚˜, useEffect๊ฐ€ ์ด๋ฏธ ๋ชจ๋‹ฌ ๋‹ซํž ๋•Œ ์ƒํƒœ ์ดˆ๊ธฐํ™”๋ฅผ ๋‹ด๋‹นํ•˜๋ฏ€๋กœ ๋ถˆํ•„์š”ํ•œ ์ค‘๋ณต์ž…๋‹ˆ๋‹ค.
โ™ป๏ธ ๊ฐœ์„  ๋ฐฉ์•ˆ
      putModifyArticle(
        { body: data, articleId },
        {
          onSuccess: () => {
            handleClose();
-           reset();
          },
        }
      );
    } else {
      postAddArticle(data, {
        onSuccess: () => {
          handleClose();
-         reset();
        },
      });
    }

Comment on lines +20 to +34
const revalidateCommunityPage = async (boardCode: string, accessToken: string) => {
try {
if (!accessToken) {
console.warn("Revalidation skipped: No access token available");
return;
}

await fetch("/api/revalidate", {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${accessToken}`,
},
body: JSON.stringify({ boardCode }),
});
Copy link

Choose a reason for hiding this comment

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

โš ๏ธ Potential issue | ๐ŸŸ  Major

ISR revalidate๊ฐ€ โ€˜์กฐ์šฉํžˆ ์‹คํŒจโ€™ํ•  ์ˆ˜ ์žˆ์–ด์š”.
fetch๋Š” 4xx/5xx์—์„œ๋„ ์˜ˆ์™ธ๋ฅผ ๋˜์ง€์ง€ ์•Š์•„์„œ, ํ˜„์žฌ๋Š” ์‹คํŒจ๊ฐ€ ๋กœ๊ทธ ์—†์ด ํ†ต๊ณผ๋  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์‘๋‹ต ok ์ฒดํฌ๋ฅผ ์ถ”๊ฐ€ํ•ด ์ฃผ์„ธ์š”.

๐Ÿ”ง ์ˆ˜์ • ์ œ์•ˆ
-    await fetch("/api/revalidate", {
+    const response = await fetch("/api/revalidate", {
       method: "POST",
       headers: {
         "Content-Type": "application/json",
         Authorization: `Bearer ${accessToken}`,
       },
       body: JSON.stringify({ boardCode }),
     });
+    if (!response.ok) {
+      throw new Error(`Revalidate failed: ${response.status}`);
+    }
๐Ÿค– Prompt for AI Agents
In `@apps/web/src/apis/community/deletePost.ts` around lines 20 - 34, The
revalidation call in revalidateCommunityPage currently awaits fetch but doesn't
check HTTP status, so 4xx/5xx responses silently succeed; update
revalidateCommunityPage to capture the fetch response, check response.ok, and if
false log or throw an error including response.status and response.statusText
(or response.text()) so failed ISR revalidations are visible; ensure this
handling occurs after the fetch and before returning from
revalidateCommunityPage.

Comment on lines +19 to +33
const revalidateCommunityPage = async (boardCode: string, accessToken: string) => {
try {
if (!accessToken) {
console.warn("Revalidation skipped: No access token available");
return;
}

await fetch("/api/revalidate", {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${accessToken}`,
},
body: JSON.stringify({ boardCode }),
});
Copy link

Choose a reason for hiding this comment

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

โš ๏ธ Potential issue | ๐ŸŸ  Major

์—ฌ๊ธฐ๋„ revalidate ์‹คํŒจ๊ฐ€ ์ˆจ๊ฒจ์งˆ ์ˆ˜ ์žˆ์–ด์š”.
fetch๋Š” 4xx/5xx์—์„œ๋„ ์„ฑ๊ณต์œผ๋กœ resolve๋˜๋ฏ€๋กœ, ์‘๋‹ต ok ์ฒดํฌ๋กœ ์‹คํŒจ๋ฅผ ๋ช…์‹œํ•ด ์ฃผ์„ธ์š”.

๐Ÿ”ง ์ˆ˜์ • ์ œ์•ˆ
-    await fetch("/api/revalidate", {
+    const response = await fetch("/api/revalidate", {
       method: "POST",
       headers: {
         "Content-Type": "application/json",
         Authorization: `Bearer ${accessToken}`,
       },
       body: JSON.stringify({ boardCode }),
     });
+    if (!response.ok) {
+      throw new Error(`Revalidate failed: ${response.status}`);
+    }
๐Ÿ“ Committable suggestion

โ€ผ๏ธ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const revalidateCommunityPage = async (boardCode: string, accessToken: string) => {
try {
if (!accessToken) {
console.warn("Revalidation skipped: No access token available");
return;
}
await fetch("/api/revalidate", {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${accessToken}`,
},
body: JSON.stringify({ boardCode }),
});
const revalidateCommunityPage = async (boardCode: string, accessToken: string) => {
try {
if (!accessToken) {
console.warn("Revalidation skipped: No access token available");
return;
}
const response = await fetch("/api/revalidate", {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${accessToken}`,
},
body: JSON.stringify({ boardCode }),
});
if (!response.ok) {
throw new Error(`Revalidate failed: ${response.status}`);
}
๐Ÿค– Prompt for AI Agents
In `@apps/web/src/apis/community/patchUpdatePost.ts` around lines 19 - 33, The
fetch in revalidateCommunityPage currently treats all HTTP responses as success;
update the function to check the Response.ok after the await fetch (in
revalidateCommunityPage) and handle non-ok responses by throwing or logging a
descriptive error (include response.status and response text) so the existing
try/catch can surface failures; ensure the Authorization/header/body logic
remains unchanged and that failures end up logged or rethrown for callers to
observe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

2 participants