[PR #7780] [MERGED] feat(state-editor): open it from the Trackers window and every popped-out tracker #7924

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/7780
Author: @ylli-selmani
Created: 10/18/2026
Status: ✅ Merged
Merged: 10/18/2026
Merged by: @ylli-selmani

Base: staging ← Head: feat/state-editor-tracker-entries


📝 Commits (2)

  • 940aed3 feat(state-editor): reachable from the Trackers window and every detached tracker
  • 69feb2c docs(roleplay): say where the State Editor's {} button now lives

📊 Changes

8 files changed (+129 additions, -5 deletions)

View changed files

📝 docs/roleplay/hud-and-trackers.md (+1 -1)
📝 packages/client/src/components/chat/RoleplayTrackerWindow.tsx (+26 -0)
📝 packages/client/src/components/layout/ModalRenderer.tsx (+8 -1)
📝 packages/client/src/components/modals/GameStateEditorModal.tsx (+4 -1)
📝 packages/client/src/components/ui/Drawer.tsx (+8 -0)
📝 packages/client/src/components/ui/state-editor/StateEditor.tsx (+13 -2)
➕ packages/client/src/features/tracker-panel/components/TrackerStateEditorButton.tsx (+35 -0)
📝 scripts/regressions/state-editor.regression.ts (+34 -0)

📄 Description

Linked issue

No issue — small QoL on maintainer request.

Why this change

The State Editor was only reachable from the docked Tracker Panel (gear → { }), which is not the default surface any more. The default is the merged Trackers window, and from there any tracker can be popped out into a window of its own. On both of those surfaces there was no way to the editor, so fixing one value meant closing the popped-out tracker, finding the docked panel, opening its settings and clicking { } there — or going through Agent Suite.

The ask was simply: put that button in the merged tracker panel and in every detached tracker.

What changed

  • The { } control (Open in State Editor) now sits in the title bar of the Trackers window and of every tracker popped out into its own window: World State, Persona Stats, Present Characters, Quests, Inventory, Custom Tracker Fields. It is the first control there, before pin/lock/put-back/close.
  • It opens the editor on the section that window shows, so you land where you were reading instead of on Scene: Present Characters → Present Characters, World State → Scene, Persona Stats → Persona Stats, Inventory → Inventory Tracker, Custom Tracker Fields → Custom Tracker Fields, Quests → Active Quests. The Trackers window's own button opens on Scene.
  • StateEditor takes an optional initialSectionId; game-state-editor accepts the same through its modal props.
  • Drawer gains detachedHeaderControls, for controls that belong to the popped-out window's title bar only. The docked drawer header is unchanged, and the package drawers and Agent Activity (not game state) get no button.
  • No new localization strings: the control reuses Open in State Editor and the existing game-state-editor modal.
  • Docs: docs/roleplay/hud-and-trackers.md § The State Editor now says where the button also lives and that it opens on the tracker's own section.
  • Regression: state-editor.regression.ts reads each <TrackerDrawer> block and pins its id to its section, exactly once (a swap between two drawers fails, not just a missing one), and checks those ids against GAME_STATE_EDITOR_SECTION_IDS.

Not included: the phone-only tracker windows (Player & Tracker, the mobile World State window). They are separate surfaces without window title bars; a follow-up could add the same entry point there if it is wanted.

Validation

Leave pnpm check and the rest for you to confirm; run locally:

  • pnpm check — passed, exit 0 (only the pre-existing HomeProfessorMariChat exhaustive-deps warning).
  • pnpm --filter @marinara-engine/client lint and tsc -p packages/client/tsconfig.json --noEmit — passed.
  • node scripts/run-regressions.mjs --filter state-editor — passed; the new guard was also checked negatively (swapping world-state/persona-stats in the source makes it fail).
  • node scripts/run-regressions.mjs --filter open-issues — passed.

Manual verification notes

Ran a seeded roleplay chat (world state, two present characters, persona stats, a quest, an inventory) on a local dev server, then clicked through the surfaces the request named:

  • Trackers window: title bar reads { }, then pin, lock, close. Clicking { } opens the editor on Scene.
  • Popped-out Present Characters: same control first in its title bar, then pin, lock, put back in Trackers, close. Clicking it opens the editor already on Present Characters, showing the two characters' mood, stats, outfit and thoughts.
  • Popped-out World State: clicking its { } opens the editor on Scene (date, time, location, weather, temperature).

Please verify in the browser yourself:

  • The other four trackers' buttons (Persona Stats, Quests, Inventory, Custom Tracker Fields) open on their own section — only World State and Present Characters were clicked through here.
  • Light / SillyTavern theme, and a narrow window: the control picks up the window button styling, so it should follow the theme, but that was not looked at.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README) 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)

The follow-up for the translated packs is #7779.

UI evidence (if applicable)

The { } control in the Trackers window title bar, and in the Present Characters window popped out of it:

Trackers window and a popped-out tracker both carry the State Editor button

Opened from that Present Characters window, the editor starts on Present Characters instead of Scene:

State Editor opened on Present Characters


🔄 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/7780 **Author:** [@ylli-selmani](https://github.com/ylli-selmani) **Created:** 10/18/2026 **Status:** ✅ Merged **Merged:** 10/18/2026 **Merged by:** [@ylli-selmani](https://github.com/ylli-selmani) **Base:** `staging` ← **Head:** `feat/state-editor-tracker-entries` --- ### 📝 Commits (2) - [`940aed3`](https://github.com/Pasta-Devs/Marinara-Engine/commit/940aed3e6c9cf5ef68621a6e8c62607f502598ba) feat(state-editor): reachable from the Trackers window and every detached tracker - [`69feb2c`](https://github.com/Pasta-Devs/Marinara-Engine/commit/69feb2cc995fc532de946b2e0779fa8e3a6014b1) docs(roleplay): say where the State Editor's {} button now lives ### 📊 Changes **8 files changed** (+129 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `docs/roleplay/hud-and-trackers.md` (+1 -1) 📝 `packages/client/src/components/chat/RoleplayTrackerWindow.tsx` (+26 -0) 📝 `packages/client/src/components/layout/ModalRenderer.tsx` (+8 -1) 📝 `packages/client/src/components/modals/GameStateEditorModal.tsx` (+4 -1) 📝 `packages/client/src/components/ui/Drawer.tsx` (+8 -0) 📝 `packages/client/src/components/ui/state-editor/StateEditor.tsx` (+13 -2) ➕ `packages/client/src/features/tracker-panel/components/TrackerStateEditorButton.tsx` (+35 -0) 📝 `scripts/regressions/state-editor.regression.ts` (+34 -0) </details> ### 📄 Description ## Linked issue No issue — small QoL on maintainer request. ## Why this change The State Editor was only reachable from the **docked** Tracker Panel (gear → **{ }**), which is not the default surface any more. The default is the merged **Trackers** window, and from there any tracker can be popped out into a window of its own. On both of those surfaces there was no way to the editor, so fixing one value meant closing the popped-out tracker, finding the docked panel, opening its settings and clicking **{ }** there — or going through **Agent Suite**. The ask was simply: put that button in the merged tracker panel and in every detached tracker. ## What changed - The **{ }** control (**Open in State Editor**) now sits in the title bar of the **Trackers** window and of every tracker popped out into its own window: World State, Persona Stats, Present Characters, Quests, Inventory, Custom Tracker Fields. It is the first control there, before pin/lock/put-back/close. - It opens the editor **on the section that window shows**, so you land where you were reading instead of on Scene: Present Characters → Present Characters, World State → Scene, Persona Stats → Persona Stats, Inventory → Inventory Tracker, Custom Tracker Fields → Custom Tracker Fields, Quests → Active Quests. The **Trackers** window's own button opens on Scene. - `StateEditor` takes an optional `initialSectionId`; `game-state-editor` accepts the same through its modal props. - `Drawer` gains `detachedHeaderControls`, for controls that belong to the popped-out window's title bar only. The docked drawer header is unchanged, and the package drawers and Agent Activity (not game state) get no button. - No new localization strings: the control reuses **Open in State Editor** and the existing `game-state-editor` modal. - Docs: `docs/roleplay/hud-and-trackers.md` § The State Editor now says where the button also lives and that it opens on the tracker's own section. - Regression: `state-editor.regression.ts` reads each `<TrackerDrawer>` block and pins its id to its section, exactly once (a swap between two drawers fails, not just a missing one), and checks those ids against `GAME_STATE_EDITOR_SECTION_IDS`. Not included: the phone-only tracker windows (**Player & Tracker**, the mobile World State window). They are separate surfaces without window title bars; a follow-up could add the same entry point there if it is wanted. ## Validation Leave `pnpm check` and the rest for you to confirm; run locally: - `pnpm check` — passed, exit 0 (only the pre-existing `HomeProfessorMariChat` exhaustive-deps warning). - `pnpm --filter @marinara-engine/client lint` and `tsc -p packages/client/tsconfig.json --noEmit` — passed. - `node scripts/run-regressions.mjs --filter state-editor` — passed; the new guard was also checked negatively (swapping `world-state`/`persona-stats` in the source makes it fail). - `node scripts/run-regressions.mjs --filter open-issues` — passed. ### Manual verification notes Ran a seeded roleplay chat (world state, two present characters, persona stats, a quest, an inventory) on a local dev server, then clicked through the surfaces the request named: - **Trackers window**: title bar reads `{ }`, then pin, lock, close. Clicking `{ }` opens the editor on **Scene**. - **Popped-out Present Characters**: same control first in its title bar, then pin, lock, put back in Trackers, close. Clicking it opens the editor already on **Present Characters**, showing the two characters' mood, stats, outfit and thoughts. - **Popped-out World State**: clicking its `{ }` opens the editor on **Scene** (date, time, location, weather, temperature). Please verify in the browser yourself: - The other four trackers' buttons (Persona Stats, Quests, Inventory, Custom Tracker Fields) open on their own section — only World State and Present Characters were clicked through here. - Light / SillyTavern theme, and a narrow window: the control picks up the window button styling, so it should follow the theme, but that was not looked at. ## Docs and release impact - [ ] No docs changes needed - [x] Updated docs (README / CONTRIBUTING / android/README) as needed - [x] 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) The follow-up for the translated packs is #7779. ## UI evidence (if applicable) The `{ }` control in the Trackers window title bar, and in the Present Characters window popped out of it: ![Trackers window and a popped-out tracker both carry the State Editor button](https://raw.githubusercontent.com/ylli-selmani/Marinara-Engine-Ylli-Edits/pr-assets/pr-assets/state-editor-entries-01-windows.png) Opened from that Present Characters window, the editor starts on Present Characters instead of Scene: ![State Editor opened on Present Characters](https://raw.githubusercontent.com/ylli-selmani/Marinara-Engine-Ylli-Edits/pr-assets/pr-assets/state-editor-entries-02-present-characters.png) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-24 04:08:53 +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#7924
No description provided.