[Bug]: Chat message knowledge-base labels display internal resource IDs instead of names
Related Module
Frontend/Web
Describe the bug
Knowledge-base references below sent chat messages display the raw resource ID (for example, workspace:<workspace-id>:kb:example_kb) instead of the knowledge-base name. The composer correctly shows example_kb for the same selected resource, so its label changes visibly after sending.
Observed in a Mastery Path conversation on v1.6.12, even after the KB was successfully assigned to the current workspace. This is a display issue independent of workspace resource assignment.
Steps to reproduce
- Have a workspace-owned knowledge base available and assigned to the current workspace.
- Select it as a source for a Mastery Path conversation.
- Confirm that the composer chip displays its knowledge-base name.
- Send a message and inspect the knowledge-base reference below the sent message.
- The reference displays
workspace:<workspace-id>:kb:<name>instead of the name.
This was observed in an existing deployment and traced through stored message metadata and the matching release source; these steps have not been rerun in a clean installation.
Expected Behavior
Show the knowledge-base display name consistently in the composer and sent-message references. If scope disambiguation is needed, a human-readable workspace name can accompany the KB name. Preserve the qualified resource ID for identity and retrieval.
Evidence and cause
Identifiers and names in the examples below are placeholders; no private chat content or workspace IDs are included.
- An older message with
request_snapshot.knowledgeBases = ["example_kb"]displays the short name. - A newer message with
request_snapshot.knowledgeBases = ["workspace:<workspace-id>:kb:example_kb"]displays the full ID. - Thus, the apparent old/new KB difference follows the stored reference format; it is not inherently a defect limited to newly created KBs.
Source at v1.6.12 (ef2d9e5c3c99fd073742c5aadc2bb9584b1e503b):
- ChatComposer.tsx, line 726 resolves each selected reference against the KB catalog and uses
.namefor its label. - ChatMessageList.tsx, lines 1617–1640 iterates over
snap.knowledgeBasesand directly useslabel: name; the variable can actually contain a qualified ID. - knowledge-helpers.ts, line 563 preserves qualified IDs when selecting KB references.
- Snapshot persistence copies the request's knowledge-base references into message metadata.
The sent-message renderer needs display-name resolution while keeping resource identity intact. The inspected v1.6.11 renderer also has the direct-label behavior, so this is not being claimed as a v1.6.12 regression.
Environment
- DeepTutor: official v1.6.12, commit above, no local overlays
- Host: Linux ARM64
- Python: 3.11.16
- Frontend runtime: Node.js 24.19.0
Existing issue check
Searched existing issues for knowledge-base labels and internal IDs; no matching report was found. This is separate from the workspace activity-lock issue #1646.
Source: HKUDS/DeepTutor