Repository navigation
Conversation
The Sessions tab renames a session from its row menu or a double-click on the title, but a session row in the Projects tab had no way to do it: its right-click menu offered fork, move, archive and the rest, but not rename. The menu now has Rename… next to Copy session ID, in the track cards and the session pane alike. It opens the same name dialog the project and track renames use, prefilled with the current title, and saves through the existing rename-session IPC. As in the Sessions tab, typing the session's own title back clears the custom name.
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.
Summary
Adds Rename… to the right-click menu of a session row in the Projects tab, so a session can be renamed there the same way it can in the Sessions tab.
Why
In the Sessions tab a session is renamed from its
…menu (Rename session) or by double-clicking its title. The Projects tab lists the same sessions, in the track cards, the archived sections and the session pane beside a running session, but its menu for them had fork, move, mark as unread, archive and the rest, and no rename. To rename a session you were working on from a project, you had to switch to the Sessions tab, find it again, rename it there and come back.What it does
buildSessionRowandsessionMenuItems, and for terminals as well, as in the Sessions tab.showPromptDialog), titled Rename session and prefilled with the session's current title.Implementation notes
public/projects-view.jsonly:renameSessionFlow(session), next torenameProjectFlowandrenameTrackFlow;sessionMenuItems.window.api.renameSession/rename-sessionIPC, so the stored name and the search index title are updated exactly as for an inline rename. It then callsloadProjects(), which refreshes the Projects tab and the Sessions tab together.Testing
test/project-session-rename.test.js. It loads the realsessionMenuItemsandrenameSessionFlowfromprojects-view.jsin avmcontext, with stubs, and checks that:null;projects-view.js, all 6 tests fail.npm test: 447 of 449 pass. The two failures (incremental columns upgrade a version-4/12 database…indb-schema-reconcile.test.js) fail the same way on currentmainon my machine and are unrelated.electron .with an isolatedSWITCHBOARD_DATA_DIR), in a project with one session, from the Projects tab: