Repository navigation
Keep the title a person is renaming from the Planner's drafted title - #714
Merged
Merged
Conversation
The background heading job drafted and applied a title about 30 seconds after a person's first message, while they were opening the title to rename it. The earlier fix only kept titles that were neither blank, a generated name nor the Planner's last draft, and the server had no idea anyone was mid-rename. The browser now reports on plan:titling while the person has the header's title field open or the caret in the document's heading, and whether they have typed in it on this connection. The heading tool keeps the current title while anyone is renaming, while anyone still connected has typed in it, and for a minute after the last of them lets go. A rename, or a person's edit of the heading through the editor, now records titleChosen in the sidecar, so no later draft replaces their title even when it is blank, looks generated or matches the Planner's earlier draft. Because a rename waits on the document queue, a draft in flight is refused as stale and the person's title stands. Assistant-model: Claude Opus 5.5 (fast) Assistant-workflow: inline (fast subagents) Assistant-verification: red-before-fix: four new heading-tool tests failed (title redrafted after rename or heading edit; no titling signal); both new document-title-naming e2e tests failed with the Planner's title replacing the one being renamed Assistant-verification: GIT_CONFIG_GLOBAL=/dev/null bun test (6702 pass, 0 fail); bun run types; bun run ci Assistant-verification: bun run e2e on document-title-naming, document-title and conversation-plan-heading (19 passed) Co-authored-by: Alex Lavaee <alexlavaee@microsoft.com>
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.
What happened
In a hosted test, a person created a document and sent a first message. About 30 seconds later the Planner's background heading job drafted a title and applied it while the person was about to rename the document. #665 keeps a title a person has already set, but it still let the Planner replace a blank title, a generated name, or the Planner's own last draft. The server also had no way to know someone was in the middle of renaming.
Rules now
plan:titling(writers only, kept in memory). During that time the heading job keeps the current title. It also keeps it while anyone still connected has typed in the title, and for 60 seconds after the last person lets go. A goal may still be seeded in the body.rename_document) or a person's edit to the heading in the editor recordstitleChosenin the sidecar. After that no draft replaces the title, even if it is blank, looks like a generated name, or matches the Planner's earlier draft.Tests
heading-tool.test.ts: four new tests, all red before the fix. They cover a rename to blank, to a generated name and to the earlier draft; the hold while the field is open and for the window after; holding after typing until the person leaves; and a heading edit sent throughService.submit, which survives reopening.document-title-naming.e2e.ts: two new tests, both red before the fix (the Planner's title replaced the one being renamed). In one, a person types in the title field while a peer's message drafts a title; in the other, a person has the caret in the heading. Both check that later messages don't redraft the person's title.Verification
GIT_CONFIG_GLOBAL=/dev/null bun test: 6702 pass, 0 failbun run types,bun run cibun run e2eon document-title-naming, document-title and conversation-plan-heading: 19 passedThe connector is unchanged.