Light mode: bold text invisible in AI chat and possibly other islands #47
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
In light mode,
<strong>text in the AI chat bubble is invisible (white on near-white). Normal text is also faint. Dark mode works perfectly.Root cause analysis
The AI message bubble uses:
The fallback values (
#2b3035,#dee2e6) are dark-mode colors. In light mode, the CSS variables fromtheme.rsshould override these (--color-text: #0f172a,--color-surface: near-white). But the<strong>tag and possibly other elements are not inheriting the correct color.Key finding:
styles.cssin hero_os_app has ALL fallback colors hardcoded for dark mode. If CSS variables fail to resolve for any element, it falls back to dark-mode colors which are invisible on light backgrounds.Attempted fixes that did NOT work:
color: inheriton strongcolor: currentColoron strong (inline)color: #f8f9fa !importanton strong.ai-markdown-content strongThis suggests the issue is deeper — the parent element's color may also be wrong, or the CSS variables are not properly cascading to the
dangerous_inner_htmlcontent in the Dioxus shell.Investigation needed
coloron<strong>vs<p>inside the AI bubble in light modedangerous_inner_htmlcontent inherits CSS variables differently from RSX contentFiles
hero_os/crates/hero_os_app/src/styles.css— all fallback colors are dark-modehero_os/crates/hero_os_app/src/theme.rs— generates CSS variables for light/darkhero_archipelagos/archipelagos/intelligence/ai/src/views/message_bubble.rs— AI bubble renderinghero_archipelagos/archipelagos/intelligence/ai/src/island.rs— CSS styles for .ai-markdown-contentmik-tf referenced this issue2026-03-19 02:54:39 +00:00
Fixed. Replaced hardcoded dark-mode colors in AI markdown content (island.rs) with CSS variables (
--ai-code-bg,--ai-link-color, etc.) and added light-mode overrides in styles.css. Headings, bold, links, code blocks, and table borders all adapt to the active theme now.Also improved the build system: Cargo.toml git deps now point to
developmentwith local[patch]overrides in workspace Cargo.toml for local builds — no more pushing before building.Verified on herodev in light mode.