Repository navigation
fix: open one connections card at a time, toggle only when it shows more - #36411
bolichen97 wants to merge 1 commit into
Conversation
On the Connections page every card's name carried an expand chevron, even where opening the card showed nothing new: a provider that signs in on its own (no OAuth app part) already shows its Connect while closed, and a card held open by its state (waiting for approval, needs attention, not verified) could not close. The Google entry had the same held-open case. Opened cards also stayed open side by side, and since an open card spans two or three grid columns, several of them pushed the gallery around. The name is now a toggle only when opening changes what the card shows: the OAuth app part, or a connected card's Test and Disconnect. Opening one card closes the one opened before it. Cards held open by their state stay open and show a plain name. The coverage helper that opened every card is narrowed to the Google entry, since under one-open-at-a-time opening each card in turn closes the previous one and its waitFor never settled. Fixes #36276 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
This PR and #36305 both close #36276 and make the same change in ConnectionsPage.tsx, ConnectionsPageCard.tsx and the two ConnectionsPage coverage test files. Both open only one card at a time, and both make a card name a toggle only when opening the card shows more. Only this PR also updates docs/system-specs/modules/connections.md. Please keep one of #36305 and #36411 and close the other, carrying over anything only this one has. |
Code change approver recommendation: A person should decideWhy: the decider thinks the change is probably fine but estimates a 13% chance that this change introduces a defect, above the 12% limit for approving on its own. Frontend-only change on the Connections page. A single An automated recommendation, not a review: a maintainer still decides. It approves on its own only when the estimated chance of a defect is at most 12% and the change has at most 400 changed lines. Decider v3c (217fe607) · commit |
|
Closing as superseded: the same fix for #36276 (toggle a connections card only when it opens to more, and keep one card open at a time) landed in #36305, merged 2026-11-13, which also closed the issue. This branch now conflicts with main and adds nothing beyond it. Thank you for the work here. If something from this PR is still missing on main, please reopen with a note on what it is. |
Pull request was closed
Problem / Motivation
Goal: On the Connections page, opening a card closes the one opened before it, and a card's name is only an expand toggle when opening the card shows something more.
Every card's name carried an expand chevron, even where opening it showed nothing new. A provider that signs in on its own (Notion, Linear, Atlassian, Stripe, Vercel, GitLab, TickTick) already shows its Connect while closed, so the chevron only rotated. A card held open by its state (waiting for approval, needs attention, not verified), and the Google entry while one of its products is, could not be closed by its toggle. Opened cards also stayed open side by side.
Why it matters
Anyone setting up a connection meets these toggles first. A chevron that does nothing, or a toggle that will not close, reads as a broken page. An open card spans two or three grid columns, so with several open the gallery reflows and the card the user was looking at moves.
Not a goal
What changed (motivation → approach → change)
The open state was a set of entries, and the card drew the name toggle whenever it was given an
expandprop. So any card could be opened, opening a card never closed another, and a card held open still drew a toggle.ConnectionsPage.tsxnow keeps one open entry (string | null). Opening one closes the other, and the?provider=and OAuth-highlight links open their entry the same way. While a product holds the Google entry open, its name is plain text. InConnectionsPageCard.tsxthe name is a toggle only when the card istoggleable: it hasexpand, is not held open, and has an OAuth app part or is connected. Any other card shows a plain name and looks the way a closed card did before.docs/system-specs/modules/connections.mdgets one paragraph stating the rule.ConnectionsPage.coverageTestUtils.tsxused to open every card. It now opens only the Google entry, because opening each card in turn closes the one before it and itswaitFornever settled.Backwards compatibility
Compatible: frontend only. No API, config or stored data changes, and every card that showed more when opened still opens.
Removes nothing: no route, key, record or public function is removed. A card that had nothing to show when opened simply has no toggle.
Tests
website/src/test/ConnectionsPage.coverage.test.tsx:These four fail on the parent commit and pass here. All 17 Connections test files pass (343 tests).
Proof: not provable -- frontend test (prove.py runs Python only)
Manual verification
Run on Ubuntu 24.04: real Chromium through Playwright against an isolated gateway on 127.0.0.1, with a temporary
KIROCREW_HOME, aftermake frontend. Fromout/evidence/smoke-after.md:Before the fix, on the parent commit, Notion and GitLab had a chevron. Clicking Notion set
aria-expanded=trueand changed nothing on the card, and GitHub and GitLab stayed open side by side.The held-open cases need a consent in flight or a broken server, which this host cannot produce without a provider account. The vitest cases above cover them.
Gates: black, subprocess encoding, isort, flake8, mypy, comment-history, brand, file-line cap, docs-lint, eslint,
tsc,gen-ui-index --checkandmake frontendpass. Inscripts/local-gate.py, every red also fails on a clean worktree of the parent commit, so this change did not cause any of them. The list is in the job'sgates-final.txt.Screenshots / video
Google entry open, and the before shots
Related Issues
Issue #36276, closed by the last line of this description.
Sibling sweep
Swept: git grep -n "aria-expanded" -- website/src/pages/connections
Sibling: website/src/pages/connections/ConnectionsPage.tsx -- changed here
Sibling: website/src/pages/connections/ConnectionsPageCard.tsx -- changed here
Pattern harvest
Not generalizable: whether opening a card shows anything new depends on this page's own card model (OAuth app part, connected state, held-open states), and no lint can see that.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)🤖 Generated with Claude Code
Closes #36276
How it was verified
Smoke test after the fix (issue #36276)
Same isolated home, gateway restarted on the rebuilt bundle (
make frontend,exit 0) at 127.0.0.1:42237. Real Chromium through Playwright (
check.mjs).Command
Output
Reading
TickTick (they sign in on their own, with no OAuth app part) show a plain
name and no chevron; Notion's Connect is still visible on the closed card.
Only GitHub, Asana (OAuth app part) and the Google entry keep the toggle.
closes GitHub (its OAuth app part goes hidden); opening Google closes Asana.
clicking Google again closes it.
attention or not verified) need a consent in flight or a broken server,
which this host cannot produce without a provider account. They are pinned by
the vitest cases "opens a broken connection by itself, with no name toggle
that could not close it" and "opens the Google entry by itself while a Google
consent is in flight" (both failed before the fix, pass after).
Screenshots:
after-1-gallery.png(plain names except GitHub, Asana, Google),after-2-accordion.png(Asana open, GitHub closed),after-3-google.png(Google open, GitHub and Asana closed).