mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #1058] [CLOSED] feat: creator notes CSS injection with tri-state mode #4905
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#4905
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?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/1058
Author: @kolacheee
Created: 5/21/2026
Status: ❌ Closed
Base:
staging← Head:feature/creator-notes-css📝 Commits (7)
32363d0feat: render creator notes CSS from character cards46fae49feat: add per-character card theming toggle in Chat Settingsb9b2387feat: replace per-character card CSS toggles with tri-state mode selectorb178932fix: add mari-card-css scope to GameSurface and data-card-css to active narration097ee0cfix: move data-card-css from narration box to inner content divsfda0946feat: harden card CSS scoping and add data-chat-mode attributese97f109fix: strip CSS comments before scoping to prevent selector corruption📊 Changes
12 files changed (+479 additions, -52 deletions)
View changed files
📝
packages/client/src/components/chat/ChatArea.tsx(+24 -0)📝
packages/client/src/components/chat/ChatMessage.tsx(+4 -47)📝
packages/client/src/components/chat/ChatRoleplaySurface.tsx(+1 -1)📝
packages/client/src/components/chat/ChatSettingsDrawer.tsx(+125 -0)📝
packages/client/src/components/chat/ConversationMessage.tsx(+2 -0)📝
packages/client/src/components/chat/ConversationView.tsx(+1 -1)➕
packages/client/src/components/chat/CreatorNotesCssInjector.tsx(+87 -0)📝
packages/client/src/components/game/GameNarration.tsx(+13 -2)📝
packages/client/src/components/game/GameSurface.tsx(+1 -1)➕
packages/client/src/lib/chat-css.ts(+197 -0)📝
packages/shared/src/index.ts(+1 -0)➕
packages/shared/src/utils/creator-notes-css.ts(+23 -0)📄 Description
Summary
<style>blocks from character creator notes and injects them as scoped CSS into the chat areadata-card-cssattribute)sanitizeChatCss) and scoped (scopeChatCss) before injectiondata-card-cssattributes added to message wrappers in all surface modes (roleplay, conversation, game narration)cardCssMode(replaces earlierdisabledCardCssCharIdsapproach)Files changed
CreatorNotesCssInjector.tsx— new component: extracts, sanitizes, scopes, and injects card CSS per modeChatArea.tsx— readscardCssModefrom chat metadata, passes mode to injector in all 3 surface modesChatMessage.tsx— addsdata-card-cssto narrator, roleplay, and iMessage wrapper elementsConversationMessage.tsx— addsdata-card-cssto grouped and regular message wrappersGameNarration.tsx— addsdata-card-cssto stacked and regular log entriesChatSettingsDrawer.tsx— replaces per-character on/off toggles withCardCssModeSelectortri-state UITest plan
<style>blocks in creator notes.mari-card-cssscope in Chat and Exclusive modes🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.