[GH-ISSUE #2626] Character editor header: action buttons render twice (both responsive action bars visible on desktop) #1296

Closed
opened 2026-10-21 05:31:02 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @kolacheee on GitHub (Jun 18, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2626

Originally assigned to: @SpicyMarinara on GitHub.

Summary

In the character editor, the header action buttons render twice on desktop. There's the expected bar inline with the title (Save · favorite · export · assign · duplicate · delete), plus a second, full-width copy of the same buttons in a row directly below it. Only one of the two bars should be visible at a time.

Steps to reproduce

  1. Open any character in the editor at a desktop / wide viewport.
  2. Look at the header — the Save + icon buttons appear twice (once in the title row, once as a full-width row beneath it).

Root cause

The header renders two responsive action bars in packages/client/src/components/characters/CharacterEditor.tsx (~lines 874 / 882):

  • desktop: <div className="mari-editor-actions hidden md:flex">
  • mobile: <div className="mari-editor-actions flex w-full … md:hidden">

They're meant to be mutually exclusive via Tailwind's hidden / md:hidden. But packages/client/src/styles/globals.css:900 defines an unlayered rule:

.mari-editor-actions {
  display: flex;
  …
}

Unlayered CSS wins over Tailwind's layered utilities, so this display: flex overrides both hidden (on the desktop bar) and md:hidden (on the mobile bar) — neither bar can be hidden, so both render at every width. (Same "unlayered globals.css beats Tailwind utilities" footgun that affects card-CSS scoping.)

Suggested fix

Drop display: flex from the base .mari-editor-actions rule and let the existing flex / md:flex / hidden / md:hidden utilities control display (both bars already carry them); keep the other base properties (flex: 0 0 auto, align-items, gap). Alternatively, move the rule into the right cascade layer, or drop the .mari-editor-actions class from one of the two bars.

Notes

  • Appears to originate from the character-editor / header rework in #2606; not introduced by the in-flight scoped-regex / custom-emoji work — verified, those changes don't touch the header.
  • Pointers: CharacterEditor.tsx ~874–882; globals.css:900.
  • A screenshot of the doubled header is available is attached:
    Image
Originally created by @kolacheee on GitHub (Jun 18, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2626 Originally assigned to: @SpicyMarinara on GitHub. ## Summary In the character editor, the header **action buttons render twice** on desktop. There's the expected bar inline with the title (Save · favorite · export · assign · duplicate · delete), plus a second, full-width copy of the same buttons in a row directly below it. Only one of the two bars should be visible at a time. ## Steps to reproduce 1. Open any character in the editor at a desktop / wide viewport. 2. Look at the header — the Save + icon buttons appear twice (once in the title row, once as a full-width row beneath it). ## Root cause The header renders two responsive action bars in `packages/client/src/components/characters/CharacterEditor.tsx` (~lines 874 / 882): - desktop: `<div className="mari-editor-actions hidden md:flex">` - mobile: `<div className="mari-editor-actions flex w-full … md:hidden">` They're meant to be mutually exclusive via Tailwind's `hidden` / `md:hidden`. But `packages/client/src/styles/globals.css:900` defines an **unlayered** rule: ```css .mari-editor-actions { display: flex; … } ``` Unlayered CSS wins over Tailwind's layered utilities, so this `display: flex` overrides both `hidden` (on the desktop bar) and `md:hidden` (on the mobile bar) — neither bar can be hidden, so **both render at every width**. (Same "unlayered `globals.css` beats Tailwind utilities" footgun that affects card-CSS scoping.) ## Suggested fix Drop `display: flex` from the base `.mari-editor-actions` rule and let the existing `flex` / `md:flex` / `hidden` / `md:hidden` utilities control `display` (both bars already carry them); keep the other base properties (`flex: 0 0 auto`, `align-items`, `gap`). Alternatively, move the rule into the right cascade layer, or drop the `.mari-editor-actions` class from one of the two bars. ## Notes - Appears to originate from the character-editor / header rework in #2606; **not** introduced by the in-flight scoped-regex / custom-emoji work — verified, those changes don't touch the header. - Pointers: `CharacterEditor.tsx` ~874–882; `globals.css:900`. - A screenshot of the doubled header is available is attached: <img width="1601" height="304" alt="Image" src="https://github.com/user-attachments/assets/04da0136-c6ec-41a9-ab86-47f172b297cf" />
Author
Owner

@SpicyMarinara commented on GitHub (Jun 18, 2026):

On it.

<!-- gh-comment-id:4743715556 --> @SpicyMarinara commented on GitHub (Jun 18, 2026): On it.
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#1296
No description provided.