Skip to content

fix: Prevent auto-generated title from overwriting manual rename#1676

Merged
charlesvien merged 3 commits intomainfrom
04-15-prevent_auto-generated_title_from_overwriting_manual_rename
Apr 16, 2026
Merged

fix: Prevent auto-generated title from overwriting manual rename#1676
charlesvien merged 3 commits intomainfrom
04-15-prevent_auto-generated_title_from_overwriting_manual_rename

Conversation

@charlesvien
Copy link
Copy Markdown
Member

@charlesvien charlesvien commented Apr 15, 2026

Problem

Auto-title generation silently bypassed the title_manually_set guard because getQueryData used exact key matching while task queries include filter objects in their keys.

Closes #1669

Changes

  1. Fix cache lookup in useChatTitleGenerator to use getQueriesData (prefix match) instead of getQueryData (exact match)
  2. Add title_manually_set guard to generateTaskTitle at task creation time

How did you test this?

Manually

@charlesvien charlesvien changed the title Prevent auto-generated title from overwriting manual rename fix: Prevent auto-generated title from overwriting manual rename Apr 15, 2026
@charlesvien charlesvien force-pushed the 04-15-prevent_auto-generated_title_from_overwriting_manual_rename branch from 90ebf0c to 94a8ce6 Compare April 15, 2026 21:01
@charlesvien charlesvien marked this pull request as ready for review April 15, 2026 21:03
@charlesvien charlesvien force-pushed the 04-15-add_task_search_and_sidebar_context_menu_integration_to_command_center branch from 000d5bb to e96a20f Compare April 15, 2026 21:25
@charlesvien charlesvien force-pushed the 04-15-prevent_auto-generated_title_from_overwriting_manual_rename branch 2 times, most recently from 3124ffd to 2b53d3c Compare April 15, 2026 22:10
@charlesvien charlesvien force-pushed the 04-15-add_task_search_and_sidebar_context_menu_integration_to_command_center branch 2 times, most recently from f4cd928 to 2fa6f55 Compare April 16, 2026 12:49
@charlesvien charlesvien force-pushed the 04-15-prevent_auto-generated_title_from_overwriting_manual_rename branch from 2b53d3c to 37f4016 Compare April 16, 2026 12:49
@charlesvien charlesvien changed the base branch from 04-15-add_task_search_and_sidebar_context_menu_integration_to_command_center to graphite-base/1676 April 16, 2026 13:01
@charlesvien charlesvien force-pushed the 04-15-prevent_auto-generated_title_from_overwriting_manual_rename branch from 37f4016 to 0706ec0 Compare April 16, 2026 13:01
@graphite-app graphite-app bot changed the base branch from graphite-base/1676 to main April 16, 2026 13:01
@charlesvien charlesvien force-pushed the 04-15-prevent_auto-generated_title_from_overwriting_manual_rename branch from 0706ec0 to 273252c Compare April 16, 2026 13:01
@charlesvien charlesvien merged commit 8cb36a9 into main Apr 16, 2026
15 of 16 checks passed
Copy link
Copy Markdown
Member Author

Merge activity

@charlesvien charlesvien deleted the 04-15-prevent_auto-generated_title_from_overwriting_manual_rename branch April 16, 2026 13:09
vdekrijger pushed a commit that referenced this pull request Apr 16, 2026
## Problem

Auto-title generation silently bypassed the title_manually_set guard because getQueryData used exact key matching while task queries include filter objects in their keys.

Closes https://github.com/PostHog/code/issues/1669<!-- Who is this for and what problem does it solve? -->

<!-- Closes #ISSUE_ID -->

## Changes

1. Fix cache lookup in useChatTitleGenerator to use getQueriesData (prefix match) instead of getQueryData (exact match)
2. Add title_manually_set guard to generateTaskTitle at task creation time

<!-- What did you change and why? -->

<!-- If there are frontend changes, include screenshots. -->

## How did you test this?

Manually

<!-- Describe what you tested -- manual steps, automated tests, or both. -->

<!-- If you're an agent, only list tests you actually ran. -->
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.

Manual task rename gets overwritten by auto-generated name from latest message

2 participants