[GH-ISSUE #6697] [Feature]: Game Mode HUD widgets, layout editor, phone and tablet layouts, and GM table tools #3750

Closed
opened 2026-10-21 06:06:50 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @SirAdoni on GitHub (Sep 26, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/6697

Originally assigned to: @SpicyMarinara on GitHub.

Part of the contribution roadmap in #6624 (Game Mode theme 2 of 3).

What problem does this solve?

  • HUD widgets cover a few shapes of state. Campaigns also track clocks, countdowns, schedules, ledgers, rumors, turn order and the like, and lists stop at a small number of entries.
  • Panels can only be arranged so far. Players want to move, resize, snap, lock and save layouts, and to hide the party bar or Currently Present.
  • Phones and tablets are tight. Widgets, presence and the storyboard compete with narration, landscape phones lose most of the height, and a long turn in the composer can push the layout around.
  • Game masters keep their table tools outside the app: dice history, initiative, prep notes, random tables, names and an in-world calendar.

Proposed solution

These build on Game Mode's existing HUD widgets, [widget:] commands, floating panels, journal and dice tray.

HUD widgets

  • 19 extended widget types (checklist, obligations, schedule, calendar, note, clock, pips, countdown, tug of war, tier track, stages, tags, ledger, log, rumor board, turn order, scoreboard, bars, charges) that reuse the existing [widget:] keys and restore on branches.
  • A Status widget and a Contact Book, widget editors with a live preview, edge tucking, stacks, auto expand per game or per widget, and lists up to 100 entries with a notice when one is evicted.

Layout

  • An Edit layout mode: drag, resize, snap with guides, collisions on or off, undo and redo, keyboard nudging, lock, Tidy, align, and saved layouts reusable across games (stored per device).
  • Show or hide the party bar and Currently Present, per game and per device.
  • Phones: a widget tray, an arrange sheet, a presence strip, a storyboard sheet, and a one-row top bar on landscape phones. Tablets: a readable narration column and 36px controls. Long turns never move narration or panels.
  • Full names wrap instead of being cut off.

GM table tools (a Tools tab in the Session panel)

  • Dice log, initiative tracker, a private prep board (never sent to the model), random tables with a yes/no oracle and starter packs, an offline name generator, an in-world calendar tied to the Game clock, and a campaign log reader.

Scenes and fixes

  • Storyboard improvements, automatic scene media after GM turns, portraits with saved crops, legacy node maps converted to World Maps (originals kept), an in-game features guide.
  • Fixes from a Game UI bug hunt: combat, narration and parser, surface state, sheets, journal, inventory, party, replay (hidden turns stay out of replay and text exports) and maps, plus server guards for bad maps, journal edit conflicts and repeated reputation changes.

How it's switched: Extended HUD widgets, Automatic scene media and Auto expand widgets are per-game switches; with extended widgets off, the widget block the GM sees is upstream's, verbatim. The tools only appear in their own tab, and the calendar is off until a game creates one; without it the GM time line is byte-identical. The layout editor and the phone and tablet layout changes will get a switch before their PR. The fork turns these on; upstream versions default off, and off keeps today's behaviour.

  • Areas touched (for spotting overlap):
    • Client components/game: GameSurface, GameWidgetPanel, floating panels, narration and input, mobile tray and sheets, new tools/ folder, Contact Book, Status widget, storyboards, features guide
    • Client lib and hooks: game panel layout and editor store, floating widget avoidance, short-landscape detection
    • packages/shared/src/utils: HUD widget types and lifecycle, game feature switches, random tables, prep board, calendar, initiative
    • packages/server/src/services/game: GM prompt widget catalog, branch state, automatic media, storyboards, map validation, dice log
    • packages/server/src/routes: game, and new game tools, initiative, prep board, random tables and calendar routes; new small tables for dice rolls and tool data
    • styles/globals.css and a scoped stylesheet for the World Maps package text
  • Size: about 310 files and 55,000 added lines, including regressions. It will be split into several PRs of well under 150 files each (widgets, layout, phones and tablets, tools, bug fixes).
  • Status: implemented and tested in a fork, at phone, tablet and desktop sizes.

Alternatives considered

  • New widget commands for each type: the extended types reuse the existing keys, so the GM contract stays the same.
  • Storing layouts in chat metadata: layouts stay device-local, so a phone and a desktop can differ and chats don't grow.
  • Tools as separate pages: a tab next to Session history keeps them inside the game without taking room from narration.

Additional context

  • The fork also registers commands for these tools in its own palette. Since the command palette is now handled by the Omnibar work, those commands can be offered there instead once it lands.
  • Implementation depends on #6647 (foundations); PRs will follow once it merges, one package at a time.
  • If you're working in any of these areas, please comment so we can coordinate before a PR.

Screenshots

Taken from the fork build with invented demo data (characters, lorebooks and a campaign made up for these shots). Model replies and token counts come from a local test stub, so no real model was called.

Extended HUD widgets: clock, tug of war, checklist, schedule, ledger and rumor board.

Extended HUD widgets

Edit layout mode while dragging a panel: snap guides, handles, undo and redo, lock, and saved layouts.

Edit layout mode while dragging a panel

GM tools, Dice log: session stats, a face distribution against a fair die, and the latest rolls.

GM tools, Dice log

GM tools, the private prep board (never sent to the model).

GM tools, the private prep board (never sent to the model)

Phone, 390x844: the widget tray above narration, and a widget opened as a sheet.

Phone, 390x844

Tablet, 820x1180: readable narration column, widget tray and 36px controls.

Tablet, 820x1180

Template check

  • I DID NOT read this template and provide the requested details.
Originally created by @SirAdoni on GitHub (Sep 26, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/6697 Originally assigned to: @SpicyMarinara on GitHub. <!-- roadmap theme issue 2, draft v1.0 --> Part of the contribution roadmap in #6624 (Game Mode theme 2 of 3). ## What problem does this solve? - **HUD widgets cover a few shapes of state.** Campaigns also track clocks, countdowns, schedules, ledgers, rumors, turn order and the like, and lists stop at a small number of entries. - **Panels can only be arranged so far.** Players want to move, resize, snap, lock and save layouts, and to hide the party bar or Currently Present. - **Phones and tablets are tight.** Widgets, presence and the storyboard compete with narration, landscape phones lose most of the height, and a long turn in the composer can push the layout around. - **Game masters keep their table tools outside the app:** dice history, initiative, prep notes, random tables, names and an in-world calendar. ## Proposed solution These build on Game Mode's existing HUD widgets, `[widget:]` commands, floating panels, journal and dice tray. **HUD widgets** - 19 extended widget types (checklist, obligations, schedule, calendar, note, clock, pips, countdown, tug of war, tier track, stages, tags, ledger, log, rumor board, turn order, scoreboard, bars, charges) that reuse the existing `[widget:]` keys and restore on branches. - A Status widget and a Contact Book, widget editors with a live preview, edge tucking, stacks, auto expand per game or per widget, and lists up to 100 entries with a notice when one is evicted. **Layout** - An Edit layout mode: drag, resize, snap with guides, collisions on or off, undo and redo, keyboard nudging, lock, Tidy, align, and saved layouts reusable across games (stored per device). - Show or hide the party bar and Currently Present, per game and per device. - Phones: a widget tray, an arrange sheet, a presence strip, a storyboard sheet, and a one-row top bar on landscape phones. Tablets: a readable narration column and 36px controls. Long turns never move narration or panels. - Full names wrap instead of being cut off. **GM table tools** (a Tools tab in the Session panel) - Dice log, initiative tracker, a private prep board (never sent to the model), random tables with a yes/no oracle and starter packs, an offline name generator, an in-world calendar tied to the Game clock, and a campaign log reader. **Scenes and fixes** - Storyboard improvements, automatic scene media after GM turns, portraits with saved crops, legacy node maps converted to World Maps (originals kept), an in-game features guide. - Fixes from a Game UI bug hunt: combat, narration and parser, surface state, sheets, journal, inventory, party, replay (hidden turns stay out of replay and text exports) and maps, plus server guards for bad maps, journal edit conflicts and repeated reputation changes. **How it's switched:** **Extended HUD widgets**, **Automatic scene media** and **Auto expand widgets** are per-game switches; with extended widgets off, the widget block the GM sees is upstream's, verbatim. The tools only appear in their own tab, and the calendar is off until a game creates one; without it the GM time line is byte-identical. The layout editor and the phone and tablet layout changes will get a switch before their PR. The fork turns these on; upstream versions default off, and off keeps today's behaviour. - **Areas touched (for spotting overlap):** - Client `components/game`: `GameSurface`, `GameWidgetPanel`, floating panels, narration and input, mobile tray and sheets, new `tools/` folder, Contact Book, Status widget, storyboards, features guide - Client `lib` and `hooks`: game panel layout and editor store, floating widget avoidance, short-landscape detection - `packages/shared/src/utils`: HUD widget types and lifecycle, game feature switches, random tables, prep board, calendar, initiative - `packages/server/src/services/game`: GM prompt widget catalog, branch state, automatic media, storyboards, map validation, dice log - `packages/server/src/routes`: game, and new game tools, initiative, prep board, random tables and calendar routes; new small tables for dice rolls and tool data - `styles/globals.css` and a scoped stylesheet for the World Maps package text - **Size:** about 310 files and 55,000 added lines, including regressions. It will be split into several PRs of well under 150 files each (widgets, layout, phones and tablets, tools, bug fixes). - **Status:** implemented and tested in a fork, at phone, tablet and desktop sizes. ## Alternatives considered - **New widget commands for each type:** the extended types reuse the existing keys, so the GM contract stays the same. - **Storing layouts in chat metadata:** layouts stay device-local, so a phone and a desktop can differ and chats don't grow. - **Tools as separate pages:** a tab next to Session history keeps them inside the game without taking room from narration. ## Additional context - The fork also registers commands for these tools in its own palette. Since the command palette is now handled by the Omnibar work, those commands can be offered there instead once it lands. - Implementation depends on #6647 (foundations); PRs will follow once it merges, one package at a time. - If you're working in any of these areas, please comment so we can coordinate before a PR. ## Screenshots Taken from the fork build with invented demo data (characters, lorebooks and a campaign made up for these shots). Model replies and token counts come from a local test stub, so no real model was called. **Extended HUD widgets: clock, tug of war, checklist, schedule, ledger and rumor board.** ![Extended HUD widgets](https://raw.githubusercontent.com/SirAdoni/Marinara-Engine-contrib/e98c448478676a9b4a6fad4bed1b6c29c046e9a4/roadmap/T2-1-hud-widgets.png) **Edit layout mode while dragging a panel: snap guides, handles, undo and redo, lock, and saved layouts.** ![Edit layout mode while dragging a panel](https://raw.githubusercontent.com/SirAdoni/Marinara-Engine-contrib/e98c448478676a9b4a6fad4bed1b6c29c046e9a4/roadmap/T2-2-edit-layout.png) **GM tools, Dice log: session stats, a face distribution against a fair die, and the latest rolls.** ![GM tools, Dice log](https://raw.githubusercontent.com/SirAdoni/Marinara-Engine-contrib/e98c448478676a9b4a6fad4bed1b6c29c046e9a4/roadmap/T2-3-gm-tools-dice-log.png) **GM tools, the private prep board (never sent to the model).** ![GM tools, the private prep board (never sent to the model)](https://raw.githubusercontent.com/SirAdoni/Marinara-Engine-contrib/e98c448478676a9b4a6fad4bed1b6c29c046e9a4/roadmap/T2-4-gm-tools-prep-board.png) **Phone, 390x844: the widget tray above narration, and a widget opened as a sheet.** ![Phone, 390x844](https://raw.githubusercontent.com/SirAdoni/Marinara-Engine-contrib/e98c448478676a9b4a6fad4bed1b6c29c046e9a4/roadmap/T2-5-phone-390x844.png) **Tablet, 820x1180: readable narration column, widget tray and 36px controls.** ![Tablet, 820x1180](https://raw.githubusercontent.com/SirAdoni/Marinara-Engine-contrib/e98c448478676a9b4a6fad4bed1b6c29c046e9a4/roadmap/T2-6-tablet-820x1180.png) ## Template check - [ ] I DID NOT read this template and provide the requested details.
Author
Owner

@SpicyMarinara commented on GitHub (Sep 26, 2026):

@kolacheee, tagging you since you've been working on Game mode; please check if this doesn't overlap with what you're doing.

<!-- gh-comment-id:5848561193 --> @SpicyMarinara commented on GitHub (Sep 26, 2026): @kolacheee, tagging you since you've been working on Game mode; please check if this doesn't overlap with what you're doing.
Author
Owner

@kolacheee commented on GitHub (Sep 27, 2026):

@SirAdoni, thanks for the detailed write-up. Nothing here blocks what I'm working on (Game Mode rulesets and the ruleset items arc), but a few seams are worth agreeing on before the PRs:

  • Initiative tracker and the turn order widget. A ruleset fight run by the combat director keeps its own turn order, and that order changes during the fight:

    • some rulesets throw initiative again every round;
    • a ruleset whose attacks move initiative (#6741) re-sorts the order every round;
    • a fighter who crashes or is defeated drops out.

    During such a fight the tracker shouldn't keep a second order. It could show the fight's own order and round (the director's session view carries ruleset.order and the round) and refresh after every step, and stay a manual tool outside those fights. The same goes for the turn order widget.

  • Inventory fixes from the bug hunt. The inventory has changed a lot on staging. Stacks now have ids, change by any amount and split (#6762). Next comes a bag per party member (#6772, PR coming shortly): every change goes through one server route, and the Game Master's [inventory:] tags are applied on the server. GameInventory.tsx and every inventory handler in GameSurface.tsx were rewritten, so those fixes will need rebasing on staging, and some will already be covered.

  • Ledger and charges widgets. Later in the arc, the ruleset items plan adds item charges and per-character purses with currencies. There's no code conflict, but in a ruleset game with items it would be good if the Game Master used the engine's inventory for those, and widgets for everything else.

  • Dice log. Engine-resolved rolls include dice pools counted in successes (with exploding and doubled faces) and combat director rolls, not only sums. The log and the fair-die distribution should read those.

  • Bundle budget. Since #6756 a lazy chunk over 500 KiB fails the build, and GameSurface is at about 492 KiB with the bags slice. New widget, layout and phone code in GameSurface will likely need lazy chunks of its own; the inventory screen got one for this reason.

<!-- gh-comment-id:5858416353 --> @kolacheee commented on GitHub (Sep 27, 2026): @SirAdoni, thanks for the detailed write-up. Nothing here blocks what I'm working on (Game Mode rulesets and the ruleset items arc), but a few seams are worth agreeing on before the PRs: - **Initiative tracker and the turn order widget.** A ruleset fight run by the combat director keeps its own turn order, and that order changes during the fight: - some rulesets throw initiative again every round; - a ruleset whose attacks move initiative (#6741) re-sorts the order every round; - a fighter who crashes or is defeated drops out. During such a fight the tracker shouldn't keep a second order. It could show the fight's own order and round (the director's session view carries `ruleset.order` and the round) and refresh after every step, and stay a manual tool outside those fights. The same goes for the turn order widget. - **Inventory fixes from the bug hunt.** The inventory has changed a lot on staging. Stacks now have ids, change by any amount and split (#6762). Next comes a bag per party member (#6772, PR coming shortly): every change goes through one server route, and the Game Master's `[inventory:]` tags are applied on the server. `GameInventory.tsx` and every inventory handler in `GameSurface.tsx` were rewritten, so those fixes will need rebasing on staging, and some will already be covered. - **Ledger and charges widgets.** Later in the arc, the ruleset items plan adds item charges and per-character purses with currencies. There's no code conflict, but in a ruleset game with items it would be good if the Game Master used the engine's inventory for those, and widgets for everything else. - **Dice log.** Engine-resolved rolls include dice pools counted in successes (with exploding and doubled faces) and combat director rolls, not only sums. The log and the fair-die distribution should read those. - **Bundle budget.** Since #6756 a lazy chunk over 500 KiB fails the build, and `GameSurface` is at about 492 KiB with the bags slice. New widget, layout and phone code in `GameSurface` will likely need lazy chunks of its own; the inventory screen got one for this reason.
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#3750
No description provided.