fix(content): keep the stored title in the sidebar after a create - #401
Merged
Conversation
createUntitledEntry stores "Untitled" on the server but hands the editor a copy whose title is blank, so the title field shows its placeholder instead of pre-filling the word. loadEntries then merged that editor copy back into the sidebar list whenever an in-flight list load resolved after the create, leaving a row with an author and a status but no name. Which request won was scheduling luck, so the same click worked most of the time. The workspace now keeps the stored row alongside the editor view and rebuilds the list from the stored one. An MCP save, where the selection genuinely is the newer row, still merges as it did before.
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.
The bug
Creating a post while the entries list was still loading left a nameless row in the Content sidebar. The entry saved correctly and the editor showed its "Untitled" placeholder, but the sidebar row rendered with only an author and a status. The same click worked most of the time, because which request finished first decided the outcome.
The fix
createUntitledEntrystores "Untitled" on the server but hands the editor a copy whose title is blank, so the title field shows its placeholder.loadEntriesmerged that editor copy back into the list whenever an in-flight load resolved after the create. The workspace now keeps the stored row alongside the editor view and rebuilds the list from the stored one. An MCP save, where the selection genuinely is the newer row, still merges as before.Verification
The Playwright line reports 6 passed because the
e2eproject pulls in auth setup, dashboard preflight, and personas first. CONTENT-009 is the only test covering this fix.New coverage at unit and browser level. Both hold the list response until the create lands, and both fail without the fix.