Repository navigation
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 624d9a82fe
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| let updated = conn.execute( | ||
| "UPDATE projects SET name = ?1, updated_at = ?2 WHERE id = ?3", | ||
| params![name, now_timestamp(), id], |
There was a problem hiding this comment.
Keep concurrent metadata writes from undoing renames
When another window or MCP client is adding a first/primary repository concurrently, add_project_repo_impl snapshots project.name before its workspace await and later passes that snapshot to update_project, which rewrites the name along with the repository fields. If this rename completes during that interval, the later repository update silently restores the old name; the primary-repository and removal paths have the same read-then-full-row-write pattern. Updating only the name here protects one race ordering but not the reverse, so the other project metadata writers also need to become column-scoped or otherwise preserve a concurrently renamed value.
Useful? React with 👍 / 👎.
| toast.error('Unable to rename project', { | ||
| // One toast per project: a retry replaces the previous failure | ||
| // rather than stacking another infinite-duration toast. | ||
| id: renameProjectToastId(), | ||
| description: message, | ||
| duration: Infinity, |
There was a problem hiding this comment.
Dismiss rename errors when the section unmounts
If a rename fails and the user navigates somewhere that unmounts this ProjectSection, this infinite-duration toast is never dismissed because the component's existing onDestroy only stops the poller and flushes drafts. A request that is still pending during unmount can also fail afterward and create the same permanent, now-contextless toast, so teardown should dismiss it and prevent a superseded request from publishing another one.
Useful? React with 👍 / 👎.
624d9a8 to
d87fd90
Compare
Add a project-only rename: a `rename_project` command and an inline title editor on the project page. The write is metadata-only — it changes the `projects.name` column and nothing else. Branches, worktrees, Blox workspaces and repo branch names keep whatever was inferred from the old name when they were created, so nothing on disk moves and the rename is safe while sessions in the project are queued or running. Fitted to what has landed since the original commit: - The store gets a name-only `rename_project` write instead of routing through `update_project`, which rewrites the primary-repo columns and `location` from a snapshot and could carry stale values back over a concurrent transfer or branch move. - The command body lives in `project_commands::rename_project_impl`, shared by the Tauri command and a new web-server dispatch arm, which the web-dispatch parity test requires. - ProjectHome paints the new name into the shared `projectsDataStore` via a new `projectRenamed` entry point, so the detail-page title, sidebar row and sticky top-bar echo update at once; the store change feed's `project-changed` refetch then confirms it in every window. The window title is derived from the sidebar filters, not the project name, so it is unaffected. - The editor sits inside the title row next to the status picker. The pencil button is a sibling of the `<h2>` rather than a child, so the heading's accessible name is just the project name and heading navigation does not land on a control; the heading itself stays mounted through editing because ProjectHome measures it for the sticky top-bar handoff. The editor distinguishes Enter from blur. Enter validates and keeps the user in the input (a blank draft shows an inline error, a failed save refocuses so the name can be fixed). Blur means the user has moved on: a blank draft, an unchanged name, or the same name whose save just failed all cancel and restore the old name, so the input losing focus after a failure cannot loop through refocus → blur → identical rename → toast. An Enter that confirms an IME composition candidate (`isComposing`) is ignored so a half-composed name is never submitted. The failure toast carries a stable per-project id so retries replace the previous toast rather than stacking infinite-duration ones, and it is dismissed when a retry succeeds or the editor is cancelled, so the pinned toast cannot outlive the error it describes. A delete starting while the editor is open closes it, and the save path refuses to run while deleting, so the blur from the disabled input never renames a project that is being torn down. Covered by a store test for the name-only write, unit tests for `rename_project_impl` (trimming, blank rejection, missing project), component tests for the inline editor (Enter and blur saves, the pending state, the blur cancels, the IME guard, toast dismissal on success and cancel, the editor closing when `deleting` flips, and the heading structure), and a store test for the immediate repaint. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: Matt Toohey <contact@matttoohey.com>
d87fd90 to
9506247
Compare
Summary
Adds a project-only rename: a
rename_projectcommand and an inline title editor on the project page.The write is metadata-only. It changes the
projects.namecolumn and nothing else. Branches, worktrees, Blox workspaces and repo branch names keep whatever was inferred from the old name when they were created, so nothing on disk moves and the rename is safe while sessions in the project are queued or running.Backend
rename_projectwrite instead of routing throughupdate_project, which rewrites the primary-repo columns andlocationfrom a snapshot and could carry stale values back over a concurrent transfer or branch move.project_commands::rename_project_impl, shared by the Tauri command and a new web-server dispatch arm (required by the web-dispatch parity test).Frontend
projectsDataStorevia a newprojectRenamedentry point, so the detail-page title, sidebar row and sticky top-bar echo update at once. The store change feed'sproject-changedrefetch then confirms it in every window.<h2>rather than a child, so the heading's accessible name is just the project name. The heading stays mounted through editing because ProjectHome measures it for the sticky top-bar handoff.isComposing) is ignored.Tests
rename_project_impl(trimming, blank rejection, missing project).deletingflips, heading structure).🤖 Generated with Claude Code