{"id": "88fd33e3d4f4", "category": "build_log", "title": "Pattern: verified-source-only icon resolver (never guess a logo URL)", "content": "Problem: report/investigation cards need to show a or protocol's real logo, but constructing an image URL from a guess (e.g. templating a CDN path from a symbol string) risks showing the WRONG project's mark if the guess is off \u2014 worse than showing no icon at all.\n\nPattern (see docs/assets/icons.js): resolve in strict, ordered tiers, and stop as soon as one tier confirms a real match \u2014 never fall through to a guess.\n 1. A small hand-verified table for assets that appear in almost every report (BTC/ETH/USDC/Base/Uniswap/VAPE's own \u2014 sourced from a stable, official, publicly-used CDN (CoinGecko's asset CDN, a project's own brand-kit repo).\n 2. For anything with a real contract address: a per-chain CDN keyed by the address itself (DexScreener's dd.dexscreener.com pattern) \u2014 the address IS the identity, so this can't collide with another project.\n 3. For a named thing with no address (e.g. a DeFi protocol name string with no slug attached): only an EXACT, case-insensitive name match against a live, authoritative list (DefiLlama's /protocols) qualifies \u2014 never fuzzy-match a name, since a near-miss silently shows an unrelated project's logo.\nEvery still gets onerror=\"this.remove()\" as a last-resort safety net \u2014 a missing icon degrades gracefully to no icon, never a broken-image glyph.\nReusable whenever VAPE needs to display a real-world identity (protocol, exchange, chain) without a paid data provider backing it.", "source": "docs/assets/icons.js", "tags": ["pattern", "frontend", "data-integrity", "icons"], "confidence": 0.9, "timestamp": "2026-07-05T05:40:59.292397", "metadata": {"files": ["docs/assets/icons.js", "docs/assets/report.js"]}}
{"id": "287876ecce39", "category": "build_log", "title": "Gotcha: CSS containing blocks silently break `position:absolute` popovers", "content": "Symptom this session: a wallet-connect dropdown rendered fine right after page load, but opening it after scrolling down put it off-screen above the fold.\n\nRoot cause: the popover was appended to document.body (so it wouldn't be clipped by an ancestor's overflow/backdrop-filter) and positioned with Tailwind's `absolute top-16 right-5`. `position:absolute` resolves against the nearest *positioned* ancestor \u2014 with none, that's the INITIAL containing block, i.e. the very top of the whole document, not the current viewport. So `top-16` always meant \"16 units from the top of the page,\" not \"16 units below the button\" \u2014 invisible the moment the user had scrolled past that point.\n\nFix pattern: when an element must be appended to