diff --git a/doc/connections/GITHUB-REVIEW-BOT.md b/doc/connections/GITHUB-REVIEW-BOT.md index 8458e532596..f0e9cf0f9ed 100644 --- a/doc/connections/GITHUB-REVIEW-BOT.md +++ b/doc/connections/GITHUB-REVIEW-BOT.md @@ -30,11 +30,11 @@ the GitHub Code Review Bot connector. This default-off setting is independent of 4. Paperclip reuses your verified GitHub identity when available. Otherwise, authorize the dedicated App and confirm the observed account once. Bot work uses installation credentials, never your personal GitHub token. -5. Connection verification and completion happen automatically. The connected - page shows the actual App identity and enabled repository count, with a - copyable optional review mention. Open **Bot settings** to manage the - bot; normal connection navigation is already available. Runtime and isolation - readiness remain separate prerequisites. +5. Connection verification and completion happen automatically. Paperclip opens + the bot's Settings with a connected confirmation modal showing the actual App + identity, enabled repository count, and a copyable optional review mention. + Dismiss it with **Done**, the close button, or Escape to stay in Settings. + Runtime and isolation readiness remain separate prerequisites. Installation may return before GitHub's separately delivered signed webhook ping. Paperclip keeps the same draft and credentials, shows a waiting state, diff --git a/ui/src/pages/apps/chat/ChatEndpoint.clipboard.test.tsx b/ui/src/pages/apps/chat/ChatEndpoint.clipboard.test.tsx index 5116d384116..6e8939fe1af 100644 --- a/ui/src/pages/apps/chat/ChatEndpoint.clipboard.test.tsx +++ b/ui/src/pages/apps/chat/ChatEndpoint.clipboard.test.tsx @@ -57,6 +57,7 @@ vi.mock("@/context/SidebarContext", () => ({ })); vi.mock("@/lib/router", () => ({ useNavigate: () => vi.fn(), + useLocation: () => ({ state: null }), useParams: () => ({ endpointId: "endpoint-a", tab: mocks.tab }), useSearchParams: () => [new URLSearchParams(mocks.search), mocks.setParams], Link: ({ children }: { children: React.ReactNode }) => ( diff --git a/ui/src/pages/apps/chat/ChatEndpointDetail.agentmail.test.tsx b/ui/src/pages/apps/chat/ChatEndpointDetail.agentmail.test.tsx index 16b0d1cfe9b..b20b156fe68 100644 --- a/ui/src/pages/apps/chat/ChatEndpointDetail.agentmail.test.tsx +++ b/ui/src/pages/apps/chat/ChatEndpointDetail.agentmail.test.tsx @@ -24,6 +24,7 @@ vi.mock("./EmailEndpointSetup", () => ({ EmailEndpointSettings: () =>
@@ -359,6 +363,19 @@ export function ChatEndpointDetail() {
{activeTab === "activity" && (
{error || @@ -331,14 +342,6 @@ export function GitHubChatSetup() {
{footer()} > - ) : connected ? ( -diff --git a/ui/src/pages/apps/chat/GitHubConnectionComplete.tsx b/ui/src/pages/apps/chat/GitHubConnectionComplete.tsx index 97fb088f0f5..7b0c4a60c2a 100644 --- a/ui/src/pages/apps/chat/GitHubConnectionComplete.tsx +++ b/ui/src/pages/apps/chat/GitHubConnectionComplete.tsx @@ -6,24 +6,31 @@ import { githubChatApi } from "@/api/githubChat"; import { AgentAvatar, type AvatarAgent } from "@/components/AgentAvatar"; import { AppLogo } from "../AppLogo"; import { CopyText } from "@/components/CopyText"; -import { SetupWizardFooter } from "@/components/SetupWizard"; import { Button } from "@/components/ui/button"; +import { Dialog, DialogContent, DialogFooter, DialogTitle } from "@/components/ui/dialog"; import { agentAvatarUrl } from "@/lib/agent-avatar-url"; import { Link } from "@/lib/router"; import { GitHubAppBranding, gitHubBotMention } from "./GitHubAppIdentity"; +export type GitHubConnectionCompleteLocationState = { + githubConnectionComplete?: { + endpointId: string; + runtimeChecks?: GitHubAppWizardState["runtimeChecks"]; + }; +}; + export function GitHubConnectionComplete({ endpoint, agent, runtimeChecks, - onExit, - pending = false, + onClose, + onCloseAutoFocus, }: { endpoint: ChatEndpoint; agent?: AvatarAgent; runtimeChecks?: GitHubAppWizardState["runtimeChecks"]; - onExit: () => void; - pending?: boolean; + onClose: () => void; + onCloseAutoFocus?: () => void; }) { const repositories = useQuery({ queryKey: ["github-connected-repositories", endpoint.id], @@ -34,73 +41,82 @@ export function GitHubConnectionComplete({ const count = repositories.data?.enabledCount; const incomplete = runtimeChecks?.filter((check) => !check.ok) ?? []; return ( -