Skip to content

feat(vibenet): polish validity mempool copy, restore delay, add tooltips - #154

Open
BrianBland wants to merge 7 commits into
mainfrom
mux/polish-conditional-swaps-demo
Open

feat(vibenet): polish validity mempool copy, restore delay, add tooltips#154
BrianBland wants to merge 7 commits into
mainfrom
mux/polish-conditional-swaps-demo

Conversation

@BrianBland

@BrianBland BrianBland commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Mempool: renamed ReplaceSequential (paired with Concurrent) and rewrote the copy to drop the fee-bump/nonce jargon ("One transaction at a time via sequential nonces" / "Submit multiple nonceless transactions simultaneously.").
  • Delay: restored the not-before Delay control (Off/5s/15s). It had been dropped when the v3 rewrite (feat(vibenet): v3 Validity UI — buy/sell exactly 100 VIBE (exact-in/out) #149) branched off before its stacked PR (feat(vibenet): add an optional delay to Validity orders #137) reached main — reapplied the same block-number >= predicate design onto the current file.
  • Delay now sits to the left of Expiry, and Expiry starts counting after Delay elapses instead of both being measured from submission time — a swap stays eligible for the full Expiry duration once it starts, rather than Delay silently eating into a window measured from "now". Both chip rows are gated by a combined delay + expiry cap (20s for the concurrent/nonceless envelope, 60s for sequential), and delay == expiry is valid (it just pins the swap to a single block).
  • Added concise InfoTooltip hover explainers for Mempool, Delay, and Expiry, matching the b20/Publish Announcement pattern.
  • Submitted history list now reads concurrent/sequential instead of 8130/replace.
  • The predicate JSON copy control in the review modal's Advanced Details panel is now icon-only (dropped the "copy json" / "copied" text label), matching the icon-only CopyButton pattern used elsewhere.

Screenshots

Conditional Swaps overview
Mempool tooltip
Delay tooltip
Expiry tooltip
Icon-only copy button
Copy button in the copied state

Test plan

  • npx vitest run app/vibenet/demos/validity — 15 files / 89 tests passing (added delay-predicate, minBlockForDelay, and delay-aware wall-clock-expiry tests).
  • npx eslint app/vibenet/demos/validity — 0 errors.
  • npx tsc --noEmit — clean.
  • Manually exercised /vibenet/demos/validity/conditional-swaps in a local dev server: Sequential/Concurrent toggle, Delay/Expiry chip gating in both modes (including the 60s-expiry-blocks-all-delay and delay==expiry cases), all three tooltips, the review modal's block-number predicates (expiry starting from the delay block), and the icon-only predicate-JSON copy button (verified clipboard contents and the copied-state checkmark).

Generated with Toshi

…oltips

- Rename Mempool submit-mode labels/copy: Replace -> Sequential, and
  drop the fee-bump framing ("One transaction at a time via
  sequential nonces" / "Submit multiple nonceless transactions
  simultaneously. Max expiry 20s").
- Re-add the not-before Delay control (Off/5s/15s) that was dropped
  when the v3 rewrite branched before its stacked PR (#137) reached
  main: block_number >= predicate, forced shorter than expiry,
  reflected in the review modal and Submitted list.
- Add concise InfoTooltip hover explainers for Mempool and Delay,
  matching the b20/Publish Announcement pattern.
- Replace remaining 8130/replace jargon in the Submitted history
  list with concurrent/sequential.
@cb-heimdall

Copy link
Copy Markdown
Collaborator

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

@vercel

vercel Bot commented Sep 3, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
omni-ui Ready Ready Preview Sep 3, 2026 11:03pm UTC

Request Review

@BrianBland BrianBland changed the title polish(vibenet): rename validity mempool modes, restore delay, add tooltips feat(vibenet): polish validity mempool copy, restore delay, add tooltips Sep 3, 2026
…elay

Also tightens the Delay tooltip copy since Expiry and Delay sit side
by side, not stacked (the old wording referenced expiry "above").
lint (react/no-unescaped-entities) failed on the possessives in the
new Expiry/Delay tooltip text; reworded instead of escaping.
Each tooltip stands on its own now instead of cross-referencing the
other control.
Delay only needs to stay at or under the expiry window, not strictly
under it — a matching not-before/not-after bound just pins the swap
to a single block, which is a valid (if narrow) predicate. Relaxes
the UI gating and the delay clamp used when building predicates.
Previously Delay (not-before) and Expiry (not-after) were both
measured from submission time, so a longer delay silently ate into
the usable window and could never exceed expiry. Now expiry begins
once the delay elapses, so a swap stays eligible for the full expiry
duration after it starts — bounded by a combined delay+expiry cap
(20s for the concurrent/nonceless envelope, 60s for sequential).

- Reorder the ticket so Delay sits left of Expiry, matching the
  sequencing.
- Gate both chip rows on delay+expiry <= cap instead of the old
  delay < expiry rule.
- orderWallClockExpired now adds delaySeconds to the expiry window
  so client-side status tracking matches the new deadline.
- Update review-modal and Mempool copy to describe the combined cap
  and starts-then-expires timing.
Drop the copy json / copied text label in the Advanced Details panel,
keeping just the MorphIcon button. The accessible name now updates
between Copy predicate JSON and Copied predicate JSON via aria-label,
matching the icon-only CopyButton pattern used elsewhere.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants