Skip to content

fix dark mode tinker-bot swap path#412

Merged
jarugupj merged 2 commits into
mainfrom
hypeship/fix-tinker-bot-dark-path
Jun 14, 2026
Merged

fix dark mode tinker-bot swap path#412
jarugupj merged 2 commits into
mainfrom
hypeship/fix-tinker-bot-dark-path

Conversation

@jarugupj

@jarugupj jarugupj commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

Summary

Dark-mode tinker-bot was invisible on prod. The previous fix used a CSS content: url() swap, which silently failed because:

  1. Mintlify inlines style.css as a <style> tag — not a <link> — so relative url() resolves against the document URL, not a stylesheet URL
  2. Prod docs canonical is https://kernel.sh/docs (no trailing slash), so the absolute path /images/tinker-bot-dark.svg resolved to kernel.sh/images/… (outside the docs subpath) and 404'd
  3. The mintlify preview happened to serve docs at root, so this was invisible during PR review

Switched to mintlify's standard dual-<img> pattern, gated by tailwind block / dark:block. Mintlify's CDN rewriter handles both asset paths, so it works in prod, preview, and dev.

Changes

  • index.mdx — one <img> becomes two, gated by visibility classes
  • style.css — drop the unused /* hero bot dark recolor */ block

Test plan

  • Toggle dark on / (preview): cream tinker-bot renders
  • After merge, toggle dark on prod /: cream tinker-bot renders
  • Light mode unchanged

The CSS swap rule used an absolute path (`/images/tinker-bot-dark.svg`)
which resolves against the domain root in the browser. On prod the docs
are served under `/docs/`, so the absolute path 404s and the swap
silently keeps the light variant — invisible against the dark page.

Drop the leading slash so the path resolves relative to the stylesheet's
location, working in both the mintlify preview (docs at root) and prod
(docs under `/docs/`).
@mintlify

mintlify Bot commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
Kernel 🟢 Ready View Preview Jun 14, 2026, 4:37 AM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@jarugupj jarugupj changed the title fix dark mode tinker-bot swap path on prod fix dark mode tinker-bot swap path Jun 14, 2026
The previous CSS-based swap used a relative url() that resolved against
the document URL (style.css is inlined as a <style> tag, not loaded as
a separate stylesheet). On prod docs are served under /docs/ so the
absolute /images/tinker-bot-dark.svg path 404s — the light variant
stays rendered and is invisible against the dark page.

Swap to the standard mintlify dark-mode pattern: render both light and
dark <img> tags with tailwind block/dark:block visibility classes.
Mintlify's CDN rewriter handles asset paths for both, so this works in
every environment with no path-resolution edge cases.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Risk assessment: Very Low.

This PR makes a tiny, isolated docs homepage UI change: it swaps the tinker bot image via separate light/dark image elements and removes the prior dark-mode CSS content: url(...) override. The changed files are limited to index.mdx and style.css, with no production logic, infrastructure, auth, permissions, or shared system impact. No CODEOWNERS file is present, and there were no existing approvals to duplicate.

Open in Web View Automation 

Sent by Cursor Automation: Assign PR reviewers

@jarugupj jarugupj marked this pull request as ready for review June 14, 2026 05:09
@firetiger-agent

Copy link
Copy Markdown

Firetiger deploy monitoring skipped

This PR didn't match the auto-monitor filter configured on your GitHub connection:

PRs in the kernel, infra, hypeman, and hypeship repos. kernel is a ~mono repo with many logical services underneath, ensure to focus on the implicated service for the PR

Reason: PR appears to be documentation/website styling changes (dark mode UI fix in index.mdx and style.css), not infrastructure or core service changes that would require deploy monitoring.

To monitor this PR anyway, reply with @firetiger monitor this.

@jarugupj jarugupj merged commit ab3c134 into main Jun 14, 2026
4 checks passed
@jarugupj jarugupj deleted the hypeship/fix-tinker-bot-dark-path branch June 14, 2026 05:26
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