feat: 도서관 좌석 현황 확인 및 예약 바로가기#60
Conversation
Summary of ChangesHello @nahyeongjin1, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! 이 PR은 사용자가 건국대학교 도서관 열람실의 실시간 좌석 현황을 편리하게 확인할 수 있도록 새로운 기능을 도입합니다. 기존 eCampus 로그인 정보를 활용하여 도서관 시스템에 자동으로 인증하고, 웹사이트에서 예약 페이지로 바로 이동할 수 있는 기능을 제공하여 사용자 편의성을 높였습니다. 이를 통해 사용자는 별도의 로그인 과정 없이 빠르게 도서관 좌석 정보를 확인하고 예약할 수 있습니다. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
이 PR은 도서관 열람실 좌석 현황 조회 및 예약 바로가기 기능을 추가하는군요. 전반적으로 기능 구현이 잘 이루어졌습니다. manifest.json에 필요한 권한을 추가하고, 도서관 API와 연동하기 위한 로직을 src/apis/external/library.ts에 잘 분리하셨습니다. 또한, LibrarySeatSection 컴포넌트를 통해 UI에 상태를 잘 표시하고 있습니다. 몇 가지 코드 개선 사항을 제안드립니다. API 연동 부분의 하드코딩된 값과 중복 코드, 그리고 디버깅용 로그에 대한 수정이 필요해 보입니다. 자세한 내용은 각 파일의 주석을 확인해주세요.
- Extract magic numbers to named constants (COOKIE_IS_PASSWORD_EXPIRED, COOKIE_CHECKSUM) - Simplify response handling with early return pattern - Remove debug console.log statements - Fix redundant setIsLoading call in LibrarySeatSection
Turtle-Hwan
left a comment
There was a problem hiding this comment.
와아 귀한 기능 기여 감사해요~!
저도 추가하고 싶었는데 시간이 없었는데 잘 해주셨네요!
@nahyeongjin1 몇 가지 수정 사항 남겨두었는데 확인 부탁드려요~
자동 로그인 시도 히스토리 정리:
실패 원인 분석 (아마도)SPA의 인증은 클라이언트(쿠키/localStorage) + 서버 세션 조합으로 동작. |
추측이지만 chrome.cookies 로 설정했을 때의 origin(크롬 확장)과 실제 사이트에서 받은 쿠키의 origin이 달라서일수도 있을 거 같아요 service worker에서 하거나 실제로 탭을 잠깐 켰다가 로그인 관련 요청만 보내고 탭 끄는 방식도 전에 고민은 해봤었네요. |
|
종종 쓰고 싶은 기능 있으면 기여하겠습니당 👍 |
Summary
실험실에 간단한 도서관 열람실 좌석 현황 조회 기능 추가
열람실 클릭 시 예약 페이지로 바로 이동
eCampus 로그인 정보를 활용한 자동 인증 및 쿠키 설정
Closes [FEAT] 도서관 남은 좌석 확인 및 예약 바로가기 #30
Test plan
Known Limitations