mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-12-03 11:47:42 +01:00
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
This commit is contained in:
1 parent
28c44fa2a1
commit
2bef9e3a80
3 files changed
+21
-2
No files matched your search
@@ -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(<>
|
||||
<OnboardingLoginCard instruction="Enter API key" loading={loading}><input /></OnboardingLoginCard>
|
||||
<OnboardingLoginCard instruction="Sign in" revealTogether loading={loading}><button>Sign in</button></OnboardingLoginCard>
|
||||
</>);
|
||||
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 —
|
||||
|
||||
@@ -101,7 +101,7 @@ export function OnboardingLoginCard({
|
||||
}) {
|
||||
if (revealTogether) {
|
||||
return (
|
||||
<div className="relative rounded-xl bg-muted/40 p-4">
|
||||
<div data-login-card="" className="relative rounded-xl bg-muted/40 p-4">
|
||||
<div
|
||||
inert={loading}
|
||||
className={cn("flex flex-col gap-4", loading ? "invisible" : "onboarding-subscription-reveal")}
|
||||
@@ -121,6 +121,7 @@ export function OnboardingLoginCard({
|
||||
if (loading) {
|
||||
return (
|
||||
<div
|
||||
data-login-card=""
|
||||
className="flex min-h-(--sz-108px) items-center justify-center rounded-xl bg-muted/40"
|
||||
role="status"
|
||||
aria-label="Preparing the sign-in"
|
||||
@@ -132,7 +133,7 @@ export function OnboardingLoginCard({
|
||||
|
||||
|
||||
return (
|
||||
<div className="flex min-h-(--sz-108px) flex-col gap-4 rounded-xl bg-muted/40 p-4">
|
||||
<div data-login-card="" className="flex min-h-(--sz-108px) flex-col gap-4 rounded-xl bg-muted/40 p-4">
|
||||
{/* 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.
|
||||
|
||||
@@ -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).
|
||||
|
||||
Reference in new issue
Block a user