mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #237] [MERGED] feat: add /goto slash command to jump to a message by number #4523
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#4523
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/237
Author: @LukaTheHero
Created: 4/25/2026
Status: ✅ Merged
Merged: 4/25/2026
Merged by: @LukaTheHero
Base:
main← Head:feat/goto-message-command📝 Commits (1)
8256fcdfeat: add /goto slash command to jump to a message by number📊 Changes
3 files changed (+90 additions, -0 deletions)
View changed files
📝
packages/client/src/components/chat/ChatArea.tsx(+58 -0)📝
packages/client/src/lib/slash-commands.ts(+16 -0)📝
packages/client/src/stores/chat.store.ts(+16 -0)📄 Description
Summary
/goto N(aliases/jump,/scroll) — scrolls the chat to message #N using the same 1-based numbering already exposed by the existing "Show message numbers" setting.block: "center").Message #N doesn't exist — this chat has X messages.); bad input (non-integer, ≤ 0) returns the usage hint via the normal slash-command feedback bubble.Why
Long chats are a pain to navigate — scrolling back hundreds of messages to revisit a specific moment is tedious and breaks flow.
/goto 27jumps you straight there, including across paginated history.Implementation
stores/chat.store.ts— newgotoRequeststate +requestGotoMessage/clearGotoRequestactions. Atokenfield forces re-fire when the same number is requested twice.lib/slash-commands.ts— new local/gotocommand; validates input and dispatches via the store so the command stays decoupled from React.components/chat/ChatArea.tsx— effect fulfils the request: paginate older pages until the target index is in the loaded window, thenscrollIntoViewviadata-message-id. SetsuserScrolledAwayRefso the streaming auto-scroll-to-bottom doesn't immediately yank the user back.Test plan
/goto 27in a chat with the target already loaded → scrolls smoothly to message #27, centered./goto 27in a long chat where #27 is on an older page → auto-fetches older pages then scrolls./goto 9999(out of range) → toast:Message #9999 doesn't exist — this chat has X messages./goto abc,/goto 0,/goto -3,/goto→ usage hint shown in feedback bubble.pnpm check(TypeScript + ESLint + build) is clean.Summary by CodeRabbit
/gotoslash command for message navigation. Users can jump to specific messages by entering/goto <message_number>. The feature includes input validation, error feedback, and automatic pagination for older messages.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.