Skip to content

Add paused-rewards tooltip; restore WalletConnect dev alias - #18

Merged
torreyatcitty merged 9 commits into
mainfrom
rewards-pause-tooltip
Jul 20, 2026
Merged

Add paused-rewards tooltip; restore WalletConnect dev alias#18
torreyatcitty merged 9 commits into
mainfrom
rewards-pause-tooltip

Conversation

@torreyatcitty

Copy link
Copy Markdown
Contributor

Summary

Claiming COMP rewards is temporarily paused. This adds an info tooltip next to the rewards total explaining the pause, and bundles in a local-dev fix for an unrelated regression on main.

Rewards tooltip

  • Info icon next to the rewards total in both the desktop header pill and the mobile wallet menu (RewardsButton.tsx).
  • Reuses the existing Tooltip + InfoSolid components; content is the one-liner "Pausing Comet Rewards Top-ups" plus a Learn more link to the forum thread.
  • No changes to claim logic — tooltip only.
  • New REWARDS_PAUSE_FORUM_URL constant in urls.ts; styling in _rewards.scss / _tooltip.scss.

Local dev fix (vite.config.js)

Restores the vite alias redirecting the (transitive, via @wagmi/connectors) @walletconnect/ethereum-provider to its self-contained UMD bundle. This alias was removed in #14, which broke yarn dev: the ESM entry has bare imports of @msgpack/msgpack and blakejs that aren't in the dependency tree and fail esbuild's dep pre-bundling.

Tooling

  • Adds a webb3-dev launch config under .claude/.
  • Gitignores the per-developer .claude/settings.local.json.

Testing

  • tsc --noEmit clean; vite build succeeds.
  • yarn dev starts and the dashboard renders with no console errors (the msgpack/blakejs optimizer error is gone).
  • Tooltip itself requires a connected wallet with COMP rewards to render, so it wasn't exercised live in preview.

🤖 Generated with Claude Code

torreyatcitty and others added 2 commits July 14, 2026 22:02
Claiming COMP rewards is temporarily paused, so surface an info tooltip
next to the rewards total (desktop pill + mobile wallet menu) with a
one-liner and a link to the governance forum thread explaining the pause.

Also restore the vite alias redirecting the (transitive) WalletConnect
ethereum-provider to its self-contained UMD bundle. It was removed in #14,
which broke local dev: the ESM entry has bare imports of @msgpack/msgpack
and blakejs that aren't in the tree and fail esbuild dep pre-bundling.

Adds a webb3-dev launch config and gitignores the per-developer
.claude/settings.local.json.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
"Comet reward top-ups have been paused. Learn more." with an inline
forum link, reads better than the prior label + separate link.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The shared Tooltip hid immediately on trigger mouseout, so the pointer
could never cross the gap onto the tooltip to click "Learn more". Add an
opt-in `interactive` prop that delays hiding (150ms grace period) and
keeps the tooltip open while it is itself hovered. Enable it on the
rewards-pause tooltip. Non-interactive tooltips are unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Previously the tooltip auto-flipped below the header icon but kept its
caret at the bottom, pointing away from the origin. Give the `under`
placement a gap below the trigger and a `tooltip--below` modifier that
moves the caret to the top so it points up at the info icon. Scoped to
the `under` path (only the rewards tooltip uses it); the legacy auto-flip
behavior for other tooltips is unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Gate the info icon on totalUnclaimed > 0 so it appears only when the user
actually has COMP to claim, and stays hidden otherwise.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Interactive tooltips were hover-only, so on touch devices the rewards-pause
notice and its forum link were unreachable. A tap on the trigger now toggles
the tooltip; preventDefault on touchend suppresses the browser's synthesized
mouse events so the hover path doesn't double-fire and undo the toggle. A
touchmove guard ignores scroll gestures, and while open, tapping outside the
tooltip and trigger dismisses it.

Three rendering fixes uncovered while verifying on a mobile viewport:
- main.scss hides ALL tooltips at mobile width; interactive tooltips now
  carry a tooltip--interactive class exempting them from that rule.
- Raise the tooltip z-index (100 -> 2000) above the header stacking context
  (300) whose nested mobile wallet menu (1500) was covering tooltips opened
  from inside it.
- Clamp the tooltip horizontally inside the viewport (the mobile trigger sits
  near the right edge, which clipped the content) and offset the caret via a
  CSS variable so it keeps pointing at the trigger when clamped.

Also right-align the info icon within the mobile rewards pill.

Scoped to interactive tooltips; other tooltips keep hover-only behavior
(the clamp is a no-op when the tooltip already fits).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Clicks on the rewards-pause tooltip bubbled through the portal up the React
tree to the pill's dropdown toggle, and the native mousedown tripped
useOnClickOutside, so clicking "Learn more" opened or closed the rewards
dropdown as a side effect. Stop click and mousedown propagation on the
interactive tooltip's portal span; outside clicks still close the dropdown.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Unify placement logic: the caret now flips to face the trigger in every
  below-the-trigger case, including the auto-flip path (previously it kept
  pointing down, away from the trigger, when a top-of-viewport tooltip
  flipped below). The placement state is set from the physically computed
  position rather than mirroring the `under` prop.
- Flip `under` tooltips back above the trigger when the viewport has no room
  below (the mobile wallet-menu trigger can sit near the bottom edge).
- Drop the dead !hideArrow guard on the --below class; hide-arrow tooltips
  have no caret to flip (::before is content: none).
- Bump the interactive hide grace period 150ms -> 300ms so slow pointers can
  cross the trigger-to-tooltip gap without losing the tooltip.
- Dedupe the flipped-caret CSS shared by tooltip--below and tooltip--sticky.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Comment thread vite.config.js

@coburncoburn coburncoburn left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@torreyatcitty
torreyatcitty merged commit f248a3f into main Jul 20, 2026
2 checks passed
@torreyatcitty
torreyatcitty deleted the rewards-pause-tooltip branch July 20, 2026 16:49
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