mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #241] [MERGED] feat(game): jump back to a segment by clicking it in Session Logs #4524
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#4524
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?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/241
Author: @Romuromylus
Created: 4/26/2026
Status: ✅ Merged
Merged: 4/27/2026
Merged by: @LukaTheHero
Base:
main← Head:fix/game-logs-jump-to-segment📝 Commits (4)
525f0b8feat(game): jump back to a segment by clicking it in Session Logsa548148fix(game): add SFX and a11y to Session Logs jump rows9082dbdfix(game): widen interactive-target guard from HTMLElement to Element1f8ec27Merge branch 'main' into fix/game-logs-jump-to-segment📊 Changes
1 file changed (+54 additions, -1 deletions)
View changed files
📝
packages/client/src/components/game/GameNarration.tsx(+54 -1)📄 Description
Why this change
In Game Mode, the Session Logs modal is a read-only history. If you scroll past a beat and want to re-experience it (replay the typewriter for that exact narration segment, or reground yourself in a moment of dialogue), there's no way to get back —
setActiveIndexis internal toGameNarrationand segments past the active one have no affordance. This adds the natural interaction: click a logged row from the current scene to make it the active narration segment again.What changed
packages/client/src/components/game/GameNarration.tsx: each row in the Session Logs modal that belongs to the latest assistant message (the "current scene") now accepts a click. Clicking setsactiveIndexto that segment's index in the livesegmentslist, resetsvisibleCharsviagetSegmentStartVisibleChars(so the typewriter replays — or reveals instantly ifgameInstantTextRevealis on), closes the modal, and clears any in-progress log edit state.latestAssistantis the only message the narration stage can play, so older messages would require a destructive "delete everything after" rewind. Out of scope here — this PR is scoped strictly to the cheap, non-destructive case.target.closest("button, input, textarea, a")so the existing edit/delete pencil/trash buttons (and inline edit textareas) keep working without bubbling into a jump.cursor-pointerand a fainthover:ring-1 hover:ring-white/15. The currently-active segment keeps its existingring-1 ring-[var(--primary)]/40and is excluded from the jump (it would be a no-op).Wired across all four segment renderers in the modal — dialogue, system, readable (Note/Book), and the default narration row.
Validation
pnpm checkManual verification notes
Built and deployed to the author's EasyPanel instance off fork main; verified in-browser:
activeIndexflows through the existingonSegmentChangepath and is written to bothlocalStorage(narration-idx:<chatId>) and the server'sgameNarrationIndex, so a refresh restores the rewound position.Docs and release impact
Summary by CodeRabbit
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.