Skip to content

chore(cross-app): add VeChain logomark favicon (light/dark adaptive)#624

Merged
Agilulfo1820 merged 3 commits into
mainfrom
chore/favicon
May 19, 2026
Merged

chore(cross-app): add VeChain logomark favicon (light/dark adaptive)#624
Agilulfo1820 merged 3 commits into
mainfrom
chore/favicon

Conversation

@Agilulfo1820

Copy link
Copy Markdown
Member

Summary

The cross-app host had no favicon — browser tabs showed an empty default next to "VeChain Connect". Add the VeChain logomark, switching variants automatically based on the browser's prefers-color-scheme so the glyph stays legible against both light and dark tab UIs.

What changed

cross-app-connect/src/app/layout.tsx:

export const metadata = {
    title: 'VeChain Connect',
    icons: {
        icon: [
            { url: '/brand/vechain-logomark-dark.png',  media: '(prefers-color-scheme: light)' },
            { url: '/brand/vechain-logomark-light.png', media: '(prefers-color-scheme: dark)' },
        ],
        apple: '/brand/vechain-logomark-dark.png',
    },
};

No new image files — reusing the existing 300×300 PNGs already in public/brand/.

Built HTML

<link rel="icon" href="/brand/vechain-logomark-dark.png" media="(prefers-color-scheme: light)"/>
<link rel="icon" href="/brand/vechain-logomark-light.png" media="(prefers-color-scheme: dark)"/>
<link rel="apple-touch-icon" href="/brand/vechain-logomark-dark.png"/>

Test plan

  • Visit https://connect.vechain.org/ → browser tab shows the VeChain V glyph.
  • Toggle system theme (or browser theme) light ↔ dark and reload — favicon swaps variant.
  • On iOS Safari → Share → Add to Home Screen → home-screen tile shows the dark glyph.

🤖 Generated with Claude Code

Agilulfo1820 and others added 2 commits May 19, 2026 17:45
The generic delegator's /estimate/clauses endpoint simulates the user's
raw clauses without the executeWithAuthorization wrapper and without the
embedded-wallet typed-data signature, so it under-estimates gas (and for
NFT-heavy clauses can revert outright in simulation). The returned
transactionCost was then used to build the transfer clause that pays the
delegator's deposit account, leaving it insufficient to cover the actual
on-chain gas. The failure was masked by a catch-all that surfaced a
misleading "no gas tokens have sufficient balance" error even when the
wallet had ample balance.

Mirror VeWorld mobile's approach: trust the delegator only for the
gas-token-per-gas rate (a market price independent of the gas amount),
recompute the gas number locally with thor.gas.estimateGas (caller =
smart account), add a fixed wrapper overhead per smart-account version
plus a fixed fee-payer overhead per gas token, apply a 1.1 safety
multiplier, then reapply the rate. New shared helper
computeCorrectedGasTokenCost is used by the send path, the fee-estimation
UI hook, and the all-tokens hook so they all agree.

Also revert the homepage/playground feeDelegation override introduced in
the cross-app PR. It set feeDelegation.delegatorUrl (dApp-sponsored mode)
to the generic-delegator URL, which routed transactions through the
dapp-kit fee-delegator path that POSTs to the bare base URL and 404s.
With no override the kit's default getGenericDelegatorUrl() takes over
and the request hits the correct /api/v1/sign/transaction/authorized/...
endpoint.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
The cross-app-connect host shipped without a favicon — empty browser
tab next to the "VeChain Connect" title.

Wire the existing 300×300 brand assets in `public/brand/` as the
favicon via Next.js metadata, with `prefers-color-scheme` media
queries so the glyph variant stays legible against both light and
dark browser tab UIs:

- light tabs → `vechain-logomark-dark.png` (dark V on transparent)
- dark tabs  → `vechain-logomark-light.png` (white V on transparent)

iOS Add-to-Home-Screen always gets the dark glyph — Apple ignores
`prefers-color-scheme` on touch icons, and the dark V reads against
the typical white home-screen tile.

No new image files; reusing what's already in the public folder.
@coderabbitai

coderabbitai Bot commented May 19, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@Agilulfo1820 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 29 minutes and 30 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 1fc176fd-8baa-4a83-b194-3de26b99160d

📥 Commits

Reviewing files that changed from the base of the PR and between 0a61fc3 and 042242d.

📒 Files selected for processing (7)
  • cross-app-connect/src/app/layout.tsx
  • cross-app-connect/src/types/css-modules.d.ts
  • examples/homepage/src/app/providers/VechainKitProviderWrapper.tsx
  • examples/playground/src/app/providers/VechainKitProviderWrapper.tsx
  • packages/vechain-kit/src/hooks/generic-delegator/useEstimateAllTokens.ts
  • packages/vechain-kit/src/hooks/generic-delegator/useGenericDelegator.ts
  • packages/vechain-kit/src/hooks/generic-delegator/useGenericDelegatorFeeEstimation.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/favicon

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

The cross-app-connect-check workflow runs `tsc --noEmit` before
`next build`, but Next.js only generates CSS Module type stubs
under `.next/types/` as part of a build. Without those stubs the
typecheck step fails with "Cannot find module './foo.module.css'
or its corresponding type declarations" on every styled component.

Add a small `src/types/css-modules.d.ts` ambient declaration so TS
resolves `*.module.css` imports without depending on Next's
build-time output. Same `{ readonly [key: string]: string }` shape
Next eventually generates; the runtime stays identical because
CSS Modules are still handled by the bundler.
@github-actions

Copy link
Copy Markdown
Contributor

Size Change: +26.1 kB (+0.3%)

Total Size: 8.8 MB

Filename Size Change
packages/vechain-kit/dist/index-BKrexOzG.d.cts 0 B -181 kB (removed) 🏆
packages/vechain-kit/dist/index-BKrexOzG.d.cts.map 0 B -49.1 kB (removed) 🏆
packages/vechain-kit/dist/index-BYfc-9J5.d.mts 0 B -5.63 kB (removed) 🏆
packages/vechain-kit/dist/index-BYfc-9J5.d.mts.map 0 B -2.99 kB (removed) 🏆
packages/vechain-kit/dist/index-RB9EMHHr.d.mts 0 B -181 kB (removed) 🏆
packages/vechain-kit/dist/index-RB9EMHHr.d.mts.map 0 B -48 kB (removed) 🏆
packages/vechain-kit/dist/index.cjs 1.14 MB +1.18 kB (+0.1%)
packages/vechain-kit/dist/index.cjs.map 2.82 MB +8.31 kB (+0.3%)
packages/vechain-kit/dist/index.mjs 1.09 MB +1.15 kB (+0.1%)
packages/vechain-kit/dist/index.mjs.map 2.75 MB +8.28 kB (+0.3%)
packages/vechain-kit/dist/index-BjQrND59.d.mts 5.63 kB +5.63 kB (new file) 🆕
packages/vechain-kit/dist/index-BjQrND59.d.mts.map 2.99 kB +2.99 kB (new file) 🆕
packages/vechain-kit/dist/index-BpQGBB7K.d.mts 183 kB +183 kB (new file) 🆕
packages/vechain-kit/dist/index-BpQGBB7K.d.mts.map 48.7 kB +48.7 kB (new file) 🆕
packages/vechain-kit/dist/index-oOhRkZPs.d.cts 183 kB +183 kB (new file) 🆕
packages/vechain-kit/dist/index-oOhRkZPs.d.cts.map 49.7 kB +49.7 kB (new file) 🆕
ℹ️ View Unchanged
Filename Size Change
packages/vechain-kit/dist/assets 4.1 kB 0 B
packages/vechain-kit/dist/assets-BL24r-Yp.mjs 51.3 kB 0 B
packages/vechain-kit/dist/assets-BL24r-Yp.mjs.map 74.1 kB 0 B
packages/vechain-kit/dist/assets-DNJsQD7_.cjs 58.5 kB 0 B
packages/vechain-kit/dist/assets-DNJsQD7_.cjs.map 75.5 kB 0 B
packages/vechain-kit/dist/assets/index.cjs 716 B 0 B
packages/vechain-kit/dist/assets/index.d.cts 973 B 0 B
packages/vechain-kit/dist/assets/index.d.mts 973 B 0 B
packages/vechain-kit/dist/assets/index.mjs 718 B 0 B
packages/vechain-kit/dist/index-C8Uj8ple.d.cts 5.63 kB 0 B
packages/vechain-kit/dist/index-C8Uj8ple.d.cts.map 2.99 kB 0 B
packages/vechain-kit/dist/index.d.cts 24.3 kB +330 B (+1.38%)
packages/vechain-kit/dist/index.d.mts 24.3 kB +330 B (+1.38%)
packages/vechain-kit/dist/utils 4.1 kB 0 B
packages/vechain-kit/dist/utils-B1rpHKZq.mjs 22.1 kB 0 B
packages/vechain-kit/dist/utils-B1rpHKZq.mjs.map 66.7 kB 0 B
packages/vechain-kit/dist/utils-D0w5dcVX.cjs 27.3 kB 0 B
packages/vechain-kit/dist/utils-D0w5dcVX.cjs.map 67.4 kB 0 B
packages/vechain-kit/dist/utils/index.cjs 1.98 kB 0 B
packages/vechain-kit/dist/utils/index.d.cts 3.04 kB 0 B
packages/vechain-kit/dist/utils/index.d.mts 3.04 kB 0 B
packages/vechain-kit/dist/utils/index.mjs 2 kB 0 B

compressed-size-action

@Agilulfo1820 Agilulfo1820 merged commit c7fba3b into main May 19, 2026
9 checks passed
@Agilulfo1820 Agilulfo1820 deleted the chore/favicon branch May 19, 2026 16:12
Agilulfo1820 added a commit that referenced this pull request May 20, 2026
main shipped PR #624 which squashed our earlier generic-delegator fix
together with the cross-app favicon. The three hook files (useGenericDelegator,
useGenericDelegatorFeeEstimation, useEstimateAllTokens) on main are an
older snapshot of this branch's work — superseded here by the
hoist-estimate-out-of-loop + timeout + always-auto-inject refinements.
Take 'ours' for those three files and pick up the new favicon assets
(cross-app-connect/src/app/layout.tsx and css-modules.d.ts) from main.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
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