Skip to content

fix(frontend): link a locked agent tab to its workflow - #9604

Merged
bobbai00 merged 4 commits into
apache:mainfrom
bobbai00:fix/agent-locked-tabs
Nov 24, 2026
Merged

bobbai00 merged 4 commits into
apache:mainfrom
bobbai00:fix/agent-locked-tabs

Conversation

@bobbai00

@bobbai00 bobbai00 commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

Two ways an agent's chat could not be reopened:

  • An agent on another workflow: its tab was disabled behind a lock. It can now be selected, and shows the agent's workflow with a link to it in place of the chat. The agent stays inactive there, since an active agent loads its workflow into the canvas. The link is a plain one, as on the admin executions page: the workspace reads the workflow id only when it is created.
  • Your own agent on this workflow: a prompt sent right after its tab opened could arrive before the page fetched the workflow, carrying the content alone. The reload dropped the workflow's id and name, blanking the title and locking the tab. For an agent bound to the open workflow, the reload now keeps them. An agent bound to no workflow reloads as before.

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:

Before: clicking the locked tab of an agent on another workflow does nothing

After, it names that workflow and links to it, where the chat is:

After: the tab names the agent's workflow, and its link opens that workflow with the chat

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:

Before: after a quick prompt the workflow title and id disappear and the agent tabs lock

After, they stay:

After: after a quick prompt the workflow title and id stay and the tabs stay open

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)

@github-actions github-actions Bot added fix frontend Changes related to the frontend GUI labels Nov 21, 2026
@Yicong-Huang Yicong-Huang added release/v1.3 back porting to release/v1.3 release/v1.2 back porting to release/v1.2 labels Nov 21, 2026
@github-actions
github-actions Bot requested review from mengw15 and xuang7 November 21, 2026 09:18
@github-actions

github-actions Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Backport auto-label report

This fix: PR was checked against each actively-supported release branch. A release/* label nominates a backport target; the branch's release manager approving this PR is what sends the fix there. The required Backport Approvals check stays red until every label below is approved, so each manager either approves or removes their own label — which is why the labels left on a merged PR are exactly the branches it reached.

Release branch Analysis
✅ release/v1.3 Already labeled — this fix is queued to backport here. @mengw15 decides: approving sends the fix here, removing this label declines it. The merge waits on one or the other.
✅ release/v1.2 Already labeled — this fix is queued to backport here. @xuang7 decides: approving sends the fix here, removing this label declines it. The merge waits on one or the other.

Auto-label run.

@github-actions

Copy link
Copy Markdown
Contributor

Automated Reviewer Suggestions

Based on the git blame history of the changed files, we recommend the following reviewers:

  • Contributors with relevant context: @eugenegujing, @aglinxinyuan
    You can notify them by mentioning @eugenegujing, @aglinxinyuan in a comment.

@codecov-commenter

codecov-commenter commented Nov 21, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.68%. Comparing base (a1b5aad) to head (6504681).

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           
Flag Coverage Δ *Carryforward flag
access-control-service 77.44% <ø> (ø) Carriedforward from a1b5aad
agent-service 99.56% <ø> (ø) Carriedforward from a1b5aad
amber 85.79% <ø> (ø) Carriedforward from a1b5aad
computing-unit-managing-service 63.83% <ø> (ø) Carriedforward from a1b5aad
config-service 87.50% <ø> (ø) Carriedforward from a1b5aad
file-service 82.16% <ø> (ø) Carriedforward from a1b5aad
frontend 96.44% <100.00%> (+<0.01%) ⬆️
notebook-migration-service 83.77% <ø> (ø) Carriedforward from a1b5aad
pyamber 98.32% <ø> (ø) Carriedforward from a1b5aad
result-service 86.48% <ø> (ø) Carriedforward from a1b5aad
workflow-compiling-service 80.90% <ø> (ø) Carriedforward from a1b5aad

*This pull request uses carry forward flags. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@bobbai00
bobbai00 marked this pull request as ready for review November 22, 2026 23:23
@bobbai00 bobbai00 removed release/v1.2 back porting to release/v1.2 release/v1.3 back porting to release/v1.3 labels Nov 22, 2026
@bobbai00
bobbai00 requested a review from kunwp1 November 22, 2026 23:33
@bobbai00

Copy link
Copy Markdown
Contributor Author

@sshiv012 could you take a look and share what you think? This is part of #9575: a chat from another workflow now shows a link to that workflow instead of a lock, and a prompt sent right after opening a chat no longer locks it. The GIFs in the description show the before and after.

@kunwp1 kunwp1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

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.
@bobbai00
bobbai00 force-pushed the fix/agent-locked-tabs branch from 2c00996 to 6504681 Compare November 24, 2026 06:57
@bobbai00
bobbai00 added this pull request to the merge queue Nov 24, 2026
Merged via the queue into apache:main with commit ba8558b Nov 24, 2026
23 checks passed
@bobbai00
bobbai00 deleted the fix/agent-locked-tabs branch November 24, 2026 22:26
renovate-bot pushed a commit to renovate-bot/apache-_-texera that referenced this pull request Nov 24, 2026
### 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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix frontend Changes related to the frontend GUI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants