From ca6413ef37e71c8f9bbbf65aa2e6203485764db8 Mon Sep 17 00:00:00 2001 From: Patrick O'Reilly Date: Fri, 25 Sep 2026 14:29:01 -0700 Subject: [PATCH] fix(claims): keep a confirming response looking settled #2587 showed "Waiting for confirmation" under the claim page's pills and a progress cursor on them while a response confirmed. It read as the side not having been taken, where it used to look taken at once. Drop both; the pills still quietly drop presses until the response lands, which is what stops a second press retracting it, and their tooltip still explains the wait. --- .../web/core/claims/browse/claim-page-view.test.tsx | 13 ++++++------- apps/web/core/claims/browse/claim-page-view.tsx | 3 +-- .../debates/matchmaking/matchmaking-claim-card.tsx | 12 ------------ 3 files changed, 7 insertions(+), 21 deletions(-) diff --git a/apps/web/core/claims/browse/claim-page-view.test.tsx b/apps/web/core/claims/browse/claim-page-view.test.tsx index eb6f66c93a..fdf8f015db 100644 --- a/apps/web/core/claims/browse/claim-page-view.test.tsx +++ b/apps/web/core/claims/browse/claim-page-view.test.tsx @@ -155,7 +155,6 @@ vi.mock('~/core/debates/matchmaking/matchmaking-claim-card', () => ({ isConnected: false, isResponsePending: mocks.isResponsePending, }), - ResponseConfirmingNote: () =>

, })); vi.mock('./claim-position-comment', () => ({ ClaimPositionCommentControl: (props: Record) => { @@ -561,20 +560,20 @@ describe('ClaimPageView description', () => { }); describe('ClaimPageView position', () => { - // The claim page is where a confirming response was pressed again and published a retraction: - // it drew no sign of the wait, so a held pill looked like a settled one. - it('says the response is confirming, and marks the pills pending, while it is', () => { + // The claim page is where a confirming response was pressed again and published a retraction. + // The pills guard against that quietly: the side reads as taken at once, with no note or wait + // cursor, and only the presses that would undo it are dropped until it lands. + it('marks the pills pending while the response confirms, without announcing a wait', () => { mocks.isResponsePending = true; render(); - expect(screen.getByTestId('confirming')).toBeInTheDocument(); expect(mocks.positionControl?.pending).toBe(true); + expect(screen.queryByText(/waiting for confirmation/i)).toBeNull(); }); - it('says nothing once it has landed', () => { + it('releases the pills once it has landed', () => { render(); - expect(screen.queryByTestId('confirming')).toBeNull(); expect(mocks.positionControl?.pending).toBe(false); }); }); diff --git a/apps/web/core/claims/browse/claim-page-view.tsx b/apps/web/core/claims/browse/claim-page-view.tsx index 2839918d3f..8ea3f2eb9c 100644 --- a/apps/web/core/claims/browse/claim-page-view.tsx +++ b/apps/web/core/claims/browse/claim-page-view.tsx @@ -14,7 +14,7 @@ import { useBackfillReadinessForHeldPosition, } from '~/core/debates/backfill-readiness-for-held-position'; import { useDebateClaims } from '~/core/debates/hooks'; -import { ResponseConfirmingNote, useClaimPositionControl } from '~/core/debates/matchmaking/matchmaking-claim-card'; +import { useClaimPositionControl } from '~/core/debates/matchmaking/matchmaking-claim-card'; import { usePrivySignIn } from '~/core/hooks/use-privy-sign-in'; import { ID } from '~/core/id'; import { hasRecordToShow } from '~/core/profile/profile-proposer'; @@ -546,7 +546,6 @@ function ClaimPositionSection({ // Explore's pill row width, so the two read as one control. positionRowClassName="max-w-[360px]" /> - {control.isResponsePending ? : null} {control.responseError ? (

diff --git a/apps/web/core/debates/matchmaking/matchmaking-claim-card.tsx b/apps/web/core/debates/matchmaking/matchmaking-claim-card.tsx index b2ed050e59..f15c3f9f14 100644 --- a/apps/web/core/debates/matchmaking/matchmaking-claim-card.tsx +++ b/apps/web/core/debates/matchmaking/matchmaking-claim-card.tsx @@ -1005,17 +1005,6 @@ function UnresolvableControls({ ); } -/** Said under the pills while the viewer's response is confirming, in the vote arrows' words. */ -export function ResponseConfirmingNote() { - return ( -
- - {RESPONSE_CONFIRMING_COPY} - -
- ); -} - export function PositionRow({ positions, responseKind, @@ -1232,7 +1221,6 @@ function PositionButton({ className={cx( className, 'transition-colors disabled:opacity-60', - pending && 'cursor-progress', !selected && !disabled && !pending && 'hover:border-text' )} >