[PR #5206] [MERGED] fix(tracker): keep Inventory Tracker entries as pills at every width #6671

Closed
opened 2026-10-23 04:12:37 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/5206
Author: @augusteo
Created: 8/17/2026
Status: ✅ Merged
Merged: 8/17/2026
Merged by: @SpicyMarinara

Base: staging ← Head: fix/5205-inventory-chip-wrap


📝 Commits (2)

  • c24e816 fix(tracker): keep Inventory Tracker entries as pills at every width
  • 72e64e0 Merge branch 'staging' into fix/5205-inventory-chip-wrap

📊 Changes

1 file changed (+4 additions, -3 deletions)

View changed files

📝 packages/client/src/features/tracker-panel/components/sections/InventoryTrackerPanel.tsx (+4 -3)

📄 Description

Linked issue

Closes #5205

Why this change

The Inventory Tracker stops looking like an inventory as soon as the panel gets narrow. Below a 300px container width it abandoned the chip layout and gave every entry its own full-width row, so the pill shape — the thing that makes an entry read as an item rather than as a button — was gone at exactly the width where it does the most work.

The group container was flex-col under the breakpoint. In column direction the chips stretch to the full row, so this was not a wrapping failure; the stacked bars were the intended fallback rendering itself.

It is reachable in normal use: the docked sidebar's minimum is 240px (ui.store.ts:127), well under the breakpoint, so dragging the sidebar in is enough to trigger it.

And it costs the most space where there is least of it. Same twelve entries, same 260px panel, measured on the live section element:

section height
Before (stacked) 505px
After (wrapping pills) 327px
Before — 260px panel After — 260px panel
Stacked full-width rows Wrapping pills

ced28787f (#5168) introduced the breakpoint deliberately, reasoning that below ~300px a wrapping row fits barely two chips so the ragged right edge costs more than the wrapping saves. The ragged edge is real, but it is cheap. Losing the chip identity and a third of the vertical budget is not, and it works against the density goal that motivated #5168 in the first place.

What changed

  • InventoryTrackerPanel.tsx: the group container is now flex flex-wrap at every width; the @min-[300px] variants are gone. Chips keep rounded-full, min-w-0, and max-w-full, so they size to content and a name too long for one line still clips to the panel instead of overflowing it.
  • Replaced the stale comment above the container with the reasoning behind wrapping unconditionally.

Behavior above 300px is unchanged — that path already wrapped. One file, three lines.

Validation

  • pnpm check passes locally
  • Container (Docker / Podman) built and ran without issue
  • Ran the app, clicked through the changes manually
  • Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)
  • Above manual verification completed (describe below)
  • Read and followed CONTRIBUTING.md

Manual verification notes

Only the pnpm check box is ticked, and it is the only one that has actually been verified. It was run on this branch at the head commit and exited 0 (tsc, ESLint, Prettier, client build). Every other box above is left unticked on purpose — treat them as a to-do list, not as evidence. The before/after screenshots were captured from the running dev app against a live chat, at a 260px panel, by toggling only this commit in the working tree, so they are the same data and the same width in both shots; that is automated capture, not the manual click-through the checklist asks for. The before/after screenshots above were captured from the running dev app against a live chat, at a 260px panel, by toggling only this commit in the working tree — so they are the same data and the same width in both shots.

Still to verify manually before merging:

  • Manually drag the docked sidebar across the full 240px–max range and confirm entries stay pills throughout, with no width that stacks or overflows.
  • Manually check the same range in the HUD popover, which portals to document.body and owns its own container context.
  • Manually verify a single very long item name at 240px clips inside the panel and does not push the section wider or trigger horizontal scroll.
  • Manually check light mode as well as the dark mode shown above.
  • Manually check add mode, delete mode, and lock mode at 240px — those add a ×N field, a remove button, and a padlock inside each chip, which is the tightest case.
  • Manually check the empty-group state at 240px.
  • Manually check a mobile viewport.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Translated docs on the docs-i18n branch updated to match, or a [docs-i18n] follow-up issue opened (see CONTRIBUTING.md § Translated documentation)
  • Version/release files updated (only if this PR includes a version bump)

No user-facing docs describe the narrow-width layout, so nothing under docs/ looks affected — worth a second opinion from a maintainer, since the Inventory Tracker docs were added recently (#5113).

UI evidence (if applicable)

See the before/after table above. Both shots: 12 entries, 260px panel, dark mode, docked sidebar.

Summary by CodeRabbit

  • Style
    • Updated inventory group chips to consistently wrap in a horizontal layout across all panel widths.
    • Removed the narrow-panel stacked layout for a more consistent presentation.

🔄 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/5206 **Author:** [@augusteo](https://github.com/augusteo) **Created:** 8/17/2026 **Status:** ✅ Merged **Merged:** 8/17/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/5205-inventory-chip-wrap` --- ### 📝 Commits (2) - [`c24e816`](https://github.com/Pasta-Devs/Marinara-Engine/commit/c24e816f6ba9251140071c840e33c85c92539ee3) fix(tracker): keep Inventory Tracker entries as pills at every width - [`72e64e0`](https://github.com/Pasta-Devs/Marinara-Engine/commit/72e64e062a95c691bc2dce756c65bf32f70eef8c) Merge branch 'staging' into fix/5205-inventory-chip-wrap ### 📊 Changes **1 file changed** (+4 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `packages/client/src/features/tracker-panel/components/sections/InventoryTrackerPanel.tsx` (+4 -3) </details> ### 📄 Description ## Linked issue Closes #5205 ## Why this change The Inventory Tracker stops looking like an inventory as soon as the panel gets narrow. Below a 300px container width it abandoned the chip layout and gave every entry its own full-width row, so the pill shape — the thing that makes an entry read as an item rather than as a button — was gone at exactly the width where it does the most work. The group container was `flex-col` under the breakpoint. In column direction the chips stretch to the full row, so this was not a wrapping failure; the stacked bars were the intended fallback rendering itself. It is reachable in normal use: the docked sidebar's minimum is 240px (`ui.store.ts:127`), well under the breakpoint, so dragging the sidebar in is enough to trigger it. And it costs the most space where there is least of it. Same twelve entries, same 260px panel, measured on the live section element: | | section height | |---|---| | Before (stacked) | 505px | | After (wrapping pills) | 327px | | Before — 260px panel | After — 260px panel | |---|---| | ![Stacked full-width rows](https://raw.githubusercontent.com/augusteo/Marinara-Engine/pr-assets/inventory-chip-wrap/01-before-260px-stacked.png) | ![Wrapping pills](https://raw.githubusercontent.com/augusteo/Marinara-Engine/pr-assets/inventory-chip-wrap/02-after-260px-pills.png) | ced28787f (#5168) introduced the breakpoint deliberately, reasoning that below ~300px a wrapping row fits barely two chips so the ragged right edge costs more than the wrapping saves. The ragged edge is real, but it is cheap. Losing the chip identity and a third of the vertical budget is not, and it works against the density goal that motivated #5168 in the first place. ## What changed - `InventoryTrackerPanel.tsx`: the group container is now `flex flex-wrap` at every width; the `@min-[300px]` variants are gone. Chips keep `rounded-full`, `min-w-0`, and `max-w-full`, so they size to content and a name too long for one line still clips to the panel instead of overflowing it. - Replaced the stale comment above the container with the reasoning behind wrapping unconditionally. Behavior above 300px is unchanged — that path already wrapped. One file, three lines. ## Validation - [x] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [ ] Ran the app, clicked through the changes manually - [ ] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [ ] Above manual verification completed (describe below) - [ ] Read and followed `CONTRIBUTING.md` ### Manual verification notes **Only the `pnpm check` box is ticked, and it is the only one that has actually been verified.** It was run on this branch at the head commit and exited 0 (tsc, ESLint, Prettier, client build). Every other box above is left unticked on purpose — treat them as a to-do list, not as evidence. The before/after screenshots were captured from the running dev app against a live chat, at a 260px panel, by toggling only this commit in the working tree, so they are the same data and the same width in both shots; that is automated capture, not the manual click-through the checklist asks for. The before/after screenshots above were captured from the running dev app against a live chat, at a 260px panel, by toggling only this commit in the working tree — so they are the same data and the same width in both shots. Still to verify manually before merging: - Manually drag the docked sidebar across the full 240px–max range and confirm entries stay pills throughout, with no width that stacks or overflows. - Manually check the same range in the HUD popover, which portals to `document.body` and owns its own container context. - Manually verify a single very long item name at 240px clips inside the panel and does not push the section wider or trigger horizontal scroll. - Manually check light mode as well as the dark mode shown above. - Manually check add mode, delete mode, and lock mode at 240px — those add a `×N` field, a remove button, and a padlock inside each chip, which is the tightest case. - Manually check the empty-group state at 240px. - Manually check a mobile viewport. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Translated docs on the `docs-i18n` branch updated to match, or a `[docs-i18n]` follow-up issue opened (see CONTRIBUTING.md § Translated documentation) - [ ] Version/release files updated (only if this PR includes a version bump) No user-facing docs describe the narrow-width layout, so nothing under `docs/` looks affected — worth a second opinion from a maintainer, since the Inventory Tracker docs were added recently (#5113). ## UI evidence (if applicable) See the before/after table above. Both shots: 12 entries, 260px panel, dark mode, docked sidebar. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Style** * Updated inventory group chips to consistently wrap in a horizontal layout across all panel widths. * Removed the narrow-panel stacked layout for a more consistent presentation. <!-- 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-23 04:12:37 +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#6671
No description provided.