mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #5322] [MERGED] Feat/inlinecolorednames #6728
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#6728
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/5322
Author: @ylli-selmani
Created: 8/20/2026
Status: ✅ Merged
Merged: 8/20/2026
Merged by: @SpicyMarinara
Base:
staging← Head:feat/inlinecolorednames📝 Commits (10+)
f1ce947UI and database groundwork for using nameColors to color names in Chats, inline. For both Personas and Characters for now.aa76713Removal of everything Persona Related -> moved to a different branch. Now only for characters and coloring logic0b07106Character Names + Aliases colored in Text with their set nameColor, but not inside quotes/dialogue, protecting dialogue colorbae1068added force solid Color subtoggle (uses brightest color of gradient array) and fixed gradient rendering0be7218added a subtle shadow to gradient names to visually match other text. Solid color names inherit shadow from parent.9a6bc83fixed en.json inaccuracy about 'force solid colors' subtoggleec65fedsplit main function into two (markdown and html) to preserve paragraph spacing when active. I wont pretend to understand why.18d7c9eran prettier on all documents i touched, and fixed minor code visuals50fd470restored and expanded upon a comment inside function renderContent in ChatMessage.tsx83c984dMerge branch 'staging' into feat/inlinecolorednames📊 Changes
10 files changed (+686 additions, -10 deletions)
View changed files
📝
CHANGELOG.md(+1 -0)📝
packages/client/src/components/characters/CharacterEditor.tsx(+8 -0)📝
packages/client/src/components/chat/ChatArea.tsx(+6 -0)📝
packages/client/src/components/chat/ChatMessage.tsx(+451 -9)📝
packages/client/src/components/chat/chat-area.types.ts(+2 -0)📝
packages/client/src/components/panels/SettingsPanel.tsx(+36 -1)➕
packages/client/src/components/ui/NameAliasesSection.tsx(+153 -0)📝
packages/client/src/localization/locales/en.json(+11 -0)📝
packages/client/src/stores/ui.store.ts(+14 -0)📝
packages/shared/src/types/character.ts(+4 -0)📄 Description
Disclaimer
This was truthfully, fully vibe-coded with Professor Mari using Glm 5.2 Thinking, manual copy and pasting, and as much human (me) testing as i could manage. If the code is therefore trash, but you like the idea, feel free to toss it out and code it yourself. I'd COMPLETELY understand.
also, as stated below, for some reason my pnpm check always fails on prettier, but it fails in the same place as it does in an unmodified Staging, so... i don't know why. Maybe someone could run it for me.
This is a draft for now, because I think i still need a changelog.md
Linked issue
Closes #5321
Why this change
In multi-character roleplays, it's hard to tell who's being referred to in the prose at a glance. The speaker header already shows each character's name color (including gradients), but that visual anchor disappears the moment you start reading the body text. This PR brings that coloring inline into the message text itself, so names pop visually without needing to look up at the header.
Inspired by the AI Dungeon extension "Dungeon Extension v2", which does exactly this and makes multi-character stories way more readable. I full-on stole the idea because it's just good.
What changed
Added an opt-in toggle under Text Rules: "Color Character Names in Text" (off by default)
Added a sub-toggle: "Force Solid Colors for Inline Names" which replaces gradient name colors with the brightest single color stop (by perceived luminance) for better readability in inline contexts. The speaker header is unaffected and always uses the full gradient.
Only characters added to the chat are eligible for name coloring. Works whether they're enabled or disabled in the chat's character list, as long as they're present.
Supports name aliases: all aliases get colored, not just the primary name.
Quote-aware: names inside dialogue quotes are NOT colored, since they're spoken dialogue, already colored and not narrative prose. Includes a safety valve for unmatched/stray quotes.
Works in both the markdown and HTML rendering paths without interfering with paragraph spacing, text stroke, or the existing text shadow/halo.
Gradient name spans use filter: drop-shadow() instead of text-shadow (which breaks with background-clip: text), and zero out the inherited WebkitTextStroke to avoid a visible inward border artifact.
Validation
pnpm checkpasses locallyCONTRIBUTING.md- i think.Manual verification notes
pnpm check does NOT pass locally, not on staging, not on my branch. It fails on Prettier formatting issues in the same spot everywhere. I don't know why, it was happening before my changes too. Someone else should verify this one.
Everything else I tested manually:
Known limitation: if multiple characters share the same alias or name, one character's color is chosen over the other. I don't know which one gets picked (probably whichever comes first in the map iteration). Should probably look into this in the future, but it's an edge case and doesn't break anything.
Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)UI evidence (if applicable)
Summary by CodeRabbit
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.