Skip to content

GIE-95: rename and delete functionality for chat history#114

Open
grantsydney wants to merge 5 commits intomainfrom
feat-gie-95
Open

GIE-95: rename and delete functionality for chat history#114
grantsydney wants to merge 5 commits intomainfrom
feat-gie-95

Conversation

@grantsydney
Copy link
Contributor

@grantsydney grantsydney commented Feb 3, 2026

Description

Adds rename and delete for conversations in chat history. Refactors EditableChatHeader so it works in two variants: inline (in the history list) and default (chat header), with optional icon and delete. Introduces a delete hook that calls the backend (useDeleteConversation) and a reusable modal hook for the delete confirmation flow (useDeleteConversationModal). When the user deletes the active conversation or the last conversation in the list, the app navigates to the new-chat screen; uses window.location.replace for that navigation so the new-chat view reliably loads (router navigate was leaving a blank screen when the history list became empty).

Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • [X ] ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📝 Documentation update
  • 🎨 UI/UX improvement
  • ♻️ Code refactoring (no functional changes)
  • ⚡ Performance improvement
  • 🧪 Test updates

Related Issues

Fixes #

Changes Made

  • EditableChatHeader refactored for two variants: inline (in the history list, with kebab for rename/delete) and default (chat header), with optional icon and delete
  • Delete confirmation modal (DeleteConversationModal) and reusable modal hook (useDeleteConversationModal); backend delete hook (useDeleteConversation)
  • Rename and delete in chat history via inline EditableChatHeader; i18n for header and modal
  • Navigate to new-chat when deleting the active conversation or the last conversation in the list; use window.location.replace so the new-chat view always loads
  • Chat history list styling (pill-shaped rows, hover)
  • useUpdateConversationTitle for renaming; export new hooks from AIState
  • Locale strings for new chat header and delete modal; ChatHistory tests updated for useDeleteConversationModal

Testing Done

  • Unit tests added/updated
  • Integration tests added/updated
  • Manual testing performed
  • Tested on different browsers/devices (if applicable)

Test Details:
ChatHistory tests updated (useDeleteConversationModal mock); all pass. Manually: rename (open rename, type including Space, save/cancel), delete (open modal, confirm/cancel, error display), row click/Enter/Space when not editing.

Screenshots/Videos

Click to expand

Definition of Done (DOD)

Code Quality

  • Code follows project style guidelines and conventions
  • Code has been self-reviewed for logic, readability, and best practices
  • No debugging code (console.logs, commented code, etc.) left behind
  • No linter errors or warnings introduced
  • Code is properly commented where necessary

Testing

  • Unit tests added/updated and passing
  • Integration tests added/updated (if applicable)
  • Manual testing completed successfully
  • Edge cases and error scenarios tested
  • No existing tests broken by changes

Documentation

  • Code documentation updated (JSDoc, inline comments)
  • README updated (if applicable)
  • User-facing documentation updated (if applicable)
  • CHANGELOG updated (if maintained)

Review & Quality

  • PR description is clear and complete
  • All related issues are linked
  • Breaking changes are clearly documented
  • Security implications considered and addressed
  • Performance impact assessed
  • Accessibility requirements met (if UI changes)

Pre-Merge

  • All CI/CD checks passing
  • At least one approval from code owner/reviewer
  • All review comments addressed or resolved
  • Branch is up to date with target branch
  • No merge conflicts

Additional Notes

Reviewer Guidance


@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Feb 3, 2026
@openshift-ci-robot
Copy link

openshift-ci-robot commented Feb 3, 2026

@grantsydney: This pull request references GIE-95 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.22.0" version, but no target version was set.

Details

In response to this:

Description

Adds rename and delete for conversations in chat history. Refactors EditableChatHeader so it works inline (in the list) and in the default (chat header) variant with optional icon and delete. Introduces a delete hook that calls the backend and a reusable modal hook for the delete confirmation flow.

Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • [X ] ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📝 Documentation update
  • 🎨 UI/UX improvement
  • ♻️ Code refactoring (no functional changes)
  • ⚡ Performance improvement
  • 🧪 Test updates

Related Issues

Fixes #

Changes Made

  • Rename in chat history: EditableChatHeader used inline in the list so users can rename from the kebab (Rename) and edit the title in place; save/cancel and validation.
  • EditableChatHeader refactor: Single component for inline (list row: title + kebab) and default (chat header with optional icon, ChatbotHeader). Optional onDeleteClick; optional icon in default variant
  • Delete flow: useDeleteConversation hook calls backend DELETE; useDeleteConversationModal for modal state/handlers; DeleteConversationModal UI; ChatHistory wires delete from kebab and shows confirmation; drawer closes on success via onDeleted.
  • Chat history row: isEventFromInput helper so click/keyboard from input/textarea don’t open the conversation.
  • Tests & locales: ChatHistory tests mock useDeleteConversationModal; added locale keys for cancel/save title.

Testing Done

  • Unit tests added/updated
  • Integration tests added/updated
  • Manual testing performed
  • Tested on different browsers/devices (if applicable)

Test Details:
ChatHistory tests updated (useDeleteConversationModal mock); all pass. Manually: rename (open rename, type including Space, save/cancel), delete (open modal, confirm/cancel, error display), row click/Enter/Space when not editing.

Screenshots/Videos

Click to expand
Screen.Recording.2026-02-03.at.12.28.21.PM.mov

Definition of Done (DOD)

Code Quality

  • Code follows project style guidelines and conventions
  • Code has been self-reviewed for logic, readability, and best practices
  • No debugging code (console.logs, commented code, etc.) left behind
  • No linter errors or warnings introduced
  • Code is properly commented where necessary

Testing

  • Unit tests added/updated and passing
  • Integration tests added/updated (if applicable)
  • Manual testing completed successfully
  • Edge cases and error scenarios tested
  • No existing tests broken by changes

Documentation

  • Code documentation updated (JSDoc, inline comments)
  • README updated (if applicable)
  • User-facing documentation updated (if applicable)
  • CHANGELOG updated (if maintained)

Review & Quality

  • PR description is clear and complete
  • All related issues are linked
  • Breaking changes are clearly documented
  • Security implications considered and addressed
  • Performance impact assessed
  • Accessibility requirements met (if UI changes)

Pre-Merge

  • All CI/CD checks passing
  • At least one approval from code owner/reviewer
  • All review comments addressed or resolved
  • Branch is up to date with target branch
  • No merge conflicts

Additional Notes

Reviewer Guidance


Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 3, 2026
@openshift-ci
Copy link

openshift-ci bot commented Feb 3, 2026

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 3, 2026
@openshift-ci
Copy link

openshift-ci bot commented Feb 3, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: grantsydney

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 3, 2026
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 3, 2026
@openshift-ci-robot
Copy link

openshift-ci-robot commented Feb 3, 2026

@grantsydney: This pull request references GIE-95 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.22.0" version, but no target version was set.

Details

In response to this:

Description

Adds rename and delete for conversations in chat history. Refactors EditableChatHeader so it works in two variants: inline (in the history list) and default (chat header), with optional icon and delete. Introduces a delete hook that calls the backend (useDeleteConversation) and a reusable modal hook for the delete confirmation flow (useDeleteConversationModal). When the user deletes the active conversation or the last conversation in the list, the app navigates to the new-chat screen; uses window.location.replace for that navigation so the new-chat view reliably loads (router navigate was leaving a blank screen when the history list became empty).

Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • [X ] ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📝 Documentation update
  • 🎨 UI/UX improvement
  • ♻️ Code refactoring (no functional changes)
  • ⚡ Performance improvement
  • 🧪 Test updates

Related Issues

Fixes #

Changes Made

  • EditableChatHeader refactored for two variants: inline (in the history list, with kebab for rename/delete) and default (chat header), with optional icon and delete
  • Delete confirmation modal (DeleteConversationModal) and reusable modal hook (useDeleteConversationModal); backend delete hook (useDeleteConversation)
  • Rename and delete in chat history via inline EditableChatHeader; i18n for header and modal
  • Navigate to new-chat when deleting the active conversation or the last conversation in the list; use window.location.replace so the new-chat view always loads
  • Chat history list styling (pill-shaped rows, hover)
  • useUpdateConversationTitle for renaming; export new hooks from AIState
  • Locale strings for new chat header and delete modal; ChatHistory tests updated for useDeleteConversationModal

Testing Done

  • Unit tests added/updated
  • Integration tests added/updated
  • Manual testing performed
  • Tested on different browsers/devices (if applicable)

Test Details:
ChatHistory tests updated (useDeleteConversationModal mock); all pass. Manually: rename (open rename, type including Space, save/cancel), delete (open modal, confirm/cancel, error display), row click/Enter/Space when not editing.

Screenshots/Videos

Click to expand
Screen.Recording.2026-02-03.at.12.28.21.PM.mov

Definition of Done (DOD)

Code Quality

  • Code follows project style guidelines and conventions
  • Code has been self-reviewed for logic, readability, and best practices
  • No debugging code (console.logs, commented code, etc.) left behind
  • No linter errors or warnings introduced
  • Code is properly commented where necessary

Testing

  • Unit tests added/updated and passing
  • Integration tests added/updated (if applicable)
  • Manual testing completed successfully
  • Edge cases and error scenarios tested
  • No existing tests broken by changes

Documentation

  • Code documentation updated (JSDoc, inline comments)
  • README updated (if applicable)
  • User-facing documentation updated (if applicable)
  • CHANGELOG updated (if maintained)

Review & Quality

  • PR description is clear and complete
  • All related issues are linked
  • Breaking changes are clearly documented
  • Security implications considered and addressed
  • Performance impact assessed
  • Accessibility requirements met (if UI changes)

Pre-Merge

  • All CI/CD checks passing
  • At least one approval from code owner/reviewer
  • All review comments addressed or resolved
  • Branch is up to date with target branch
  • No merge conflicts

Additional Notes

Reviewer Guidance


Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot
Copy link

openshift-ci-robot commented Feb 3, 2026

@grantsydney: This pull request references GIE-95 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.22.0" version, but no target version was set.

Details

In response to this:

Description

Adds rename and delete for conversations in chat history. Refactors EditableChatHeader so it works in two variants: inline (in the history list) and default (chat header), with optional icon and delete. Introduces a delete hook that calls the backend (useDeleteConversation) and a reusable modal hook for the delete confirmation flow (useDeleteConversationModal). When the user deletes the active conversation or the last conversation in the list, the app navigates to the new-chat screen; uses window.location.replace for that navigation so the new-chat view reliably loads (router navigate was leaving a blank screen when the history list became empty).

Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • [X ] ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📝 Documentation update
  • 🎨 UI/UX improvement
  • ♻️ Code refactoring (no functional changes)
  • ⚡ Performance improvement
  • 🧪 Test updates

Related Issues

Fixes #

Changes Made

  • EditableChatHeader refactored for two variants: inline (in the history list, with kebab for rename/delete) and default (chat header), with optional icon and delete
  • Delete confirmation modal (DeleteConversationModal) and reusable modal hook (useDeleteConversationModal); backend delete hook (useDeleteConversation)
  • Rename and delete in chat history via inline EditableChatHeader; i18n for header and modal
  • Navigate to new-chat when deleting the active conversation or the last conversation in the list; use window.location.replace so the new-chat view always loads
  • Chat history list styling (pill-shaped rows, hover)
  • useUpdateConversationTitle for renaming; export new hooks from AIState
  • Locale strings for new chat header and delete modal; ChatHistory tests updated for useDeleteConversationModal

Testing Done

  • Unit tests added/updated
  • Integration tests added/updated
  • Manual testing performed
  • Tested on different browsers/devices (if applicable)

Test Details:
ChatHistory tests updated (useDeleteConversationModal mock); all pass. Manually: rename (open rename, type including Space, save/cancel), delete (open modal, confirm/cancel, error display), row click/Enter/Space when not editing.

Screenshots/Videos

Click to expand

Definition of Done (DOD)

Code Quality

  • Code follows project style guidelines and conventions
  • Code has been self-reviewed for logic, readability, and best practices
  • No debugging code (console.logs, commented code, etc.) left behind
  • No linter errors or warnings introduced
  • Code is properly commented where necessary

Testing

  • Unit tests added/updated and passing
  • Integration tests added/updated (if applicable)
  • Manual testing completed successfully
  • Edge cases and error scenarios tested
  • No existing tests broken by changes

Documentation

  • Code documentation updated (JSDoc, inline comments)
  • README updated (if applicable)
  • User-facing documentation updated (if applicable)
  • CHANGELOG updated (if maintained)

Review & Quality

  • PR description is clear and complete
  • All related issues are linked
  • Breaking changes are clearly documented
  • Security implications considered and addressed
  • Performance impact assessed
  • Accessibility requirements met (if UI changes)

Pre-Merge

  • All CI/CD checks passing
  • At least one approval from code owner/reviewer
  • All review comments addressed or resolved
  • Branch is up to date with target branch
  • No merge conflicts

Additional Notes

Reviewer Guidance


Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@grantsydney grantsydney marked this pull request as ready for review February 3, 2026 21:32
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 3, 2026
@openshift-ci openshift-ci bot requested review from jhadvig and spadgett February 3, 2026 21:32
@vishsanghishetty
Copy link
Contributor

The delete modal looks clipped behind the chat history drawer (title starts mid‑word). Can you check the modal’s stacking context so it isn’t rendered under the drawer?

When the delete modal opens, the kebab menu still appears open behind it. Can you make sure the menu state closes when the modal opens?

image

if (isEventFromInput(e)) return;
onClick(conversation);
}}
onKeyDown={(e) => {
Copy link
Contributor

@vishsanghishetty vishsanghishetty Feb 3, 2026

Choose a reason for hiding this comment

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

The row’s onKeyDown handler triggers navigation on Enter/Space, but it doesn’t guard against key events coming from child controls (like the kebab).

Image

Right now, pressing Enter or Space on the dropdown toggle can both open the menu and navigate into the conversation. Can you make sure keyboard interaction with the menu doesn’t trigger row navigation?

@openshift-ci
Copy link

openshift-ci bot commented Feb 3, 2026

@grantsydney: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants