Skip to content

fix: remove legacy z-index overrides on model config popup#33769

Merged
lyzno1 merged 1 commit intolanggenius:mainfrom
xr843:fix/model-config-popup-zindex
Mar 20, 2026
Merged

fix: remove legacy z-index overrides on model config popup#33769
lyzno1 merged 1 commit intolanggenius:mainfrom
xr843:fix/model-config-popup-zindex

Conversation

@xr843
Copy link
Copy Markdown
Contributor

@xr843 xr843 commented Mar 19, 2026

Fixes #33745

Summary

  • Remove legacy portalToFollowElemContentClassName z-index values that override the Popover component's default z-[1002] via tailwind-merge, causing the model configuration popup to render behind other UI elements
  • The most critical case was metadata-filter/index.tsx passing z-[50], which placed the popup far below other overlays
  • Other callers passed z-[1000] or !z-[1002], which were unnecessary since the new Popover primitive already uses z-[1002] by default
  • Remove the now-unused portalToFollowElemContentClassName prop from ModelParameterModal

Root cause

When the ModelParameterModal was migrated from PortalToFollowElem (default z-[60]) to the new Popover primitive (default z-[1002]), callers still passed legacy z-index overrides through portalToFollowElemContentClassName. Since cn() uses tailwind-merge, these values override the Popover's default z-[1002], breaking the stacking order. This is consistent with the overlay migration guide which states: "portalToFollowElemContentClassName with z-index values should be deleted when the surrounding legacy container is migrated."

Screenshots

Before After
Model config popup hidden behind other panels due to z-[50] override Popup correctly appears on top with default z-[1002]

Checklist

  • This change requires a documentation update, included: Dify Document
  • I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.
  • I ran make lint and make type-check (backend) and cd web && npx lint-staged (frontend) to appease the lint gods

…cking order

Remove portalToFollowElemContentClassName z-index values that were overriding
the Popover's default z-[1002] via tailwind-merge, causing the model
configuration popup to appear behind other UI elements. The most critical
case was metadata-filter passing z-[50], which made the popup invisible
behind the workflow panel.

Fixes langgenius#33745

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Mar 19, 2026
@github-actions github-actions bot added the web This relates to changes on the web. label Mar 19, 2026
@dosubot dosubot bot added the javascript Pull requests that update javascript code label Mar 19, 2026
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses a UI layering issue where the model configuration popup was rendering behind other elements. The problem stemmed from legacy z-index overrides being incorrectly applied after the ModelParameterModal component was migrated to use the new Popover primitive. By removing the redundant "portalToFollowElemContentClassName" prop and its associated z-index values from various call sites and the ModelParameterModal component itself, the popup now correctly utilizes the Popover's default z-index, ensuring proper display order.

Highlights

  • Z-index Overrides Removed: Eliminated legacy "portalToFollowElemContentClassName" z-index values that incorrectly overrode the Popover component's default "z-[1002]", resolving issues where the model configuration popup rendered behind other UI elements.
  • ModelParameterModal Prop Removal: The "portalToFollowElemContentClassName" prop was removed from the ModelParameterModal component definition and its various call sites, as it is no longer needed after the migration to the Popover primitive.
  • Improved UI Layering: Ensured that the model configuration popup now correctly appears on top of other UI elements by leveraging the Popover component's default z-index, fixing critical cases like the metadata-filter where it was previously hidden.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request correctly addresses a z-index issue with the model configuration popup by removing legacy z-index overrides. The changes involve removing the portalToFollowElemContentClassName prop and its usages across multiple components, which was causing the popup to render behind other UI elements. By removing these overrides, the Popover component's default z-index can take effect, resolving the stacking order problem. The removal of the now-unused prop from the ModelParameterModal component is also a good cleanup. The changes are well-targeted and effectively fix the bug described.

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Mar 20, 2026
@lyzno1 lyzno1 merged commit 8bebec5 into langgenius:main Mar 20, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

javascript Pull requests that update javascript code lgtm This PR has been approved by a maintainer size:XS This PR changes 0-9 lines, ignoring generated files. web This relates to changes on the web.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The model configuration pop-up is not displayed at the top.

3 participants