[PR #7340] [MERGED] feat(trackers): show World State as a banner when its window is minimized #7691

Closed
opened 2026-10-24 04:06:35 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/7340
Author: @SpicyMarinara
Created: 10/9/2026
Status: ✅ Merged
Merged: 10/9/2026
Merged by: @SpicyMarinara

Base: staging ← Head: feat/7320-minimized-agent-hover


📝 Commits (10+)

  • c9f9ce3 feat(trackers): show World State as a banner when its window is minimized
  • 46c1b4a Merge origin/staging into feat/7320-minimized-agent-hover
  • 57c6885 style(trackers): draw a round-shape World State banner as a pill
  • 5b93b54 fix(trackers): let screen readers hear the World State banner's values
  • 7e82196 Merge origin/feat/7320-minimized-agent-hover (staging sync) into local branch
  • 31ff133 Merge origin/staging into feat/7320-minimized-agent-hover
  • 381567a fix(trackers): keep a phone World State banner in its row of buttons
  • da60467 Merge origin/feat/7320-minimized-agent-hover (staging sync) into local branch
  • 7c7537c Merge origin/staging into feat/7320-minimized-agent-hover
  • a46b148 Move the CHANGELOG entry away from other open PRs

📊 Changes

14 files changed (+295 additions, -43 deletions)

View changed files

📝 CHANGELOG.md (+1 -0)
📝 docs/appearance/custom-css-themes.md (+2 -1)
📝 docs/roleplay/hud-and-trackers.md (+3 -1)
📝 e2e/drawer-popout.e2e.ts (+69 -0)
📝 e2e/phone-bubbles.e2e.ts (+3 -0)
📝 packages/client/src/components/chat/RoleplayHUD.tsx (+20 -5)
📝 packages/client/src/components/chat/RoleplayTrackerWindow.tsx (+7 -1)
📝 packages/client/src/components/ui/Drawer.tsx (+9 -2)
📝 packages/client/src/components/ui/FloatingWindow.tsx (+5 -1)
📝 packages/client/src/components/ui/WindowBubble.tsx (+49 -14)
📝 packages/client/src/lib/floating-window-layout.ts (+35 -17)
📝 packages/client/src/styles/globals.css (+17 -1)
📝 packages/client/src/styles/themes/chat-widgets.css (+6 -0)
📝 scripts/regressions/floating-window.regression.ts (+69 -0)

📄 Description

Important

Contributions target staging. Only SpicyMarinara may promote this repository's staging branch or a same-repository hotfix/* branch to main.
Outside and first-time contributors also require an approving review from SpicyMarinara.

Linked issue

Closes #7320

Why this change

  • Before the 2.5.0 chat window redesign (#7049), World State could sit at the top of the chat as a small banner: a location pin, a calendar with the day, a little clock, the weather and the temperature. Players used it to keep the in-world date and time in view while they wrote.
  • After the redesign a World State window could only shrink to a bare map-pin button, so that at-a-glance view was gone and there was no setting to bring it back.
  • Marinara's direction in the issue: allow it when you minimize the window of a specific agent. This PR does that for World State.

What changed

  • Computer: pop World State out of the Trackers window and close it (X, Escape or a click elsewhere while unpinned). Its button becomes the old World State banner instead of the bare pin. Clicking it reopens the window where it was left. It drags, snaps, locks and saves its place per chat like every other bubble.
  • Phone: the World State button shows the same banner once there is world state to show. Tapping it opens the World State sheet as before.
  • The banner reuses the existing WorldStateMiniature (the same icon strip as the old toolbar widget and the collapsed drawer preview). No new colours were added. For screen readers the button keeps its name ("Open World State") and the banner's values (place, date, time, weather, temperature) become its description.
  • WindowBubble / FloatingWindow / Drawer take an optional banner; the bubble renders it in .mari-window-bubble__banner with data-banner="true" and grows as wide as it needs (globals.css, themeable like every bubble).
  • Bubble layout math assumed squares, so a wide banner could cover its neighbours. clampWindowBubble, dropWindowBubble and placeWindowBubbles now accept a width and height (a plain number still means a square, so every other caller is unchanged). A banner measures its real size and counts as movable in placement, so when it grows into another button it is the banner that moves aside.
  • Scope: World State only. The other tracker previews are square tiles (bars, a count, scrolling text) that would need their own styling to work as banners; they keep their icons.
  • With the Mari preset or the Arched shape (50% bubble radius), a banner is drawn as a pill instead of an oval, unless a theme sets its own bubble radius (chat-widgets.css).
  • Docs: docs/roleplay/hud-and-trackers.md (banner on both devices) and docs/appearance/custom-css-themes.md (.mari-window-bubble__banner, data-banner). Translations are tracked in #7341.
  • CHANGELOG entry under [Unreleased].

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

  • Manually verify on a computer: in a Roleplay chat with World State on and the Tracker Panel off, open Trackers, pop World State out, close it, and check the button shows the pin, calendar day, clock, weather and thermometer.
  • Manually verify the banner drags anywhere (for example the top middle of the chat), never lands on another button, and stays put after a page reload.
  • Manually verify clicking the banner reopens the World State window where you left it, and Put back in Trackers still returns it.
  • Manually verify a chat with no world state yet: the minimized World State window shows the plain pin button, then turns into the banner once the tracker fills in.
  • Manually verify on a phone viewport: the World State button shows the banner, sits clear of the other buttons, and tapping it opens the World State sheet.
  • Manually verify in light and dark mode and with a few Chat widget style presets/shapes (Mari, Dottore, cut corners, a custom button size) that the banner keeps the bubble look.

Agent-run checks: pnpm check passed. node ./scripts/run-regressions.mjs --filter scripts/regressions/floating-window.regression.ts passed (new banner assertions; confirmed failing without the layout change), plus the open-issues, tracker-gallery-ui and chat-window-icons regressions. Playwright desktop-chromium: drawer-popout.e2e.ts (including the new banner test), tracker-window.e2e.ts and chat-widget-style.e2e.ts passed (23 passed, 1 skipped). Playwright mobile-chromium: phone-bubbles.e2e.ts and world-tracker-controls.e2e.ts passed (16 passed), including the existing phone World State test, which now shows the banner. Not run: mobile-webkit, the full e2e suite. pnpm check was rerun after the last commit and passed.

Local CodeRabbit: first run gave 1 finding (the banner's values were not available to screen readers), fixed in 5b93b54a8. The rerun after that fix hit the CodeRabbit rate limit, so it has not been reviewed locally since.

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)

UI evidence (if applicable)

  • The new desktop e2e test saves world-state-banner.png in its Playwright output. Local screenshots (default dark, Mari light, Dottore dark, on phone and computer) show the banner with the pin, calendar day, clock, weather and temperature in the bubble's theme. On phones it settles in the row below the Player and Chat Settings buttons. On a computer it first sits just below the Chat Settings button.

🔄 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/7340 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 10/9/2026 **Status:** ✅ Merged **Merged:** 10/9/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `feat/7320-minimized-agent-hover` --- ### 📝 Commits (10+) - [`c9f9ce3`](https://github.com/Pasta-Devs/Marinara-Engine/commit/c9f9ce3df5c40e9a666b8982437cf21a1e7824b9) feat(trackers): show World State as a banner when its window is minimized - [`46c1b4a`](https://github.com/Pasta-Devs/Marinara-Engine/commit/46c1b4a98943fdb2179072fdb4aa8e6adeeaa6ce) Merge origin/staging into feat/7320-minimized-agent-hover - [`57c6885`](https://github.com/Pasta-Devs/Marinara-Engine/commit/57c688542399aea921a036b4ab5d5ae45faa92f6) style(trackers): draw a round-shape World State banner as a pill - [`5b93b54`](https://github.com/Pasta-Devs/Marinara-Engine/commit/5b93b54a8a622ae6e9789eeedd682d41f08f6922) fix(trackers): let screen readers hear the World State banner's values - [`7e82196`](https://github.com/Pasta-Devs/Marinara-Engine/commit/7e82196b397b9b3575aa866a041bdbee1814b937) Merge origin/feat/7320-minimized-agent-hover (staging sync) into local branch - [`31ff133`](https://github.com/Pasta-Devs/Marinara-Engine/commit/31ff133722b912d88ef3fdca184f9d883da76cd2) Merge origin/staging into feat/7320-minimized-agent-hover - [`381567a`](https://github.com/Pasta-Devs/Marinara-Engine/commit/381567a2b0676abafff605282ab4d51705b46392) fix(trackers): keep a phone World State banner in its row of buttons - [`da60467`](https://github.com/Pasta-Devs/Marinara-Engine/commit/da60467af8c876356d7d0ae6a8f0e7c72714279a) Merge origin/feat/7320-minimized-agent-hover (staging sync) into local branch - [`7c7537c`](https://github.com/Pasta-Devs/Marinara-Engine/commit/7c7537c539ce55ed7e1c70aa547780f306d49aeb) Merge origin/staging into feat/7320-minimized-agent-hover - [`a46b148`](https://github.com/Pasta-Devs/Marinara-Engine/commit/a46b148479454a57994668082a0450323101e40b) Move the CHANGELOG entry away from other open PRs ### 📊 Changes **14 files changed** (+295 additions, -43 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+1 -0) 📝 `docs/appearance/custom-css-themes.md` (+2 -1) 📝 `docs/roleplay/hud-and-trackers.md` (+3 -1) 📝 `e2e/drawer-popout.e2e.ts` (+69 -0) 📝 `e2e/phone-bubbles.e2e.ts` (+3 -0) 📝 `packages/client/src/components/chat/RoleplayHUD.tsx` (+20 -5) 📝 `packages/client/src/components/chat/RoleplayTrackerWindow.tsx` (+7 -1) 📝 `packages/client/src/components/ui/Drawer.tsx` (+9 -2) 📝 `packages/client/src/components/ui/FloatingWindow.tsx` (+5 -1) 📝 `packages/client/src/components/ui/WindowBubble.tsx` (+49 -14) 📝 `packages/client/src/lib/floating-window-layout.ts` (+35 -17) 📝 `packages/client/src/styles/globals.css` (+17 -1) 📝 `packages/client/src/styles/themes/chat-widgets.css` (+6 -0) 📝 `scripts/regressions/floating-window.regression.ts` (+69 -0) </details> ### 📄 Description > [!IMPORTANT] > Contributions target `staging`. Only `SpicyMarinara` may promote this repository's `staging` branch or a same-repository `hotfix/*` branch to `main`. > Outside and first-time contributors also require an approving review from `SpicyMarinara`. <!-- See CONTRIBUTING.md § Branches. --> ## Linked issue Closes #7320 ## Why this change - Before the 2.5.0 chat window redesign (#7049), World State could sit at the top of the chat as a small banner: a location pin, a calendar with the day, a little clock, the weather and the temperature. Players used it to keep the in-world date and time in view while they wrote. - After the redesign a World State window could only shrink to a bare map-pin button, so that at-a-glance view was gone and there was no setting to bring it back. - Marinara's direction in the issue: allow it when you minimize the window of a specific agent. This PR does that for World State. ## What changed - **Computer:** pop World State out of the Trackers window and close it (X, Escape or a click elsewhere while unpinned). Its button becomes the old World State banner instead of the bare pin. Clicking it reopens the window where it was left. It drags, snaps, locks and saves its place per chat like every other bubble. - **Phone:** the World State button shows the same banner once there is world state to show. Tapping it opens the World State sheet as before. - The banner reuses the existing `WorldStateMiniature` (the same icon strip as the old toolbar widget and the collapsed drawer preview). No new colours were added. For screen readers the button keeps its name ("Open World State") and the banner's values (place, date, time, weather, temperature) become its description. - `WindowBubble` / `FloatingWindow` / `Drawer` take an optional `banner`; the bubble renders it in `.mari-window-bubble__banner` with `data-banner="true"` and grows as wide as it needs (`globals.css`, themeable like every bubble). - Bubble layout math assumed squares, so a wide banner could cover its neighbours. `clampWindowBubble`, `dropWindowBubble` and `placeWindowBubbles` now accept a width and height (a plain number still means a square, so every other caller is unchanged). A banner measures its real size and counts as movable in placement, so when it grows into another button it is the banner that moves aside. - Scope: World State only. The other tracker previews are square tiles (bars, a count, scrolling text) that would need their own styling to work as banners; they keep their icons. - With the Mari preset or the Arched shape (50% bubble radius), a banner is drawn as a pill instead of an oval, unless a theme sets its own bubble radius (`chat-widgets.css`). - Docs: `docs/roleplay/hud-and-trackers.md` (banner on both devices) and `docs/appearance/custom-css-themes.md` (`.mari-window-bubble__banner`, `data-banner`). Translations are tracked in #7341. - CHANGELOG entry under `[Unreleased]`. ## 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 - Manually verify on a computer: in a Roleplay chat with World State on and the Tracker Panel off, open Trackers, pop World State out, close it, and check the button shows the pin, calendar day, clock, weather and thermometer. - Manually verify the banner drags anywhere (for example the top middle of the chat), never lands on another button, and stays put after a page reload. - Manually verify clicking the banner reopens the World State window where you left it, and **Put back in Trackers** still returns it. - Manually verify a chat with no world state yet: the minimized World State window shows the plain pin button, then turns into the banner once the tracker fills in. - Manually verify on a phone viewport: the World State button shows the banner, sits clear of the other buttons, and tapping it opens the World State sheet. - Manually verify in light and dark mode and with a few **Chat widget style** presets/shapes (Mari, Dottore, cut corners, a custom button size) that the banner keeps the bubble look. **Agent-run checks:** `pnpm check` passed. `node ./scripts/run-regressions.mjs --filter scripts/regressions/floating-window.regression.ts` passed (new banner assertions; confirmed failing without the layout change), plus the `open-issues`, `tracker-gallery-ui` and `chat-window-icons` regressions. Playwright desktop-chromium: `drawer-popout.e2e.ts` (including the new banner test), `tracker-window.e2e.ts` and `chat-widget-style.e2e.ts` passed (23 passed, 1 skipped). Playwright mobile-chromium: `phone-bubbles.e2e.ts` and `world-tracker-controls.e2e.ts` passed (16 passed), including the existing phone World State test, which now shows the banner. Not run: mobile-webkit, the full e2e suite. `pnpm check` was rerun after the last commit and passed. **Local CodeRabbit:** first run gave 1 finding (the banner's values were not available to screen readers), fixed in 5b93b54a8. The rerun after that fix hit the CodeRabbit rate limit, so it has not been reviewed locally since. ## 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) ## UI evidence (if applicable) - The new desktop e2e test saves `world-state-banner.png` in its Playwright output. Local screenshots (default dark, Mari light, Dottore dark, on phone and computer) show the banner with the pin, calendar day, clock, weather and temperature in the bubble's theme. On phones it settles in the row below the Player and Chat Settings buttons. On a computer it first sits just below the Chat Settings button. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-24 04:06:35 +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#7691
No description provided.