-
Notifications
You must be signed in to change notification settings - Fork 1.1k
feat(gui): redesign provider accounts workspace with adaptive grid, collapsible rails, and quota controls #4560
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
agentHits
wants to merge
6
commits into
lidge-jun:dev
Choose a base branch
from
agentHits:agentHits/antigravity
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
868fa6a
feat(gui): redesign provider accounts workspace with adaptive grid, c…
agentHits c2efd78
fix(gui): keep Antigravity Claude/Gemini quota chrome off other provi…
agentHits bad05da
refactor(gui): retain feature styles in bounded owners after rebase
lidge-jun 6ee1949
style(gui): remove whitespace-only lines flagged in rebased workspace…
lidge-jun 04cdf9a
fix(gui): keep account titles on the masked email projection
agentHits dd745e0
fix(gui): derive effective account filter without effect setState
agentHits File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,103 @@ | ||
| import { useEffect } from "react"; | ||
| import { IconX } from "../icons"; | ||
| import { useT } from "../i18n/shared"; | ||
| import { ProviderIcon } from "./provider-workspace/ProviderRail"; | ||
| import CockpitToolsCard from "./provider-workspace/CockpitToolsCard"; | ||
|
|
||
| export interface AccountAuthChoiceModalProps { | ||
| provider: string; | ||
| providerLabel: string; | ||
| apiBase: string; | ||
| isOpen: boolean; | ||
| isBusy?: boolean; | ||
| onClose: () => void; | ||
| onContinueOAuth: () => void; | ||
| onImportSuccess?: () => void; | ||
| } | ||
|
|
||
| export default function AccountAuthChoiceModal({ | ||
| provider, | ||
| providerLabel, | ||
| apiBase, | ||
| isOpen, | ||
| isBusy = false, | ||
| onClose, | ||
| onContinueOAuth, | ||
| onImportSuccess, | ||
| }: AccountAuthChoiceModalProps) { | ||
| const t = useT(); | ||
| useEffect(() => { | ||
| if (!isOpen) return; | ||
| const handleKeyDown = (e: KeyboardEvent) => { | ||
| if (e.key === "Escape") { | ||
| e.preventDefault(); | ||
| onClose(); | ||
| } | ||
| }; | ||
| window.addEventListener("keydown", handleKeyDown); | ||
| return () => window.removeEventListener("keydown", handleKeyDown); | ||
| }, [isOpen, onClose]); | ||
|
|
||
| if (!isOpen) return null; | ||
|
|
||
| return ( | ||
| <div | ||
| role="dialog" | ||
| aria-modal="true" | ||
| aria-labelledby="auth-choice-modal-title" | ||
| className="modal-overlay" | ||
| onClick={onClose} | ||
| > | ||
| <div className="modal-card auth-choice-modal" onClick={e => e.stopPropagation()}> | ||
| <div className="modal-head"> | ||
| <div> | ||
| <h3 id="auth-choice-modal-title"> | ||
| {t("pws.authChoiceModalTitle", { provider: providerLabel })} | ||
| </h3> | ||
| <p className="muted text-label" style={{ marginTop: 2 }}> | ||
| {t("pws.authChoiceModalSubtitle")} | ||
| </p> | ||
| </div> | ||
| <button | ||
| type="button" | ||
| className="btn btn-ghost btn-icon" | ||
| aria-label={t("common.close")} | ||
| onClick={onClose} | ||
| > | ||
| <IconX /> | ||
| </button> | ||
| </div> | ||
|
|
||
| <div className="auth-choice-body"> | ||
| {/* Method 1: Browser OAuth */} | ||
| <div className="auth-choice-card"> | ||
| <div className="auth-choice-card-info"> | ||
| <ProviderIcon name={provider} cls="provider-icon provider-icon-sm" /> | ||
| <div className="auth-choice-card-text"> | ||
| <span className="auth-choice-card-title">{t("pws.antigravityOauthTitle")}</span> | ||
| <span className="auth-choice-card-desc">{t("pws.antigravityOauthDesc")}</span> | ||
| </div> | ||
| </div> | ||
| <button | ||
| type="button" | ||
| className="btn btn-primary btn-sm" | ||
| disabled={isBusy} | ||
| onClick={() => { | ||
| onClose(); | ||
| onContinueOAuth(); | ||
| }} | ||
| > | ||
| {isBusy ? t("prov.waitingBrowser") : t("pws.antigravityOauthAction")} | ||
| </button> | ||
| </div> | ||
|
|
||
| {/* Method 2: Cockpit Tools Card */} | ||
| <CockpitToolsCard | ||
| apiBase={apiBase} | ||
| onImportSuccess={onImportSuccess} | ||
| /> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| ); | ||
| } | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| import AccountAuthChoiceModal, { type AccountAuthChoiceModalProps } from "./AccountAuthChoiceModal"; | ||
|
|
||
| export type AntigravityChoiceModalProps = Omit<AccountAuthChoiceModalProps, "provider" | "providerLabel"> & { | ||
| provider?: string; | ||
| providerLabel?: string; | ||
| }; | ||
|
|
||
| export default function AntigravityChoiceModal(props: AntigravityChoiceModalProps) { | ||
| return ( | ||
| <AccountAuthChoiceModal | ||
| provider={props.provider ?? "google-antigravity"} | ||
| providerLabel={props.providerLabel ?? "Google Antigravity"} | ||
|
agentHits marked this conversation as resolved.
|
||
| {...props} | ||
| /> | ||
| ); | ||
| } | ||
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.