Skip to content

Keep the title a person is renaming from the Planner's drafted title - #714

Merged
lavaman131 merged 1 commit into
mainfrom
keep-person-title-while-renaming
Oct 21, 2026
Merged

lavaman131 merged 1 commit into
mainfrom
keep-person-title-while-renaming

Conversation

@lavaman131

Copy link
Copy Markdown
Collaborator

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

  • The Planner doesn't race someone who is renaming. While a person has the header's title field open or the caret in the document's heading, the browser sends 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.
  • A renamed title is the person's for good. A rename (from the header, the sidebar, or MCP rename_document) or a person's edit to the heading in the editor records titleChosen in 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.
  • The person's rename wins immediately. A rename waits on the document queue, so a draft that is still in flight is refused as stale. When the job retries, it sees the person's title and keeps it. Nothing flips back.
  • No suggestion UI. A held draft is not shown anywhere. The next saved message drafts again.

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 through Service.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 fail
  • bun run types, bun run ci
  • bun run e2e on document-title-naming, document-title and conversation-plan-heading: 19 passed

The connector is unchanged.

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>
@lavaman131 lavaman131 self-assigned this Oct 21, 2026
@lavaman131
lavaman131 merged commit 87669fe into main Oct 21, 2026
24 checks passed
@lavaman131
lavaman131 deleted the keep-person-title-while-renaming branch October 21, 2026 17:52
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