Skip to content

Conversation

@rbgksqkr
Copy link
Collaborator

@rbgksqkr rbgksqkr commented May 24, 2025

Issue Number

closed #273

As-Is

  • 즐겨찾기 API가 변경되어 production에서 오류 발생

To-Be

  • 즐겨찾기 API 수정사항 반영 (save -> favorite)

Check List

  • 테스트가 전부 통과되었나요?
  • 모든 commit이 push 되었나요?
  • merge할 branch를 확인했나요?
  • Assignee를 지정했나요?
  • Label을 지정했나요?

Test Screenshot

image

(Optional) Additional Description

Summary by CodeRabbit

Summary by CodeRabbit

  • Bug Fixes
    • Updated all references from "save" to "favorite" for favorite to-do items, ensuring consistent naming and correct functionality throughout the app.
    • Adjusted API endpoints and internal logic to use the new "favorite" terminology and paths.
  • Chores
    • Improved clarity and consistency in constants and prop values related to favorite to-dos.

@rbgksqkr rbgksqkr self-assigned this May 24, 2025
@rbgksqkr rbgksqkr linked an issue May 24, 2025 that may be closed by this pull request
@coderabbitai
Copy link
Contributor

coderabbitai bot commented May 24, 2025

Walkthrough

The changes update the terminology and logic throughout the codebase from "SAVE" to "FAVORITE" for todo types and related API endpoints. This includes constant values, conditional checks, API URL paths, component props, API calls, and mock handlers, ensuring consistency in naming and behavior for favorite-related todo functionality.

Changes

File(s) Change Summary
frontend/src/constants/config.ts Renamed TODO_TYPE.SAVE to TODO_TYPE.FAVORITE in the constants.
frontend/src/constants/url.ts Changed API endpoint paths and values from /save to /favorite for favorite todos.
frontend/src/components/FavoriteTab/index.tsx Updated logic and rendering to use TODO_TYPE.FAVORITE instead of TODO_TYPE.SAVE.
frontend/src/pages/FavoritePage/index.tsx Changed prop to pass TODO_TYPE.FAVORITE to FavoriteTab instead of TODO_TYPE.SAVE.
frontend/src/pages/RecommendTodoPage/RecommendTodoPage.utils.ts Modified getTodoType to return TODO_TYPE.FAVORITE instead of TODO_TYPE.SAVE when needed.
frontend/src/api/map.ts Updated API call parameter from 'SAVE' to 'FAVORITE' in addFavoriteFromOther function.
frontend/src/components/TodoTab/TodoTab.constants.ts Renamed key SAVE to FAVORITE in TODO_TAB_TEXT constant.
frontend/src/constants/message.ts Renamed key SAVE to FAVORITE in DATE_TEXT constant.
frontend/src/mocks/handlers/todo.ts Changed conditional checks from 'SAVE' to 'FAVORITE' in todo handlers.
frontend/src/pages/MapPage/hooks/useAddFavoriteFromOther.ts Changed mutation argument from 'SAVE' to 'FAVORITE' in useAddFavoriteFromOther hook.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant FavoritePage
    participant FavoriteTab
    participant API

    User->>FavoritePage: Visit Favorite Page
    FavoritePage->>FavoriteTab: Render with todoType = TODO_TYPE.FAVORITE
    FavoriteTab->>API: Fetch /api/v1/todos/favorite
    API-->>FavoriteTab: Return favorite todos
    FavoriteTab-->>User: Display favorite todos
Loading

Poem

In fields of code where carrots wave,
"SAVE" has hopped, and "FAVORITE" we crave.
Endpoints shift and constants cheer,
Favorite todos now appear!
With paws on keys and whiskers bright,
This rabbit codes from day to night.
🥕✨

Note

⚡️ AI Code Reviews for VS Code, Cursor, Windsurf

CodeRabbit now has a plugin for VS Code, Cursor and Windsurf. This brings AI code reviews directly in the code editor. Each commit is reviewed immediately, finding bugs before the PR is raised. Seamless context handoff to your AI code agent ensures that you can easily incorporate review feedback.
Learn more here.


📜 Recent review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between c3114f0 and f391810.

📒 Files selected for processing (4)
  • frontend/src/components/TodoTab/TodoTab.constants.ts (1 hunks)
  • frontend/src/constants/message.ts (1 hunks)
  • frontend/src/mocks/handlers/todo.ts (2 hunks)
  • frontend/src/pages/MapPage/hooks/useAddFavoriteFromOther.ts (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • frontend/src/components/TodoTab/TodoTab.constants.ts

Note

🎁 Summarized by CodeRabbit Free

Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login.

🪧 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? Join our Discord community 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 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.

@rbgksqkr rbgksqkr added fix 버그 수정 (기능을 잘못 구현한 경우) FE 프론트엔드 작업 labels May 24, 2025
@rbgksqkr rbgksqkr merged commit b08b9eb into develop May 24, 2025
4 checks passed
@rbgksqkr rbgksqkr deleted the fix/#273 branch May 24, 2025 06:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

FE 프론트엔드 작업 fix 버그 수정 (기능을 잘못 구현한 경우)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FIX] 즐겨찾기 API 수정

2 participants