-
Notifications
You must be signed in to change notification settings - Fork 0
dev로 머지 #460
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
[FIX/FE] 스크롤 막기 다시 해제
WalkthroughThis pull request updates two components. In the admin domain’s ChatPage, several debugging Changes
Sequence Diagram(s)sequenceDiagram
participant A as AgendaPage
participant F as fetchChatRooms
A->>F: Call fetchChatRooms()
F-->>A: Return newRooms
alt newRooms is empty
A->>F: Retry fetchChatRooms()
F-->>A: Return newRooms with data
else newRooms found
A->>A: Update UI with chat rooms
end
Possibly related PRs
Suggested labels
Poem
✨ Finishing Touches
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
✅ Deploy Preview for onu-univ ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this 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
🧹 Nitpick comments (1)
frontend/src/domains/student/pages/agenda/index.tsx (1)
20-21: Pagination parameter adjustments might impact scrolling experience.Increasing
MAX_PAGE_ITEMSfrom 6 to 8 is good for showing more content initially. However, reducingTRIGGER_REST_ITEMSfrom 3 to 1 means you'll wait until almost the end of the list before loading more data, which could create visible loading pauses during scrolling, especially on slower connections.Consider testing this configuration on slower network connections to ensure smooth scrolling. A slightly higher trigger value (like 2) might provide a better balance between resource efficiency and user experience.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
frontend/src/domains/admin/pages/agenda/chat/chat-page/index.tsx(0 hunks)frontend/src/domains/student/pages/agenda/index.tsx(2 hunks)
💤 Files with no reviewable changes (1)
- frontend/src/domains/admin/pages/agenda/chat/chat-page/index.tsx
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Run Tests
| if (newRooms.length < MAX_PAGE_ITEMS) { | ||
| if (!isInProgessEnd.current) { | ||
| isInProgessEnd.current = true; | ||
| if (newRooms.length === 0) fetchChatRooms(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Risk of infinite recursion when no chat rooms are available.
The recursive call to fetchChatRooms() when newRooms.length === 0 could lead to infinite API calls if the server consistently returns no rooms. This might happen if there are truly no chat rooms available in the system.
Consider adding a maximum retry count or implementing a backoff strategy:
- if (newRooms.length === 0) fetchChatRooms();
+ if (newRooms.length === 0 && !retryCount.current) {
+ retryCount.current = true;
+ fetchChatRooms();
+ }And add this ref at the component level:
const retryCount = useRef<boolean>(false);
📌 작업 내용
📂 주요 변경사항
📑 세부 변경사항
🔗 관련 이슈
✅ 검토 요청사항
Summary by CodeRabbit
Refactor
Bug Fixes