Skip to content

Jump to any earlier prompt in long threads with a tick rail and /jump - #1667

Merged
currentbits merged 3 commits into
mainfrom
coder/jump-to-turn-rail-one-tick-per-user-prom-4135ce
Oct 18, 2026
Merged

currentbits merged 3 commits into
mainfrom
coder/jump-to-turn-rail-one-tick-per-user-prom-4135ce

Conversation

@currentbits

Copy link
Copy Markdown
Owner

After an hour the scrollbar is useless for finding "the prompt where we decided to rewrite auth". Threads with 8 or more prompts now get a slim tick rail on the right edge, one mark per prompt. /jump <filter> opens the same outline filtered. Closes #487.

Changes

  • Rail: one tick per user prompt. Hover or keyboard focus expands it into a labeled outline. A label is the prompt's first line (quoted reply context is skipped), or its pin label if the prompt is pinned. The rail is hidden below 8 prompts.
  • Jump: clicking a prompt loads it even if it sits above the rendered tail, puts it at the top of the pane and outlines it for about 1.6s. This reuses the existing pin/find reveal (jumpMessageId) rather than adding a second scroll path.
  • Current prompt: the tick for the prompt you're reading is highlighted and follows scroll.
  • /jump auth: the composer intercepts it on send, opens the outline filtered to "auth", and never sends it to the model. Enter jumps to the first match and Esc closes. /jump also works on short threads.

Verification

  • test/turnRail.test.tsx (4 tests):
    • the rail is hidden on short threads;
    • a tick click on a prompt above the rendered tail loads it and top-aligns the scroll position;
    • /jump auth filters to one prompt, sends nothing, and Enter jumps and closes;
    • label parsing.
  • Five loops of turnRail + threadView + composer at --test-concurrency=3: green.
  • After rebasing on main: tsc --noEmit is clean. ThreadView, pins, composer, slash-command and onboarding renderer suites pass, and so do the site docs electron tests.
  • Before the rebase: the full renderer suite passed 3075/3076, and vite build succeeded. The one failure was a store async-flush tempdir ENOENT race in threadHeader.test.tsx. That file passed 78/78 run alone, twice.
  • Not tested: the rail hasn't been opened in the running app. Layout, the hover expansion and the scroll-following marker are untested by eye, and jsdom has no layout, so the marker has no automated test.

Notes for reviewers

  • Prompt labels are only rendered while the rail is expanded. Existing windowing tests check whether message N is mounted by looking for its text in the page, and always-present labels broke 7 of them. Collapsed ticks are labelled "Prompt N" for screen readers.
  • The top-jump effect must stay below useStickToBottom. That hook's nearest-reveal would otherwise pull a prompt taller than the viewport down to its bottom edge.
  • A tick click blurs the tick. Otherwise the focused tick holds the outline open over the transcript. Keyboard focus then moves to the page.
  • /jump only works in ThreadView's composer. Other composers don't pass onJump, so there /jump x is still sent to the model as text.

claude-opus-5-5 via Claude Code

🤖 Generated with Claude Code

One tick per user prompt on the transcript's right edge (threads with 8+
prompts). Hover or focus expands it into a labeled outline; clicking mounts
the prompt if it is windowed out, scrolls it to the top and flashes it. The
current prompt follows scroll. `/jump <filter>` opens the same outline
filtered and never reaches the model.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-18T20:04:44.266199Z b26d61c PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b26d61ca8a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".


const submitSend = () => {
if (!canSend) return;
const jump = ask ? null : parseJumpCommand(readDraft());

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Intercept /jump in Ask threads

When thread.ask is true, the static slash palette still offers /jump, but this condition skips parsing it. Submitting the command in an Ask thread therefore sends the literal /jump ... prompt to the provider instead of opening the thread outline, even though ThreadView supplies onJump and renders the rail for these threads.

Useful? React with 👍 / 👎.

Comment on lines +89 to +92
const needle = query?.trim().toLowerCase() ?? "";
const shown = needle
? turns.filter((t) => t.label.toLowerCase().includes(needle))
: turns;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Filter against the complete prompt text

For /jump auth, this filters only the displayed label, which is the prompt's first nonempty line and may even be replaced by a pin label. A prompt such as Investigate login\nThe auth middleware is failing will not be found, despite the command being documented as filtering prompts containing the query; retain the full prompt text separately for matching.

Useful? React with 👍 / 👎.

Comment on lines +2357 to +2358
setJumpMessageId(id);
setTopJump({ id });

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Expand collapsed runs before jumping

If the user has collapsed a completed run, its user prompt remains in railTurns, but the runCollapsed rendering branch suppresses that prompt's [data-message-id] element. This handler only sets reveal state and never removes the prompt's run from collapsedRuns, so selecting that rail tick cannot find or scroll to the target.

Useful? React with 👍 / 👎.

@currentbits
currentbits enabled auto-merge (squash) October 18, 2026 20:15
@currentbits
currentbits merged commit 92b19d7 into main Oct 18, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Jump-to-turn rail: one tick per user prompt

1 participant