From 2bef9e3a80fbabadc4d25ce7b3b5d9f4168c2a0f Mon Sep 17 00:00:00 2001 From: Tonio Date: Wed, 2 Dec 2026 01:00:36 -0800 Subject: [PATCH] Keep Connect account steady when switching credential methods (#23480) ## Thinking Path > - Paperclip manages work for AI agents. > - Agents use provider accounts. > - People connect those accounts in a dialog. > - Switching methods can move the controls. > - A shared minimum panel height keeps the footer steady. ## Linked Issues or Issue Description Related PR: #23474. **What happened?** The API key panel used less space than the subscription panel. **Expected behavior** Changing methods keeps the dialog height steady. **Steps to reproduce** Open Connect account and switch from subscription to API key and back. ## What Changed Apply a common minimum height to credential cards inside Connect account. ## Verification All 10 AgentProviderConnection component tests passed. Compare both directions in the staging dialog. ## Risks Long instructions or additional controls can still grow beyond the minimum height. ## Model Used OpenAI GPT-6, via Codex. ## Checklist - [ ] I have included a thinking path that traces from project context to this change - [ ] I have specified the model used (with version and capability details) - [ ] I have checked ROADMAP.md and confirmed this PR does not duplicate planned core work - [x] I have searched GitHub for duplicate or related PRs and linked them above - [ ] I have either (a) linked existing issues with `Fixes: #` / `Closes #` / `Refs #` OR (b) described the issue in-PR following the relevant issue template - [ ] I have not referenced internal/instance-local Paperclip issues or links (only public GitHub `#NNN` / `github.com/paperclipai/paperclip` URLs) - [ ] My branch name describes the change (e.g. `docs/...`, `fix/...`) and contains no internal Paperclip ticket id or instance-derived details - [ ] I have run tests locally and they pass - [ ] I have added or updated tests where applicable - [ ] I have updated relevant documentation to reflect my changes - [ ] I have considered and documented any risks above - [ ] All Paperclip CI gates are green - [ ] Greptile is 5/5 with no open P2s, recommendations, or follow-ups - [ ] I will address all Greptile and reviewer comments before requesting merge --- ui/src/components/AdapterLoginChrome.test.tsx | 9 +++++++++ ui/src/components/AdapterLoginChrome.tsx | 5 +++-- ui/src/index.css | 9 +++++++++ 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/ui/src/components/AdapterLoginChrome.test.tsx b/ui/src/components/AdapterLoginChrome.test.tsx index a8c893bcdfd..bae179d506d 100644 --- a/ui/src/components/AdapterLoginChrome.test.tsx +++ b/ui/src/components/AdapterLoginChrome.test.tsx @@ -222,6 +222,15 @@ describe("the connect step's cards", () => { expect(plain!.hasAttribute("aria-describedby")).toBe(false); }); + it.each([false, true])("shares the dialog sizing rule across card layouts (loading=%s)", (loading) => { + render(<> + + + ); + expect(Array.from(container.children).every(card => card.matches("[data-login-card]"))).toBe(true); + expect(container.children).toHaveLength(2); + }); + it("holds one height across the card's waiting and ready states", () => { // The card opens on a spinner and then fills. Both states share a floor, so // the footer below is pushed down once for one event rather than twice — diff --git a/ui/src/components/AdapterLoginChrome.tsx b/ui/src/components/AdapterLoginChrome.tsx index 16429db98fa..d8901f55c81 100644 --- a/ui/src/components/AdapterLoginChrome.tsx +++ b/ui/src/components/AdapterLoginChrome.tsx @@ -101,7 +101,7 @@ export function OnboardingLoginCard({ }) { if (revealTogether) { return ( -
+
+
{/* The row is the instruction alone. It shared this line with a Cancel until that button went — it repeated the footer's Back, which is the step's one way out. diff --git a/ui/src/index.css b/ui/src/index.css index 3a583f87088..6d6aabf1c9f 100644 --- a/ui/src/index.css +++ b/ui/src/index.css @@ -1355,6 +1355,15 @@ html:has(.paperclip-app-shell[data-keyboard-open="true"] [data-classic-task-shel } } +/* Reserve two instruction lines, their gap, the control row, and the card padding. */ +.connect-account-dialog [data-login-card] { + min-height: calc(2 * var(--text-xs) * var(--text-xs--line-height) + 13 * var(--spacing) + var(--sz-44px)); +} + +.connect-account-dialog [data-login-card].flex-col { + justify-content: space-between; +} + /* ──────────────────────────────────────────────────────────────────────── Chat-style task thread animation utilities (default view; classic legacy view sits behind enableClassicTaskInterface).