eCampus 수집 실패 대응 개선 - #4
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Vercel preview is ready: https://ehelper-alyvbjtc0-kimyeonjins-projects.vercel.app |
There was a problem hiding this comment.
Pull request overview
eCampus HTML 파싱 기반 수집 흐름을 유지하면서, 수집 결과가 비거나 과목 수집에 실패했을 때 Moodle API로 fallback하고, 실패 원인 공유를 위한 “복사 가능한 오류 로그” UI/개발 도구를 추가하는 PR입니다.
Changes:
- 설정 모달에 Moodle 토큰 발급/저장/해제 UI(eCampus API 연결 섹션) 추가
- 과목 수집 결과가 비었고 HTML 기반 허브 수집이 실패한 경우에만 Moodle API fallback 수행
- 실패 과목 경고 배너/오류 로그 복사 기능 및 dev 명령(
previewErrorLog,clearErrorLog) 추가
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| src/content/ui/types.ts | UI 상태에 errorLog 필드 추가 |
| src/content/ui/runtime/dashboardRuntimeSetup.ts | 런타임/스토어 초기화·동기화에 errorLog 반영 |
| src/content/ui/runtime/dashboardRuntimeApi.ts | runtime 공개 API에 setErrorLog 추가 |
| src/content/ui/runtime/dashboardDevTools.ts | dev 커맨드로 오류 로그 미리보기/초기화 추가 |
| src/content/ui/constants.ts | Moodle 토큰 저장용 storage key 상수 추가 |
| src/content/ui/components/dashboardShell/types.ts | DashboardShell props에 errorLog/clear 핸들러 추가 |
| src/content/ui/components/dashboardShell/settings/DashboardMoodleAuthSection.tsx | Moodle 토큰 발급/저장/해제 UI 섹션 신규 추가 |
| src/content/ui/components/dashboardShell/DashboardSettingsModal.tsx | 설정 모달에 Moodle 인증 섹션 포함 |
| src/content/ui/components/dashboardShell/DashboardFooter.tsx | 푸터에 오류 로그 복사 버튼 추가 |
| src/content/ui/components/DashboardShell.tsx | 실패 경고 배너 + 로그 복사/닫기 UI 연결 |
| src/content/ui/components/DashboardApp.tsx | errorLog 전달 및 clear 핸들러(runtime.setErrorLog('')) 연결 |
| src/content/modules/shared.ts | 공용 constants에 MOODLE_TOKEN_KEY 추가 |
| src/content/modules/moodle.api.ts | Moodle REST API 호출 및 항목 변환 로직 신규 추가 |
| src/content/modules/crawler.course-items.ts | HTML 수집 실패 시 Moodle API fallback + HTML 스니펫 캡처 추가 |
| src/content/index.ts | moodle.api 모듈 로드 순서에 포함 |
| src/content/bootstrap.ts | 실패 과목 목록을 failure log로 빌드해 UI에 전달 |
| public/page-dev-bridge.js | dev bridge에 preview/clear error log API 추가 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
관련 이슈
작업 내용
HTML 파싱을 기본 경로로 유지하면서, 수집 실패 시 Moodle API fallback과 복사 가능한 실패 로그 UI를 추가했습니다.
주요 변경사항
window.__ECDASH_DEV__.previewErrorLog()/clearErrorLog()명령을 추가했습니다.테스트
npm run typechecknpm run build체크리스트
스크린샷 (선택)
UI 변경이 있지만 스크린샷은 별도 첨부하지 않았습니다.
기타