From f40b1770a8adce987dc781eb23cab2aa276255d5 Mon Sep 17 00:00:00 2001 From: Haardik H Date: Wed, 2 Sep 2026 14:47:39 -0400 Subject: [PATCH 1/9] refactor(vibenet): compact validity race layout Co-authored-by: OpenCode --- .../race-the-agent/RaceTheAgentDemo.tsx | 182 ++++++------------ 1 file changed, 57 insertions(+), 125 deletions(-) diff --git a/app/vibenet/demos/validity/race-the-agent/RaceTheAgentDemo.tsx b/app/vibenet/demos/validity/race-the-agent/RaceTheAgentDemo.tsx index 61a9844..f77adf6 100644 --- a/app/vibenet/demos/validity/race-the-agent/RaceTheAgentDemo.tsx +++ b/app/vibenet/demos/validity/race-the-agent/RaceTheAgentDemo.tsx @@ -803,7 +803,7 @@ function RaceTheAgentDemoInner() { - -
- -
- - {prepared ? 'Race setup ready' : setupError ? 'Automatic setup needs attention' : setupRunning ? 'Preparing race automatically' : 'Waiting to start setup'} - - - {setupError ?? progress ?? (prepared - ? agentRunning ? `Condition agent: ${agentPhase}` : 'Singleton funded; restarting condition agent.' - : 'Waiting for account and chain state.')} - -
-
- {setupError ? : null} -
- -
+
@@ -884,7 +864,7 @@ function RaceTheAgentDemoInner() {
Guided race - Submit first. React second. + Race first. Then submit ahead.
- - {agentRunning ? agentPhase : setupRunning ? 'Starting after setup' : 'Waiting for setup'} - + {setupError ? ( +
+ {setupError} + +
+ ) : ( + + {progress ?? (agentRunning ? agentPhase : setupRunning ? 'Starting after setup' : 'Waiting for setup')} + + )}
0} - > - - - + 0} + > + +
{(error || agentError) ? (
@@ -928,36 +915,23 @@ function RaceTheAgentDemoInner() {
) : null}
-
-
-
-
+ +
+
Comparison - Same call, different timing model + Same call, different timing. +
+
- -
-
- - -
-
- - -
+ + Manual attempts begin on your click. Validity attempts can already be waiting when withdrawals open. + +
+ + +
+
@@ -969,10 +943,22 @@ function RaceTheAgentDemoInner() {
- - Solidity stores the first state variable, enabled, - in slot 0. The validity transaction reads that slot directly and becomes eligible only when the boolean is true. - +
+ + Solidity stores the first state variable, enabled, + in slot 0. The validity transaction reads that slot directly and becomes eligible only when the boolean is true. + + {withdrawal ? ( +
+ Singleton contract + +
+ ) : null} +
@@ -980,7 +966,7 @@ function RaceTheAgentDemoInner() {
-
+
Observed chain state
@@ -1007,19 +993,6 @@ function RaceTheAgentDemoInner() {
- - What the result means - Blocks beat stopwatches. - - The timestamps show when this browser sampled state or received a receipt. They are useful context, not authoritative sequencing. The lower included block landed first; the same block is a tie at this resolution. - - {withdrawal ? ( -
- Global singleton - -
- ) : null} -
); @@ -1111,12 +1084,12 @@ function ConditionPill({ enabled }: { enabled: boolean | null }) { function AttemptHistoryCard({ title, attempts }: { title: string; attempts: Attempt[] }) { return ( - +
{title} {attempts.length} total
-
+
{attempts.length === 0 ? ( No previous attempts yet. ) : attempts.map((attempt, index) => ( @@ -1240,47 +1213,6 @@ function RaceStep({ ); } -function AttemptCard({ - label, - headline, - description, - attempt, - accent, -}: { - label: string; - headline: string; - description: string; - attempt: Attempt; - accent: 'blue' | 'green'; -}) { - const explorer = attempt.hash ? `${VIBENET_EXPLORER_PATH}/tx/${attempt.hash}` : null; - return ( - - -
-
- {label} - {headline} -
- -
- {description} -
- - - - -
- {attempt.error ? {attempt.error} : null} - {explorer ? ( - - View transaction in explorer - - ) : null} -
- ); -} - function StatusPill({ status }: { status: Attempt['status'] }) { const positive = status === 'success'; const negative = status === 'reverted' || status === 'expired' || status === 'error'; From 4163e9cb9833aaa4d9dbd8e88faa70e0d15bbd5b Mon Sep 17 00:00:00 2001 From: Haardik H Date: Wed, 2 Sep 2026 14:56:27 -0400 Subject: [PATCH 2/9] refactor(vibenet): loosen validity race layout Co-authored-by: OpenCode --- .../race-the-agent/RaceTheAgentDemo.tsx | 70 +++++-------------- .../race-the-agent/comparison.test.ts | 8 --- .../validity/race-the-agent/comparison.ts | 5 -- 3 files changed, 17 insertions(+), 66 deletions(-) diff --git a/app/vibenet/demos/validity/race-the-agent/RaceTheAgentDemo.tsx b/app/vibenet/demos/validity/race-the-agent/RaceTheAgentDemo.tsx index f77adf6..264246f 100644 --- a/app/vibenet/demos/validity/race-the-agent/RaceTheAgentDemo.tsx +++ b/app/vibenet/demos/validity/race-the-agent/RaceTheAgentDemo.tsx @@ -48,7 +48,6 @@ import { ensureSingleton, probeSingleton } from '../lib/singleton'; import { connectJsonRpcStream, headNumber, type StreamHead } from '../lib/stream'; import { attemptHistoryRows, - canResetRace, canSubmitManual, canSubmitValidity, comparisonResult, @@ -128,7 +127,6 @@ function RaceTheAgentDemoInner() { const [agentPhase, setAgentPhase] = useState('Waiting'); const [agentRestartToken, setAgentRestartToken] = useState(0); const [agentError, setAgentError] = useState(null); - const [streamLive, setStreamLive] = useState(false); const [prepared, setPrepared] = useState(false); const [setupRunning, setSetupRunning] = useState(false); const [setupError, setSetupError] = useState(null); @@ -146,7 +144,6 @@ function RaceTheAgentDemoInner() { const generationRef = useRef(0); const observedRef = useRef(null); - const validityRef = useRef(validity); const accountKeyRef = useRef(null); const setupInFlightKeyRef = useRef(null); const setupReadyKeyRef = useRef(null); @@ -156,7 +153,6 @@ function RaceTheAgentDemoInner() { const rpcSendRef = useRef(null); const engineRef = useRef(engine); engineRef.current = engine; - validityRef.current = validity; observedRef.current = observed; useEffect(() => { @@ -268,7 +264,6 @@ function RaceTheAgentDemoInner() { const startPoll = () => { if (pollId !== undefined) return; rpcSendRef.current = null; - setStreamLive(false); void syncState(); pollId = window.setInterval(() => void syncState(), STATE_FALLBACK_POLL_MS); }; @@ -289,7 +284,6 @@ function RaceTheAgentDemoInner() { stream.close(); return; } - setStreamLive(true); void syncState(); }; @@ -308,7 +302,6 @@ function RaceTheAgentDemoInner() { rpcSendRef.current = null; if (pollId !== undefined) window.clearInterval(pollId); stream?.close(); - setStreamLive(false); }; }, [applyObservation, client, vibe, withdrawal]); @@ -765,25 +758,7 @@ function RaceTheAgentDemoInner() { } }; - const reset = () => { - if (!canResetRace(validityRef.current, validBefore)) { - setError(`This validity transaction is still pending and can land until its ${RACE_VALIDITY_SECONDS}-second expiry. Keep watching the receipt and chain state.`); - return; - } - setValidity(EMPTY_ATTEMPT); - setValidityHistory([]); - setValidityAttemptCount(0); - setManual(EMPTY_ATTEMPT); - setManualHistory([]); - setManualAttemptCount(0); - setValidBefore(null); - setError(null); - setAgentError(null); - setObservations(observedRef.current ? [observedRef.current] : []); - }; - const result = comparisonResult(validity, manual); - const resetAllowed = canResetRace(validity, validBefore); const readyToSubmit = prepared && observed?.enabled === false && canSubmitValidity(validity.status); const readyToWithdraw = canSubmitManual({ status: manual.status, @@ -809,17 +784,6 @@ function RaceTheAgentDemoInner() { eyebrow="Validity Transactions · live comparison" title="Race the Agent" description="The same permissionless withdrawal pays exactly 1 VIBE. One transaction waits in advance for storage to equal 1; the other can be fired at any time and succeeds or reverts against the state it reaches onchain." - actions={validity.status !== 'idle' || manual.status !== 'idle' ? ( - - ) : undefined} />
@@ -850,15 +814,7 @@ function RaceTheAgentDemoInner() {
- -
- - {streamLive - ? 'WebSocket observations follow each Vibenet head at roughly 200ms cadence.' - : 'WebSocket unavailable; state observations are polling every second.'}{' '} - Inclusion blocks below remain the primary ordering evidence. - @@ -866,7 +822,7 @@ function RaceTheAgentDemoInner() { Guided race Race first. Then submit ahead.
-
+
{withdrawal ? ( -
- Singleton contract - +
+
+ Singleton contract + +
+
+ Contract balance + + {contractBalance === null ? '—' : `${formatCompactVibe(contractBalance)} VIBE`} + +
) : null}
@@ -1198,7 +1162,7 @@ function RaceStep({ return (
diff --git a/app/vibenet/demos/validity/race-the-agent/comparison.test.ts b/app/vibenet/demos/validity/race-the-agent/comparison.test.ts index 821037f..918ce84 100644 --- a/app/vibenet/demos/validity/race-the-agent/comparison.test.ts +++ b/app/vibenet/demos/validity/race-the-agent/comparison.test.ts @@ -4,7 +4,6 @@ import { AGENT_DISABLED_DWELL_MAX_MS, AGENT_DISABLED_DWELL_MIN_MS, attemptHistoryRows, - canResetRace, canSubmitManual, canSubmitValidity, comparisonResult, @@ -63,13 +62,6 @@ describe('race lifecycle predicates', () => { expect(fields.validBefore).toBe(BigInt(now + 15_000)); }); - it('blocks reset only while a submitted validity transaction can still land', () => { - expect(canResetRace({ status: 'pending' }, 20_000, 10_000)).toBe(false); - expect(canResetRace({ status: 'pending' }, null, 20_001)).toBe(false); - expect(canResetRace({ status: 'pending' }, 20_000, 20_001)).toBe(true); - expect(canResetRace({ status: 'expired' }, 20_000, 10_000)).toBe(true); - }); - it('runs the condition agent only when automatic setup resources are ready', () => { expect(shouldRunConditionAgent({ prepared: true, hasAgent: true, hasClient: true, hasContract: true })).toBe(true); expect(shouldRunConditionAgent({ prepared: false, hasAgent: true, hasClient: true, hasContract: true })).toBe(false); diff --git a/app/vibenet/demos/validity/race-the-agent/comparison.ts b/app/vibenet/demos/validity/race-the-agent/comparison.ts index 2371db9..5cc3849 100644 --- a/app/vibenet/demos/validity/race-the-agent/comparison.ts +++ b/app/vibenet/demos/validity/race-the-agent/comparison.ts @@ -54,11 +54,6 @@ export function isAttemptTerminal(status: AttemptStatus): boolean { return status === 'success' || status === 'reverted' || status === 'expired' || status === 'error'; } -export function canResetRace(validity: Attempt, validBefore: number | null, now = Date.now()): boolean { - if (validity.status !== 'pending') return true; - return validBefore !== null && now > validBefore; -} - export function canSubmitAttempt(status: AttemptStatus): boolean { return status !== 'pending' && status !== 'submitting'; } From 2df50d176a506c5e27f184194e25639665d56ed1 Mon Sep 17 00:00:00 2001 From: Haardik H Date: Wed, 2 Sep 2026 14:59:09 -0400 Subject: [PATCH 3/9] refactor(vibenet): merge race status and comparison Co-authored-by: OpenCode --- .../race-the-agent/RaceTheAgentDemo.tsx | 50 ++++++++++--------- 1 file changed, 26 insertions(+), 24 deletions(-) diff --git a/app/vibenet/demos/validity/race-the-agent/RaceTheAgentDemo.tsx b/app/vibenet/demos/validity/race-the-agent/RaceTheAgentDemo.tsx index 264246f..c25e918 100644 --- a/app/vibenet/demos/validity/race-the-agent/RaceTheAgentDemo.tsx +++ b/app/vibenet/demos/validity/race-the-agent/RaceTheAgentDemo.tsx @@ -786,7 +786,7 @@ function RaceTheAgentDemoInner() { description="The same permissionless withdrawal pays exactly 1 VIBE. One transaction waits in advance for storage to equal 1; the other can be fired at any time and succeeds or reverts against the state it reaches onchain." /> -
+
@@ -796,9 +796,9 @@ function RaceTheAgentDemoInner() {
-
+
{observed ? (observed.enabled ? '1' : '0') : '—'}
+
+ + +
-
- - +
+
+
+ Comparison + Same call, different timing. +
+ +
+ + Manual attempts begin on your click. Validity attempts can already be waiting when withdrawals open. + +
+ + +
@@ -872,25 +888,10 @@ function RaceTheAgentDemoInner() { ) : null} - -
-
- Comparison - Same call, different timing. -
- -
- - Manual attempts begin on your click. Validity attempts can already be waiting when withdrawals open. - -
- - -
-
-
+
+
Advanced details @@ -930,7 +931,7 @@ function RaceTheAgentDemoInner() {
-
+
Observed chain state
@@ -958,6 +959,7 @@ function RaceTheAgentDemoInner() {
+
); } From 4d05ba2687bef0b10c823f375d24871f589957a6 Mon Sep 17 00:00:00 2001 From: Haardik H Date: Wed, 2 Sep 2026 15:00:58 -0400 Subject: [PATCH 4/9] refactor(vibenet): simplify race status display Co-authored-by: OpenCode --- .../race-the-agent/RaceTheAgentDemo.tsx | 55 ++++--------------- .../race-the-agent/comparison.test.ts | 22 -------- .../validity/race-the-agent/comparison.ts | 28 ---------- 3 files changed, 10 insertions(+), 95 deletions(-) diff --git a/app/vibenet/demos/validity/race-the-agent/RaceTheAgentDemo.tsx b/app/vibenet/demos/validity/race-the-agent/RaceTheAgentDemo.tsx index c25e918..1d1fd9a 100644 --- a/app/vibenet/demos/validity/race-the-agent/RaceTheAgentDemo.tsx +++ b/app/vibenet/demos/validity/race-the-agent/RaceTheAgentDemo.tsx @@ -50,7 +50,6 @@ import { attemptHistoryRows, canSubmitManual, canSubmitValidity, - comparisonResult, isAttemptTerminal, preserveCompletedAttempt, randomAgentDwellMs, @@ -758,7 +757,6 @@ function RaceTheAgentDemoInner() { } }; - const result = comparisonResult(validity, manual); const readyToSubmit = prepared && observed?.enabled === false && canSubmitValidity(validity.status); const readyToWithdraw = canSubmitManual({ status: manual.status, @@ -788,12 +786,9 @@ function RaceTheAgentDemoInner() {
-
-
- Shared onchain switch - Withdrawal condition -
- +
+ Shared onchain switch + Withdrawal condition
@@ -815,18 +810,15 @@ function RaceTheAgentDemoInner() {
-
-
-
- Comparison - Same call, different timing. -
- +
+
+ Comparison + Same call, different timing.
Manual attempts begin on your click. Validity attempts can already be waiting when withdrawals open. -
+
@@ -1033,29 +1025,14 @@ function formatCompactVibe(value: bigint): string { return Number(whole).toLocaleString(undefined, { notation: 'compact', maximumFractionDigits: 1 }); } -function ConditionPill({ enabled }: { enabled: boolean | null }) { - return ( - - {enabled === null ? 'unobserved' : enabled ? 'enabled · 1' : 'disabled · 0'} - - ); -} - function AttemptHistoryCard({ title, attempts }: { title: string; attempts: Attempt[] }) { return ( - +
{title} {attempts.length} total
-
+
{attempts.length === 0 ? ( No previous attempts yet. ) : attempts.map((attempt, index) => ( @@ -1195,15 +1172,3 @@ function StatusPill({ status }: { status: Attempt['status'] }) { ); } - -function ResultPill({ result, validity, manual }: { result: ReturnType; validity: Attempt; manual: Attempt }) { - let label = 'Race in progress'; - if (result === 'validity-first') label = 'Validity landed first'; - if (result === 'manual-first') label = 'Manual landed first'; - if (result === 'same-block') label = 'Same inclusion block'; - if (result === 'validity-only') label = 'Only validity succeeded'; - if (result === 'manual-only') label = 'Only manual succeeded'; - if (result === 'neither-succeeded') label = 'Neither transaction succeeded'; - if (result === 'none' && validity.status === 'idle' && manual.status === 'idle') label = 'Not started'; - return {label}; -} diff --git a/app/vibenet/demos/validity/race-the-agent/comparison.test.ts b/app/vibenet/demos/validity/race-the-agent/comparison.test.ts index 918ce84..e007c69 100644 --- a/app/vibenet/demos/validity/race-the-agent/comparison.test.ts +++ b/app/vibenet/demos/validity/race-the-agent/comparison.test.ts @@ -6,7 +6,6 @@ import { attemptHistoryRows, canSubmitManual, canSubmitValidity, - comparisonResult, isAttemptTerminal, preserveCompletedAttempt, randomAgentDwellMs, @@ -23,27 +22,6 @@ import { blockNumberPredicate } from '../lib/predicates'; const WITHDRAWAL = '0x1111111111111111111111111111111111111111'; -function success(block: bigint): Attempt { - return { status: 'success', includedBlock: block }; -} - -describe('comparisonResult', () => { - it('uses inclusion block ordering instead of browser timestamps', () => { - expect(comparisonResult(success(10n), { ...success(11n), includedAt: 1 })).toBe('validity-first'); - expect(comparisonResult({ ...success(12n), includedAt: 1 }, success(11n))).toBe('manual-first'); - expect(comparisonResult(success(12n), success(12n))).toBe('same-block'); - }); - - it('describes one-sided and unfinished outcomes', () => { - expect(comparisonResult(success(10n), { status: 'reverted' })).toBe('validity-only'); - expect(comparisonResult({ status: 'expired' }, success(10n))).toBe('manual-only'); - expect(comparisonResult(success(10n), { status: 'idle' })).toBe('none'); - expect(comparisonResult({ status: 'pending' }, { status: 'idle' })).toBe('none'); - expect(comparisonResult({ status: 'expired' }, { status: 'idle' })).toBe('neither-succeeded'); - expect(comparisonResult({ status: 'reverted' }, { status: 'error' })).toBe('neither-succeeded'); - }); -}); - describe('isAttemptTerminal', () => { it('only stops on final receipt or expiry states', () => { expect(isAttemptTerminal('success')).toBe(true); diff --git a/app/vibenet/demos/validity/race-the-agent/comparison.ts b/app/vibenet/demos/validity/race-the-agent/comparison.ts index 5cc3849..d2cd2b4 100644 --- a/app/vibenet/demos/validity/race-the-agent/comparison.ts +++ b/app/vibenet/demos/validity/race-the-agent/comparison.ts @@ -22,34 +22,6 @@ export type Attempt = { error?: string; }; -export type ComparisonResult = - | 'validity-first' - | 'manual-first' - | 'same-block' - | 'validity-only' - | 'manual-only' - | 'neither-succeeded' - | 'none'; - -export function comparisonResult(validity: Attempt, manual: Attempt): ComparisonResult { - const validityLanded = validity.status === 'success' && validity.includedBlock !== undefined; - const manualLanded = manual.status === 'success' && manual.includedBlock !== undefined; - if (validityLanded && manualLanded) { - if (validity.includedBlock! < manual.includedBlock!) return 'validity-first'; - if (manual.includedBlock! < validity.includedBlock!) return 'manual-first'; - return 'same-block'; - } - if (validityLanded && isAttemptTerminal(manual.status)) return 'validity-only'; - if (manualLanded && isAttemptTerminal(validity.status)) return 'manual-only'; - if ( - (!validityLanded && isAttemptTerminal(validity.status) && manual.status === 'idle') || - (!validityLanded && !manualLanded && isAttemptTerminal(validity.status) && isAttemptTerminal(manual.status)) - ) { - return 'neither-succeeded'; - } - return 'none'; -} - export function isAttemptTerminal(status: AttemptStatus): boolean { return status === 'success' || status === 'reverted' || status === 'expired' || status === 'error'; } From 0b30a0e6e9fda1ad62416a5a9e2f0fd1d61387f4 Mon Sep 17 00:00:00 2001 From: Haardik H Date: Wed, 2 Sep 2026 15:03:39 -0400 Subject: [PATCH 5/9] fix(vibenet): fix race attempt panel heights Co-authored-by: OpenCode --- app/vibenet/demos/validity/race-the-agent/RaceTheAgentDemo.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/vibenet/demos/validity/race-the-agent/RaceTheAgentDemo.tsx b/app/vibenet/demos/validity/race-the-agent/RaceTheAgentDemo.tsx index 1d1fd9a..f7db20b 100644 --- a/app/vibenet/demos/validity/race-the-agent/RaceTheAgentDemo.tsx +++ b/app/vibenet/demos/validity/race-the-agent/RaceTheAgentDemo.tsx @@ -818,7 +818,7 @@ function RaceTheAgentDemoInner() { Manual attempts begin on your click. Validity attempts can already be waiting when withdrawals open. -
+
From 3b9785184a28ba9c667b39b677ea62a9bf6933c6 Mon Sep 17 00:00:00 2001 From: Haardik H Date: Wed, 2 Sep 2026 15:05:51 -0400 Subject: [PATCH 6/9] fix(vibenet): fill race attempt panel height Co-authored-by: OpenCode --- app/vibenet/demos/validity/race-the-agent/RaceTheAgentDemo.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/vibenet/demos/validity/race-the-agent/RaceTheAgentDemo.tsx b/app/vibenet/demos/validity/race-the-agent/RaceTheAgentDemo.tsx index f7db20b..4a5918f 100644 --- a/app/vibenet/demos/validity/race-the-agent/RaceTheAgentDemo.tsx +++ b/app/vibenet/demos/validity/race-the-agent/RaceTheAgentDemo.tsx @@ -818,7 +818,7 @@ function RaceTheAgentDemoInner() { Manual attempts begin on your click. Validity attempts can already be waiting when withdrawals open. -
+
From 0b8f2633da8cf590a833a605492f49fe9a9e2fee Mon Sep 17 00:00:00 2001 From: Haardik H Date: Wed, 2 Sep 2026 15:07:11 -0400 Subject: [PATCH 7/9] fix(vibenet): bound race comparison height Co-authored-by: OpenCode --- .../demos/validity/race-the-agent/RaceTheAgentDemo.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/vibenet/demos/validity/race-the-agent/RaceTheAgentDemo.tsx b/app/vibenet/demos/validity/race-the-agent/RaceTheAgentDemo.tsx index 4a5918f..72d87d2 100644 --- a/app/vibenet/demos/validity/race-the-agent/RaceTheAgentDemo.tsx +++ b/app/vibenet/demos/validity/race-the-agent/RaceTheAgentDemo.tsx @@ -784,8 +784,8 @@ function RaceTheAgentDemoInner() { description="The same permissionless withdrawal pays exactly 1 VIBE. One transaction waits in advance for storage to equal 1; the other can be fired at any time and succeeds or reverts against the state it reaches onchain." /> -
- +
+
Shared onchain switch Withdrawal condition @@ -818,14 +818,14 @@ function RaceTheAgentDemoInner() { Manual attempts begin on your click. Validity attempts can already be waiting when withdrawals open. -
+
- +
Guided race Race first. Then submit ahead. From 916d91c81b9bd4c444bd67415fc9f25892475670 Mon Sep 17 00:00:00 2001 From: Haardik H Date: Wed, 2 Sep 2026 15:14:01 -0400 Subject: [PATCH 8/9] fix(vibenet): preserve guided race actions Co-authored-by: OpenCode --- .../validity/race-the-agent/RaceTheAgentDemo.tsx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/app/vibenet/demos/validity/race-the-agent/RaceTheAgentDemo.tsx b/app/vibenet/demos/validity/race-the-agent/RaceTheAgentDemo.tsx index 72d87d2..8da3449 100644 --- a/app/vibenet/demos/validity/race-the-agent/RaceTheAgentDemo.tsx +++ b/app/vibenet/demos/validity/race-the-agent/RaceTheAgentDemo.tsx @@ -830,7 +830,7 @@ function RaceTheAgentDemoInner() { Guided race Race first. Then submit ahead.
-
+
- Solidity stores the first state variable, enabled, + The contract stores the first state variable, enabled, in slot 0. The validity transaction reads that slot directly and becomes eligible only when the boolean is true. {withdrawal ? ( @@ -1141,7 +1141,7 @@ function RaceStep({ return (
@@ -1149,9 +1149,9 @@ function RaceStep({ {number}
- {title} - {detail} -
{children}
+ {title} + {detail} +
{children}
); } @@ -1163,7 +1163,7 @@ function StatusPill({ status }: { status: Attempt['status'] }) { Date: Wed, 2 Sep 2026 15:21:19 -0400 Subject: [PATCH 9/9] refactor(vibenet): feature Race the Agent first Co-authored-by: OpenCode --- app/vibenet/demos/catalogue.test.ts | 2 +- app/vibenet/demos/catalogue.ts | 24 ++++++++++++------------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/app/vibenet/demos/catalogue.test.ts b/app/vibenet/demos/catalogue.test.ts index a0ffd52..d646ad0 100644 --- a/app/vibenet/demos/catalogue.test.ts +++ b/app/vibenet/demos/catalogue.test.ts @@ -47,7 +47,7 @@ describe('DEMOS', () => { it('keeps Validity Transactions reachable but hidden from the top-level grid', () => { const validity = DEMOS.find((demo) => demo.href === '/vibenet/demos/validity'); expect(validity?.title).toBe('Validity Transactions'); - expect(validity?.children?.map((demo) => demo.title)).toEqual(['Conditional Swaps', 'Race the Agent']); + expect(validity?.children?.map((demo) => demo.title)).toEqual(['Race the Agent', 'Conditional Swaps']); expect(listedDemos()).not.toContain(validity); }); }); diff --git a/app/vibenet/demos/catalogue.ts b/app/vibenet/demos/catalogue.ts index 83faa9d..16fa370 100644 --- a/app/vibenet/demos/catalogue.ts +++ b/app/vibenet/demos/catalogue.ts @@ -69,18 +69,6 @@ export const DEMOS: DemoEntry[] = [ available: true, listed: false, children: [ - { - href: '/vibenet/demos/validity/conditional-swaps', - title: 'Conditional Swaps', - summary: - 'Place a swap that waits for a target price, then lands or expires as a shared simulated market moves through its validity window.', - points: [ - 'Set a buy or sell price against a live VIBE/USDV pool', - 'Inspect the EIP-8130 predicates attached to the swap', - 'Watch pending orders fill, expire, or get replaced', - ], - available: true, - }, { href: '/vibenet/demos/validity/race-the-agent', title: 'Race the Agent', @@ -93,6 +81,18 @@ export const DEMOS: DemoEntry[] = [ ], available: true, }, + { + href: '/vibenet/demos/validity/conditional-swaps', + title: 'Conditional Swaps', + summary: + 'Place a swap that waits for a target price, then lands or expires as a shared simulated market moves through its validity window.', + points: [ + 'Set a buy or sell price against a live VIBE/USDV pool', + 'Inspect the EIP-8130 predicates attached to the swap', + 'Watch pending orders fill, expire, or get replaced', + ], + available: true, + }, ], }, ];