Skip to content

feat(web): Add repository 대화상자에서 GitHub 저장소 검색·clone (AGT-4005) - #903

Open
unohee wants to merge 1 commit into
mainfrom
heewonoh/agt-4005-github-connect
Open

unohee wants to merge 1 commit into
mainfrom
heewonoh/agt-4005-github-connect

Conversation

@unohee

@unohee unohee commented Nov 14, 2026

Copy link
Copy Markdown
Collaborator

무엇

supervisor 페이지의 Add repository 대화상자(기존 저장소 관리 영역)에 Connect GitHub repo 섹션을 추가했다.

  • GET /api/github/repos?q=로 검색한다(250ms debounce, 늦게 도착한 이전 응답은 버림). 행마다 full name, private 배지, 이미 clone된 저장소는 Clone 버튼 대신 cloned 배지를 보여준다.
  • Clone을 누르면 POST /api/repos/clone { fullName }을 보낸다. 행 단위로 진행(Cloning…) → 성공(cloned + 경로) / 실패(에러 문구 + Retry)를 표시한다.
  • GH_TOKEN이 없을 때(503)는 빈 목록 대신 설정 안내를 보여준다.
  • 성공하면 supervisor.js의 reloadProjectList()로 Repositories 패널과 로컬 picker 목록을 다시 읽는다.
  • 새 파일 web/static/js/githubConnect.js(classic script, 의존성 없음). GitHub 이름은 textContent/dataset로만 쓴다. 요청은 다른 대시보드 호출처럼 webToken.js fetch seam을 거친다.

왜

API(#581)는 있었지만 대시보드에 진입점이 없어서 운영자가 GitHub 저장소를 연결할 수 없었다. 이슈에 적힌 파일 범위 dashboardHtml.ts는 #828–#835에서 정적 supervisor 페이지로 재설계되기 전 기준이라, 변경은 web/static에 들어갔다.

검증

  • 신규 src/support/githubConnectBrowser.test.ts(jsdom) 6건: 쿼리 인코딩·배지 렌더, 악성 이름이 마크업이 되지 않음, 503 안내, stale 응답 폐기, clone 진행→성공·패널 갱신, 실패 표시·재시도 활성화
  • 기존 staticAssets·web.githubRepos 테스트 포함 3 files / 22 tests 통과
  • tsc --noEmit -p tsconfig.check.json 통과. oxlint 신규 경고 0(남은 2건은 기존 supervisor.js 경고)
  • 한계: 실제 브라우저에서 렌더해 보지 않았다. test:responsive는 떠 있는 데몬 URL이 필요해서 돌리지 않았다.

…ry dialog (AGT-4005)

The supervisor page's Add repository dialog gets a "Connect GitHub repo"
section that consumes the existing GET /api/github/repos?q= and POST
/api/repos/clone endpoints (#581).

- Debounced search with stale-response protection; results show the full
  name, a private badge, and a cloned badge in place of the Clone button.
- Per-row clone progress (Cloning..., then cloned or the error with Retry);
  a missing GH_TOKEN (503) is explained instead of rendering an empty list.
- On success the Repositories panel and local picker list are reloaded via
  reloadProjectList() in supervisor.js.
- GitHub names are written with textContent/dataset only. Requests go
  through the webToken.js fetch seam like every other dashboard call.

The issue's file scope (dashboardHtml.ts) predates the static supervisor
page redesign, so the change lives in web/static instead.
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.

1 participant