Repository navigation
fix(frontend): link a locked agent tab to its workflow - #9604
Conversation
Backport auto-label reportThis
|
Automated Reviewer SuggestionsBased on the
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9604 +/- ##
=========================================
Coverage 91.68% 91.68%
Complexity 5125 5125
=========================================
Files 1305 1305
Lines 58211 58221 +10
Branches 7594 7596 +2
=========================================
+ Hits 53371 53382 +11
+ Misses 2933 2932 -1
Partials 1907 1907
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
An agent's step can reach the page before the agent's workflow has been fetched, and then carries the content alone. Reloading the workspace from it dropped the open workflow's id and name: the title went blank and the agent's own tab locked as belonging to a different workflow. For an agent bound to the open workflow, the reload now keeps that workflow's id and name. An agent bound to no workflow is reloaded as before, so its content is not saved over the workflow that happens to be open.
The tab of an agent that works on another workflow was disabled: it showed a lock and could not be clicked, so its chat could not be reached again. The tab can now be selected. In place of the chat it names the agent's workflow and links to it. The agent is not activated there, since an active agent loads its workflow into the canvas. The link is a plain one, as on the admin executions page, because the workspace reads the workflow's id from its address only when it is created.
…le branch Only an agent bound to another workflow reaches the notice that links to its workflow, so the agent's delegate is always set there. Optional chaining on it added a branch that could never run, which left the line partly covered.
Every agent tab can be selected now, so the check decides whether a tab shows the chat or a link to the agent's workflow, not whether the tab can be switched to. It is now isOnAnotherWorkflow, true only for an agent bound to a workflow other than the open one; an agent bound to none still gets its chat.
2c00996 to
6504681
Compare
### What changes were proposed in this PR? The "+ Agent" form in the AI Agents panel did not respond when the page loaded with the panel minimized. Clicking a model card did nothing, so no agent could be created. While minimized, the panel's body is hidden. ng-zorro 21 hides an inactive tab pane only when its fade-out transition ends, and no transition runs in a hidden element. Each listed agent's chat pane stayed, invisible, over the form and took its clicks. The agent tabs no longer animate, so an inactive pane is hidden at once. On "Iris species report", which already has the agent "Iris helper", the page loads with the panel minimized. Before, clicking the model card does nothing, and "Create Agent" stays grey: <img width="1080" height="800" alt="Before: clicking the model card does nothing, and Create Agent stays grey" src="https://github.com/user-attachments/assets/99963727-cfea-49cb-a9d2-9875ed5419e5" /> After, the card is selected, and "Create Agent" opens the new agent's chat: <img width="1080" height="800" alt="After: the model card is selected, and Create Agent opens the new agent's chat" src="https://github.com/user-attachments/assets/7be11880-2c18-437d-81c2-1a0db440cdbe" /> ### Any related issues, documentation, discussions? Part of apache#9575: this fixes the model card that does not respond, and apache#9604 fixes the chats that cannot be reopened. ### How was this PR tested? A new spec renders the panel with animations on, as the app runs, and fails without the fix; the existing specs run with animations off. Also run in headless Chromium against a local stack with a real model. On `main` every click over the form lands on the invisible pane; with this change an agent is created and answers. ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Code (Claude Fable 5.2, Claude Opus 5.5)
What changes were proposed in this PR?
Two ways an agent's chat could not be reopened:
An agent on another workflow. On "Iris species report", the chat of an agent working on "Q4 sales by region". Before, its tab does not respond:
After, it names that workflow and links to it, where the chat is:
Your own agent on this workflow. A prompt sent the moment the agent's tab opens. Before, the title and the workflow id disappear, and both tabs lock:
After, they stay:
Any related issues, documentation, discussions?
Part of #9575: this fixes the chats that cannot be reopened, and #9579 fixes the model card that does not respond.
How was this PR tested?
New specs cover the selectable tab, the link and the kept workflow id; each fails without its change. Also run in headless Chromium against a local stack with a real model, alone and merged with #9579. The link opens the agent's workflow, where the chat answers, and a prompt sent at once keeps the title.
Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Claude Fable 5.2, Claude Opus 5.5)