Skip to content

feat: resolve chat title references so that is human readable - #10047

Merged
AdityaHegde merged 2 commits into
mainfrom
feat/resolved-chat-title-refs
Oct 21, 2026
Merged

AdityaHegde merged 2 commits into
mainfrom
feat/resolved-chat-title-refs

Conversation

@AdityaHegde

@AdityaHegde AdityaHegde commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

References to measures/dimensions/metrics views etc show up as <chat-reference>type="metricsView" metricsView="adbids"</chat-reference>. When the title is truncated it can be unreadable since it doesnt get resolved.

  1. promptToTitle in backend moves the cut point if it falls within a chat-reference block. Also counts a block as 10 chars so that resolved title has somewhat consistent title length.
  2. Front is updated to resolve label for a chat-reference block wherever title is rendered.

Checklist:

  • Covered by tests
  • Ran it and it works as intended
  • Reviewed the diff before requesting a review
  • Checked for unhandled edge cases
  • Linked the issues it closes
  • Checked if the docs need to be updated. If so, create a separate Linear DOCS issue
  • Intend to cherry-pick into the release branch
  • I'm proud of this work!

@nishantmonu51 nishantmonu51 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 , LGTM.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Malformed saved references can break conversation-list rendering, and some legacy truncated tags remain visible.

2 open issues
What changed in this PR

Makes chat titles human-readable by preserving references in the backend and resolving their labels in the frontend.

Changes:

  • Truncates titles without splitting references or Unicode characters.
  • Resolves reference labels in sidebar headers and conversation history.
  • Adds backend truncation and frontend formatting tests.
File Description
web-common/​src/​features/​chat/​layouts/​sidebar/​SidebarHeader.svelte Resolves header titles and supplies metadata to history.
web-common/​src/​features/​chat/​layouts/​sidebar/​ConversationHistoryMenu.svelte Passes metadata to history entries.
web-common/​src/​features/​chat/​layouts/​sidebar/​ConversationHistoryItem.svelte Formats history titles.
web-common/​src/​features/​chat/​layouts/​fullpage/​ConversationSidebar.svelte Formats conversation titles and tooltips.
web-common/​src/​features/​chat/​core/​context/​conversation-title.ts Adds reference-to-label formatting.
web-common/​src/​features/​chat/​core/​context/​conversation-title.spec.ts Tests title formatting and fallbacks.
runtime/​ai/​router_agent.go Preserves references during title truncation.
runtime/​ai/​router_agent_internal_test.go Tests Unicode and reference-aware truncation.

Review effort: Balanced

Comment thread web-common/src/features/chat/core/context/conversation-title.ts
Comment thread web-common/src/features/chat/core/context/conversation-title.ts
@AdityaHegde
AdityaHegde force-pushed the feat/resolved-chat-title-refs branch from ba1ca00 to abb0fbd Compare October 21, 2026 13:40
@AdityaHegde
AdityaHegde merged commit c0e40fb into main Oct 21, 2026
16 checks passed
@AdityaHegde
AdityaHegde deleted the feat/resolved-chat-title-refs branch October 21, 2026 14:10
AdityaHegde added a commit that referenced this pull request Oct 21, 2026
* feat: resolve chat title references so that is human readable

* PR review
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.

3 participants