chat: adopt lui scoped theme API for semantic colors - #23
Merged
Merged
Conversation
Replace the host-side .luiSemanticColors dictionary with wire-level
theme tokens emitted by the OCaml view: mode-dependent colors ride as
adaptive {light,dark} pairs and theme-mode follows the appearance
setting, so light/dark switching and palette overrides now come from
one OCaml declaration on every backend.
Bumps the lui pins (opam, SPM, pubspec) to the theme API commit.
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adopts the new LUI scoped theme API (logseq/lui#49) so the chat palette comes from the wire instead of a host-side color dictionary.
View.chat_viewnow wraps the screen tree inLui_elements.themed ~tokens:chat_theme_tokens ~mode_signal:(Signal.map chat_theme_mode model_source).chat_theme_tokenscarries the LogseqThemePolicy palette: mode-dependent colors (background,surface,autocomplete-row-background) use the new adaptive{light,dark}token form picked per backend effective color scheme, while task/flashcard colors areFixedhex+alpha strings converted 1:1 from the previousColor(...)/opacity(0.12)literals.chat_theme_modemapsmodel.appearance("system"|"light"|"dark") to atheme_modesignal, so the appearance setting hot-switches every backend's effective scheme with one patch — previously this only reached the native shell.LogseqChatRootView: drops the.luiSemanticColors([...])dictionary; the SwiftUI palette stays for app chrome (.tint,.foregroundStyle,.background) outside the LUI tree. Flutter keepsLogseqChatTheme/themeModeas platform shell theme for the same reason.5958c0c(opam pin, SPMrevision, pubspecref).Verified:
dune build @shared/native/runtest— 716/716 pass.Link to Devin session: https://app.devin.ai/sessions/eab2eca00a5649d09fcf48626d9f09ef
Open in Devin Desktop: https://app.devin.ai/desktop/session/eab2eca00a5649d09fcf48626d9f09ef?variant=devin
Requested by: @tiensonqin