Repository navigation
A bare /rename asks the server for a new session title (opencode#66396) - #1249
Merged
Merged
Conversation
Official: Rename session is also the slash command /rename: with words after it the session takes them as its title, bare it asks the server to generate a new title; a new command, Generate session title, does the same; the header's title shimmers meanwhile and a second ask does nothing (packages/app/src/session/timeline/message-timeline.tsx:300-319, :702-704, controller.tsx:455-494). Ours had Rename session as an edit in place only. A command's /name can now take words (CommandEntry::words in opencode-kernel; only a plugin's could). The ask is the session's update with an empty title, one per session at a time (features/session-menu/src/generate_title.rs); its answer comes back as a rename's does, and the session is read again after it.
Hona
added a commit
that referenced
this pull request
Nov 25, 2026
…aft (#1250) No new official commit since 3ac14c053c. UP-236 (the Add extension dialog redesigned) is ported by #1216, with what ran, the two cases still to run and the one open difference. UP-240 names its draft, #1249, and its line on ours is put right: Rename session edits the title in place, it does not open a dialog.
The first head showed the new title at once and did not put it back: with no server, or a server that refuses, the header and the tab kept a title the server never took (seen in the run: /rename New words on a fixture file kept New words with a toast that nothing was sent). Official sends the update and shows the title when the server's event comes (packages/app/src/session/timeline/controller.tsx:472-478). Ours now does the same: the write goes out and session.renamed brings the title.
Hona
marked this pull request as ready for review
November 25, 2026 20:43
Hona
added a commit
that referenced
this pull request
Nov 25, 2026
No new official commit since 57551d990d. UP-240 (a bare /rename asks the server for a new session title) is ported by #1249: the row has what ran on a fixture file, the four cases that wait for a server, and its three differences from official.
Hona
added a commit
that referenced
this pull request
Nov 25, 2026
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.
Port of opencode#66396 (
3ac14c053c, "regenerate session title with bare /rename"). Ledger row UP-240.What changes
/renameis a slash command. With words after it, the open session takes them as its title once the server has taken them. Bare, it asks the server to generate a new title from the conversation so far. Picked from the/list it types/renameand waits for the words, as a command that takes words does./rename, from the palette. It is not offered on a subagent's page, while the title is being edited, or while a title is on its way.Before this change there was no
/rename, and nothing asked the server for a title.How
Official:
packages/app/src/session/timeline/message-timeline.tsx:300-319(the commands),:702-704(the shimmer),packages/app/src/session/timeline/controller.tsx:455-494(title.set),packages/app/src/runtime/i18n/en.ts:129-131./namecan take words.crates/opencode-kernel/src/commands.rs:CommandEntry::wordsand.slash_words(..). Until now only a plugin's command could (apps/desktop/src/session/composer/slash.rs).features/session-menu/src/generate_title.rs: one small machine (Generating: a session waits for a generated title or does not),set_title,replied. An empty title in the session's update is the ask, as in official; its answer comes back on the path a rename's does (features/session-menu/src/lib.rssession_write_replied), and the session is read again after it.apps/desktop/src/session/menu.rs; their order inshell/commands/order.rs; the shimmer inshell/view/header.rs; three keys incrates/opencode-i18n/locales/official/en.json.How it differs from official
/rename wordsreads Failed to rename session, as ours' other renames do, where official's reads Request failed (controller.tsx:481). By reading.message-timeline.tsx:699). By reading; the run shows it if the generated-title case uses a long title./renamestands in the/list. Official lists later registrations first (shell/commands/command.tsx:133-134), so its place depends on when the timeline registers; not determined by reading. Ours lists it after the commands whose order is known.Run
A PR build is of the PR's own head.
691698c9f(Windows x64 CI build, run45674067934; headless, the app's own fixture file, no server; 14 launches, each exit code read whole and 0). Before: opencode-rune fix(deps): pin rune to d5c7a5ad, the effect warm for backdrop blur only (214 commits, rune#1962-#2246) #1192's own PR build, headcc991c6505, run45629508899. Cases 1, 2, 4 and 5 hold: the/list has/renamewith its description and Ctrl+R (before: no such row); picking it leaves/renamein the composer; the palette lists Generate session title on a session's page and nothing for it on a subagent's page (before: no result); a bare/renamewith no server leaves the title as it was, with no shimmer and one toast that nothing was sent. The sample of the files shared with feat(app): group tabs by project or server in Consolidated (opencode#66350) #1215: a session's menu from its tab lists Rename, and it edits the title in place.c87457101:/rename New wordswith no server showed 'New words' in the header and the tab beside a toast that nothing was sent: a title the server never took. Before this change the words were sent as a prompt. The title now changes only when the server's event comes, as official's does.c87457101, the head that merges (Windows x64 CI build, run45687337329; headless, the same fixture file, no server; 5 launches, each exit code read whole and 0; before:cc991c6505). Case 3 holds: the composer is empty, the header and the tab keep "Sidebar shows stale session titles", one toast reads "Not connected to an OpenCode server" / "Nothing was sent.", and the timeline has no new row. The sample holds: a session's menu from its tab lists Rename, and Rename puts a text field holding the title in the tab's place. Cases 1, 2, 4 and 5 were not repeated on this head: between the two heads the change is three lines in one function (features/session-menu/src/generate_title.rs) anddevtaken in.cc991c6505shows the same two, word for word ("Not connected to an OpenCode server" / "Nothing was sent." and "Failed to rename session" / "Not connected to an OpenCode server"). Not changed here: a follow-up makes it one toast in official's words (packages/app/src/shell/titlebar/tab-rename-machine.ts:274-283,tab-nav.tsx:354-357), and with it a refused/rename wordsreads Request failed.45687337329green onc87457101(guardrails, macOS, Windows x64, Windows arm64, Linux x64; Linux arm64 skipped).devtook no file of this change since its base.The cases:
/list has/renamewith its description and Ctrl+R. Before: no such row./renamefrom the list leaves/renamein the composer and runs nothing./rename New words, Return, with no server: the composer clears; the header and the tab keep the title they had; one toast says nothing was sent./rename, Return, with no server: one toast says nothing was sent; the title is as it was and does not shimmer.With a server:
/rename: one update goes out with an empty title; the header's title shimmers until the answer; then the new title shows in the header, the tab and the list. A second bare/renamemeanwhile sends nothing./rename New words: one update with that title; the header and the tab read "New words" once the server has answered; it stays after a reload.