[GH-ISSUE #3067] [Issue]: On phone-width screens the always-on action pill in the Connections/Personas/Presets/Characters panels paints over the right edge of each row's title and subtitle text #1634

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

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

Originally assigned to: @SpicyMarinara on GitHub.

What's wrong

In the Connections, Personas, Presets, and Characters resource panels, every row has an action pill (assign / random / duplicate / set-default / delete, etc.) pinned to its right edge. On desktop that pill is hidden until you hover the row, but on phone-width screens it is forced permanently visible via max-md:opacity-100, and it has a solid --sidebar background plus a ring-1 border, so it is fully opaque. The row's text column sits next to it as min-w-0 flex-1 with no right padding, so the row name and (worse) the longer secondary line are laid out across the full row width and then the opaque pill is painted on top of their right edge. The covered text is silently lost — most noticeably on the second line: Connections' provider • model, Personas' description, and Presets' FORMAT · N sections · by author. The sibling AgentsPanel and LorebooksPanel rows already solve exactly this by reserving right padding (pr-16) on their text column; these four panels omit it.

How to reproduce (try it yourself)

  1. Open the app on a phone-width viewport (<=767px; worst at <=479px). The right resource panel goes full-width here via .app-right-panel-mobile { width: 100% }.
  2. Open the Connections panel (or Personas / Presets / Characters) so the resource rows are visible.
  3. Make sure at least one row has a reasonably long name or provider • model string — e.g. an OpenRouter connection whose model id is long.
  4. Look at the right side of each row, where the 3-button (Connections / Personas) or up-to-4-button (Presets, when a non-conversation chat is active) action pill sits.

You'll see: the right ~90-120px of the row's title/subtitle is hidden behind the solid, always-on pill; the provider • model / description / by author text is cut off under the buttons even though there is empty row height beside it.
Expected: the text should truncate to the LEFT of the pill (as it already does in the Agents and Lorebooks panels), so nothing readable is hidden behind the always-on mobile pill.

Where it is

Broken (text column reserves no right padding, opaque pill always shown on mobile):

  • packages/client/src/components/panels/ConnectionsPanel.tsx:651 — text column className="min-w-0 flex-1"; pill at :659 absolute right-2 ... bg-[var(--sidebar)] ... ring-1 ... group-hover:opacity-100 max-md:opacity-100. Note this pill is NOT wrapped in {!selectionMode && (...)} — it renders in all modes.
  • packages/client/src/components/panels/PersonasPanel.tsx:1052 — min-w-0 flex-1; pill at :1069.
  • packages/client/src/components/panels/PresetsPanel.tsx:691 — min-w-0 flex-1; up-to-4-button pill at :710.
  • packages/client/src/components/panels/CharactersPanel.tsx:1284 — min-w-0 flex-1; pill at :1344.

Done correctly (contrasting siblings that reserve the space):

  • packages/client/src/components/panels/AgentsPanel.tsx:1265 — cn("min-w-0 flex-1 text-left", !selectionMode && (onDelete ? "pr-16" : "pr-10")) with the identical pill at :1285.
  • packages/client/src/components/panels/LorebooksPanel.tsx:1250 — cn("min-w-0 flex-1", !selectionMode && "pr-16") with the identical pill at :1272.

(For the record, CharactersPanel.tsx:1062 — the folder-member row — is NOT affected: its "Remove from folder" control at :1125-1136 is an in-flow button, not an absolutely-positioned pill, so it reserves its own space and needs no padding.)

What's happening

The pill is position: absolute, so it is removed from normal flow. The text column's flex-1 width — and therefore the CSS truncate ellipsis cutoff — is computed as if the pill were not there, i.e. at the full row width. The pill, with bg-[var(--sidebar)] + ring-1, is opaque, and max-md:opacity-100 keeps it permanently visible below 768px, so it composites on top of the right slice of the text instead of pushing it aside. Each mari-chrome-control--small p-1.5 button is ~24px, plus the container's px-1, gap-0.5, and right-2 offset — roughly 92px for a 3-button row (Connections, inactive Personas) and ~118px for the 4-button Presets row. That entire band of text is hidden, and it is worst at <=479px where the row is narrowest so the fixed-width pill eats a larger fraction of it. There is no mitigation in globals.css: the @media (max-width: 767px), (max-width: 479px), and (pointer: coarse) blocks add no padding for these rows or for mari-chrome-control, and there is no max-md:pr-* on the text columns.

Suggested fix

Mirror the already-shipped AgentsPanel/LorebooksPanel pattern (add right padding to the text column sized to the pill), but size each panel to its actual maximum button count and gate it to match each pill's real visibility:

  • ConnectionsPanel.tsx:651: min-w-0 flex-1 → cn("min-w-0 flex-1", "pr-24") UNCONDITIONALLY (do NOT gate on !selectionMode), because the pill at :659 renders in all modes including selection mode. 3-button pill needs ~pr-24 (pr-16 would leave ~28px hidden).
  • PersonasPanel.tsx:1052: min-w-0 flex-1 → cn("min-w-0 flex-1", !selectionMode && "pr-24"). Up to 3 buttons when the persona is inactive (the !active "Set as active" button adds one); pr-16 is too short in that case.
  • PresetsPanel.tsx:691: min-w-0 flex-1 → cn("min-w-0 flex-1", !selectionMode && "pr-32"). Up to 4 buttons when canAssignToActiveChat (assign + default + duplicate + delete, ~118px); pr-24 (96px) would leave ~22px hidden. (Equivalently, pad the outer flex wrapper at :663 — same right edge.)
  • CharactersPanel.tsx:1284: min-w-0 flex-1 → cn("min-w-0 flex-1", !selectionMode && "pr-16"). 2-button pill, so use the proven 2-button sibling value pr-16.
  • Do NOT touch CharactersPanel.tsx:1062 (folder-member row): its control is an in-flow button, not an absolute pill.

Keep all four breakpoint-unconditional (no md: prefix), exactly like the siblings.

Regression avoided: the padding is purely additive right-padding, and the pill is position: absolute (out of flow) so there is no reflow, no z-index change, and no hover-only control is made always-visible. Personas/Presets/Characters insert a left checkbox in selection mode and hide the pill, so gating their padding on !selectionMode keeps selection-mode layout untouched; Connections is the one exception whose pill stays visible in selection mode, so its padding is deliberately unconditional to avoid re-creating the overlap there. On desktop the pill already occupies that band on hover and the Agents/Lorebooks siblings already render the same always-reserved right gap, so desktop behavior becomes consistent with the siblings rather than regressing.

AI-investigated against v2.0.6 (packages/client); cited lines read and confirmed. Additionally verified live at a 375px viewport: the pill computes to opacity: 1 (via max-md:opacity-100) and its left edge sits ~87px inside the row's right edge, while the text column extends to the full row width with no reserved right padding — so the rightmost ~87px of the truncated title/subtitle is painted over by the opaque pill.

Originally created by @kolacheee on GitHub (Jun 29, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/3067 Originally assigned to: @SpicyMarinara on GitHub. **What's wrong** In the Connections, Personas, Presets, and Characters resource panels, every row has an action pill (assign / random / duplicate / set-default / delete, etc.) pinned to its right edge. On desktop that pill is hidden until you hover the row, but on phone-width screens it is forced permanently visible via `max-md:opacity-100`, and it has a solid `--sidebar` background plus a `ring-1` border, so it is fully opaque. The row's text column sits next to it as `min-w-0 flex-1` with no right padding, so the row name and (worse) the longer secondary line are laid out across the full row width and then the opaque pill is painted on top of their right edge. The covered text is silently lost — most noticeably on the second line: Connections' `provider • model`, Personas' description, and Presets' `FORMAT · N sections · by author`. The sibling AgentsPanel and LorebooksPanel rows already solve exactly this by reserving right padding (`pr-16`) on their text column; these four panels omit it. **How to reproduce (try it yourself)** 1. Open the app on a phone-width viewport (`<=767px`; worst at `<=479px`). The right resource panel goes full-width here via `.app-right-panel-mobile { width: 100% }`. 2. Open the Connections panel (or Personas / Presets / Characters) so the resource rows are visible. 3. Make sure at least one row has a reasonably long name or `provider • model` string — e.g. an OpenRouter connection whose model id is long. 4. Look at the right side of each row, where the 3-button (Connections / Personas) or up-to-4-button (Presets, when a non-conversation chat is active) action pill sits. You'll see: the right ~90-120px of the row's title/subtitle is hidden behind the solid, always-on pill; the `provider • model` / description / `by author` text is cut off under the buttons even though there is empty row height beside it. Expected: the text should truncate to the LEFT of the pill (as it already does in the Agents and Lorebooks panels), so nothing readable is hidden behind the always-on mobile pill. **Where it is** Broken (text column reserves no right padding, opaque pill always shown on mobile): - `packages/client/src/components/panels/ConnectionsPanel.tsx:651` — text column `className="min-w-0 flex-1"`; pill at `:659` `absolute right-2 ... bg-[var(--sidebar)] ... ring-1 ... group-hover:opacity-100 max-md:opacity-100`. Note this pill is NOT wrapped in `{!selectionMode && (...)}` — it renders in all modes. - `packages/client/src/components/panels/PersonasPanel.tsx:1052` — `min-w-0 flex-1`; pill at `:1069`. - `packages/client/src/components/panels/PresetsPanel.tsx:691` — `min-w-0 flex-1`; up-to-4-button pill at `:710`. - `packages/client/src/components/panels/CharactersPanel.tsx:1284` — `min-w-0 flex-1`; pill at `:1344`. Done correctly (contrasting siblings that reserve the space): - `packages/client/src/components/panels/AgentsPanel.tsx:1265` — `cn("min-w-0 flex-1 text-left", !selectionMode && (onDelete ? "pr-16" : "pr-10"))` with the identical pill at `:1285`. - `packages/client/src/components/panels/LorebooksPanel.tsx:1250` — `cn("min-w-0 flex-1", !selectionMode && "pr-16")` with the identical pill at `:1272`. (For the record, CharactersPanel.tsx:1062 — the folder-member row — is NOT affected: its "Remove from folder" control at `:1125-1136` is an in-flow button, not an absolutely-positioned pill, so it reserves its own space and needs no padding.) **What's happening** The pill is `position: absolute`, so it is removed from normal flow. The text column's `flex-1` width — and therefore the CSS `truncate` ellipsis cutoff — is computed as if the pill were not there, i.e. at the full row width. The pill, with `bg-[var(--sidebar)]` + `ring-1`, is opaque, and `max-md:opacity-100` keeps it permanently visible below 768px, so it composites on top of the right slice of the text instead of pushing it aside. Each `mari-chrome-control--small p-1.5` button is ~24px, plus the container's `px-1`, `gap-0.5`, and `right-2` offset — roughly 92px for a 3-button row (Connections, inactive Personas) and ~118px for the 4-button Presets row. That entire band of text is hidden, and it is worst at `<=479px` where the row is narrowest so the fixed-width pill eats a larger fraction of it. There is no mitigation in `globals.css`: the `@media (max-width: 767px)`, `(max-width: 479px)`, and `(pointer: coarse)` blocks add no padding for these rows or for `mari-chrome-control`, and there is no `max-md:pr-*` on the text columns. **Suggested fix** Mirror the already-shipped AgentsPanel/LorebooksPanel pattern (add right padding to the text column sized to the pill), but size each panel to its actual maximum button count and gate it to match each pill's real visibility: - `ConnectionsPanel.tsx:651`: `min-w-0 flex-1` → `cn("min-w-0 flex-1", "pr-24")` UNCONDITIONALLY (do NOT gate on `!selectionMode`), because the pill at `:659` renders in all modes including selection mode. 3-button pill needs ~`pr-24` (`pr-16` would leave ~28px hidden). - `PersonasPanel.tsx:1052`: `min-w-0 flex-1` → `cn("min-w-0 flex-1", !selectionMode && "pr-24")`. Up to 3 buttons when the persona is inactive (the `!active` "Set as active" button adds one); `pr-16` is too short in that case. - `PresetsPanel.tsx:691`: `min-w-0 flex-1` → `cn("min-w-0 flex-1", !selectionMode && "pr-32")`. Up to 4 buttons when `canAssignToActiveChat` (assign + default + duplicate + delete, ~118px); `pr-24` (96px) would leave ~22px hidden. (Equivalently, pad the outer flex wrapper at `:663` — same right edge.) - `CharactersPanel.tsx:1284`: `min-w-0 flex-1` → `cn("min-w-0 flex-1", !selectionMode && "pr-16")`. 2-button pill, so use the proven 2-button sibling value `pr-16`. - Do NOT touch `CharactersPanel.tsx:1062` (folder-member row): its control is an in-flow button, not an absolute pill. Keep all four breakpoint-unconditional (no `md:` prefix), exactly like the siblings. Regression avoided: the padding is purely additive right-padding, and the pill is `position: absolute` (out of flow) so there is no reflow, no z-index change, and no hover-only control is made always-visible. Personas/Presets/Characters insert a left checkbox in selection mode and hide the pill, so gating their padding on `!selectionMode` keeps selection-mode layout untouched; Connections is the one exception whose pill stays visible in selection mode, so its padding is deliberately unconditional to avoid re-creating the overlap there. On desktop the pill already occupies that band on hover and the Agents/Lorebooks siblings already render the same always-reserved right gap, so desktop behavior becomes consistent with the siblings rather than regressing. *AI-investigated against v2.0.6 (packages/client); cited lines read and confirmed. Additionally verified live at a 375px viewport: the pill computes to `opacity: 1` (via `max-md:opacity-100`) and its left edge sits ~87px inside the row's right edge, while the text column extends to the full row width with no reserved right padding — so the rightmost ~87px of the truncated title/subtitle is painted over by the opaque pill.*
Author
Owner

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

Addressed in PR #3072 by commit 4146a380. Validated locally with pnpm check and pnpm smoke:ui.

<!-- gh-comment-id:4836257701 --> @SpicyMarinara commented on GitHub (Jun 29, 2026): Addressed in PR #3072 by commit 4146a380. Validated locally with pnpm check and pnpm smoke:ui.
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#1634
No description provided.