Repository navigation
Conversation
…1047) Deep project paths make poor labels. A project group's menu now offers Rename… (the header becomes the session row's inline field: Enter or blur saves, Escape cancels) and Reset name while one is set. The name is a label only, kept in pi-web-session-state.json as projectNames, keyed by projectKey like the pins: it never touches the folder, the sessions, the order, pins or expansion, and never selects the project. One shared rule (projectDisplayName) serves the request parser, the optimistic apply and the file: trimmed, one line, at most 80 code points; empty or null clears. The names keep to 1000 entries and 256 KiB as JSON; a new name with no room left is not stored and the route answers 409 "full". Old files load unchanged; a malformed field reads as none. The name replaces the folder name in group headers, the drag ghost, pinned rows and the archive's group headers, and the path in the project pickers' box (files tab and the new-session bar); their menus show it with the folder as the note. The full path stays the tooltip, so the filter matches name, folder and path. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Deep project paths make poor labels (#1047, also asked in #568). A project group's ⋯ menu now has Rename… and Reset name (the latter only while a name is set). The name is only a label: it never touches the folder, the sessions, the order, pins or expansion, and renaming never selects the project.
Storage and rule
pi-web-session-state.jsonnext to the pins, as an optional top-levelprojectNames: { <projectKey>: name }(absent while empty). Old files load unchanged; a malformed field reads as no names without the file being set aside. Names are server-side, so they reach other browsers too.projectDisplayName()inlib/session-ui-state-shared.ts, serves the request parser, the optimistic apply and the file reader: trimmed, one line (control characters and line breaks refused), at most 80 code points; empty ornullclears.409 { reason: "full" }, which shows the existing "Couldn't save" toast; no other project's name is dropped.{ action: "rename-project", projectKey, name: string | null }.UI
AGENTS.mdanddocs/agents/sessions.mdupdated.Left out of #1047: naming a folder while adding it (needs a form in the directory picker and a project whose identity isn't known yet), Copy path (the path is the tooltip), the window title (it shows the cwd folder, not the project).
Checks: unit tests for the rule, request check, apply, clearing, limits and file reading (
lib/session-ui-state-shared.test.mjs), the write path and route incl. 409, tree naming, picker naming, menu entries and rendering;tsc, eslint, fullnpm test(2694 pass). Also driven in headless Chrome against a scratch server and agent dir: API refusals, save/read/clear, Enter/Escape/blur, focus, no change to URL/current project/order, files-tab box and menu, Reset, reload persistence.Closes #1047
🤖 Generated with Claude Code