Skip to content

Conversation

@chominju02
Copy link
Contributor

@chominju02 chominju02 commented Oct 11, 2025

✅ Linked Issue

🔍 What I did

Before After

💡 Why I did it

🧠 What I learned

🧪 How to test

🔧 Additional context

🚧 TODO (if any)

  • [ ]

Summary by CodeRabbit

  • New Features

    • None
  • Chores

    • Disabled the refund action on the registered exam card; the refund/cancel button is now always inactive.
    • Removed the refund form’s submit button on the refund detail page, so refunds cannot be submitted from the UI.
  • Known Impact

    • Users can still view refund details, but cannot initiate or submit a refund request from the app at this time.

@vercel
Copy link

vercel bot commented Oct 11, 2025

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

Project Deployment Preview Comments Updated (UTC)
mosu-client Ready Ready Preview Comment Oct 11, 2025 0:40am

@coderabbitai
Copy link

coderabbitai bot commented Oct 11, 2025

Walkthrough

Disables refund actions in UI: one button is now always disabled in RegisteredExamCard, and the refund page’s submit button is commented out, leaving the submit handler without a visible control.

Changes

Cohort / File(s) Summary
Refund action disabling
mosu-app/src/entities/exam/ui/RegisteredExamCard.tsx, mosu-app/src/pages/mypage/refund/[id]/index.tsx
In the exam card, the cancel/refund button is set to disabled unconditionally. On the refund page, the submit button JSX is commented out, removing the visible submit control while keeping the handler code.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant U as User
  participant RC as RegisteredExamCard
  participant RP as RefundPage

  Note over RC: Before -> conditional disable based on isRefunded
  U->>RC: View exam registration
  RC-->>U: Shows refund button (now always disabled)

  Note over RP: Submit button removed from UI
  U->>RP: Open refund page
  RP-->>U: Renders form without submit control
  U--xRP: Cannot trigger submit via UI
  Note right of RP: Submit handler remains in code but is inaccessible from UI
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

I tapped the button—oh! it snoozed,
A gentle lock the devs have used.
On refund paths, the clicks now rest,
A pause for carrots, code at jest.
I’ll wait and wiggle whiskers bright,
Till green returns to “Submit” light. 🥕✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title “환불 버튼 비활성화” clearly summarizes the main change of disabling the refund button in the UI, which aligns directly with modifications to the RegisteredExamCard component and the refund form page. It is concise, specific, and provides enough context for a teammate reviewing history to understand the primary intent of the PR.
✨ 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 refactor/refundButton

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.

@github-actions
Copy link

github-actions bot commented Oct 11, 2025

Warnings
⚠️ PR 제목에 #이슈넘버가 포함되어 있지 않습니다. 이슈 번호를 포함해주세요.
⚠️ PR에 Reviewers가 지정되어 있지 않습니다. 리뷰어를 지정해주세요.
⚠️ PR에 라벨이 지정되어 있지 않습니다. 적절한 라벨을 추가해주세요.
⚠️ PR에 Assignees가 지정되어 있지 않습니다. 적절한 Assignee를 추가해주세요.
⚠️ 브랜치 이름 'refactor/refundButton'이 컨벤션을 따르지 않습니다. # 형식으로 작성해주세요
Messages
📖 ✅ package.json에 변경사항이 없습니다.
📖 ✅ TypeScript 컴파일이 성공적으로 완료되었습니다.
📖 ✅ ESLint 검사 결과 문제가 없습니다.

📝 추가 및 변경된 파일

총 1개 파일 변경

└── 📂 mosu-app/
    └── 📂 src/
        └── 📂 entities/
            └── 📂 exam/
                └── 📂 ui/
                    └── ⚛️ RegisteredExamCard.tsx

Generated by 🚫 dangerJS against 9cd552b

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: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
mosu-app/src/entities/exam/ui/RegisteredExamCard.tsx (1)

71-80: Hardcoding disabled={true} creates UX and logic inconsistencies.

This change introduces several issues:

  1. Styling inconsistency: The button is always disabled, but the visual disabled state (opacity-50, cursor-not-allowed) only appears when isRefunded is true. Users will see an enabled-looking button that doesn't work.

  2. Inconsistent button behavior: The first button uses conditional disabling (disabled={isRefunded}), while this button is always disabled. This inconsistency is confusing.

  3. Dead code: The onClick handler, refundUrl constant (lines 36-41), and routing logic are now unreachable since the button is always disabled.

  4. Broken user flow: Even if this button were enabled, the refund page (as seen in mosu-app/src/pages/mypage/refund/[id]/index.tsx) has its submit button commented out, creating a dead-end user journey.

If refunds need to be temporarily disabled, consider these alternatives:

  • Remove the button entirely and show an informational message
  • Use a feature flag to conditionally render the button
  • Show a tooltip/modal explaining why refunds are unavailable
  • Keep the conditional logic but update the condition (e.g., add a time-based check)

Apply this diff if refunds should be completely hidden:

-            <footer className="my-5 flex rounded-lg border font-semibold">
+            <footer className="my-5 flex rounded-lg border font-semibold [&>button:only-child]:border-none">
                 <button
                     className={cn(
-                        "flex-1 border-r-[0.5px] p-4 hover:cursor-pointer",
+                        "flex-1 p-4 hover:cursor-pointer",
                         isRefunded && "opacity-50 hover:cursor-not-allowed",
                     )}
                     onClick={() => router.push(appliedExamDetailUrl)}
                     disabled={isRefunded}
                 >
                     상세조회
                 </button>
-                <button
-                    className={cn(
-                        "flex-1 border-l-[0.5px] p-4 hover:cursor-pointer",
-                        isRefunded && "opacity-50 hover:cursor-not-allowed",
-                    )}
-                    onClick={() => router.push(refundUrl)}
-                    disabled={true}
-                >
-                    취소 및 환불
-                </button>
             </footer>

Alternatively, if refunds should be temporarily disabled but the UI should remain, add a clear disabled state:

+            const isRefundDisabled = true; // TODO: Remove when refunds are re-enabled
+
             <footer className="my-5 flex rounded-lg border font-semibold">
                 <button
                     className={cn(
                         "flex-1 border-r-[0.5px] p-4 hover:cursor-pointer",
                         isRefunded && "opacity-50 hover:cursor-not-allowed",
                     )}
                     onClick={() => router.push(appliedExamDetailUrl)}
                     disabled={isRefunded}
                 >
                     상세조회
                 </button>
                 <button
                     className={cn(
                         "flex-1 border-l-[0.5px] p-4 hover:cursor-pointer",
-                        isRefunded && "opacity-50 hover:cursor-not-allowed",
+                        (isRefunded || isRefundDisabled) && "opacity-50 hover:cursor-not-allowed",
                     )}
                     onClick={() => router.push(refundUrl)}
-                    disabled={true}
+                    disabled={isRefundDisabled || isRefunded}
+                    title={isRefundDisabled ? "환불 기능이 일시적으로 비활성화되었습니다" : undefined}
                 >
                     취소 및 환불
                 </button>
             </footer>
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d5d1551 and 1ecd93a.

📒 Files selected for processing (2)
  • mosu-app/src/entities/exam/ui/RegisteredExamCard.tsx (1 hunks)
  • mosu-app/src/pages/mypage/refund/[id]/index.tsx (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Run DangerJS
  • GitHub Check: Run Unit & Integration Tests

@github-actions
Copy link

📚 Storybook이 Chromatic에 배포되었습니다!

@chominju02 chominju02 merged commit ca6ea54 into main Oct 11, 2025
9 checks passed
@chominju02 chominju02 deleted the refactor/refundButton branch October 11, 2025 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants