Skip to content

feat(gui): deliver hubapi phase-one SaaS console - #2462

Draft
kwannz wants to merge 6 commits into
lidge-jun:devfrom
kwannz:codex/newapi-console
Draft

feat(gui): deliver hubapi phase-one SaaS console#2462
kwannz wants to merge 6 commits into
lidge-jun:devfrom
kwannz:codex/newapi-console

Conversation

@kwannz

@kwannz kwannz commented Aug 24, 2026

Copy link
Copy Markdown

Summary

  • Rebrand the user-facing product surfaces as hubapi while preserving the real ocx CLI, protocol headers, configuration identifiers, package coordinates, and upstream source links.
  • Deliver the phase-one React/Vite management-console navigation, validated request-history/route-evidence surfaces, responsive states, accessibility behavior, and synchronized locales.
  • Deliver the Astro/Starlight landing experience with responsive light/dark layouts and truthful routing copy.
  • Add the opt-in hub/ hosted admission and accounting edge: secure sessions, public API keys, integer credit ledger, recharge codes, allowlisted streaming proxy routes, user portal, and administrator controls.
  • Keep hosted mode isolated from the ordinary local runtime and keep the private routing core as the only provider/model router.
  • Harden the hosted and GUI trust boundaries with bounded streaming request reads, production TLS-proxy enforcement, bootstrap database locking, password/admin-action throttling, cancellation-safe settlement, truthful logout handling, bounded API-response validation, filtered rolling-upgrade fallback, and the PRD tablet drawer breakpoint.

Verification

  • cd gui && bun test tests (988 pass, 0 fail; 8,745 expectations)
  • cd gui && bun run lint
  • cd gui && bun run lint:i18n
  • cd gui && bun run build (passes; existing large-chunk advisory remains)
  • cd docs-site && bun install --frozen-lockfile
  • cd docs-site && bun run build (401 pages)
  • bun x tsc --noEmit -p hub/tsconfig.json
  • bun test tests/hub-admission.test.ts tests/hub-auth.test.ts tests/hub-billing.test.ts tests/hub-network-firewall.test.ts tests/hub-portal.test.ts (59 pass, 0 fail; 374 expectations)
  • bun run typecheck
  • bun run test (all 10 isolated repository batches passed)
  • bun run privacy:scan
  • bun run audit:high (no high-severity root or GUI dependency findings)
  • Browser acceptance: 320, 390, 768, 1024, 1440, and 1600 widths; no page-level horizontal overflow.
  • Browser acceptance: Landing and Logs states inspected in light/dark themes; prefers-reduced-motion leaves only color/background-color transitions.
  • Browser acceptance: 1023px and below uses the off-canvas drawer, 1024px restores the fixed sidebar; mobile drawer focus, Escape return, scrollability, and body scroll lock were verified.
  • Browser acceptance from the original phase-one slice: hosted registration, recharge redemption, one-time API-key reveal, three-chunk SSE response, 125-unit settlement, 402 insufficient-credit rejection, API-key revocation with subsequent 401, administrator user disable, audit entry, and disabled-login rejection.

Screenshots

Landing page, 1600×1000, Simplified Chinese, light theme:

hubapi landing page

Hosted user proxy console, 1440×900, Simplified Chinese:

hubapi hosted proxy console

Local management GUI offline/error state, 1440×900, Simplified Chinese, light theme:

hubapi local management GUI

Checklist

  • Scope stays focused and avoids unrelated cleanup.
  • Docs or release notes were updated when needed.
  • Security-sensitive changes require explicit maintainer security review before this draft becomes review-ready.

Review readiness checklist

This PR stays in draft until every box below is ticked. Tick all four boxes once the requirements are met:

  • All CI tests are green on my local testing.

  • I pushed my PR to the latest dev commit.

  • I resolved all correct Codex and CodeRabbit findings.

  • My PR is ready for review.

@coderabbitai

coderabbitai Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added the intake: hygiene-blocked Deterministic PR hygiene checks failed label Aug 24, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Deterministic hygiene checks failed.

  • unsponsored_surface — This changes an authentication, workflow, release-automation, or dependency surface. MAINTAINERS.md requires security review for these; ask a maintainer to apply maintainer-sponsored once they have reviewed it. Paths: package.json.

@github-actions github-actions Bot added the enhancement New feature or request label Aug 24, 2026
@github-actions

github-actions Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

⏳ DRAFT

  • hygiene: unsponsored_surface.

What to do

  • Fix unsponsored_surface — This changes an authentication, workflow, release-automation, or dependency surface. MAINTAINERS.md requires security review for these; ask a maintainer to apply maintainer-sponsored once they have reviewed it. Paths: package.json.
  • Tick all four boxes in the PR description once you're done (currently 0/4).

Review readiness checklist

  • ⬜ All CI tests are green on my local testing.
  • ⬜ I pushed my PR to the latest dev commit.
  • ⬜ I resolved all correct Codex and CodeRabbit findings.
  • ⬜ My PR is ready for review.

0/4 boxes ticked.

This pull request was already a draft. Its draft status will be preserved after every issue above is resolved.
@kwannz Tick the boxes once your local CI is green, your branch is on the latest dev commit, and every correct Codex and CodeRabbit finding is resolved.

@lidge-jun

Copy link
Copy Markdown
Owner

리뷰 · 우선순위 50 / 80

설명: 이 풀 리퀘스트는 허브에이피아이 1단계 호스티드 콘솔이다. 화면 이름을 허브에이피아이로 바꾸고, 관리 콘솔 탐색과 요청 기록, 랜딩, 선택 허브 입장과 회계 끝을 넣는다. 세션, 공개 에이피아이 키, 정수 크레딧 장부, 충전 코드, 허용 스트림 프록시, 사용자 포털, 관리자 조작이 있다. 작성자는 호스티드 모드를 보통 로컬 런타임과 떨어뜨리고, 사설 라우팅 코어만 제공자 라우터로 둔다고 적었다. 지금 CURRENT dev HEAD 는 35a89903c 이다. 이번 시간에 origin/dev 는 그대로다. 새 머지는 없다. package.json 은 2.27.0 이다. src/config.ts 는 3238줄이다. src/runtime 폴더는 지금 HEAD 에 없다. 베이스는 dev 다. 초안이다. 점검 네 칸 중 둘만 채워졌다. 위생은 스폰서 없는 인증과 의존 표면이라고 막았다. 경로에 package.json 이 있다. 지금 머지하지 말 것.

크기는 크다. 기준 dev 와 비교하면 파일 92개, 더하기 8757, 빼기 782 다. 새 폴더 hub/ 에 입장, 인증, 결제, 서버, 데이터베이스, 포털이 있다. 시험도 허브 인증과 결제와 방화벽과 포털이 따라 온다. 문서 사이트와 관리 화면 번역도 같이 바뀐다. 커밋 메일 칸은 자리 표시다. 보안 민감 칸은 메인테이너 보안 검토 전에 초안에서 나오면 안 된다고 점검에 적혀 있다. 그 칸은 아직 비어 있다. 토끼는 초안이라 자동 리뷰를 건너뛰었다. 액션 봇은 스폰서 라벨을 요구한다.

내가 허브 코드를 열어 본 범위에서는 조심하는 흔적이 있다. 비밀번호는 아르곤2 아이다. 없는 계정도 더미 해시를 비교한다. 로그인은 실패 횟수와 차단이 있다. 세션과 씨에스알에프는 에이치맥 다이제스트다. 변이 요청은 설정 오리진과 씨에스알에프 헤더를 본다. 관리 위험 조작은 최근 로그인과 속도 제한이 있다. 공개 프록시 길은 응답, 채팅 완성, 메시지, 모델 네 개로 고정이다. 본문은 8 메비 한도가 있다. 크레딧은 정수 장부다. 업스트림이 받기 전에 예약하고, 거절이면 풀어 준다. 받기 뒤에 스트림이 죽어도 정산 이유를 남긴다. 내부 토큰 헤더로 업스트림에 붙는다. 이 주의가 있어도 호스티드 결제와 키 발급은 로컬 프록시 제품의 기본 길이 아니다. 메인테이너가 스폰서하기 전에는 착지하지 말 것.

초안이다. 로컬 시험과 최신 dev 칸은 채워졌다. 토끼와 코덱스 지적 해소 칸과 리뷰 준비 칸은 비어 있다. 위생이 스폰서 없는 표면으로 막는다. 그 라벨을 봇이 붙이지 말 것. 메인테이너가 보안을 본 뒤에만 붙인다. 2459 윈도우 모듈 지도와 2460 스냅샷 쓰기와 한 기차에 섞지 말 것. 로컬 런타임 코어, 콤보 프리플라이트, wait 밑줄, 웹소켓 크기 가드를 이 허브 표면으로 고치지 말 것. 닫는 이슈도 적혀 있지 않다. 2210 1049 2221 을 이 PR 로 닫지 말 것.

사용자 길이로는 아직 초안인 큰 호스티드 콘솔이라서 50. 로컬 사용자가 지금 겪는 502 가 아니다. 카탈로그 팁은 Ox Alpha x-preview-f-free + deepseek-v4-flash-vision-exp. Cursor 정적 카탈로그는 opus-4-8-fast / opus-5-fast. 2334 CursorCredentialRouter 는 여전히 src/providers/cursor-pool.ts 모듈+테스트만 있고 어댑터에 연결되지 않았다. 2332 H2 는 discovery 전용. 2320 overflow + 2342 는 이미 dev. 2188 사이드카는 이미 dev. 2361 __omit__ 는 이미 HEAD 다. combo-stream-preflight.ts 는 지금 HEAD 에 있다. src/lib/bounded-body.ts 128줄과 2426 나가는 크기 가드와 2451 하이픈 wait 는 그대로다. 이 PR 이 그 구멍을 닫지 않는다.

hub/src/auth.ts - 아르곤2 와 더미 해시와 실패 차단이 있다. 호스티드 로그인은 로컬 기본 길이 아니다
hub/src/server.ts - 오리진과 씨에스알에프와 관리 최근 로그인을 본다. 스폰서 없는 착지는 안 된다
hub/src/admission.ts - 공개 프록시 길은 네 개다. 내부 토큰으로 업스트림에 붙는다
package.json - 위생이 스폰서 없는 인증과 의존 표면으로 막았다. 봇이 라벨을 붙이지 말 것
점검 네 칸 - 둘만 채워졌다. 초안이다. 지금 머지하지 말 것
이슈 2459 / 2460 - 윈도우 모듈 지도와 스냅샷 쓰기다. 이 허브 표면과 섞지 말 것

메인테이너의 판단이 필요한 지점

  • 호스티드 결제 콘솔을 이 저장소 기본 제품에 넣을지. 지금은 초안으로 두고 스폰서 없이 착지하지 말 것
  • 보안 검토를 누가 할지. 위생이 요구하는 라벨은 메인테이너만 붙인다
  • 로컬 런타임과 허브 프로세스를 끝까지 분리할지. 작성자 주장은 분리지만 package.json 이 같이 바뀐다
  • 2459 와 2460 과 한 기차에 섞지 말 것
  • 초안 점검을 채우기 전에 레디로 올리지 말 것

너의 추천
초안으로 둔다. 지금 머지하지 말 것. 메인테이너 보안 검토와 스폰서 라벨 전에는 레디로 올리지 말 것. 로컬 프록시 구멍을 이 PR 로 고치지 말 것. 2459 와 2460 과 2210 과 1049 과 2221 은 닫지 않는다. 호출 길을 넓히지 말 것. 라벨은 그대로 둔다. 프리뷰 배포가 아니다.

이 댓글은 grok-bot이 작성했습니다

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request intake: hygiene-blocked Deterministic PR hygiene checks failed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants