Skip to content

feat(webapp): affiliate UI on the FeeProxy singleton (live testnet)#14

Merged
Wieedze merged 17 commits into
feat/singleton-feeproxyfrom
feat/webapp-affiliate-singleton
Jun 19, 2026
Merged

feat(webapp): affiliate UI on the FeeProxy singleton (live testnet)#14
Wieedze merged 17 commits into
feat/singleton-feeproxyfrom
feat/webapp-affiliate-singleton

Conversation

@Wieedze

@Wieedze Wieedze commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator

What

Rebuilds the webapp as an affiliate-facing UI on Intuition's audited multi-tenant
FeeProxy singleton
(intuition-contracts-v2@feat/v1.1.0-core-upgrade). The webapp now
works against a vendored ABI only — fully decoupled from the local SDK, which is
reintegrated later.

Why

Post-ENG-11832 pivot: the project is no longer a Factory. There is one FeeProxy per
network, owned/administered by Intuition; affiliates register with their own wallet (the
routing tag) and route fees via depositVia(affiliate, …). The webapp owner is in charge
of the UI only (not SDK, not Solidity).

Confirmed cuts

  • SDK coupling — vendored src/contracts/ (ABI, chains, addresses, types); same export
    names so the SDK can be reintegrated by swapping one barrel.
  • Safe integration — removed safe-tx package usage + all Safe hooks/components.
  • Admin page — admin is Intuition's role, not the affiliate's.
  • Dead Factory leftoveruseIntuitionAtom (no live import).

Added

  • Integration kit on the dashboard: singleton address + the affiliate's own id + a
    copy-paste depositVia snippet (makes registration actionable).
  • Activity feed (useAffiliateActivity): replays the four routing events filtered on
    the indexed affiliate topic — no indexer needed. Shown on My affiliate + public detail.
  • Docs: rewrote the Reference section for the singleton (Roles & pause; Integrate via
    the ABI). Design pass: positive states use brand (dropped neon emerald).

Pages

Home · Register · My affiliate (config + stats + activity + integration kit + edit) ·
Affiliates · Affiliate detail · Docs. All read against the vendored ABI and degrade
gracefully to a "not configured" state while no FeeProxy address is published.

Testing

  • bun --filter @intuition-fee-proxy/webapp typecheck — green.
  • bun --filter @intuition-fee-proxy/webapp build — green (pre-existing >500kB vendor
    chunk warning only).
  • No live contract yet (the singleton is the contract under audit), so end-to-end behavior
    is validated once Intuition publishes a testnet address.

Follow-ups (not in this PR)

  • Wire the real FEEPROXY_ADDRESSES once Intuition deploys on testnet.
  • Deferred side quest: end-user deposit flow + approval revocation
    (MultiVault.approve(feeProxy, NONE) — already supported, no contract change).

🤖 Generated with Claude Code

Wieedze and others added 17 commits June 19, 2026 09:26
Register/edit forms now take a human percentage (e.g. 1.5 for 1.5%) and
convert to on-chain bps on submit (pctToBps/bpsToPct). Display already
rendered bps as %. Caps hint shows max as % only. FeeFields keys renamed
depositPct/creationPct.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Two-column hero over the beam: heading + CTAs on the left, a glassy live
stats card on the right (affiliates, funds routed, fees paid, transactions
via useProtocolStats). Move the call-flow diagram below the hero and drop
the three feature cards, mirroring the reference layout.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Taller beam container (820->1100px, canvas stretches) and a shorter top
mask fade (120->32px) so the beam spans from the very top down to the
call-flow block.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add mx-auto so Register, My affiliate and Affiliate detail are centered
in the content area instead of left-aligned.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Replace the scattered Stat/Metric boxes with a single Configuration card
and a single Analytics card, matching the home stats-card style (kicker
title + cell grid with hairline separators).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Split the dashboard into three tabs — Analytics (default: stats + activity),
Integration (the kit), and Config (config card + edit forms / paused notice).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Drop the redundant 'Analytics' card title (the tab already labels it) and
split the stats into a headline block (txs / users / total fees) and a
detail block (gross/forwarded/deposits/creations/fees).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Remove border-top on the first row of cells so no separator sits at the
card's top edge; inner rows keep theirs.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Also zero the top padding on the first row so labels sit flush instead of
leaving an empty gap where the hairline used to be.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The Config tab already labels it; render the configuration card title-less
like the analytics blocks.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Remove the kicker above the call-flow and replace its height with pt-8 so
the block stays where it was. (Also carries the simplified flow-node labels.)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add a Quickstart section, copy buttons on all code blocks, and a full
'Copy full guide for an AI agent' button (top of docs + AI agent prompt
section) that emits a self-contained integration spec with the live
addresses, depositVia signature, fee math and approval flow. Soften the
not-yet-shipped SDK references.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Remove the top docs header/banner; the 'Copy full guide for an AI agent'
button now lives in the Quickstart 'Fastest path' callout.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The beam canvas only measured its container once at mount; if the height
wasn't settled yet it rendered near-zero until a late resize, so the beam
appeared after a long blank. Re-measure across the first ~800ms (rAF +
staggered timers, guarded so it only re-renders on a real size change).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The IntersectionObserver could report not-intersecting on a 0-height first
measurement, freezing the fade-in near-invisible until a late event. Add a
600px rootMargin so the top-of-page beam stays in view from the start.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
gitignore the local intuition-contracts-v2 Foundry clone; refresh bun.lock
after dropping the sdk + safe-tx workspace deps from the webapp.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Remove the brand box-shadow halo and the orange-tinted border from the
Configuration/Analytics cards; use a neutral line border.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Wieedze Wieedze merged commit 2a0684f into feat/singleton-feeproxy Jun 19, 2026
1 check failed
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.

1 participant