mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #6463] [Issue]: Disabled regex/function rows: off-state toggle is unreadable (dimmed row + border-coloured switch stack) #3618
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#3618
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?
Originally created by @BobEckman0348 on GitHub (Sep 20, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/6463
Originally assigned to: @SpicyMarinara on GitHub.
[Issue]:
Summary
A disabled regex script (and, by the same code path, a disabled function) renders its on/off toggle at effectively zero contrast, so the control can only be found by moving the pointer around the row until it happens to hit. Nothing is broken functionally — two independent styling decisions compound into an inaccessible one.
Expected behavior
The toggle should be clearly visible in both states, so a disabled regex or function can be re-enabled without hunting for the control.
Actual behavior
The toggle is indistinguishable from the row background. Two stacked causes:
The whole row is dimmed, including the control.
packages/client/src/components/panels/PresetsPanel.tsx, line 1671, on the regex row wrapper<div>:The
SettingsSwitchis a child of that wrapper (line 1760), so it is dimmed along with the text. CSS opacity composites — a child cannot opt back out.The off-state switch has almost no contrast to begin with.
packages/client/src/components/panels/settings/SettingControls.tsx, line 711, inSettingsSwitchTrack:Off = a bare
--border-coloured pill. On the default dark palette--borderis already near-invisible against the panel, and the row'sopacity-50halves it again. The thumb (line 718) fares no better:--backgroundfill with a--borderring, inside a--bordertrack — the whole control sits one contrast step above the surface it is drawn on.Steps to reproduce
enabled: false— e.g. a SillyTavern export carryingdisabled: true.Concrete case. Five imported scripts reproduce this reliably. All five arrived via SillyTavern import with
disabled: trueand are still disabled:All five show the same symptom: dimmed row, no discernible toggle.
Environment
package.jsonline 3)Logs, screenshots, or video
No logs — this is purely visual, with no error output. A screenshot of the five dimmed rows above, with the toggle area circled, would carry more weight than the line numbers. Attaching one is recommended.
Additional context
The same defect exists on the Functions surface
While verifying the regex row, the identical
!enabled && "opacity-50"wrapper turned up on the Functions row in the same file —PresetsPanel.tsxline 2009, with its ownSettingsSwitchmounted inside at line 2096:PresetsPanel.tsx:1671PresetsPanel.tsx:1760PresetsPanel.tsx:2009PresetsPanel.tsx:2096Both feed the same switch component, so the app-wide fix below resolves both at once; a row-scoped fix has to be applied twice. Included here rather than as a separate issue because it is one defect class with two call sites.
Evidence strength for the Functions half: found by source audit, not reproduced by the reporter (no custom tools are installed on this machine). The code paths were read directly, but the visual symptom has not been observed on that surface — treat it as a code-level finding to confirm.
One further detail on the Functions row: it stacks
opacity-50for disabled (line 2009) againstopacity-40while being dragged (line 2010) on the same element, so a disabled row mid-drag lands dimmer still.Suggested fix
Either change alone helps; both together is the real fix. Leaving the final call to maintainers, since the second option has app-wide blast radius.
opacity-50off the row wrapper and onto the text nodes only (name, pattern, placement tags) so the row still reads as "off" while the switch stays full-strength. AffectsPresetsPanel.tsxlines 1671 and 2009, plus the text spans inside each row.SettingsSwitchTrackline 711, e.g.bg-[var(--muted-foreground)]/35plus a subtle ring. Larger blast radius — this affects everySettingsSwitchin the app, not just regex rows — but it is the underlying accessibility issue.!enabled && "opacity-50"/!enabled && "opacity-40"that wrap interactive children.Notes
enabledvalue is never touched by the rendering.packages/client/src/components/agents/RegexScriptEditor.tsxhas its own enable switch, outside the dimmed list row), or use a theme with a brighter--border.Template check
Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:
@SpicyMarinara commented on GitHub (Sep 20, 2026):
The opacity fix should be enough.
@SpicyMarinara commented on GitHub (Sep 21, 2026):
I am taking this in #6482 for @SpicyMarinara. The sweep will reuse the existing schedule and UI paths and include focused regression checks.