Skip to content

[Feature]: 1-click clipboard import and unified auth choice for Cockpit Tools #3998

Closed as not planned

Description

@agentHits

Area

Authentication and account pool

What are you trying to accomplish?

Enable users to import Google Antigravity account tokens from Cockpit Tools directly via clipboard (1-click paste) and provide a clean, unified authorization choice modal when connecting accounts, allowing seamless selection between personal Google OAuth and Cockpit Tools token import.

What prevents this today?

Currently, Cockpit Tools import only supports selecting a .json file from disk (gui/src/components/provider-workspace/ProviderAuthPanel.tsx). Users with token exports in their system clipboard have to manually save JSON files to their local disk before uploading.

Furthermore, clicking "Add account" on Google Antigravity immediately triggers browser-based Google OAuth redirect and subscription ToS risk warnings, providing no visible option or choice for users who manage accounts via Cockpit Tools exports, unless they navigate deep into provider settings.

What should OpenCodex do?

  1. Clipboard & Manual Paste for Cockpit Tools:

    • Add a 1-click "Paste from clipboard" action using navigator.clipboard.readText().
    • Automatically normalize single account objects ({ email, refresh_token }) into expected record arrays ([{ email, refresh_token }]) and sanitize trailing commas before API validation.
    • Provide an expandable manual text input (textarea) as a fallback when browser clipboard read access is denied or manually toggled.
  2. Unified Account Auth Choice Modal:

    • When clicking "Add account" (or "Login") for Google Antigravity, present an explicit choice modal (AccountAuthChoiceModal) with two clear options:
      • Standard personal browser login (Google OAuth)
      • Cockpit Tools Antigravity import (with official AGCT branding and clipboard/file actions)
    • Allow users to cancel or go back without getting stuck in OAuth warning dialogs.
  3. Reusable Cockpit Tools Card Component:

    • Extract the import interface into a shared, styled CockpitToolsCard component with var(--glass-rail) background and official AGCT branding.

Example usage or interface

In the Add Provider modal or Provider Settings for Google Antigravity:

Connect Google Antigravity
Choose how you want to connect your account:

1. Browser Login (Google OAuth)
   Standard personal account login through a Google browser window
   [ Log in via browser ]

2. Cockpit Tools Antigravity
   Import account tokens and subscriptions without browser login
   [ 📋 Paste from clipboard ]  [ From file ]  [ Paste text ]
   ● Local encryption: refresh tokens are stored only on this device

Alternatives or workarounds

  • Save Cockpit Tools JSON export to disk manually every time and select the file via file picker.
  • Navigate to the provider settings page manually to find the file-only import input.

Additional context

  • Tested across all 9 supported locales with 100% translation parity.
  • Unit and UI test coverage added in gui/tests/provider-account-import.test.tsx.
  • Rebased on the latest dev branch commit.

Checks

  • I searched existing issues and documentation.
  • This request describes a concrete OpenCodex workflow rather than merely naming a desired technology.
  • I removed secrets and personal data.

Activity

  1. lidge-jun commented on Sep 8, 2026

    @lidge-jun
    Owner

    리뷰 · 우선순위 45 / 80

    이 이슈는 Google Antigravity 계정 추가 UX를 바꿉니다. 지금 dev HEAD(402be7c1f)의 gui/src/components/provider-workspace/ProviderAuthPanel.tsx는 Cockpit Tools JSON을 파일 선택으로만 가져옵니다. Providers에서 Antigravity “계정 추가”를 누르면 ToS/OAuth 경고 뒤 바로 브라우저 Google 로그인으로 갑니다. Cockpit Tools로 토큰을 관리하는 사람은 JSON을 디스크에 저장하거나, OAuth 경고를 한 번 겪은 뒤에야 다른 길을 찾게 됩니다. 이 이슈가 원하는 것은 (1) 클립보드 1클릭·수동 textarea·파일 가져오기, (2) OAuth vs Cockpit을 고르는 선택 모달, (3) 재사용 CockpitToolsCard입니다.

    이미 구현 PR #3999(feat(auth): support clipboard paste and unified auth choice for Cockpit Tools, Closes #3998, review-ready)가 dev를 base로 열려 있고, grok-bot 리뷰도 올라간 상태입니다. 그 PR은 모달·카드·9로케일·테스트를 넣었지만, 리뷰에서 (a) ProviderAuthPanel의 설정 탭 Cockpit 입구 삭제, (b) safeCockpitImportResult 검증 약화, (c) textarea 평문 토큰 표시, (d) 죽은 CSS/래퍼를 지적했습니다. 이슈 본문의 “설정 화면 입구 유지” 취지와 PR의 “모달 전용” 설계가 조금 어긋납니다.

    현재 dev 우선순위(Pool cooldown·reset-credit·bug6 스택)에 비하면 UX enhancement라 점수는 중간입니다. account-pool 라벨은 맞지만 서버 코어 버그는 아닙니다. 중복 이슈를 더 열 필요는 없고, #3999 수정 후 머지하면 이 이슈는 닫히면 됩니다.

    경로 ProviderAuthPanel.tsx (HEAD) - 파일 선택 전용 Cockpit import. 이슈 재현 지점
    경로 #3999 - 구현 PR. Closes #3998. 리뷰에서 설정 탭 입구 삭제·검증 약화 지적
    경로 AccountAuthChoiceModal / CockpitToolsCard - 이슈가 스케치한 UI와 대응
    경로 현재 dev tip - reset-credit/#3996 계열이 더 급함. 이 이슈는 병렬로 가도 충돌 적음

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

    너의 추천
    이슈는 열린 채로 #3999 후속 수정을 기다리고, 머지되면 자동 닫힘으로 정리하세요. 새 PR을 또 받지 말고 #3999 하나만 키우면 됩니다. 긴급 버그 열차(#3996/#3997/#3995)보다 우선순위는 낮습니다.

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

  2. lidge-jun commented on Sep 8, 2026

    @lidge-jun
    Owner

    그건 공식 지원 아님. 별도의 2급 지원을 생각해보겠음.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    account-poolOAuth, credentials, Codex pool, quota, failover, plansenhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions