mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #3254] docs: docs/FRONTEND.md is out of date - stale hooks, store count, modal/endpoint tables, missing Game Mode #1751
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#1751
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @kolacheee on GitHub (Jul 5, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/3254
Originally assigned to: @SpicyMarinara on GitHub.
docs/FRONTEND.mdhas drifted from the shipped app. Found in a full docs-vs-code audit against v2.1.0. Each item below is independently checkable: open the doc at the noted spot and compare against the app or code. These can all land in one PR that refreshes the file.8 items found.
1. Agent System > Built-in Agents (21) table,
htmlrow (line 603)(outdated)
The
htmlrow says phasepre_generation/ "Adds immersive HTML/CSS instructions", but Immersive HTML was converted in v2.0.9 from static main-prompt injection into a Roleplay post-processing rewrite agent. Its manifest phase ispost_processing.Suggested fix: Change the
htmlrow's phase topost_processingand reword the description to something like "Rewrites the finished Roleplay response to add diegetic HTML/CSS/JS visuals (runs in the same rewrite pass as Prose Guardian and Continuity)".2. Hooks Reference > Generation Hook (use-generate.ts) (lines 208-219)
(outdated)
The documented hook API is wrong on all three counts: the return shape (
{ generate, regenerateMessage }- actual is{ generate, retryAgents }), the call signature (generate(chatId, prompt, signal)- actual takes one params object), and the SSE event list (agent_updateandencounter_initdo not exist as events anywhere in client or server code).Suggested fix: Document the real shape:
useGenerate()returns{ generate, retryAgents };generate(params)takes an options object (chatId,connectionId,userMessage,regenerateMessageId,continueMessageId,impersonate,attachments, ...) and returns false if a generation is already in flight for that chat. Replace the event list with the key real events - token, agent_start / agent_result / agent_error, thinking, tool_call, game_state / game_state_patch, text_rewrite, scene_created, done, error - noting it is a subset of the full set handled in use-generate.ts.3. Hooks Reference > Preset Hooks (use-presets.ts) table,
useChoiceBlocks(presetId)andusePresetPreview(presetId)rows (lines 194-195)(outdated)
Both documented hooks no longer exist under those names: choice-block fetching is now
usePresetVariables(presetId)(choice blocks were rebranded "Preset Variables", served from/prompts/:id/variables), and the preview hook isusePreviewPreset()- a mutation, not a(presetId)query.Suggested fix: Replace the two rows with
usePresetVariables(presetId)- Query - "Preset variables (choice blocks)" andusePreviewPreset()- Mutation - "Rendered prompt preview for a preset + chat (accepts { presetId, chatId, choices })".4. State Management > Zustand Stores (Client State) intro (line 64)
(outdated)
"Six stores manage UI and runtime state" is stale: there are now 14 Zustand stores. The doc omits backfill, chess-game, dialog, game-asset, game-mode, sidecar, translation, and uno-game - several of which back major shipped features (Game Mode, UNO/Chess turn games, the local-model sidecar).
Suggested fix: Update the count to 14 and add short entries (or a one-line catch-all) for the newer stores: game-mode.store / game-asset.store (Game Mode), chess-game.store / uno-game.store (turn games), sidecar.store (local model runtime), translation.store, dialog.store, backfill.store. Keep the note that ui.store remains the only persisted store.
5. Overview (line 5), Shared Package > Constants
chat-modes.tsrow (line 425), and the "Chat Modes" section (lines 618-648)(missing)
The doc presents exactly three chat modes (conversation, roleplay, visual_novel) everywhere, but a fourth mode,
game(Game Mode: AI Game Master, sessions, dice, journals, storyboards, its own API routes and stores), shipped in the 2.0.x line and is completely absent.Suggested fix: Add
gameto the Overview mode list and the CHAT_MODES row, and add a Game Mode subsection under "Chat Modes" (GM-driven sessions, party members, dice, Game Assets, storyboards, journal; link to docs/GAME_MODE.md), including its commonly used agents.6. Component Guide > Modal System (components/modals/) (lines 297-315)
(outdated)
The "Available modal types" table lists 9 of 15 shipped modal types - missing
create-connection,import-connection,create-persona,character-card-update,agent-write-approval, and (as of this branch)docs-viewer- and ModalRenderer.tsx actually lives in components/layout/, not components/modals/ as the section heading implies.Suggested fix: State that ModalRenderer.tsx lives in components/layout/ (the modal components themselves are in components/modals/), and add rows for create-connection, import-connection, create-persona, character-card-update (agent-proposed card evolutions), agent-write-approval (agent write consent), and docs-viewer (in-app documentation browser).
7. API Endpoints section (lines 474-547)
(missing)
The endpoint tables, presented as the server's REST surface, omit roughly 20 shipped route groups - including /api/themes (which the doc's own Custom Themes section depends on), /api/extensions, /api/tts, /api/game, /api/game-assets, /api/turn-games, /api/sidecar, /api/app-settings, /api/achievements, /api/youtube, /api/global-gallery, /api/conversation-calls, /api/chat-presets, /api/connection-folders, /api/custom-emojis, /api/custom-stickers, /api/prompt-overrides, /api/professor-mari/workspace, and the /api/bot-browser/datacat source.
Suggested fix: Extend the tables with the missing prefixes grouped sensibly (themes/extensions/app-settings under System or a new Customization group; game, game-assets, turn-games under a Game Mode group; tts, youtube, global-gallery, custom-emojis, custom-stickers under Media; sidecar, conversation-calls, chat-presets, connection-folders, prompt-overrides, achievements, professor-mari/workspace, bot-browser datacat, docs where they fit) - or at minimum mark the section as non-exhaustive and point to packages/server/src/routes/index.ts as the authoritative list. Note /api/sidecar is disabled in Lite builds.
8. Agent System > Agent Result Types list (line 614) and Built-in Agents table
spotifyrow (line 604)(outdated)
The result-type list omits
local_music_control(it otherwise mirrors the AgentResultType union exactly), and the Music DJ row says the agent controls "Spotify or YouTube" - the Custom Music DJ mode that plays local Game Assets music through the embedded player shipped in v2.0.3.Suggested fix: Insert
local_music_controlinto the result-type list (afteryoutube_control, matching the union order) and change the Music DJ description to "Controls Music DJ playback for Spotify, YouTube, or local Custom Music (Game Assets / local folder via the embedded player)".@SpicyMarinara commented on GitHub (Jul 5, 2026):
Addressed in #3289.