Repository navigation
[WIP preview] Solidarity Fund hero — real images + tweaks - #447
Open
diterra-code wants to merge 19 commits into
Open
diterra-code wants to merge 19 commits into
diterra-code wants to merge 19 commits into
Conversation
Wagmi is now bridged through @privy-io/wagmi so Privy manages wallet
connections (embedded wallets, its own login modal covering
MetaMask/Coinbase/WalletConnect/etc) instead of RainbowKit's connect
flow. LoginButton now opens Privy's login modal; LogoutButton also
calls Privy's logout(); "Change network" uses wagmi's useSwitchChain.
@privy-io/wagmi's createConfig silently drops any custom `connectors`
array (it wants to own connector management exclusively), and its
WagmiProvider unconditionally clears the connector registry whenever
Privy has no active wallet -- both of which broke Safe{Wallet} support,
since a Safe session never goes through Privy's login flow. Fixed by
splitting each wagmi config in two: a Privy-managed one (no static
connectors) for normal use, and a plain wagmi one with our full
RainbowKit connector list (including "safe") used only when the app is
running inside an iframe. Verified with a real headless-browser test
that the "safe" connector survives in that branch. QueryClientProvider
now wraps WagmiProvider (not the other way around) -- Privy's internal
reconnect logic needs it as an ancestor.
Also fixed, discovered while getting this to actually boot:
- A pre-existing transitive dependency conflict (@privy-io/react-auth
-> x402 -> an old @coinbase/cdp-sdk / @gemini-wallet/core pinning an
incompatible viem) that broke both Turbopack and webpack builds.
Fixed via a scoped pnpm override rather than a blanket viem pin,
since @safe-global/safe-apps-sdk genuinely needs viem@^1.
- viem bumped to the exact version @privy-io/wagmi's peer dep wants.
Bump @breadcoop/ui 1.0.23 -> 2.0.2: our usage (Body/Caption/Heading*/
LiftedButton/Logo/Footer) is API-compatible, verified via full
typecheck/lint/build. Deliberately not adopting its new
ConnectedUserProvider/BreadUIKitProvider -- that version's user-state
shape drops the chainConfig/feature-flags data our app threads through
useConnectedUser everywhere, so it's not a drop-in replacement.
The new @breadcoop/ui's barrel file re-exports its navbar/auth/
connected-user submodules (Privy/wagmi/RainbowKit-heavy) without
declaring sideEffects:false, so bundlers couldn't tree-shake them out
even though we only import Logo/Body/LiftedButton -- added
`@breadcoop/ui` to next.config.js's optimizePackageImports, which
brought every route's bundle size back down (slightly below the
pre-bump baseline, in fact).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The library now declares sideEffects:false, which fixed tree-shaking for most routes on its own. Kept optimizePackageImports though: verified by removing it and rebuilding that the Home route's specific import mix still doesn't tree-shake cleanly without it (~306kB vs ~526kB First Load JS), while other routes are fine either way. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Ports the Safe-transaction-status portion of PR #415 onto privy: a dedicated SafeTransactionModal (PENDING/WAITING/CONFIRMED/REJECTED/ EXPIRED views with signer-progress tracking and a 30-min expiry), a persistent nav SafeIndicatorBadge while a Safe is connected, and the SafeTransactionWatcher that polls getBySafeTxHash so SAFE_SUBMITTED transactions no longer get stuck "in process" forever. Deliberately not ported from #415: - The nav account-widget (balance chip/avatar) diff -- privy's account-menu.tsx already has this, shipped separately via "Show bread balance in the navbar", using the newer semantic Tailwind color tokens. #415's version would have regressed that to hardcoded hex colors. - @privy-io/react-auth ^3.27.2 + 2 NEXT_PUBLIC_PRIVY_* env vars -- leftover from since-reverted commits on #415, zero actual usages anywhere in its diff. - The blo ^1.1.1 -> ^1.2.0 bump -- only consumer was the skipped account-menu.tsx diff. Also fixes a real bug found while integrating: #415 added SafeTransactionWatcher but never mounted it anywhere (not in TransactionsContext.tsx, not in the new modal) -- so SAFE_SUBMITTED transactions would still never resolve despite the new watcher existing. Wired it into TransactionsContext.tsx alongside the existing TransactionWatcher, mirroring that component's pattern. Verified: tsc --noEmit, next lint, and a full production build all clean. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Ports PR #425's "fund your embedded wallet -> auto-bake BREAD" feature onto privy's existing Privy-bridged wagmi plumbing, deliberately without adopting #425's own auth-plumbing rewrite (see below for why). Flow: sign in -> embedded wallet (Privy) -> FundOnSignIn nudges funding if empty -> FundWallet modal offers 3 options (fund from a connected browser wallet / Privy on-ramp / LiFi bridge) -> xDAI auto-bakes to BREAD via ButteredBread's payable mint(receiver), a gas-sponsored embedded-wallet tx (Privy's own paymaster, dashboard config only -- no custom relayer). New: src/app/components/fund-wallet/{FundButton,FundFromWallet, FundOnSignIn,FundWallet,useFundFromConnectedWallet}, nav/ privy-deposit-button.tsx, core/hooks/{useAutoBakeBread,useSponsoredTx, useWatchFundedXdai}. Wired PrivyDepositButton into account-menu.tsx's balance chip and <FundOnSignIn /> into layout.tsx (keeping the RainbowKit styles.css import -- privy still needs RainbowKit for the Safe-iframe wagmi config, unlike #425 which removed it entirely). Real bug fixed while porting: useWatchFundedXdai (the block-polling auto-bake watcher) was only invoked inside FundWallet, so it only ran while that modal was mounted -- an on-ramp or bridge deposit landing after the user closed the modal would never auto-bake. Moved it to FundOnSignIn (mounted globally in layout.tsx) so it runs for the embedded wallet's whole session, and removed the modal-scoped call entirely rather than running both (two independent watcher instances racing on the same balance increase would have double-minted BREAD). Also hardened for privy's "users-without-wallets" embedded-wallet policy (kept as-is; #425 used "all-users", not adopted): FundWallet's on-ramp button and FundFromWallet's submit button now also disable when there's no embedded wallet, with a clear message, instead of only surfacing a thrown error after the user fills in an amount. Also ported (Safe{Wallet}-support and dead-code cleanup, not deposit specific): Swap.tsx/VotingPowerPanel.tsx's RainbowKit useChainModal -> wagmi useSwitchChain swap (mirrors what login-button.tsx already does on privy); LPVaultTransactionModal.tsx/WithdrawTransaction.tsx's Safe-multisig-aware submission support; ButteredBread.ts's ERC20InsufficientBalance ABI entry (error-decoding support). Cleaned up VaultPanel.tsx's leftover debug console.logs and dead commented imports, and removed CastVote.tsx's confirmed-dead useChainModal import (referenced only in a comment). Deliberately NOT ported from #425 (see plan doc for full reasoning): - AppProvider.tsx/WagmiProviderWrapper.tsx/getConfig.ts/privyConfig.ts rewrite -- #425 removes RainbowKit entirely and never replaces Safe {Wallet} connector support, silently orphaning useAutoConnect's isSafe detection (always false, since no config ever registers a "safe" connector). privy's iframe-conditional dual-config keeps RainbowKit specifically to preserve that, verified with a real headless-browser iframe test in an earlier session. - login-button.tsx rewrite -- privy's already uses usePrivy().login(). - @privy-io/react-auth/@privy-io/wagmi version bumps -- #425 never solved the x402->viem transitive dependency duplication privy fixed via a scoped pnpm-workspace.yaml override; adopting newer versions wasn't obviously safer without redoing that work. - netlify.toml/next.config.js Node-heap and @farcaster/mini-app-solana workarounds -- band-aids for the above unfixed viem duplication. Confirmed privy doesn't need them: a clean build succeeds without either, both before and after this change. - createOnLogin: "all-users" -- kept privy's "users-without-wallets". - WithdrawTransaction.tsx's silent-catch error handling -- privy didn't have the earlier error-surfacing fix for this file either (issue #408, branch fix-wallet-connect-lp-issue, never merged to development), so this isn't a regression from where privy already stood; left as its own separate follow-up per user decision. Verified: tsc --noEmit, next lint, a full production build (bundle sizes stayed flat), and a live dev-server pass over / and /governance/lp-vaults with no new console errors. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Ports PR #445's hero redesign: SolidarityHero replaces the old headline+swap-widget block on the homepage with an auto-fading 3-image carousel (HeroImageCarousel, respects prefers-reduced-motion), a circulated-BREAD-in-USD headline with Distributed/Supporters/APY stat chips (reusing the existing hero data hooks/query keys so TanStack dedupes), and a "Support fund" CTA (SupportFundButton) that opens Privy login when signed out or the Fund-your-account deposit module (#425's FundWallet, ported in the previous commit) when signed in. Placeholder images at public/hero/hero-{1,2,3}.png -- flagged by the PR as temporary, need the real photos. page.tsx's diff didn't apply cleanly (a grid-layout tweak landed on this branch after #445's diff was generated) -- applied the hero swap manually; confirmed via the diff that no other part of page.tsx was touched. This removes the inline swap/bake widget from the homepage top, replaced by the hero CTA -- a real product change, not just a visual refresh. Real bug fixed while porting, found via a full production build: first attempt showed `/`'s First Load JS jump from ~306kB to ~1.47MB. Root cause: FundWallet.tsx statically imports Bridge (the LiFi widget, large) and Privy's useFundWallet on-ramp hook (which pulls in Solana support code from Privy's chain-agnostic SDK) -- both previously loaded on demand elsewhere (see SwapWrapper's next/dynamic pattern for NewSwap), but SupportFundButton being unconditionally rendered on the homepage made this reachable eagerly. Fixed in two parts: - FundWallet.tsx: Bridge is now dynamic()-imported, only loaded when the user clicks "Bridge crypto". - Made FundWallet itself a dynamic() import at all three of its call sites (SupportFundButton, PrivyDepositButton, FundOnSignIn) rather than a static one, since webpack/Next's automatic chunk-splitting wasn't deduping a module reachable from multiple independent entry points into the shared bundle as hoped -- it created a route-specific chunk for `/` instead. Making it lazy everywhere sidesteps that heuristic entirely: the on-ramp/Solana code now only loads once a user actually opens the Fund modal, regardless of entry point. Result: `/` back down to ~358kB (the remaining ~52kB over the 306kB pre-hero baseline is the new hero component code itself). Verified: tsc --noEmit, next lint, three full production builds (tracking the bundle-size fix), and a live dev-server pass over / with no new console errors and the hero rendering correctly (carousel, fallback headline figure, stat chips). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- next.config.js: disable Sentry source-map GENERATION on non-production builds (dryRun only skips upload); this is the memory hog that OOMs the CI/Netlify build (exit 134) on the Privy/wagmi/LiFi graph. - CI: give the Next Build step a 6144MB heap for headroom. - Hero headline now uses font-breadDisplay font-[900] (same font + weight as the "We decide, together." heading, text-h2) instead of body font-bold. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Replace the placeholder hero images with the three real Bread Cooperative photos (group photo, outdoor gathering, workshop) and point the carousel at the correct extensions (.png + .webp). Group photo is the default frame, matching the design; the 4:3 container matches its aspect ratio. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Remove the orange "You need xDAI to bake" balance banner from the home page. - Stat + Support-fund icons are now stroke-only (drop weight="fill"). - Desktop hero image height follows the content column and runs ~10% taller (extends 1rem above/below); mobile stays full-bleed 4:3. - Stat chips (Distributed/Supporters → Dune, APY → Spark) are now hyperlinks with an orange hover state. The subhead "Dedicated to funding human resilience." was already a Heading3. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
✅ Deploy Preview for dapper-sundae-ae0873 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…verlay - Hero fills the viewport on desktop (min-h calc), vertically centered, with vertical padding. - Narrower image / wider content columns (2fr / 3fr) so the stat chips aren't squeezed. - Fix the account dropdown rendering behind the hero: give the header its own stacking context (relative z-50) and drop the hero content's z-index on desktop so the z-50 dropdown overlays it. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
On mobile the carousel now covers the full viewport (absolute background) and the content card is centered on both axes on top of it. Desktop layout is unchanged (2fr/3fr grid, image ~10% taller than content). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
… padding) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Move the hero out of the page wrapper so it spans the full viewport. - Desktop: image fills the LEFT half of the viewport (50vw, full height, cropped via object-cover); content is a fixed-width column (28rem) on the right, vertically centered. - Subhead now uses the design-system brown (text-surface-brown). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Olaleye-Blessing
force-pushed
the
development
branch
from
October 15, 2026 17:13
69bbff2 to
63ffba7
Compare
The chips were forced into 3 equal columns narrower than their content, so the text overflowed the borders. Use a wrapping flex row with content-width chips (inline-flex, whitespace-nowrap) so each chip respects its content and wraps when the row is too narrow. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- z-index: header dropped to z-30 (above hero z-10, below modal overlay z-40) so the deposit modal's dark overlay covers the header/account widget and only the modal is visible. - Fund-your-account module now reflects the Stacks fund-wallet build: an xDAI->BREAD info note and an "Always get xDAI" warning alert, with the option rows restyled to the Stacks pattern — kept in Solidarity Fund orange instead of Stacks blue. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The "fund your account" flow only fits the Privy embedded wallet (get funds in -> auto-bake). For an external wallet (EOA) — which already holds funds and has no embedded wallet to top up — the same modal now shows a direct deposit view: a USD amount input (BREAD abstracted to $) + a "Support fund" action that mints from the connected wallet, reusing the existing Bake tx. Insufficient balance hands off to the shared Bridge/"Get funds" flow. FundWallet detects which wallet is active and renders the right view; Bake gained an optional label prop so the button reads "Support fund", not "Bake". Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
EOA deposit (DepositFromWallet) now starts with a method choice: - Deposit with crypto: uses existing xDAI (shown in $) or routes to the LiFi bridge when the wallet has none - Deposit with cash: Privy on-ramp targeting the EOA's own address Adds an explicit "you're depositing xDAI (worth $1, 1:1 with USD)" note. FundWallet.handleOnRamp is parameterized by address so cash funds the EOA. Abstracts BREAD -> $ in the shared transaction/success modal: - headers "Processing deposit"/"Deposit complete" (was Baking Bread) - advice "You successfully deposited" - value and annual-funding rows show $ instead of the BREAD logo/label - share copy drops token amounts; Curve CTA -> "Earn yield on Curve" - baking-bread-importance copy -> "Your deposit increases funding" Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…balance Add a persistent 'Bridge crypto from another chain' action to the deposit view so users holding xDAI can still pull tokens in from other chains. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…' prompt Cash on-ramp isn't wired up yet, so disable it (marked coming soon). Promote the bridge action to a prominent outlined card asking 'Don't have xDAI? Deposit from another network or chain'. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Preview-only PR to get a Netlify deploy preview of the new hero with the real images and the latest tweaks.
This branch is cut off
privy(#437), so it carries the whole Privy/deposit + hero stack on top ofdevelopment— do not merge this intodevelopment; it exists to render a preview. The real images land inprivyvia #446.Includes: real community photos, banner removed, stroke-only icons, taller hero image, hyperlinked stat chips (Dune / Spark) with hover.
🤖 Generated with Claude Code