Skip to content

feat(agentconnect-ui): design refresh - #282

Merged
shan8851 merged 35 commits into
mainfrom
feat/agentconnect-ui-design-refresh
Nov 16, 2026
Merged

shan8851 merged 35 commits into
mainfrom
feat/agentconnect-ui-design-refresh

Conversation

@shan8851

@shan8851 shan8851 commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

What

A new design for the agentconnect dashboard, sign-in page and the login, connect and approve pages. One stage per commit. What the app does is unchanged apart from the small fixes listed under "Fixes that change behaviour".

  • One visual system. Buttons, dialogs, toasts, cards, badges, tabs and empty states come from @polygonlabs/design-system (which needs React 19 and lucide-react 1.x). Its preset replaces the app's own token CSS; the last legacy stylesheet is removed.
  • Navigation. A desktop sidebar with Overview, Markets, Yield and Settings; a top bar with the account, total balance and a profile pop-up; on phones a header with a slide-out menu in place of the bottom tab bar.
  • Overview. The balance with its three parts and four actions (add, withdraw, receive, try with your agent). Tokens (with search), activity (a table, with its in/out filter) and connected agents are tabs on this page.
  • Agent prompts. One drawer, grouped by wallet, prediction markets and yield, opened from every page. It replaces the inline prompt panels. Prompt text is unchanged.
  • Markets and Yield. A header with the total, then one card per market or vault.
  • Settings. Spending limits (the same amounts, in a dropdown, still producing the prompt to give your agent) and Resources.
  • Sign-in, CLI login, connect, approve. The same card, inputs and buttons throughout. On the consent and approval pages what the owner is told, the options offered and the requests sent are unchanged, apart from the default agent name reading "your agent" mid-sentence.
  • Local development. A dev-only Vite proxy to a local wrangler dev, so signed-in views can be developed with hot reload: run pnpm dev:worker alongside pnpm dev in packages/agentconnect-ui.

Fixes that change behaviour

Small corrections found while reviewing the new screens, each in its own commit with tests:

  • Yield. The yearly estimate is the sum of each vault's balance at that vault's own rate, instead of one vault's rate applied to everything.
  • Overview balance. The headline (and the balance in the top bar) is the sum of the three figures under it, to the cent, from one shared helper. It waits for those figures instead of showing a partial total that then jumps.
  • Load time limit. Every dashboard load expires after 15 seconds and is then treated as a failed load, so one source that never answers cannot keep the total on a skeleton.
  • Activity. Incoming transfers of tokens with no known decimals and no dollar value are hidden (airdropped spam and collectibles that read "+0" with a blank name). Anything leaving the wallet is always listed, as is any transfer with a dollar value, a native transfer, or a token with known decimals.
  • Add money on phones is a bottom sheet like withdraw, receive and deposit.
  • Consent page. The period control uses the same dropdown as Settings.

Why

The dashboard grew screen by screen, each styled on its own, with hard-coded colours and one-off classes. This moves every screen onto one set of tokens and components and regroups the navigation around what people do: see the wallet, use markets, earn, and manage settings.

What did not change

  • No Worker file changes. Sign-in, relay and money-moving logic are untouched.
  • The data layer gains three small fields and nothing else: activity records carry the token contract address (a token icon is shown only when the token list returns a logo for that exact address, never by symbol, because another token can imitate it) and whether the token's decimals are known; holdings carry the chain they were read from, which picks the chain badge.
  • Every prompt the app hands you to give your agent is byte-identical.

Differences from the design

Kept from today's app where the design has no frame: the withdraw, deposit, receive and add-money dialogs (all four are bottom sheets on phones); the sign-in code step; the login, connect and approve pages; empty, loading and error states; the activity in/out filter; the phone menu.

Not built, because the app does not have the data or feature yet: the "spent today" bar; balance and token change figures; the token filter button; the activity "Method" column, download and pagination; "Earned" on Yield; market volume and count; the second, unheld outcome on a market card; an "Add an agent" row; a dark-mode toggle; cards and saved addresses.

Wording: the yearly line on Yield reads "At today's rates that's ≈ … a year" (or "Your vault deposits earn ≈ … a year at today's rates" when some earning money has no rate here). Kept accurate rather than as drawn: the spending-limit row is titled "Wallet spending limit" (the limit is a total over a period, not a daily amount, and a spend over it is refused rather than held for approval).

Figures that now read differently from main:

  • Markets: one card per market (was one row per position); the per-market profit is worth minus contribution, so each card adds up; the header total includes uninvested cash, matching Overview. Every outcome is the same purple pill as drawn (was green for "Yes", red for anything else); the outcome name is still printed. New on each card: a multiplier (1 ÷ the current price) and a percentage.
  • Yield: the header shows vault balances only (older lending positions are listed below, with a combined line that equals Overview's figure). The yearly projection uses the rates as shown on the cards, so it can be reproduced from the screen; lending positions have no rate on this page and are left out of it, and the sentence says so. The vault name is now a link to the vault contract on the chain's block explorer.
  • Vault totals are rounded per vault on both Overview and Yield, so the two pages agree to the cent.
  • Overview and Activity: see "Fixes that change behaviour" above.

Removed because the design leaves them out: the 14-day in/out chart and the recent-activity block on Overview, and the Sign out button on the Settings page (Sign out is in the profile pop-up).

Layouts at widths the design does not draw (tablet, short windows) are our own: action buttons wrap 2×2, totals step down rather than break inside a number, dialogs scroll inside themselves.

Verification

  • pnpm run lint, the package's tests (also run with no local keys set) and the build pass.
  • Every screen and state was checked in a browser at desktop (1512) and phone (402) widths, plus tablet widths and short windows, signed out and signed in, against the design frames; the consent and approval pages were checked for identical copy and identical request bodies against main.
  • The new derivations (market grouping and profit, vault and balance totals, the yearly estimate, the activity filter and row types, the load time limit) have unit tests.
  • A patch changeset for @polygonlabs/agentconnect-ui is included.

What merging does

Nothing deploys on merge. The changeset opens a release pull request; merging that one tags @polygonlabs/agentconnect-ui, and the tag runs the tests and then the production deploy. That will be the first production deploy through the tag-triggered path.

Notes for review

  • Bundle: the main script grows by about 315 kB (about 100 kB gzipped) against main, mostly the design system's underlying component library and React DOM 19; CSS grows from about 30 kB to 100 kB because the design system's preset scans its whole library for classes.
  • The sign-in illustration is a 1024×1024 raster and is slightly soft on high-density screens at desktop size.
  • Known and left for follow-up: on a prediction-market wallet the outgoing share leg of a redemption is listed as a "-0" row with no name; after a load times out, Overview shows a total without the missing part and no hint that a part is missing; one press of Esc closes both the wallet picker and the add-money sheet; the Markets header and its cards can differ by cents because they round at different levels.

🤖 Generated with Claude Code

shan8851 and others added 30 commits November 12, 2026 10:07
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Needed by the OMS design system (@polygonlabs/design-system), which the
UI refresh adopts next. No visual or behaviour change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ocks

Buttons, dialogs, toasts, cards, badges and empty states now come from
@polygonlabs/design-system, and its preset replaces most of the app-level
token CSS. Page layouts, navigation and copy are unchanged; the following
changes restyle each page on top of these pieces.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Navigation regroups into Overview, Markets, Yield and Settings under a
desktop sidebar and a phone header with a slide-out menu. The top bar
shows the account and total balance and opens a profile pop-up with
Settings and Sign out. Wallet, activity and connected agents become tabs
on Overview. Page content inside the shell is unchanged.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Remove comments that restate names or signatures and shorten the rest to
the reason behind the code. Comments only; the built bundle is unchanged.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…ponent

Move-only: each tab and panel gets its own file under src/dashboard/tabs,
with shared pieces in src/components and src/utils and the prompt lists in
src/dashboard/prompts.ts. No logic, markup, class or copy changes.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Two columns on desktop with the wallet illustration on a gradient panel;
on phones the illustration sits behind a card holding the form. The
email-code step and its busy and error states use the same card. Sign-in
calls and handlers are unchanged; the form moves to its own file.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Overview opens with the balance, its three parts and four actions: add,
withdraw, receive, and try with your agent. Agent prompts move from inline
panels into one drawer, opened from each page. Withdraw, deposit, receive
and add money use one modal layout and live in their own files. The
in/out chart and the recent-activity block leave Overview; activity keeps
its own tab. Prompt text and what each action does are unchanged.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
… and agents

Tokens gets a search box and rows with the token icon and its chain
badge. Activity becomes a table with a type column and a direction pill,
and keeps its in/out filter. Connected agents shows an info banner and
one row per agent with a disconnect button on the existing handler.
Empty, no-match, loading and error states share one layout.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…address

Activity records now carry the token contract address, and a row shows a
token icon only when the token list returns a logo for that exact address.
A symbol can be imitated by another token, so it is never used to pick a
logo; unlisted tokens get a neutral placeholder.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A header with the total, deposited and earned, and one card per market
with a bar, multiplier and percentage for each outcome held. A card now
shows contribution, worth and their difference, so its figures add up;
the grouping and that arithmetic live in a tested helper.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…ss key

They relied on a key from a local env file, so they failed where none is set.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The page is named Yield and opens with the total in vaults. Each vault
is a card with its rate, risk tag, your balance, a link to the vault
contract, and deposit and try-with-your-agent buttons. The yield prompt
moves into the prompts drawer as its own group. Vault totals are rounded
the same way on Overview and Yield so the two pages agree to the cent.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The page the CLI opens to pair a login uses the same card, inputs and
buttons as the sign-in page. Each view moves to its own file; the state
machine wiring, copy and layout are unchanged. The email and code inputs
keep browser autocomplete and stay 16px or larger on phones.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The consent and approval pages use the same card, inputs and buttons as
sign-in, with each view in its own file. What the owner is told, the
options offered and the requests sent are unchanged, apart from the
default agent name reading "your agent" mid-sentence. The logo scrolls
with the page so it cannot cover a tall card, the selected amount chip is
filled, and the last legacy stylesheet goes.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…urces

Settings has two tabs. Spending limits offers the same amounts in a
dropdown and still produces the prompt to give your agent; its wording
keeps describing what the limit does today. Resources is a grid of link
cards. Sign out lives in the profile pop-up only.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Remove or shorten comments that restate the code or describe how it
changed. Comments only; the built bundle is unchanged.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Sign-in inputs are 16px on phones so the page does not zoom on focus.
Token search matches the name shown in the row, not a hidden one. A
vault balance under one cent reads "<$0.01" instead of looking empty.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…the final review

The chain badge on token icons no longer shows through menus and dialogs.
The Overview balance uses the same header as Markets and Yield, so it
never breaks inside a number. The activity table fits its card on
desktop. The predictions total is the sum of its rounded parts on both
Overview and Markets, and a balance that failed to load shows a dash.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
On phones with a short window the wallet illustration covered the balance
text; the text now sits in front of it. The sign-in error line is
announced to screen readers, and a long email wraps inside the code label.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The shared constant had a single use, so the class string sits at that use
and the one-line module is gone.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Grouping summed raw figures into a half-built result and then overwrote
them. It now sums per market into its own totals type, then rounds once
and derives the gain. Results and exports are unchanged.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The form chose its markup through a nested ternary and a negated compound
condition. It now derives one step and renders a component per step, with
the Google option alongside the email step. Rendered output is unchanged.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Add money was a centred card on phones while withdraw, receive and deposit
were bottom sheets. It keeps its own untransformed popup, because the
funding widget draws full-screen layers that a transformed ancestor would
confine, and is pinned to the bottom edge at phone widths instead.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The period control on the consent screen was a native select whose option
list opened small and away from the control at phone widths. It now uses
the same select as the settings page, so placement and look match.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The token icon always drew the Polygon mark. Holdings now carry the chain
they were read from and the icon looks the badge up by chain, so a chain
without a local badge shows none instead of a wrong one.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The yearly figure on the yield page applied the first vault's rate to the
whole earning total, so money held in a higher-rate vault was projected
far too low. It is now the sum of each vault's balance at that vault's
displayed rate, and the sentence no longer names a single vault. Money
with no rate on the page is left out of the projection and the wording
says so.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Airdropped spam tokens and collectibles arrive with no decimals and no
dollar value, so their amount was scaled as if it had 18 decimals and the
row read +0 with a blank name. Activity records now say whether the
token's scale is known, and the list hides a row only when the scale is
unknown and it has no dollar value. Row types are still derived from
every transfer, so a trade whose other leg is hidden still reads as a
swap.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The headline balance was summed inline in two places from unrounded
figures, so it could be a cent off the three rounded figures under it,
and it counted a part that was still loading as zero, so it showed low
and then jumped. One helper now sums the parts as displayed for both the
overview headline and the top bar, and stays unknown until every part has
arrived or failed.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
shan8851 and others added 5 commits November 13, 2026 12:15
The changeset said nothing the app does had changed. It now names the
yield estimate, balance headline, activity and add-money changes.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The spam filter dropped any transfer with no known decimals and no dollar
value, whatever its direction, so a send of such a token would have been
missing from the list. Only incoming transfers are filtered now. A test
also pins what the data layer reports for a token's scale.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The balance total waits for five sources, and none had a time limit, so
one endpoint that accepted a request and never answered left the total on
a skeleton for good. Each load now expires after 15 seconds and is then
treated exactly like a failed load; a result arriving later is ignored so
the total does not jump.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The line passed its raw sum to the formatter, which rounds exact half
cents differently from the helper behind the headline, so the two could
differ by a cent. Both now use the same rounding function.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…endered

The earlier test rounded the value itself, so it passed whether or not
the page did. This one renders the overview and compares the printed
spend line with the printed headline at exact half-cent values.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@shan8851
shan8851 marked this pull request as ready for review November 16, 2026 17:44
@shan8851
shan8851 merged commit f8b9cb5 into main Nov 16, 2026
9 checks passed
@shan8851
shan8851 deleted the feat/agentconnect-ui-design-refresh branch November 16, 2026 17:53
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