Repository navigation
fix(connections): toggle a card only when it opens to more, and open one card at a time - #36305
Conversation
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Every item removes a dead control or the pile-up of open cards that #36276 reports; the one-open-at-a-time behaviour stays inside the accepted RFC's "a card expands in place" shape. What this change shipsInventory (6 items) — 6 justifiedIntent: on the Connections page, show a card's name as a toggle only when clicking it changes something, and keep one card open at a time. FIX.
[FIRST-PRINCIPLES-REVIEWED] 3fb7316 Description read[DESCRIPTION-READ] 979fc5dfa96c10fb51aac5f876ddf27be3e21bf77860bedc4a83fd51fe766dda That sha256 names the PR description this verdict read. Recompute it with |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: the toggle now shows only where it changes the card, the accordion is a one-line state change that is easy to revert, and the three attached screenshots show this revision. Notes
[DESIGN-REVIEWED] 3fb7316 Description read[DESCRIPTION-READ] 7a5740a9d5bde22472c352ca2a2858d7f640bd565fe4a78b57a7bc15f02f7a99 That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
UX Review (Opus 5.5) — ✅ PASS (a BLOCK with no Trigger and no Outcome does not block)UX-level review of UX-Verdict: PASS cannot evaluate: missing a recording of the new accordion, where opening one card closes another and the grid reflows, and a screenshot of a card held open by its state, whose name is now plain text. Evidence gaps
Notes
[UX-REVIEWED] 3fb7316 Description read[DESCRIPTION-READ] df5c35c416bd50161144848144639e75636542847d31b924c2a60bfce2fd138d That sha256 names everything this verdict read: the PR description, plus the 6 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
4f4be1a to
7d5fb0f
Compare
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
|
Backend Tests (3.12, 8) fails on |
Code change approver recommendation: ApproveWhy: the decider estimates a 12% chance that this change introduces a defect, within the 12% limit for approving on its own, and every check passes. Frontend-only fix on the Connections page. The name toggle is now drawn only when the card isn't forced open and has an OAuth app part or a state whose actions hide while closed. This matches the card's render rule (the action row shows when open, not-connected or needs-configuration), so no visible content or action is lost. "Set up X" still uses expand.onToggle, and the OAuth panel is hidden rather than unmounted, so auto-closing a card keeps any unsaved form input. The open-card state now holds one entry; all three writers (click, ?provider=, highlight) are updated, and forced-open cards stay open outside it. New and rewritten tests cover the changed behaviour, and I found no other test that depends on a toggle the PR removes. The only failing CI check is an unrelated Python backend test; Frontend Tests were still pending. 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 |
7d5fb0f to
6880142
Compare
|
Rebased onto main carrying #36315 (the harness-table fix behind the inherited Backend Tests (3.12, 8) / Windows (8) red). Same diff; CI re-running. |
…one card at a time
6880142 to
3fb7316
Compare
bolichen97
left a comment
There was a problem hiding this comment.
Approve at 3fb7316. I read the whole diff.
- One card open at a time.
toggleExpandednow keeps at most one entry open: opening one closes the others, and clicking it again closes it. The?provider=and OAuth?highlight=deep links open just their target. Cards that a state forces open (a consent in flight, needs attention, not verified) still stay open on their own, outside this set. - The name toggles only when it does something. A forced-open card and the forced-open Google entry show their name as plain text, with no chevron. A card with no OAuth app part that is "not connected" or "needs configuration" already shows its whole action row while closed, so it gets no toggle either. Every other card keeps its button with
aria-expandedandaria-controlsas before.
Web-only, no regex, no refusal. The description carries screenshots, and all 97 checks are green. Approving without auto because the author holds auto-merge.
Problem / Motivation
Goal: On the Connections page, a card's name is a toggle only when toggling changes what the card shows, and opening one card closes the others.
Every card's name carried an expand chevron. On a card whose provider registers its own OAuth client (Notion, Linear, Stripe, Vercel, GitLab here), the closed card already shows its whole action row, so the chevron only rotated. A card held open by its state (waiting for approval, needs attention, not verified) also showed a chevron that did nothing, and so did the Google entry in the same state. Opening a second card left the first one open, and open cards span two or three grid columns.
Why it matters
Every user of the Connections page sees a control that does nothing on most cards, and open cards pile up across the grid until each one is closed by hand.
Not a goal
What changed (motivation → approach → change)
The symptom came from two places. The card drew the toggle whenever the page passed an
expandhandle, without asking whether toggling changes anything. The page kept open cards in a set that only ever added entries. NowConnectionsPageCard.tsxdraws the toggle only when the card is not forced open and has an OAuth app part or a state whose actions hide while closed.ConnectionsPage.tsxkeeps at most one open entry, for a click, a?provider=link and a settings highlight alike. Cards that need the user still stay open on their own, outside that set.Backwards compatibility
Compatible: no API, setting or stored state changes; links that open a card still open it.
Removes nothing: the toggle is dropped only where clicking it changed nothing on screen, and every action stays reachable.
Tests
ConnectionsPage.coverage.test.tsx: a not-connected card with no OAuth app part has no toggle and keeps Connect; a card with an OAuth app part opens and closes on its name; opening GitHub closes Notion and opening the Google entry closes GitHub; a forced-open card has no toggle. The two old tests that pinned the dead chevron are rewritten.ConnectionsPage.coverageTestUtils.tsx: the helper that clicked every card open now opens only the Google entry, since opening every card no longer settles.--sequence.shuffle, seeds 1, 7, 13, 42; 89/89 each).Proof: not provable -- frontend test (prove.py runs Python only)
Manual verification
Captured the built SPA with stubbed APIs (light and dark): Notion's name has no chevron, GitHub opens, then opening Asana closes GitHub.
Screenshots / video
At rest: Notion, Linear, Stripe, Vercel and GitLab have no chevron; GitHub and Asana keep theirs.
GitHub opened, then Asana opened and GitHub closed by itself:
Related Issues
Closes #36276
Sibling sweep
Swept: git grep -nE "ChevronDown|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: the dead toggle came from this card's own rule for what shows while closed, not a pattern other pages share.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)