[PR #656] [MERGED] beholder: port the slot editor, locks, Doctor and Help #1074

Closed
opened 2026-10-21 05:02:07 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Agents/pull/656
Author: @GetBeholder
Created: 8/30/2026
Status: ✅ Merged
Merged: 8/30/2026
Merged by: @GetBeholder

Base: staging ← Head: feat/beholder-editor-doctor-help


📝 Commits (6)

  • 1840892 beholder: port the slot editor, locks, Doctor and Help
  • 22a8066 beholder: make locks enforce, not just mark
  • 2a67bee test(beholder): cover attribution when several characters are tracked
  • d9f0da1 beholder: make the panel usable before the first extraction
  • 697e55a beholder: review fixes for the editor, locks and views
  • f1f6472 beholder: do not reopen Prompt over what the operator chose

📊 Changes

13 files changed (+2077 additions, -18 deletions)

View changed files

📝 artifacts/beholder-1.3.6.zip (+0 -0)
📝 catalog/catalog.json (+4 -4)
📝 catalog/v2/catalog.json (+4 -4)
📝 catalog/v3/catalog.json (+4 -4)
📝 eslint.config.mjs (+2 -0)
📝 packages/beholder/client.js (+758 -3)
📝 packages/beholder/manifest.json (+2 -2)
➕ packages/beholder/src/40-ui.js (+180 -0)
➕ packages/beholder/src/50-editor.js (+273 -0)
➕ packages/beholder/src/60-views.js (+275 -0)
📝 packages/beholder/src/80-dock.js (+22 -1)
📝 packages/beholder/src/style.css (+70 -0)
➕ tests/beholder-ui.e2e.mjs (+483 -0)

📄 Description

Pull request

Linked issue

Closes #657

Why this change

The package shipped the paper doll and nothing to do with it. Clicking a slot did nothing, and there was no Doctor and no Help — only the renderer had been carried over from the reference extension, not the chrome around it.

What changed

Ported, with markup and class names intact so the existing stylesheet dresses it as it dresses the extension:

  • Slot editor — click a slot card to correct worn items, the held item, wounds, and the bare/missing flags. Apply writes through the agent's state endpoint, which is the record the next prompt is built from, so a correction carries forward rather than being narrated away on the following turn.
  • Locks — per chat and slot, marked on the card, re-applied after every render because the panel body is rebuilt wholesale.
  • Doctor — the last extraction end to end: when it ran, which message it read, how much it found, which prompt set was in use, and the state as stored.
  • Help — the legend for the doll, what the layer toggles do, how editing works, and how to write prose it reads well.

Model management is deliberately not ported, and prompt management replaces it. There is no engine to download here — extraction runs server-side through the operator's own connection. What matters instead is which prompt set is in use: the trained model was taught five short per-lane prompts, a general model needs the single long one, and giving either the other's prompt degrades it badly. The Prompt view states which set is active, switches it, persists the choice to the chat, and warns when the selection does not match the model the agent connection points at.

Package and security impact

  • Affected package IDs: beholder
  • Engine compatibility impact: depends on Pasta-Devs/Marinara-Engine#5677, which adds the write half of the state endpoint. Without it the editor cannot save — the existing run-patch route cannot reach a package agent's runs.
  • New or changed permissions/entrypoints: none — same ui permission, same client entrypoint
  • Restart, storage, update, or uninstall impact: none new. Locks are per-chat in localStorage; edits go to the same record the agent already writes.

Validation

  • node scripts/validate-catalog.mjs passes
  • git diff --check passes
  • Rebuilt manifest, payload, artifact and catalog entry
  • Installed the package through Marinara Engine (isolated instance, own DATA_DIR) and drove the UI
  • Checked uninstall cleanup
  • Read and followed CONTRIBUTING.md

Manual verification notes

tests/beholder-ui.e2e.mjs drives every control against a running Engine and asserts behaviour rather than pixels, so it survives restyling: the toolbar toggle, the panel and doll, each header view opening and closing, the Doctor actually reporting stored state, the prompt view offering both sets and persisting the choice to the chat, opening the editor from a slot, adding and removing rows, the missing-mode grey-out, Apply persisting into the stored state and appearing in the panel, locks surviving a re-render, all three layer toggles, front/back, the layout switcher, and the close button releasing the chat reflow.

29 checks, all passing. It earned its keep on the way — it caught the apply path failing outright, a stale package still installed in the test rig, and a retheme rule this change had broken by reintroducing the old accent colour.

It is parameterised by BEHOLDER_UI_BASE and BEHOLDER_UI_CHAT so it can be pointed at any instance with the package installed.

Documentation impact

  • No documentation changes needed

UI evidence (if applicable)

Editor open on the chest slot, showing the worn row with item/damage/colour, add-worn, wounds, and the flags with their consequences spelled out; the three new header buttons (Prompt / Doctor / Help) sit beside the existing pop-out and close.

Summary by CodeRabbit

  • New Features
    • Added character slot editing for held items, wounds, damage, bleeding, and missing or bare states.
    • Added slot locking with automatic restoration of locked values.
    • Added Prompt, Doctor, and Help views for configuration, diagnostics, and guidance.
    • Added improved navigation, overlays, notifications, and visual indicators for locked or missing slots.
  • Quality Improvements
    • Expanded end-to-end coverage for editing, navigation, persistence, layouts, and error handling.
  • Chores
    • Updated package metadata for the latest build artifacts.

🔄 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-Agents/pull/656 **Author:** [@GetBeholder](https://github.com/GetBeholder) **Created:** 8/30/2026 **Status:** ✅ Merged **Merged:** 8/30/2026 **Merged by:** [@GetBeholder](https://github.com/GetBeholder) **Base:** `staging` ← **Head:** `feat/beholder-editor-doctor-help` --- ### 📝 Commits (6) - [`1840892`](https://github.com/Pasta-Devs/Marinara-Agents/commit/18408923e0fd7d988ed3fa0f7116d561877b8064) beholder: port the slot editor, locks, Doctor and Help - [`22a8066`](https://github.com/Pasta-Devs/Marinara-Agents/commit/22a80669fde0aec41c11473f53e08b6f55e51650) beholder: make locks enforce, not just mark - [`2a67bee`](https://github.com/Pasta-Devs/Marinara-Agents/commit/2a67bee49079d27509a4ea6589fa39520367ec8a) test(beholder): cover attribution when several characters are tracked - [`d9f0da1`](https://github.com/Pasta-Devs/Marinara-Agents/commit/d9f0da1fc8f2abd8b4be8cb45f6d3bf9c769060c) beholder: make the panel usable before the first extraction - [`697e55a`](https://github.com/Pasta-Devs/Marinara-Agents/commit/697e55a8a809da7a313644c6b72d02e34a974dae) beholder: review fixes for the editor, locks and views - [`f1f6472`](https://github.com/Pasta-Devs/Marinara-Agents/commit/f1f6472971b9e6588e838ac9542d4ed7eb0e35ff) beholder: do not reopen Prompt over what the operator chose ### 📊 Changes **13 files changed** (+2077 additions, -18 deletions) <details> <summary>View changed files</summary> 📝 `artifacts/beholder-1.3.6.zip` (+0 -0) 📝 `catalog/catalog.json` (+4 -4) 📝 `catalog/v2/catalog.json` (+4 -4) 📝 `catalog/v3/catalog.json` (+4 -4) 📝 `eslint.config.mjs` (+2 -0) 📝 `packages/beholder/client.js` (+758 -3) 📝 `packages/beholder/manifest.json` (+2 -2) ➕ `packages/beholder/src/40-ui.js` (+180 -0) ➕ `packages/beholder/src/50-editor.js` (+273 -0) ➕ `packages/beholder/src/60-views.js` (+275 -0) 📝 `packages/beholder/src/80-dock.js` (+22 -1) 📝 `packages/beholder/src/style.css` (+70 -0) ➕ `tests/beholder-ui.e2e.mjs` (+483 -0) </details> ### 📄 Description # Pull request ## Linked issue Closes #657 ## Why this change The package shipped the paper doll and nothing to do with it. Clicking a slot did nothing, and there was no Doctor and no Help — only the renderer had been carried over from the reference extension, not the chrome around it. ## What changed Ported, with markup and class names intact so the existing stylesheet dresses it as it dresses the extension: - **Slot editor** — click a slot card to correct worn items, the held item, wounds, and the `bare`/`missing` flags. Apply writes through the agent's state endpoint, which is the record the next prompt is built from, so a correction carries forward rather than being narrated away on the following turn. - **Locks** — per chat and slot, marked on the card, re-applied after every render because the panel body is rebuilt wholesale. - **Doctor** — the last extraction end to end: when it ran, which message it read, how much it found, which prompt set was in use, and the state as stored. - **Help** — the legend for the doll, what the layer toggles do, how editing works, and how to write prose it reads well. **Model management is deliberately not ported, and prompt management replaces it.** There is no engine to download here — extraction runs server-side through the operator's own connection. What matters instead is which prompt set is in use: the trained model was taught five short per-lane prompts, a general model needs the single long one, and giving either the other's prompt degrades it badly. The Prompt view states which set is active, switches it, persists the choice to the chat, and warns when the selection does not match the model the agent connection points at. ## Package and security impact - Affected package IDs: `beholder` - Engine compatibility impact: **depends on Pasta-Devs/Marinara-Engine#5677**, which adds the write half of the state endpoint. Without it the editor cannot save — the existing run-patch route cannot reach a package agent's runs. - New or changed permissions/entrypoints: none — same `ui` permission, same client entrypoint - Restart, storage, update, or uninstall impact: none new. Locks are per-chat in `localStorage`; edits go to the same record the agent already writes. ## Validation - [x] `node scripts/validate-catalog.mjs` passes - [x] `git diff --check` passes - [x] Rebuilt manifest, payload, artifact and catalog entry - [x] Installed the package through Marinara Engine (isolated instance, own DATA_DIR) and drove the UI - [ ] Checked uninstall cleanup - [x] Read and followed `CONTRIBUTING.md` ### Manual verification notes `tests/beholder-ui.e2e.mjs` drives every control against a running Engine and asserts behaviour rather than pixels, so it survives restyling: the toolbar toggle, the panel and doll, each header view opening and closing, the Doctor actually reporting stored state, the prompt view offering both sets and persisting the choice to the chat, opening the editor from a slot, adding and removing rows, the missing-mode grey-out, Apply persisting into the stored state *and* appearing in the panel, locks surviving a re-render, all three layer toggles, front/back, the layout switcher, and the close button releasing the chat reflow. **29 checks, all passing.** It earned its keep on the way — it caught the apply path failing outright, a stale package still installed in the test rig, and a retheme rule this change had broken by reintroducing the old accent colour. It is parameterised by `BEHOLDER_UI_BASE` and `BEHOLDER_UI_CHAT` so it can be pointed at any instance with the package installed. ## Documentation impact - [x] No documentation changes needed ## UI evidence (if applicable) Editor open on the chest slot, showing the worn row with item/damage/colour, add-worn, wounds, and the flags with their consequences spelled out; the three new header buttons (Prompt / Doctor / Help) sit beside the existing pop-out and close. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added character slot editing for held items, wounds, damage, bleeding, and missing or bare states. * Added slot locking with automatic restoration of locked values. * Added Prompt, Doctor, and Help views for configuration, diagnostics, and guidance. * Added improved navigation, overlays, notifications, and visual indicators for locked or missing slots. * **Quality Improvements** * Expanded end-to-end coverage for editing, navigation, persistence, layouts, and error handling. * **Chores** * Updated package metadata for the latest build artifacts. <!-- 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-21 05:02:07 +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-Agents#1074
No description provided.