Skip to content

feat: favicon adapts to browser theme - #2990

Merged
MohamedBassem merged 3 commits into
karakeep-app:mainfrom
ehfreema:t3code/feat-brown-favicon-adapt-to-browser-theme
Aug 11, 2026
Merged

MohamedBassem merged 3 commits into
karakeep-app:mainfrom
ehfreema:t3code/feat-brown-favicon-adapt-to-browser-theme

Conversation

@ehfreema

@ehfreema ehfreema commented Aug 7, 2026 •

Copy link
Copy Markdown
Contributor

Description

The favicon always stays black

Fixes part of #2116

Next.js creates file-based favicon links from app/favicon.ico and app/icon.png. These file-based links override the theme-aware link tags. Removal lets the prefers-color-scheme icons take effect.

The change is related to #2116 (comment)

How Has This Been Tested?

  • Test A — pnpm --filter @karakeep/web format, lint, typecheck, build — all passed.
  • Test B — pnpm --filter @karakeep/landing format, lint, typecheck, build — all passed.
  • Test C — Full pre-commit turbo typecheck lint format (64 tasks) — all passed.
  • Test D — Helium on macOS at http://localhost:3000/signin and http://localhost:4321/:
    - Make sure that link[rel="icon"][media="(prefers-color-scheme: light)"] points to /icons/logo-icon.svg.
    - Make sure that link[rel="icon"][media="(prefers-color-scheme: dark)"] points to /icons/logo-icon-dark.svg.
    - Make sure that matchMedia('(prefers-color-scheme: dark)').matches is correct for light and for dark.
    - If the OS is light and the page is light, the Chromium tab bar is light and the favicon is black.
    - If the OS is dark and the page is dark, the Chromium tab bar is dark and the favicon is white.

To reproduce:

  1. Start the web app on http://localhost:3000 and the landing app on http://localhost:4321.
  2. Open each URL in Chromium.
  3. Change the color scheme and do a hard reload. The favicon changes with the scheme.

Screenshots

Screenshot 2026-08-07 at 12 14 37 AM

Checklist:

  • I have carefully read CONTRIBUTING.md
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation if applicable
  • I have no unrelated changes in the PR.
  • I have confirmed that any new dependencies are strictly necessary.
  • I have written tests for new code (if applicable)

Please describe to which degree, if any, an LLM was used in creating this pull request.

Muse Spark 1.2 helped with research about the Next.js fields and test cases. All code changes were reviewed by a human.

@greptile-apps

greptile-apps Bot commented Aug 7, 2026 •

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR makes the web and landing favicons adapt to the browser’s preferred color scheme.

  • Adds light- and dark-theme SVG favicon metadata to both applications.
  • Adds white logo variants for dark browser chrome.
  • Removes Next.js file-based favicon assets that overrode the theme-aware metadata.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
apps/web/app/layout.tsx Adds theme-aware SVG icon metadata while retaining the existing Apple touch icon metadata.
apps/landing/src/layouts/BaseLayout.astro Replaces the static ICO favicon declaration with light- and dark-scheme SVG declarations.
apps/web/public/icons/logo-icon-dark.svg Adds the white SVG logo used as the web app’s dark-theme favicon.
apps/landing/public/icons/logo-icon-dark.svg Adds the white SVG logo used as the landing site’s dark-theme favicon.
apps/web/app/favicon.ico Removes the conventional favicon that previously overrode theme-aware icon metadata.
apps/web/app/icon.png Removes the Next.js file-based icon while leaving the dedicated Apple icon intact.

Reviews (2): Last reviewed commit: "fix(web): remove conflicting file-based ..." | Re-trigger Greptile

@ehfreema ehfreema changed the title feat: brown favicon adapt to browser theme feat: favicon adapt to browser theme Aug 7, 2026
@ehfreema ehfreema changed the title feat: favicon adapt to browser theme feat: favicon adapts to browser theme Aug 7, 2026
@ehfreema ehfreema closed this Aug 9, 2026
@ehfreema
ehfreema deleted the t3code/feat-brown-favicon-adapt-to-browser-theme branch August 9, 2026 23:32
@ehfreema
ehfreema restored the t3code/feat-brown-favicon-adapt-to-browser-theme branch August 10, 2026 06:40
@ehfreema ehfreema reopened this Aug 10, 2026
@MohamedBassem
MohamedBassem merged commit ad27c05 into karakeep-app:main Aug 11, 2026
@MohamedBassem

Copy link
Copy Markdown
Member

Thank you!

ajgon pushed a commit to deedee-ops/home-ops that referenced this pull request Aug 11, 2026
…0.33.2) (#600)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [ghcr.io/karakeep-app/karakeep](https://github.com/karakeep-app/karakeep) | patch | `0.33.1` → `0.33.2` |

---

> ⚠️ **Warning**
>
> Some dependencies could not be looked up. Check the [Dependency Dashboard](issues/7) for more information.

---

### Release Notes

<details>
<summary>karakeep-app/karakeep (ghcr.io/karakeep-app/karakeep)</summary>

### [`v0.33.2`](https://github.com/karakeep-app/karakeep/releases/tag/v0.33.2): 0.33.2

[Compare Source](karakeep-app/karakeep@v0.33.1...v0.33.2)

##### 0.33.2

This is a patch release for after [0.33.1](https://github.com/karakeep-app/karakeep/releases/tag/v0.33.1). It contains the following fixes:

**Bug fixes:**

- Change default "use max completion tokens" token env variable to `true` when using the default OpenAI configuration now that we're using 5.6 luna and this flag is required there ([#&#8203;3007](karakeep-app/karakeep#3007)).
- We're migrating to a custom karakeep chrome container (based on <https://github.com/chromedp/docker-headless-shell>) now that the old alpine-chrome is no longer fetch-able (and has been long abandoned by the maintainer). Check the migration guide [here](https://docs.karakeep.app/next/administration/chrome-image-migration). The old image will continue to work, but it's recommended that you migrate to the new one as it also upgrades chrome to 151 (compared to 124 in the old image). If you've been using browserless (e.g. on unraid), you're not impacted by this, and you don't need to migrate.
- Large singlefile archives (typically because of videos) used to fail metadata extraction as the parser used to OOM. We strip inline videos now to make the parsing succeed.
- Hardened the link to asset conversion mechanism in the crawler that used to result into silently broken assets. ([#&#8203;3002](karakeep-app/karakeep#3002))
- Pinned nodejs to version 24.18.1 thanks to [@&#8203;eriktews](https://github.com/eriktews) ([#&#8203;2996](karakeep-app/karakeep#2996)) to overcome a bug in the latest node 24.19 version (check [#&#8203;2989](karakeep-app/karakeep#2989) for details). The proxmox scripts also were pinned by [@&#8203;MickLesk](https://github.com/MickLesk).
- Karakeep's favicon is now light/dark mode aware, thanks to [@&#8203;ehfreema](https://github.com/ehfreema) ([#&#8203;2990](karakeep-app/karakeep#2990)).

**New features:**

- You can now upload custom SingleFile archives to karakeep directly using the CLI.

##### Changelog

- fix: Set max completion tokens to true when using default openai config ([#&#8203;3007](karakeep-app/karakeep#3007)) - [@&#8203;MohamedBassem](https://github.com/MohamedBassem) in [`98c0c78`](karakeep-app/karakeep@98c0c789)
- feat: migrate to a custom karakeep chrome image ([#&#8203;3005](karakeep-app/karakeep#3005)) - [@&#8203;MohamedBassem](https://github.com/MohamedBassem) in [`951e502`](karakeep-app/karakeep@951e5025)
- feat: publish a new karakeep chrome container ([#&#8203;3004](karakeep-app/karakeep#3004)) - [@&#8203;MohamedBassem](https://github.com/MohamedBassem) in [`b6415b3`](karakeep-app/karakeep@b6415b3c)
- feat: favicon adapts to browser theme ([#&#8203;2990](karakeep-app/karakeep#2990)) - [@&#8203;ehfreema](https://github.com/ehfreema) in [`ad27c05`](karakeep-app/karakeep@ad27c051)
- build: Fix crash loop caused by better-sqlite3 and node. ([#&#8203;2996](karakeep-app/karakeep#2996)) - [@&#8203;eriktews](https://github.com/eriktews) in [`132e566`](karakeep-app/karakeep@132e566b)
- fix(crawler): fail on failure to download urls converted to assets ([#&#8203;3002](karakeep-app/karakeep#3002)) - [@&#8203;MohamedBassem](https://github.com/MohamedBassem) in [`f57aad1`](karakeep-app/karakeep@f57aad1d)
- feat(mobile): switch to using context menu in ios - [@&#8203;MohamedBassem](https://github.com/MohamedBassem) in [`28e7909`](karakeep-app/karakeep@28e79094)
- fix(restate): use logger middleware instead of durable steps - [@&#8203;MohamedBassem](https://github.com/MohamedBassem) in [`764ba85`](karakeep-app/karakeep@764ba850)
- fix(workers): drop inline media blocks before metadata parsing - [@&#8203;MohamedBassem](https://github.com/MohamedBassem) in [`1c0b0a9`](karakeep-app/karakeep@1c0b0a9a)
- feat(cli): allow importing singlefile archives via the CLI - [@&#8203;MohamedBassem](https://github.com/MohamedBassem) in [`5f6ba26`](karakeep-app/karakeep@5f6ba262)
- docs: update intro doc with new features - [@&#8203;MohamedBassem](https://github.com/MohamedBassem) in [`3af6f45`](karakeep-app/karakeep@3af6f458)
- readme: update the readme and docs with the new features - [@&#8203;MohamedBassem](https://github.com/MohamedBassem) in [`a81f935`](karakeep-app/karakeep@a81f935a)
- release: release cli, sdk & mcp - [@&#8203;MohamedBassem](https://github.com/MohamedBassem) in [`b3fbf6b`](karakeep-app/karakeep@b3fbf6bb)

</details>

---

### Configuration

📅 **Schedule**: (in timezone Europe/Warsaw)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these updates again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC44LjEiLCJ1cGRhdGVkSW5WZXIiOiI0NC44LjEiLCJ0YXJnZXRCcmFuY2giOiJtYXN0ZXIiLCJsYWJlbHMiOlsicmVub3ZhdGUvY29udGFpbmVyIiwidHlwZS9wYXRjaCJdfQ==-->

Reviewed-on: https://git.ajgon.casa/deedee/mark13/pulls/600
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