Skip to content

eCampus 수집 실패 대응 개선 - #4

Merged
yeonjin719 merged 6 commits into
mainfrom
issue-3-ecampus-failure-fallback
Jul 1, 2026
Merged

eCampus 수집 실패 대응 개선#4
yeonjin719 merged 6 commits into
mainfrom
issue-3-ecampus-failure-fallback

Conversation

@yeonjin719

Copy link
Copy Markdown
Owner

관련 이슈

작업 내용

HTML 파싱을 기본 경로로 유지하면서, 수집 실패 시 Moodle API fallback과 복사 가능한 실패 로그 UI를 추가했습니다.

주요 변경사항

  • 설정 모달에 eCampus API 연결 섹션을 추가해 Moodle 토큰을 발급/저장/해제합니다.
  • 과목 수집 결과가 비었을 때만 Moodle API fallback을 시도합니다.
  • 실패한 과목은 UI 경고로 표시하고, 오류 로그와 course HTML 일부를 복사할 수 있게 했습니다.
  • 개발용 window.__ECDASH_DEV__.previewErrorLog() / clearErrorLog() 명령을 추가했습니다.

테스트

  • npm run typecheck
  • npm run build
  • 수동 테스트 완료

체크리스트

  • 불필요한 코드/파일 제거
  • 사용자 영향 범위 확인
  • 문서(README 등) 반영
  • 보안/권한 변경 사항 확인

스크린샷 (선택)

UI 변경이 있지만 스크린샷은 별도 첨부하지 않았습니다.

기타

  • Moodle API는 기본 경로가 아니라 HTML 파싱 실패 fallback으로만 사용합니다.
  • 강의 시청 여부는 API 값으로 확정하지 않고 확인필요 상태로 유지합니다.
  • 실패 로그에는 HTML 일부가 포함될 수 있으므로 공유 전 확인이 필요합니다.

@vercel

vercel Bot commented Jul 1, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ehelper Ready Ready Preview, Comment Jul 1, 2026 4:39pm

@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown

Vercel preview is ready: https://ehelper-alyvbjtc0-kimyeonjins-projects.vercel.app

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/content/modules/crawler.course-items.ts
Comment thread src/content/ui/components/DashboardShell.tsx
Comment thread src/content/ui/components/dashboardShell/DashboardFooter.tsx
Comment thread src/content/bootstrap.ts
Comment thread src/content/modules/moodle.api.ts
@yeonjin719
yeonjin719 merged commit 7d7670c into main Jul 1, 2026
4 checks passed
@yeonjin719
yeonjin719 deleted the issue-3-ecampus-failure-fallback branch July 1, 2026 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] eCampus 수집 실패 대응 및 API fallback 개선

2 participants