Skip to content

fix(content): keep the stored title in the sidebar after a create - #401

Merged
DavidBabinec merged 1 commit into
mainfrom
fix/content-list-blank-title
Aug 18, 2026
Merged

fix(content): keep the stored title in the sidebar after a create#401
DavidBabinec merged 1 commit into
mainfrom
fix/content-list-blank-title

Conversation

@DavidBabinec

@DavidBabinec DavidBabinec commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

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

createUntitledEntry stores "Untitled" on the server but hands the editor a copy whose title is blank, so the title field shows its placeholder. loadEntries merged 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

bun test                                    # 6618 pass, 0 fail (3 runs)
bun run build                               # clean
bun run lint                                # clean
bunx playwright test content-create-race    # CONTENT-009 passed

The Playwright line reports 6 passed because the e2e project 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.

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.
@DavidBabinec
DavidBabinec merged commit e65d256 into main Aug 18, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant