Skip to content

Conversation

@thezz9
Copy link
Collaborator

@thezz9 thezz9 commented Jul 1, 2025

작업 내용

  • input이 null일 때 방어코드 추가
  • 문제 테스트 페이지 변경

Summary by CodeRabbit

  • 신규 기능

    • 문제 상세 정보(제목, 설명, 제한, 카테고리)와 마크다운 렌더링이 적용된 문제 설명 영역이 추가되었습니다.
    • 코드 제출 시 JWT 인증 및 WebSocket을 통한 실시간 테스트 결과 표시 기능이 도입되었습니다.
    • favicon이 추가되고, 마크다운 스타일이 개선되었습니다.
  • 버그 수정

    • 문제 및 테스트케이스 API 일부가 인증 없이 접근 가능하도록 변경되었습니다.
    • 테스트케이스 입력/출력 필드가 null을 허용하도록 수정되어 예외 상황에 더 유연하게 대응합니다.
  • 스타일

    • 문제 설명에 대한 마크다운 스타일이 전반적으로 개선되었습니다.
  • 리팩터

    • 자바스크립트 코드가 모듈화되고, 최신 비동기 방식으로 개선되었습니다.

@coderabbitai
Copy link

coderabbitai bot commented Jul 1, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

HTTP 보안 설정이 변경되어 문제 관련 일부 GET API 엔드포인트에 대한 비인증 접근이 허용되었습니다. Testcase 엔티티의 입력 및 출력 필드가 nullable로 변경되었고, getInput 메서드에 null 체크가 추가되었습니다. 코드 제출 테스트 페이지는 클라이언트 스크립트와 UI가 대폭 리팩토링되어, 문제 정보 표시 및 코드 제출/채점 결과 표시가 개선되었습니다.

Changes

파일/경로 변경 요약
.../common/security/config/SecurityConfig.java GET "/api/problems", "/api/problems/{problemId}"에 비인증 접근 허용 규칙 추가
.../domain/problem/model/entity/Testcase.java input/output 필드 nullable로 변경, getInput()에 null 체크 추가
.../resources/templates/submit-test.html 전체 클라이언트 스크립트 리팩토링, 마크다운 렌더링, WebSocket 기반 채점 결과 표시 등 개선

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Browser
    participant Server
    participant WebSocket

    User->>Browser: JWT 입력, 코드 작성, 제출 버튼 클릭
    Browser->>Server: REST API로 문제 정보 GET (JWT 포함)
    Server-->>Browser: 문제 정보(마크다운 등)
    Browser->>Server: 코드 제출 POST (JWT 포함)
    Server-->>Browser: 제출 성공 응답
    Browser->>WebSocket: STOMP 연결 (JWT 인증)
    WebSocket-->>Browser: init 이벤트 (테스트 케이스 수 전달)
    WebSocket-->>Browser: case 이벤트 (각 테스트 케이스 결과 전달)
    WebSocket-->>Browser: final 이벤트 (최종 결과 전달)
    Browser->>User: UI에 결과 실시간 표시
Loading

Suggested labels

enhancement

Suggested reviewers

  • NCookies
  • minjee2758
  • pokerbearkr

Poem

🥕
새로워진 제출 창에 토끼가 깡총,
문제 정보도 마크다운으로 뿅!
WebSocket 타고 점수도 실시간,
코드 한 줄에 꿈을 담아,
오늘도 토끼는 채점 기다리며
귀를 쫑긋, 눈을 반짝!
🐇


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3ae9c10 and fb6b2cb.

📒 Files selected for processing (3)
  • src/main/java/org/ezcode/codetest/common/security/config/SecurityConfig.java (1 hunks)
  • src/main/java/org/ezcode/codetest/domain/problem/model/entity/Testcase.java (2 hunks)
  • src/main/resources/templates/submit-test.html (1 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@thezz9 thezz9 self-assigned this Jul 1, 2025
@thezz9 thezz9 added the bug Something isn't working label Jul 1, 2025
@thezz9 thezz9 merged commit f710d77 into dev Jul 1, 2025
1 of 2 checks passed
@thezz9 thezz9 deleted the fix/submission-input branch July 1, 2025 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants