Skip to content

feat(chat-ui): surface pipeline result keys as message labels - #209

Merged
Rod-Christensen merged 1 commit into
developfrom
feat/chat-labels
Mar 7, 2026
Merged

Rod-Christensen merged 1 commit into
developfrom
feat/chat-labels

Conversation

@Rod-Christensen

Copy link
Copy Markdown
Collaborator

Adds optional labeling of bot messages with the pipeline result field name (e.g. "answers", "summary") that produced each response, giving users visibility into which part of the pipeline generated a given reply.

Changes:

  • chat.types.ts: Added optional resultKey field to the Message interface to carry the pipeline result field name through to the UI.

  • pipelineUtils.ts: Refactored extractTextFromResult to return TextResult[] (objects with text and key) instead of plain string[], preserving the originating result field name alongside each extracted string.

  • useChatMessages.ts:

    • Updated sendMessage return type to match the new TextResult[] signature.
    • Conditionally spreads resultKey onto bot Message objects when a non-empty key is present.
    • Added two AI formatting instructions to the question payload: markdown formatting guidance and a directive to never return raw tool output.
  • Message.tsx: Renders resultKey inline with the timestamp as a small italic label (preceded by a "·" separator) when present.

  • styles.css: Added .message-result-key and .message-result-key::before rules to style the label as muted, small italic text consistent with the existing timestamp style.

Adds optional labeling of bot messages with the pipeline result field
name (e.g. "answers", "summary") that produced each response, giving
users visibility into which part of the pipeline generated a given reply.

Changes:
- `chat.types.ts`: Added optional `resultKey` field to the `Message`
  interface to carry the pipeline result field name through to the UI.

- `pipelineUtils.ts`: Refactored `extractTextFromResult` to return
  `TextResult[]` (objects with `text` and `key`) instead of plain
  `string[]`, preserving the originating result field name alongside
  each extracted string.

- `useChatMessages.ts`:
  - Updated `sendMessage` return type to match the new `TextResult[]`
    signature.
  - Conditionally spreads `resultKey` onto bot `Message` objects when
    a non-empty key is present.
  - Added two AI formatting instructions to the question payload:
    markdown formatting guidance and a directive to never return raw
    tool output.

- `Message.tsx`: Renders `resultKey` inline with the timestamp as a
  small italic label (preceded by a "·" separator) when present.

- `styles.css`: Added `.message-result-key` and
  `.message-result-key::before` rules to style the label as muted,
  small italic text consistent with the existing timestamp style.
@github-actions github-actions Bot added the module:ui Chat UI and Dropper UI label Mar 7, 2026
@Rod-Christensen
Rod-Christensen merged commit 1292167 into develop Mar 7, 2026
10 of 11 checks passed
@Rod-Christensen
Rod-Christensen deleted the feat/chat-labels branch March 7, 2026 22:55
kwit75 pushed a commit that referenced this pull request Jun 24, 2026
Closes 9 of 14 open Dependabot alerts on this repo. Two floor bumps on
existing `pnpm.overrides` entries + one new entry; lockfile regenerated.

The remaining 5 alerts are cryptography (#191/#192/#193 — handled in
the #1290/#1291 PR pair and a follow-up for text_output) and nltk
(#202/#203 — patched=null, tracked upstream).

Alerts closed:

  #204  HIGH    undici                  >=7.24.0 → >=7.28.0
  #205  MED     undici                  (same line)
  #209  LOW     undici                  (same line)
  #210  HIGH    undici                  (same line)
  #211  HIGH    undici                  (same line)
  #212  MED     undici                  (same line)
  #213  LOW     undici                  (same line)
  #206  MED     webpack-dev-server      >=5.2.4 → >=5.2.5
  #214  MED     http-proxy-middleware   new entry: >=2.0.10 <3

Lockfile-verified single resolutions post-edit:
  undici@7.28.0
  webpack-dev-server@5.2.5
  http-proxy-middleware@2.0.10
AviNormie pushed a commit to AviNormie/rocketride-server that referenced this pull request Nov 9, 2026
…ride-org#209)

Adds optional labeling of bot messages with the pipeline result field
name (e.g. "answers", "summary") that produced each response, giving
users visibility into which part of the pipeline generated a given reply.

Changes:
- `chat.types.ts`: Added optional `resultKey` field to the `Message`
  interface to carry the pipeline result field name through to the UI.

- `pipelineUtils.ts`: Refactored `extractTextFromResult` to return
  `TextResult[]` (objects with `text` and `key`) instead of plain
  `string[]`, preserving the originating result field name alongside
  each extracted string.

- `useChatMessages.ts`:
  - Updated `sendMessage` return type to match the new `TextResult[]`
    signature.
  - Conditionally spreads `resultKey` onto bot `Message` objects when
    a non-empty key is present.
  - Added two AI formatting instructions to the question payload:
    markdown formatting guidance and a directive to never return raw
    tool output.

- `Message.tsx`: Renders `resultKey` inline with the timestamp as a
  small italic label (preceded by a "·" separator) when present.

- `styles.css`: Added `.message-result-key` and
  `.message-result-key::before` rules to style the label as muted,
  small italic text consistent with the existing timestamp style.
AviNormie pushed a commit to AviNormie/rocketride-server that referenced this pull request Nov 9, 2026
…etride-org#1342)

Closes 9 of 14 open Dependabot alerts on this repo. Two floor bumps on
existing `pnpm.overrides` entries + one new entry; lockfile regenerated.

The remaining 5 alerts are cryptography (rocketride-org#191/rocketride-org#192/rocketride-org#193 — handled in
the rocketride-org#1290/rocketride-org#1291 PR pair and a follow-up for text_output) and nltk
(rocketride-org#202/rocketride-org#203 — patched=null, tracked upstream).

Alerts closed:

  rocketride-org#204  HIGH    undici                  >=7.24.0 → >=7.28.0
  rocketride-org#205  MED     undici                  (same line)
  rocketride-org#209  LOW     undici                  (same line)
  rocketride-org#210  HIGH    undici                  (same line)
  rocketride-org#211  HIGH    undici                  (same line)
  rocketride-org#212  MED     undici                  (same line)
  rocketride-org#213  LOW     undici                  (same line)
  rocketride-org#206  MED     webpack-dev-server      >=5.2.4 → >=5.2.5
  rocketride-org#214  MED     http-proxy-middleware   new entry: >=2.0.10 <3

Lockfile-verified single resolutions post-edit:
  undici@7.28.0
  webpack-dev-server@5.2.5
  http-proxy-middleware@2.0.10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module:ui Chat UI and Dropper UI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants