Repository navigation
feat(app): add a session message navigation rail - #53700
Open
aminghaseminia wants to merge 1 commit into
Open
aminghaseminia wants to merge 1 commit into
aminghaseminia wants to merge 1 commit into
Conversation
Contributor
|
This PR doesn't fully meet our contributing guidelines and PR template. What needs to be fixed:
Please edit this PR description to address the above within 72 hours, or it will be automatically closed. If you believe this was flagged incorrectly, please let a maintainer know. |
Contributor
|
The following comment was made by an LLM, it may be inaccurate: |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue for this PR
Closes #
Type of change
What does this PR do?
Adds a small navigation rail to the session timeline. It shows one short mark per user message along the end edge of the timeline. Hovering the rail reveals the list of user questions, and clicking a mark (or a list entry) scrolls that message into view. On narrow/touch layouts the marks collapse to a slim handle: tapping it opens the list and tapping outside closes it.
I built this because long sessions make it tedious to jump back to an earlier question, and a persistent list of the user's turns makes it fast.
It works by reading the existing
visibleUserMessagesand reusing the current navigation primitives:packages/app/src/pages/session/timeline/message-nav-rail.tsx+.css— the new component. Marks are evenly spaced and centered; the active mark is derived from the scroll position by querying the rendered[data-message-id]rows (the same idea as the existingcursor()insession.tsx). The hover list uses the opaque surface token and truncates each question to one line.packages/app/src/pages/session.tsx— mounts the rail over the timeline and jumps through the existingautoScroll.pause()+scrollToMessage()path, so it reuses the same reveal/hash behaviour as the keyboard message navigation.packages/app/src/i18n/en.ts— addssession.messages.navRail. Only the English key is added; other locales fall back to English.Note: CONTRIBUTING says UI features should go through a design review first. I'm happy to pause if this needs that step.
How did you verify your code works?
I could not fully test this. The environment I wrote it in has no Bun and no installed dependencies, so I could not run
bun dev,bun typecheck, or the timeline benchmark. What I did verify: both changed TS/TSX files parse under the TypeScript compiler, and the new i18n key is well-formed.So I have not been able to confirm the runtime behavior or measure the timeline benchmark that
packages/app/AGENTS.mdasks for before changing timeline code. I'd appreciate it if a maintainer or CI could run those, and I'll iterate on anything that fails.Screenshots / recordings
Not available yet — the app could not be run in the authoring environment. I can add screenshots/recording once it builds locally.
Checklist