Commit 8f7b932
authored
[Agent Builder] - Disable "Open in full screen" before conversation persistence (elastic#267699)
## Summary
Fixes a bug where navigating to the full-screen chat from the embedded
flyout immediately after starting a new conversation opens a new empty
session instead of the current one. This occurred because the
`conversationId` was not yet persisted by the server.
This PR addresses the issue by disabling the "Open Full Screen" menu
item until a stable `conversationId` is available.
### What was changed:
* **UI/UX:** Disabled the `AgentBuilderFullScreenMenuItem` while the
conversation is being created (no stable `conversationId` yet).
* **Tooltip:** Wrapped the disabled `EuiContextMenuItem` in an
`EuiToolTip` (using a wrapper `span` to bypass EUI pointer-event
limitations on disabled items) to explain to users why the action is
temporarily unavailable.
* **Guard clause:** Updated `handleOpenFullScreen` in
`more_actions_button.tsx` to early return if `conversationId` is
missing, preventing inconsistent routing.
### How to test:
**Manual testing steps:**
1. Open the Agent Builder embedded flyout.
2. Start a new conversation and immediately open the "More Actions"
(...) menu.
3. Observe that the "Open Full Screen" button is **disabled** and shows
a tooltip when hovered.
4. Wait for the server response (until the `conversationId` is
persisted).
5. Observe that the button becomes **enabled**.
6. Click "Open Full Screen" and confirm it successfully navigates to the
current conversation context (URL should contain the correct
`conversationId`).1 parent 92abf6c commit 8f7b932
1 file changed
Lines changed: 21 additions & 1 deletion
File tree
Lines changed: 21 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
54 | 55 | | |
55 | 56 | | |
56 | 57 | | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
57 | 64 | | |
58 | 65 | | |
59 | 66 | | |
| |||
147 | 154 | | |
148 | 155 | | |
149 | 156 | | |
| 157 | + | |
150 | 158 | | |
151 | 159 | | |
152 | 160 | | |
| |||
158 | 166 | | |
159 | 167 | | |
160 | 168 | | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
161 | 180 | | |
162 | 181 | | |
163 | 182 | | |
| |||
189 | 208 | | |
190 | 209 | | |
191 | 210 | | |
| 211 | + | |
192 | 212 | | |
193 | 213 | | |
194 | 214 | | |
195 | | - | |
| 215 | + | |
196 | 216 | | |
197 | 217 | | |
198 | 218 | | |
| |||
0 commit comments