[PR #1601] [MERGED] Fix three global shell/UI bugs (cursor, slider sync, toast position) #5138

Closed
opened 2026-10-22 04:13:38 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/1601
Author: @Romuromylus
Created: 5/29/2026
Status: ✅ Merged
Merged: 5/29/2026
Merged by: @Romuromylus

Base: refactor ← Head: fix/shell-global-ui


📝 Commits (6)

  • fc4943e Cascade the not-allowed cursor to disabled button children
  • 04f4639 Re-sync range slider fill on programmatic value changes
  • 9d27c1c Move the global toast region off the chat send button
  • 24028c7 Make the range slider value-setter patch idempotent and safe to dispose
  • d7635a5 Merge branch 'refactor' into fix/shell-global-ui
  • 620b4b1 Merge branch 'refactor' into fix/shell-global-ui

📊 Changes

5 files changed (+162 additions, -3 deletions)

View changed files

📝 src/app/App.tsx (+1 -1)
➕ src/app/startup/range-slider-sync.test.ts (+102 -0)
📝 src/app/startup/range-slider-sync.ts (+51 -0)
📝 src/styles/globals.css (+4 -1)
📝 src/styles/themes/sillytavern.css (+4 -1)

📄 Description

Why this change

Three small global/shell UI bugs in the refactor, grouped because each lives in the app shell or global styles rather than a single feature.

What changed

  • #1560 - not-allowed cursor vanishes over disabled-button icons: the pink cursor is set by element-level rules (a, button, input[type="color"]) and [class*="cursor-pointer"], which give the disabled button's child <svg>/<span> their own cursor and defeat the inherited not-allowed. Extended the .cursor-not-allowed rules (and the sillytavern theme mirror) to descendants so the not-allowed cursor cascades to children.
  • #1558 - slider fill stale until hover: the range-slider progress var only re-synced on input/change/focus/pointer events, so setting a slider's value from React state (e.g. a Finish preset) left the WebKit track fill stale until hover. Patched the input value setter so a programmatic value assignment on a type=range input re-syncs its progress. The patch is idempotent (won't double-wrap across HMR / StrictMode / concurrent remount), captures the native descriptor once at module load, and its disposer only restores when our setter is still the active one (so it won't clobber a later third-party value-setter patch).
  • #1552 - error toast intercepts the send button: the single global toaster was anchored bottom-right, directly over the composer send button, so a persistent error toast (pointer-events: auto) intercepted clicks meant for Send. Anchored it top-center.

Verification

  • pnpm check:architecture and pnpm check:frontend (tsc -b) pass on this branch.
  • #1558: a vitest unit on range-slider-sync - a programmatic .value assignment re-syncs --range-progress, the disposer restores the native setter, plus regression cases for overlapping installs (no permanently-wrapped prototype) and a later third-party patch (not clobbered on dispose). RED on baseline, GREEN with the fix.
  • #1560 and #1552 are CSS-cascade / DOM-attribute behaviours that jsdom cannot compute, so I verified them in a real Chromium browser against pnpm dev: #1560 - a .cursor-not-allowed element's child icon computes cursor: not-allowed (the pink cursor on baseline); #1552 - the global toaster region reports data-y-position="top" / data-x-position="center" (bottom/right on baseline). Both confirmed RED then GREEN. The browser repro specs are kept local and are not part of this diff.
  • All three are pure frontend with no Tauri-runtime dependency.

Linked issues

Closes #1560
Closes #1558
Closes #1552

Summary by CodeRabbit

  • Bug Fixes

    • Fixed cursor styling cascade for disabled elements to properly inherit disabled state across child elements.
    • Repositioned toast notifications to appear at top-center instead of bottom-right.
  • New Features

    • Enhanced range inputs to sync styling when values are updated programmatically.
  • Tests

    • Added test suite for range slider synchronization functionality.

Review Change Stack


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/1601 **Author:** [@Romuromylus](https://github.com/Romuromylus) **Created:** 5/29/2026 **Status:** ✅ Merged **Merged:** 5/29/2026 **Merged by:** [@Romuromylus](https://github.com/Romuromylus) **Base:** `refactor` ← **Head:** `fix/shell-global-ui` --- ### 📝 Commits (6) - [`fc4943e`](https://github.com/Pasta-Devs/Marinara-Engine/commit/fc4943eafb290a3c78fc8b3bce17bc626092ba7c) Cascade the not-allowed cursor to disabled button children - [`04f4639`](https://github.com/Pasta-Devs/Marinara-Engine/commit/04f4639e7e36509d5b11d3b2768bc2f2c5e60718) Re-sync range slider fill on programmatic value changes - [`9d27c1c`](https://github.com/Pasta-Devs/Marinara-Engine/commit/9d27c1ce3696691c50f880e60f72c7893ef85a55) Move the global toast region off the chat send button - [`24028c7`](https://github.com/Pasta-Devs/Marinara-Engine/commit/24028c7b1e71825f846eadedeffab95c32e8a041) Make the range slider value-setter patch idempotent and safe to dispose - [`d7635a5`](https://github.com/Pasta-Devs/Marinara-Engine/commit/d7635a5f3ba5f89dc10cae9eff47f2b70c53898e) Merge branch 'refactor' into fix/shell-global-ui - [`620b4b1`](https://github.com/Pasta-Devs/Marinara-Engine/commit/620b4b1fa65b5a72dbf880b101772b507020028a) Merge branch 'refactor' into fix/shell-global-ui ### 📊 Changes **5 files changed** (+162 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `src/app/App.tsx` (+1 -1) ➕ `src/app/startup/range-slider-sync.test.ts` (+102 -0) 📝 `src/app/startup/range-slider-sync.ts` (+51 -0) 📝 `src/styles/globals.css` (+4 -1) 📝 `src/styles/themes/sillytavern.css` (+4 -1) </details> ### 📄 Description ## Why this change Three small global/shell UI bugs in the refactor, grouped because each lives in the app shell or global styles rather than a single feature. ## What changed - **#1560 - `not-allowed` cursor vanishes over disabled-button icons**: the pink cursor is set by element-level rules (`a, button, input[type="color"]`) and `[class*="cursor-pointer"]`, which give the disabled button's child `<svg>`/`<span>` their own cursor and defeat the inherited `not-allowed`. Extended the `.cursor-not-allowed` rules (and the sillytavern theme mirror) to descendants so the not-allowed cursor cascades to children. - **#1558 - slider fill stale until hover**: the range-slider progress var only re-synced on input/change/focus/pointer events, so setting a slider's value from React state (e.g. a Finish preset) left the WebKit track fill stale until hover. Patched the input value setter so a programmatic value assignment on a `type=range` input re-syncs its progress. The patch is idempotent (won't double-wrap across HMR / StrictMode / concurrent remount), captures the native descriptor once at module load, and its disposer only restores when our setter is still the active one (so it won't clobber a later third-party value-setter patch). - **#1552 - error toast intercepts the send button**: the single global toaster was anchored bottom-right, directly over the composer send button, so a persistent error toast (pointer-events: auto) intercepted clicks meant for Send. Anchored it top-center. ## Verification - `pnpm check:architecture` and `pnpm check:frontend` (`tsc -b`) pass on this branch. - #1558: a vitest unit on `range-slider-sync` - a programmatic `.value` assignment re-syncs `--range-progress`, the disposer restores the native setter, plus regression cases for overlapping installs (no permanently-wrapped prototype) and a later third-party patch (not clobbered on dispose). RED on baseline, GREEN with the fix. - #1560 and #1552 are CSS-cascade / DOM-attribute behaviours that jsdom cannot compute, so I verified them in a real Chromium browser against `pnpm dev`: #1560 - a `.cursor-not-allowed` element's child icon computes `cursor: not-allowed` (the pink cursor on baseline); #1552 - the global toaster region reports `data-y-position="top"` / `data-x-position="center"` (`bottom`/`right` on baseline). Both confirmed RED then GREEN. The browser repro specs are kept local and are not part of this diff. - All three are pure frontend with no Tauri-runtime dependency. ## Linked issues Closes #1560 Closes #1558 Closes #1552 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Fixed cursor styling cascade for disabled elements to properly inherit disabled state across child elements. * Repositioned toast notifications to appear at top-center instead of bottom-right. * **New Features** * Enhanced range inputs to sync styling when values are updated programmatically. * **Tests** * Added test suite for range slider synchronization functionality. <!-- review_stack_entry_start --> [![Review Change Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/Pasta-Devs/Marinara-Engine/pull/1601?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack) <!-- review_stack_entry_end --> <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:13:38 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#5138
No description provided.