mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #8679] [MERGED] fix(chat): the favorite layout keeps the Scoped Regex Scripts choice for new chats #8742
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#8742
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/8679
Author: @SpicyMarinara
Created: 11/2/2026
Status: ✅ Merged
Merged: 11/2/2026
Merged by: @SpicyMarinara
Base:
staging← Head:fix/scoped-regex-new-chats-8676📝 Commits (1)
debfdb5fix(chat): the favorite layout keeps the Scoped Regex Scripts choice for new chats (#8676)📊 Changes
9 files changed (+113 additions, -12 deletions)
View changed files
📝
docs/chats/chat-settings.md(+3 -3)📝
docs/chats/settings-profiles.md(+3 -3)📝
docs/extending/regex-scripts.md(+3 -1)📝
e2e/chat-window-favorite.e2e.ts(+60 -0)📝
packages/client/src/components/chat/ChatSettingsDrawer.tsx(+5 -1)📝
packages/client/src/components/chat/ChatWindowFavoriteButton.tsx(+16 -2)📝
packages/server/src/routes/app-settings.routes.ts(+1 -1)📝
packages/shared/src/utils/chat-window-defaults.ts(+11 -1)📝
scripts/regressions/chat-window-defaults.regression.ts(+11 -0)📄 Description
Linked issue
Closes #8676
Why this change
ChatWindowFavoriteButton) saved only{windowLayout, chatSettingsHintDismissed}.chats.storage.ts create()copies that favorite into each new chat of the mode, andscopedRegexModewas never in it. So new chats fell back to the prompt preset's Scoped regex default, which is Disabled.What changed
packages/shared/src/utils/chat-window-defaults.ts:ChatWindowDefaultgets an optionalscopedRegexMode.parseChatWindowDefaultkeeps a valid value (the existingscopedRegexModeSchema), leaves out a missing or null one, and rejects others. The save route then answers 400, and a corrupt stored favorite is ignored, as other bad fields already are.ChatWindowFavoriteButton.tsxtakesscopedRegexMode, includes it in the filled/unfilled check, and saves it only when the chat has its own choice.ChatSettingsDrawer.tsxpassesnullwhile the chat uses the preset default, so "Use preset default" saves nothing.docs/chats/chat-settings.mdanddocs/chats/settings-profiles.md: the favorite now also keeps the scoped regex mode; a starred settings profile still wins.docs/extending/regex-scripts.md: lists all three ways to keep scoped regex on (preset default, favorite layout, default settings profile). It also corrects an older sentence: the per-script switches are global, not per chat.chat-window-defaultsregression covers four cases: saving a favorite with a scoped mode then creating a new roleplay chat, mode isolation, a null choice not stored, and an invalid value rejected.chat-window-favoritee2e (desktop and mobile) covers the full flow: star, choose Exclusive, the star unfills, star again, and a new roleplay chat has Exclusive.Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
What the agent ran locally, after rebasing on staging:
node ./scripts/pnpm-runner.mjs checkpasses.These regressions pass: chat-window-defaults, chat-window-default-upgrade, floating-window, preset-regex-defaults, chat-profile-followers and chat-profile-starting-picks.
E2E results:
e2e/chat-window-favorite.e2e.tspasses 5/5 on desktop-chromium and 5/5 on mobile-chromium.e2e/preset-regex.e2e.tspasses 3/3 on desktop.An independent review agent repeated the fails-before proofs. It fixed the trust-boundary comment and two doc sentences.
Local CodeRabbit asked for the docs-i18n follow-up issue to be linked; it is now #8681.
For a human to verify:
Design note: the star used to save the layout and tips only. Keeping the scoped mode follows the issue's expected behavior. The in-app copy still says "layout", which remains accurate.
Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)docs/chats/chat-settings.md,docs/chats/settings-profiles.mdanddocs/extending/regex-scripts.mdchanged. Follow-up: #8681 ([docs-i18n] catch-up for these pages). The translated packs ondocs-i18nwill be updated in one catch-up PR after this merges, and that PR closes it.🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.