Skip to content

Conversation

@angorayc
Copy link
Contributor

@angorayc angorayc commented Aug 4, 2025

Summary

  1. The last system prompt was deleted successfully but remained in the list until page refreshed:
    [Security Solution] System prompt remained in the list after deleting #230376

Steps to verify item 1:

  • Create some system prompts and delete them:
POST kbn:/api/security_ai_assistant/prompts/_bulk_action
{
  "create": [
    {
      "id": "",
      "content": "xxx0",
      "name": "xxxx0",
      "promptType": "system",
      "consumer": "management",
      "conversations": []
    },
    {
      "id": "",
      "content": "xxx1",
      "name": "xxxx1",
      "promptType": "system",
      "consumer": "management",
      "conversations": []
    },
    {
      "id": "",
      "content": "xxx2",
      "name": "xxxx2",
      "promptType": "system",
      "consumer": "management",
      "conversations": []
    },
    {
      "id": "",
      "content": "xxx3",
      "name": "xxxx3",
      "promptType": "system",
      "consumer": "management",
      "conversations": []
    },
    {
      "id": "",
      "content": "xxx4",
      "name": "xxxx4",
      "promptType": "system",
      "consumer": "management",
      "conversations": []
    },
    {
      "id": "",
      "content": "xxx5",
      "name": "xxxx5",
      "promptType": "system",
      "consumer": "management",
      "conversations": []
    },
    {
      "id": "",
      "content": "xxx6",
      "name": "xxxx6",
      "promptType": "system",
      "consumer": "management",
      "conversations": []
    },
    {
      "id": "",
      "content": "xxx7",
      "name": "xxxx7",
      "promptType": "system",
      "consumer": "management",
      "conversations": []
    },
    {
      "id": "",
      "content": "xxx8",
      "name": "xxxx8",
      "promptType": "system",
      "consumer": "management",
      "conversations": []
    },
    {
      "id": "",
      "content": "xxx9",
      "name": "xxxx9",
      "promptType": "system",
      "consumer": "management",
      "conversations": []
    },
    {
      "id": "",
      "content": "xxx10",
      "name": "xxxx10",
      "promptType": "system",
      "consumer": "management",
      "conversations": []
    },
    {
      "id": "",
      "content": "xxx11",
      "name": "xxxx11",
      "promptType": "system",
      "consumer": "management",
      "conversations": []
    },  
    {
      "id": "",
      "content": "xxx12",
      "name": "xxxx12",
      "promptType": "system",
      "consumer": "management",
      "conversations": []
    }
  ]
}
  1. Conversation title overflow in settings:
Screenshot 2025-08-04 at 15 59 53 Screenshot 2025-08-04 at 16 56 32

@angorayc angorayc added bug Fixes for quality problems that affect the customer experience Team:Security Generative AI Security Generative AI v9.2.0 v9.1.1 v8.19.1 labels Aug 4, 2025
@angorayc angorayc changed the title fix deleting system prompt [AI Assistant] The last system prompt was deleted successfully but remained in the list until page refreshed Aug 4, 2025
@angorayc angorayc added the release_note:skip Skip the PR/issue when compiling release notes label Aug 5, 2025
@angorayc angorayc marked this pull request as ready for review August 5, 2025 14:01
@angorayc angorayc requested a review from a team as a code owner August 5, 2025 14:01
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
securitySolution 10.3MB 10.3MB +51.0B

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
elasticAssistant 273.7KB 273.7KB -32.0B

History

@stephmilovic stephmilovic added the backport:version Backport to applied version labels label Aug 5, 2025
@angorayc angorayc merged commit e1b08cd into elastic:main Aug 6, 2025
16 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.19, 9.1

https://github.com/elastic/kibana/actions/runs/16772883601

kibanamachine added a commit to kibanamachine/kibana that referenced this pull request Aug 6, 2025
…mained in the list until page refreshed (elastic#230450)

## Summary

1. The last system prompt was deleted successfully but remained in the
list until page refreshed:
elastic#230376

Steps to verify item 1:

- Create some system prompts and delete them:
```
POST kbn:/api/security_ai_assistant/prompts/_bulk_action
{
  "create": [
    {
      "id": "",
      "content": "xxx0",
      "name": "xxxx0",
      "promptType": "system",
      "consumer": "management",
      "conversations": []
    },
    {
      "id": "",
      "content": "xxx1",
      "name": "xxxx1",
      "promptType": "system",
      "consumer": "management",
      "conversations": []
    },
    {
      "id": "",
      "content": "xxx2",
      "name": "xxxx2",
      "promptType": "system",
      "consumer": "management",
      "conversations": []
    },
    {
      "id": "",
      "content": "xxx3",
      "name": "xxxx3",
      "promptType": "system",
      "consumer": "management",
      "conversations": []
    },
    {
      "id": "",
      "content": "xxx4",
      "name": "xxxx4",
      "promptType": "system",
      "consumer": "management",
      "conversations": []
    },
    {
      "id": "",
      "content": "xxx5",
      "name": "xxxx5",
      "promptType": "system",
      "consumer": "management",
      "conversations": []
    },
    {
      "id": "",
      "content": "xxx6",
      "name": "xxxx6",
      "promptType": "system",
      "consumer": "management",
      "conversations": []
    },
    {
      "id": "",
      "content": "xxx7",
      "name": "xxxx7",
      "promptType": "system",
      "consumer": "management",
      "conversations": []
    },
    {
      "id": "",
      "content": "xxx8",
      "name": "xxxx8",
      "promptType": "system",
      "consumer": "management",
      "conversations": []
    },
    {
      "id": "",
      "content": "xxx9",
      "name": "xxxx9",
      "promptType": "system",
      "consumer": "management",
      "conversations": []
    },
    {
      "id": "",
      "content": "xxx10",
      "name": "xxxx10",
      "promptType": "system",
      "consumer": "management",
      "conversations": []
    },
    {
      "id": "",
      "content": "xxx11",
      "name": "xxxx11",
      "promptType": "system",
      "consumer": "management",
      "conversations": []
    },
    {
      "id": "",
      "content": "xxx12",
      "name": "xxxx12",
      "promptType": "system",
      "consumer": "management",
      "conversations": []
    }
  ]
}
```

2. Conversation title overflow in settings:
<img width="2557" height="810" alt="Screenshot 2025-08-04 at 15 59 53"
src="https://github.com/user-attachments/assets/5648cafe-a9e7-4043-a5ab-207133d86f7b"
/>
<img width="1511" height="768" alt="Screenshot 2025-08-04 at 16 56 32"
src="https://github.com/user-attachments/assets/502925de-9018-4b16-a33f-03c8d5715494"
/>

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit e1b08cd)
kibanamachine added a commit to kibanamachine/kibana that referenced this pull request Aug 6, 2025
…mained in the list until page refreshed (elastic#230450)

## Summary

1. The last system prompt was deleted successfully but remained in the
list until page refreshed:
elastic#230376

Steps to verify item 1:

- Create some system prompts and delete them:
```
POST kbn:/api/security_ai_assistant/prompts/_bulk_action
{
  "create": [
    {
      "id": "",
      "content": "xxx0",
      "name": "xxxx0",
      "promptType": "system",
      "consumer": "management",
      "conversations": []
    },
    {
      "id": "",
      "content": "xxx1",
      "name": "xxxx1",
      "promptType": "system",
      "consumer": "management",
      "conversations": []
    },
    {
      "id": "",
      "content": "xxx2",
      "name": "xxxx2",
      "promptType": "system",
      "consumer": "management",
      "conversations": []
    },
    {
      "id": "",
      "content": "xxx3",
      "name": "xxxx3",
      "promptType": "system",
      "consumer": "management",
      "conversations": []
    },
    {
      "id": "",
      "content": "xxx4",
      "name": "xxxx4",
      "promptType": "system",
      "consumer": "management",
      "conversations": []
    },
    {
      "id": "",
      "content": "xxx5",
      "name": "xxxx5",
      "promptType": "system",
      "consumer": "management",
      "conversations": []
    },
    {
      "id": "",
      "content": "xxx6",
      "name": "xxxx6",
      "promptType": "system",
      "consumer": "management",
      "conversations": []
    },
    {
      "id": "",
      "content": "xxx7",
      "name": "xxxx7",
      "promptType": "system",
      "consumer": "management",
      "conversations": []
    },
    {
      "id": "",
      "content": "xxx8",
      "name": "xxxx8",
      "promptType": "system",
      "consumer": "management",
      "conversations": []
    },
    {
      "id": "",
      "content": "xxx9",
      "name": "xxxx9",
      "promptType": "system",
      "consumer": "management",
      "conversations": []
    },
    {
      "id": "",
      "content": "xxx10",
      "name": "xxxx10",
      "promptType": "system",
      "consumer": "management",
      "conversations": []
    },
    {
      "id": "",
      "content": "xxx11",
      "name": "xxxx11",
      "promptType": "system",
      "consumer": "management",
      "conversations": []
    },
    {
      "id": "",
      "content": "xxx12",
      "name": "xxxx12",
      "promptType": "system",
      "consumer": "management",
      "conversations": []
    }
  ]
}
```

2. Conversation title overflow in settings:
<img width="2557" height="810" alt="Screenshot 2025-08-04 at 15 59 53"
src="https://github.com/user-attachments/assets/5648cafe-a9e7-4043-a5ab-207133d86f7b"
/>
<img width="1511" height="768" alt="Screenshot 2025-08-04 at 16 56 32"
src="https://github.com/user-attachments/assets/502925de-9018-4b16-a33f-03c8d5715494"
/>

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit e1b08cd)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.19
9.1

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Aug 6, 2025
… but remained in the list until page refreshed (#230450) (#230736)

# Backport

This will backport the following commits from `main` to `8.19`:
- [[AI Assistant] The last system prompt was deleted successfully but
remained in the list until page refreshed
(#230450)](#230450)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Angela
Chuang","email":"6295984+angorayc@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-08-06T09:20:54Z","message":"[AI
Assistant] The last system prompt was deleted successfully but remained
in the list until page refreshed (#230450)\n\n## Summary\n\n\n1. The
last system prompt was deleted successfully but remained in the\nlist
until page
refreshed:\nhttps://github.com//issues/230376\n\nSteps to
verify item 1:\n\n- Create some system prompts and delete
them:\n```\nPOST
kbn:/api/security_ai_assistant/prompts/_bulk_action\n{\n \"create\": [\n
{\n \"id\": \"\",\n \"content\": \"xxx0\",\n \"name\": \"xxxx0\",\n
\"promptType\": \"system\",\n \"consumer\": \"management\",\n
\"conversations\": []\n },\n {\n \"id\": \"\",\n \"content\":
\"xxx1\",\n \"name\": \"xxxx1\",\n \"promptType\": \"system\",\n
\"consumer\": \"management\",\n \"conversations\": []\n },\n {\n \"id\":
\"\",\n \"content\": \"xxx2\",\n \"name\": \"xxxx2\",\n \"promptType\":
\"system\",\n \"consumer\": \"management\",\n \"conversations\": []\n
},\n {\n \"id\": \"\",\n \"content\": \"xxx3\",\n \"name\": \"xxxx3\",\n
\"promptType\": \"system\",\n \"consumer\": \"management\",\n
\"conversations\": []\n },\n {\n \"id\": \"\",\n \"content\":
\"xxx4\",\n \"name\": \"xxxx4\",\n \"promptType\": \"system\",\n
\"consumer\": \"management\",\n \"conversations\": []\n },\n {\n \"id\":
\"\",\n \"content\": \"xxx5\",\n \"name\": \"xxxx5\",\n \"promptType\":
\"system\",\n \"consumer\": \"management\",\n \"conversations\": []\n
},\n {\n \"id\": \"\",\n \"content\": \"xxx6\",\n \"name\": \"xxxx6\",\n
\"promptType\": \"system\",\n \"consumer\": \"management\",\n
\"conversations\": []\n },\n {\n \"id\": \"\",\n \"content\":
\"xxx7\",\n \"name\": \"xxxx7\",\n \"promptType\": \"system\",\n
\"consumer\": \"management\",\n \"conversations\": []\n },\n {\n \"id\":
\"\",\n \"content\": \"xxx8\",\n \"name\": \"xxxx8\",\n \"promptType\":
\"system\",\n \"consumer\": \"management\",\n \"conversations\": []\n
},\n {\n \"id\": \"\",\n \"content\": \"xxx9\",\n \"name\": \"xxxx9\",\n
\"promptType\": \"system\",\n \"consumer\": \"management\",\n
\"conversations\": []\n },\n {\n \"id\": \"\",\n \"content\":
\"xxx10\",\n \"name\": \"xxxx10\",\n \"promptType\": \"system\",\n
\"consumer\": \"management\",\n \"conversations\": []\n },\n {\n \"id\":
\"\",\n \"content\": \"xxx11\",\n \"name\": \"xxxx11\",\n
\"promptType\": \"system\",\n \"consumer\": \"management\",\n
\"conversations\": []\n }, \n {\n \"id\": \"\",\n \"content\":
\"xxx12\",\n \"name\": \"xxxx12\",\n \"promptType\": \"system\",\n
\"consumer\": \"management\",\n \"conversations\": []\n }\n
]\n}\n```\n\n2. Conversation title overflow in settings:\n<img
width=\"2557\" height=\"810\" alt=\"Screenshot 2025-08-04 at 15 59
53\"\nsrc=\"https://github.com/user-attachments/assets/5648cafe-a9e7-4043-a5ab-207133d86f7b\"\n/>\n<img
width=\"1511\" height=\"768\" alt=\"Screenshot 2025-08-04 at 16 56
32\"\nsrc=\"https://github.com/user-attachments/assets/502925de-9018-4b16-a33f-03c8d5715494\"\n/>\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"e1b08cdd7e5f8ba955d2edfb99a587799b1d5008","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:skip","Team:Security
Generative
AI","backport:version","v9.2.0","v9.1.1","v8.19.1"],"title":"[AI
Assistant] The last system prompt was deleted successfully but remained
in the list until page
refreshed","number":230450,"url":"https://github.com/elastic/kibana/pull/230450","mergeCommit":{"message":"[AI
Assistant] The last system prompt was deleted successfully but remained
in the list until page refreshed (#230450)\n\n## Summary\n\n\n1. The
last system prompt was deleted successfully but remained in the\nlist
until page
refreshed:\nhttps://github.com//issues/230376\n\nSteps to
verify item 1:\n\n- Create some system prompts and delete
them:\n```\nPOST
kbn:/api/security_ai_assistant/prompts/_bulk_action\n{\n \"create\": [\n
{\n \"id\": \"\",\n \"content\": \"xxx0\",\n \"name\": \"xxxx0\",\n
\"promptType\": \"system\",\n \"consumer\": \"management\",\n
\"conversations\": []\n },\n {\n \"id\": \"\",\n \"content\":
\"xxx1\",\n \"name\": \"xxxx1\",\n \"promptType\": \"system\",\n
\"consumer\": \"management\",\n \"conversations\": []\n },\n {\n \"id\":
\"\",\n \"content\": \"xxx2\",\n \"name\": \"xxxx2\",\n \"promptType\":
\"system\",\n \"consumer\": \"management\",\n \"conversations\": []\n
},\n {\n \"id\": \"\",\n \"content\": \"xxx3\",\n \"name\": \"xxxx3\",\n
\"promptType\": \"system\",\n \"consumer\": \"management\",\n
\"conversations\": []\n },\n {\n \"id\": \"\",\n \"content\":
\"xxx4\",\n \"name\": \"xxxx4\",\n \"promptType\": \"system\",\n
\"consumer\": \"management\",\n \"conversations\": []\n },\n {\n \"id\":
\"\",\n \"content\": \"xxx5\",\n \"name\": \"xxxx5\",\n \"promptType\":
\"system\",\n \"consumer\": \"management\",\n \"conversations\": []\n
},\n {\n \"id\": \"\",\n \"content\": \"xxx6\",\n \"name\": \"xxxx6\",\n
\"promptType\": \"system\",\n \"consumer\": \"management\",\n
\"conversations\": []\n },\n {\n \"id\": \"\",\n \"content\":
\"xxx7\",\n \"name\": \"xxxx7\",\n \"promptType\": \"system\",\n
\"consumer\": \"management\",\n \"conversations\": []\n },\n {\n \"id\":
\"\",\n \"content\": \"xxx8\",\n \"name\": \"xxxx8\",\n \"promptType\":
\"system\",\n \"consumer\": \"management\",\n \"conversations\": []\n
},\n {\n \"id\": \"\",\n \"content\": \"xxx9\",\n \"name\": \"xxxx9\",\n
\"promptType\": \"system\",\n \"consumer\": \"management\",\n
\"conversations\": []\n },\n {\n \"id\": \"\",\n \"content\":
\"xxx10\",\n \"name\": \"xxxx10\",\n \"promptType\": \"system\",\n
\"consumer\": \"management\",\n \"conversations\": []\n },\n {\n \"id\":
\"\",\n \"content\": \"xxx11\",\n \"name\": \"xxxx11\",\n
\"promptType\": \"system\",\n \"consumer\": \"management\",\n
\"conversations\": []\n }, \n {\n \"id\": \"\",\n \"content\":
\"xxx12\",\n \"name\": \"xxxx12\",\n \"promptType\": \"system\",\n
\"consumer\": \"management\",\n \"conversations\": []\n }\n
]\n}\n```\n\n2. Conversation title overflow in settings:\n<img
width=\"2557\" height=\"810\" alt=\"Screenshot 2025-08-04 at 15 59
53\"\nsrc=\"https://github.com/user-attachments/assets/5648cafe-a9e7-4043-a5ab-207133d86f7b\"\n/>\n<img
width=\"1511\" height=\"768\" alt=\"Screenshot 2025-08-04 at 16 56
32\"\nsrc=\"https://github.com/user-attachments/assets/502925de-9018-4b16-a33f-03c8d5715494\"\n/>\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"e1b08cdd7e5f8ba955d2edfb99a587799b1d5008"}},"sourceBranch":"main","suggestedTargetBranches":["9.1","8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/230450","number":230450,"mergeCommit":{"message":"[AI
Assistant] The last system prompt was deleted successfully but remained
in the list until page refreshed (#230450)\n\n## Summary\n\n\n1. The
last system prompt was deleted successfully but remained in the\nlist
until page
refreshed:\nhttps://github.com//issues/230376\n\nSteps to
verify item 1:\n\n- Create some system prompts and delete
them:\n```\nPOST
kbn:/api/security_ai_assistant/prompts/_bulk_action\n{\n \"create\": [\n
{\n \"id\": \"\",\n \"content\": \"xxx0\",\n \"name\": \"xxxx0\",\n
\"promptType\": \"system\",\n \"consumer\": \"management\",\n
\"conversations\": []\n },\n {\n \"id\": \"\",\n \"content\":
\"xxx1\",\n \"name\": \"xxxx1\",\n \"promptType\": \"system\",\n
\"consumer\": \"management\",\n \"conversations\": []\n },\n {\n \"id\":
\"\",\n \"content\": \"xxx2\",\n \"name\": \"xxxx2\",\n \"promptType\":
\"system\",\n \"consumer\": \"management\",\n \"conversations\": []\n
},\n {\n \"id\": \"\",\n \"content\": \"xxx3\",\n \"name\": \"xxxx3\",\n
\"promptType\": \"system\",\n \"consumer\": \"management\",\n
\"conversations\": []\n },\n {\n \"id\": \"\",\n \"content\":
\"xxx4\",\n \"name\": \"xxxx4\",\n \"promptType\": \"system\",\n
\"consumer\": \"management\",\n \"conversations\": []\n },\n {\n \"id\":
\"\",\n \"content\": \"xxx5\",\n \"name\": \"xxxx5\",\n \"promptType\":
\"system\",\n \"consumer\": \"management\",\n \"conversations\": []\n
},\n {\n \"id\": \"\",\n \"content\": \"xxx6\",\n \"name\": \"xxxx6\",\n
\"promptType\": \"system\",\n \"consumer\": \"management\",\n
\"conversations\": []\n },\n {\n \"id\": \"\",\n \"content\":
\"xxx7\",\n \"name\": \"xxxx7\",\n \"promptType\": \"system\",\n
\"consumer\": \"management\",\n \"conversations\": []\n },\n {\n \"id\":
\"\",\n \"content\": \"xxx8\",\n \"name\": \"xxxx8\",\n \"promptType\":
\"system\",\n \"consumer\": \"management\",\n \"conversations\": []\n
},\n {\n \"id\": \"\",\n \"content\": \"xxx9\",\n \"name\": \"xxxx9\",\n
\"promptType\": \"system\",\n \"consumer\": \"management\",\n
\"conversations\": []\n },\n {\n \"id\": \"\",\n \"content\":
\"xxx10\",\n \"name\": \"xxxx10\",\n \"promptType\": \"system\",\n
\"consumer\": \"management\",\n \"conversations\": []\n },\n {\n \"id\":
\"\",\n \"content\": \"xxx11\",\n \"name\": \"xxxx11\",\n
\"promptType\": \"system\",\n \"consumer\": \"management\",\n
\"conversations\": []\n }, \n {\n \"id\": \"\",\n \"content\":
\"xxx12\",\n \"name\": \"xxxx12\",\n \"promptType\": \"system\",\n
\"consumer\": \"management\",\n \"conversations\": []\n }\n
]\n}\n```\n\n2. Conversation title overflow in settings:\n<img
width=\"2557\" height=\"810\" alt=\"Screenshot 2025-08-04 at 15 59
53\"\nsrc=\"https://github.com/user-attachments/assets/5648cafe-a9e7-4043-a5ab-207133d86f7b\"\n/>\n<img
width=\"1511\" height=\"768\" alt=\"Screenshot 2025-08-04 at 16 56
32\"\nsrc=\"https://github.com/user-attachments/assets/502925de-9018-4b16-a33f-03c8d5715494\"\n/>\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"e1b08cdd7e5f8ba955d2edfb99a587799b1d5008"}},{"branch":"9.1","label":"v9.1.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Angela Chuang <6295984+angorayc@users.noreply.github.com>
kibanamachine added a commit that referenced this pull request Aug 6, 2025
…but remained in the list until page refreshed (#230450) (#230737)

# Backport

This will backport the following commits from `main` to `9.1`:
- [[AI Assistant] The last system prompt was deleted successfully but
remained in the list until page refreshed
(#230450)](#230450)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Angela
Chuang","email":"6295984+angorayc@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-08-06T09:20:54Z","message":"[AI
Assistant] The last system prompt was deleted successfully but remained
in the list until page refreshed (#230450)\n\n## Summary\n\n\n1. The
last system prompt was deleted successfully but remained in the\nlist
until page
refreshed:\nhttps://github.com//issues/230376\n\nSteps to
verify item 1:\n\n- Create some system prompts and delete
them:\n```\nPOST
kbn:/api/security_ai_assistant/prompts/_bulk_action\n{\n \"create\": [\n
{\n \"id\": \"\",\n \"content\": \"xxx0\",\n \"name\": \"xxxx0\",\n
\"promptType\": \"system\",\n \"consumer\": \"management\",\n
\"conversations\": []\n },\n {\n \"id\": \"\",\n \"content\":
\"xxx1\",\n \"name\": \"xxxx1\",\n \"promptType\": \"system\",\n
\"consumer\": \"management\",\n \"conversations\": []\n },\n {\n \"id\":
\"\",\n \"content\": \"xxx2\",\n \"name\": \"xxxx2\",\n \"promptType\":
\"system\",\n \"consumer\": \"management\",\n \"conversations\": []\n
},\n {\n \"id\": \"\",\n \"content\": \"xxx3\",\n \"name\": \"xxxx3\",\n
\"promptType\": \"system\",\n \"consumer\": \"management\",\n
\"conversations\": []\n },\n {\n \"id\": \"\",\n \"content\":
\"xxx4\",\n \"name\": \"xxxx4\",\n \"promptType\": \"system\",\n
\"consumer\": \"management\",\n \"conversations\": []\n },\n {\n \"id\":
\"\",\n \"content\": \"xxx5\",\n \"name\": \"xxxx5\",\n \"promptType\":
\"system\",\n \"consumer\": \"management\",\n \"conversations\": []\n
},\n {\n \"id\": \"\",\n \"content\": \"xxx6\",\n \"name\": \"xxxx6\",\n
\"promptType\": \"system\",\n \"consumer\": \"management\",\n
\"conversations\": []\n },\n {\n \"id\": \"\",\n \"content\":
\"xxx7\",\n \"name\": \"xxxx7\",\n \"promptType\": \"system\",\n
\"consumer\": \"management\",\n \"conversations\": []\n },\n {\n \"id\":
\"\",\n \"content\": \"xxx8\",\n \"name\": \"xxxx8\",\n \"promptType\":
\"system\",\n \"consumer\": \"management\",\n \"conversations\": []\n
},\n {\n \"id\": \"\",\n \"content\": \"xxx9\",\n \"name\": \"xxxx9\",\n
\"promptType\": \"system\",\n \"consumer\": \"management\",\n
\"conversations\": []\n },\n {\n \"id\": \"\",\n \"content\":
\"xxx10\",\n \"name\": \"xxxx10\",\n \"promptType\": \"system\",\n
\"consumer\": \"management\",\n \"conversations\": []\n },\n {\n \"id\":
\"\",\n \"content\": \"xxx11\",\n \"name\": \"xxxx11\",\n
\"promptType\": \"system\",\n \"consumer\": \"management\",\n
\"conversations\": []\n }, \n {\n \"id\": \"\",\n \"content\":
\"xxx12\",\n \"name\": \"xxxx12\",\n \"promptType\": \"system\",\n
\"consumer\": \"management\",\n \"conversations\": []\n }\n
]\n}\n```\n\n2. Conversation title overflow in settings:\n<img
width=\"2557\" height=\"810\" alt=\"Screenshot 2025-08-04 at 15 59
53\"\nsrc=\"https://github.com/user-attachments/assets/5648cafe-a9e7-4043-a5ab-207133d86f7b\"\n/>\n<img
width=\"1511\" height=\"768\" alt=\"Screenshot 2025-08-04 at 16 56
32\"\nsrc=\"https://github.com/user-attachments/assets/502925de-9018-4b16-a33f-03c8d5715494\"\n/>\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"e1b08cdd7e5f8ba955d2edfb99a587799b1d5008","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:skip","Team:Security
Generative
AI","backport:version","v9.2.0","v9.1.1","v8.19.1"],"title":"[AI
Assistant] The last system prompt was deleted successfully but remained
in the list until page
refreshed","number":230450,"url":"https://github.com/elastic/kibana/pull/230450","mergeCommit":{"message":"[AI
Assistant] The last system prompt was deleted successfully but remained
in the list until page refreshed (#230450)\n\n## Summary\n\n\n1. The
last system prompt was deleted successfully but remained in the\nlist
until page
refreshed:\nhttps://github.com//issues/230376\n\nSteps to
verify item 1:\n\n- Create some system prompts and delete
them:\n```\nPOST
kbn:/api/security_ai_assistant/prompts/_bulk_action\n{\n \"create\": [\n
{\n \"id\": \"\",\n \"content\": \"xxx0\",\n \"name\": \"xxxx0\",\n
\"promptType\": \"system\",\n \"consumer\": \"management\",\n
\"conversations\": []\n },\n {\n \"id\": \"\",\n \"content\":
\"xxx1\",\n \"name\": \"xxxx1\",\n \"promptType\": \"system\",\n
\"consumer\": \"management\",\n \"conversations\": []\n },\n {\n \"id\":
\"\",\n \"content\": \"xxx2\",\n \"name\": \"xxxx2\",\n \"promptType\":
\"system\",\n \"consumer\": \"management\",\n \"conversations\": []\n
},\n {\n \"id\": \"\",\n \"content\": \"xxx3\",\n \"name\": \"xxxx3\",\n
\"promptType\": \"system\",\n \"consumer\": \"management\",\n
\"conversations\": []\n },\n {\n \"id\": \"\",\n \"content\":
\"xxx4\",\n \"name\": \"xxxx4\",\n \"promptType\": \"system\",\n
\"consumer\": \"management\",\n \"conversations\": []\n },\n {\n \"id\":
\"\",\n \"content\": \"xxx5\",\n \"name\": \"xxxx5\",\n \"promptType\":
\"system\",\n \"consumer\": \"management\",\n \"conversations\": []\n
},\n {\n \"id\": \"\",\n \"content\": \"xxx6\",\n \"name\": \"xxxx6\",\n
\"promptType\": \"system\",\n \"consumer\": \"management\",\n
\"conversations\": []\n },\n {\n \"id\": \"\",\n \"content\":
\"xxx7\",\n \"name\": \"xxxx7\",\n \"promptType\": \"system\",\n
\"consumer\": \"management\",\n \"conversations\": []\n },\n {\n \"id\":
\"\",\n \"content\": \"xxx8\",\n \"name\": \"xxxx8\",\n \"promptType\":
\"system\",\n \"consumer\": \"management\",\n \"conversations\": []\n
},\n {\n \"id\": \"\",\n \"content\": \"xxx9\",\n \"name\": \"xxxx9\",\n
\"promptType\": \"system\",\n \"consumer\": \"management\",\n
\"conversations\": []\n },\n {\n \"id\": \"\",\n \"content\":
\"xxx10\",\n \"name\": \"xxxx10\",\n \"promptType\": \"system\",\n
\"consumer\": \"management\",\n \"conversations\": []\n },\n {\n \"id\":
\"\",\n \"content\": \"xxx11\",\n \"name\": \"xxxx11\",\n
\"promptType\": \"system\",\n \"consumer\": \"management\",\n
\"conversations\": []\n }, \n {\n \"id\": \"\",\n \"content\":
\"xxx12\",\n \"name\": \"xxxx12\",\n \"promptType\": \"system\",\n
\"consumer\": \"management\",\n \"conversations\": []\n }\n
]\n}\n```\n\n2. Conversation title overflow in settings:\n<img
width=\"2557\" height=\"810\" alt=\"Screenshot 2025-08-04 at 15 59
53\"\nsrc=\"https://github.com/user-attachments/assets/5648cafe-a9e7-4043-a5ab-207133d86f7b\"\n/>\n<img
width=\"1511\" height=\"768\" alt=\"Screenshot 2025-08-04 at 16 56
32\"\nsrc=\"https://github.com/user-attachments/assets/502925de-9018-4b16-a33f-03c8d5715494\"\n/>\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"e1b08cdd7e5f8ba955d2edfb99a587799b1d5008"}},"sourceBranch":"main","suggestedTargetBranches":["9.1","8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/230450","number":230450,"mergeCommit":{"message":"[AI
Assistant] The last system prompt was deleted successfully but remained
in the list until page refreshed (#230450)\n\n## Summary\n\n\n1. The
last system prompt was deleted successfully but remained in the\nlist
until page
refreshed:\nhttps://github.com//issues/230376\n\nSteps to
verify item 1:\n\n- Create some system prompts and delete
them:\n```\nPOST
kbn:/api/security_ai_assistant/prompts/_bulk_action\n{\n \"create\": [\n
{\n \"id\": \"\",\n \"content\": \"xxx0\",\n \"name\": \"xxxx0\",\n
\"promptType\": \"system\",\n \"consumer\": \"management\",\n
\"conversations\": []\n },\n {\n \"id\": \"\",\n \"content\":
\"xxx1\",\n \"name\": \"xxxx1\",\n \"promptType\": \"system\",\n
\"consumer\": \"management\",\n \"conversations\": []\n },\n {\n \"id\":
\"\",\n \"content\": \"xxx2\",\n \"name\": \"xxxx2\",\n \"promptType\":
\"system\",\n \"consumer\": \"management\",\n \"conversations\": []\n
},\n {\n \"id\": \"\",\n \"content\": \"xxx3\",\n \"name\": \"xxxx3\",\n
\"promptType\": \"system\",\n \"consumer\": \"management\",\n
\"conversations\": []\n },\n {\n \"id\": \"\",\n \"content\":
\"xxx4\",\n \"name\": \"xxxx4\",\n \"promptType\": \"system\",\n
\"consumer\": \"management\",\n \"conversations\": []\n },\n {\n \"id\":
\"\",\n \"content\": \"xxx5\",\n \"name\": \"xxxx5\",\n \"promptType\":
\"system\",\n \"consumer\": \"management\",\n \"conversations\": []\n
},\n {\n \"id\": \"\",\n \"content\": \"xxx6\",\n \"name\": \"xxxx6\",\n
\"promptType\": \"system\",\n \"consumer\": \"management\",\n
\"conversations\": []\n },\n {\n \"id\": \"\",\n \"content\":
\"xxx7\",\n \"name\": \"xxxx7\",\n \"promptType\": \"system\",\n
\"consumer\": \"management\",\n \"conversations\": []\n },\n {\n \"id\":
\"\",\n \"content\": \"xxx8\",\n \"name\": \"xxxx8\",\n \"promptType\":
\"system\",\n \"consumer\": \"management\",\n \"conversations\": []\n
},\n {\n \"id\": \"\",\n \"content\": \"xxx9\",\n \"name\": \"xxxx9\",\n
\"promptType\": \"system\",\n \"consumer\": \"management\",\n
\"conversations\": []\n },\n {\n \"id\": \"\",\n \"content\":
\"xxx10\",\n \"name\": \"xxxx10\",\n \"promptType\": \"system\",\n
\"consumer\": \"management\",\n \"conversations\": []\n },\n {\n \"id\":
\"\",\n \"content\": \"xxx11\",\n \"name\": \"xxxx11\",\n
\"promptType\": \"system\",\n \"consumer\": \"management\",\n
\"conversations\": []\n }, \n {\n \"id\": \"\",\n \"content\":
\"xxx12\",\n \"name\": \"xxxx12\",\n \"promptType\": \"system\",\n
\"consumer\": \"management\",\n \"conversations\": []\n }\n
]\n}\n```\n\n2. Conversation title overflow in settings:\n<img
width=\"2557\" height=\"810\" alt=\"Screenshot 2025-08-04 at 15 59
53\"\nsrc=\"https://github.com/user-attachments/assets/5648cafe-a9e7-4043-a5ab-207133d86f7b\"\n/>\n<img
width=\"1511\" height=\"768\" alt=\"Screenshot 2025-08-04 at 16 56
32\"\nsrc=\"https://github.com/user-attachments/assets/502925de-9018-4b16-a33f-03c8d5715494\"\n/>\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"e1b08cdd7e5f8ba955d2edfb99a587799b1d5008"}},{"branch":"9.1","label":"v9.1.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Angela Chuang <6295984+angorayc@users.noreply.github.com>
gergoabraham pushed a commit to gergoabraham/kibana that referenced this pull request Aug 7, 2025
…mained in the list until page refreshed (elastic#230450)

## Summary


1. The last system prompt was deleted successfully but remained in the
list until page refreshed:
elastic#230376

Steps to verify item 1:

- Create some system prompts and delete them:
```
POST kbn:/api/security_ai_assistant/prompts/_bulk_action
{
  "create": [
    {
      "id": "",
      "content": "xxx0",
      "name": "xxxx0",
      "promptType": "system",
      "consumer": "management",
      "conversations": []
    },
    {
      "id": "",
      "content": "xxx1",
      "name": "xxxx1",
      "promptType": "system",
      "consumer": "management",
      "conversations": []
    },
    {
      "id": "",
      "content": "xxx2",
      "name": "xxxx2",
      "promptType": "system",
      "consumer": "management",
      "conversations": []
    },
    {
      "id": "",
      "content": "xxx3",
      "name": "xxxx3",
      "promptType": "system",
      "consumer": "management",
      "conversations": []
    },
    {
      "id": "",
      "content": "xxx4",
      "name": "xxxx4",
      "promptType": "system",
      "consumer": "management",
      "conversations": []
    },
    {
      "id": "",
      "content": "xxx5",
      "name": "xxxx5",
      "promptType": "system",
      "consumer": "management",
      "conversations": []
    },
    {
      "id": "",
      "content": "xxx6",
      "name": "xxxx6",
      "promptType": "system",
      "consumer": "management",
      "conversations": []
    },
    {
      "id": "",
      "content": "xxx7",
      "name": "xxxx7",
      "promptType": "system",
      "consumer": "management",
      "conversations": []
    },
    {
      "id": "",
      "content": "xxx8",
      "name": "xxxx8",
      "promptType": "system",
      "consumer": "management",
      "conversations": []
    },
    {
      "id": "",
      "content": "xxx9",
      "name": "xxxx9",
      "promptType": "system",
      "consumer": "management",
      "conversations": []
    },
    {
      "id": "",
      "content": "xxx10",
      "name": "xxxx10",
      "promptType": "system",
      "consumer": "management",
      "conversations": []
    },
    {
      "id": "",
      "content": "xxx11",
      "name": "xxxx11",
      "promptType": "system",
      "consumer": "management",
      "conversations": []
    },  
    {
      "id": "",
      "content": "xxx12",
      "name": "xxxx12",
      "promptType": "system",
      "consumer": "management",
      "conversations": []
    }
  ]
}
```

2. Conversation title overflow in settings:
<img width="2557" height="810" alt="Screenshot 2025-08-04 at 15 59 53"
src="https://github.com/user-attachments/assets/5648cafe-a9e7-4043-a5ab-207133d86f7b"
/>
<img width="1511" height="768" alt="Screenshot 2025-08-04 at 16 56 32"
src="https://github.com/user-attachments/assets/502925de-9018-4b16-a33f-03c8d5715494"
/>

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
@wildemat wildemat mentioned this pull request Aug 7, 2025
10 tasks
@mistic mistic added the v8.19.2 label Aug 7, 2025
NicholasPeretti pushed a commit to NicholasPeretti/kibana that referenced this pull request Aug 18, 2025
…mained in the list until page refreshed (elastic#230450)

## Summary


1. The last system prompt was deleted successfully but remained in the
list until page refreshed:
elastic#230376

Steps to verify item 1:

- Create some system prompts and delete them:
```
POST kbn:/api/security_ai_assistant/prompts/_bulk_action
{
  "create": [
    {
      "id": "",
      "content": "xxx0",
      "name": "xxxx0",
      "promptType": "system",
      "consumer": "management",
      "conversations": []
    },
    {
      "id": "",
      "content": "xxx1",
      "name": "xxxx1",
      "promptType": "system",
      "consumer": "management",
      "conversations": []
    },
    {
      "id": "",
      "content": "xxx2",
      "name": "xxxx2",
      "promptType": "system",
      "consumer": "management",
      "conversations": []
    },
    {
      "id": "",
      "content": "xxx3",
      "name": "xxxx3",
      "promptType": "system",
      "consumer": "management",
      "conversations": []
    },
    {
      "id": "",
      "content": "xxx4",
      "name": "xxxx4",
      "promptType": "system",
      "consumer": "management",
      "conversations": []
    },
    {
      "id": "",
      "content": "xxx5",
      "name": "xxxx5",
      "promptType": "system",
      "consumer": "management",
      "conversations": []
    },
    {
      "id": "",
      "content": "xxx6",
      "name": "xxxx6",
      "promptType": "system",
      "consumer": "management",
      "conversations": []
    },
    {
      "id": "",
      "content": "xxx7",
      "name": "xxxx7",
      "promptType": "system",
      "consumer": "management",
      "conversations": []
    },
    {
      "id": "",
      "content": "xxx8",
      "name": "xxxx8",
      "promptType": "system",
      "consumer": "management",
      "conversations": []
    },
    {
      "id": "",
      "content": "xxx9",
      "name": "xxxx9",
      "promptType": "system",
      "consumer": "management",
      "conversations": []
    },
    {
      "id": "",
      "content": "xxx10",
      "name": "xxxx10",
      "promptType": "system",
      "consumer": "management",
      "conversations": []
    },
    {
      "id": "",
      "content": "xxx11",
      "name": "xxxx11",
      "promptType": "system",
      "consumer": "management",
      "conversations": []
    },  
    {
      "id": "",
      "content": "xxx12",
      "name": "xxxx12",
      "promptType": "system",
      "consumer": "management",
      "conversations": []
    }
  ]
}
```

2. Conversation title overflow in settings:
<img width="2557" height="810" alt="Screenshot 2025-08-04 at 15 59 53"
src="https://github.com/user-attachments/assets/5648cafe-a9e7-4043-a5ab-207133d86f7b"
/>
<img width="1511" height="768" alt="Screenshot 2025-08-04 at 16 56 32"
src="https://github.com/user-attachments/assets/502925de-9018-4b16-a33f-03c8d5715494"
/>

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:version Backport to applied version labels bug Fixes for quality problems that affect the customer experience release_note:skip Skip the PR/issue when compiling release notes Team:Security Generative AI Security Generative AI v8.19.2 v9.1.2 v9.2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants