Skip to content

AI Admin Pages Exhibit Visible Flicker During Initial Render #741

Description

@ankitguptaindia

AI-related admin screens exhibit a noticeable visual flicker during page navigation and initial render. When navigating to the AI or Connectors pages, the existing admin UI is briefly replaced by a black/blank screen before the page content is rendered.

In contrast, standard WordPress admin pages transition smoothly without any visible intermediate state. This creates an inconsistent user experience and gives the impression that AI pages are slower or undergoing a full-page reload.

Image

Environment

  • WordPress AI Plugin: Version 1.0.2
  • Environment: WordPress Playground
  • Browser: Chrome V 149.0.7827.115

Notes

  • Reproduced consistently on a fresh WordPress Playground instance.
  • The issue appears to be specific to AI-related pages and not the general WordPress admin experience.
  • This may indicate a loading-state, rendering, or hydration issue during page initialisation.
  • No functional issues were observed; this is primarily a UX/performance concern.

Step-by-step reproduction instructions

Steps to Reproduce

  1. Launch a fresh WordPress Playground instance.

  2. Install and activate the latest version of the AI plugin.

  3. Navigate between standard WordPress admin pages (Dashboard, Posts, Pages, Plugins, etc.).

  4. Observe that pages load normally without any visual flash.

  5. Navigate to:

    • AI
    • Connectors
  6. Observe the page loading behavior.

Screenshots, screen recording, code snippet

Recording.1864.mp4

Environment info

No response

Please confirm that you have searched existing issues in the repo.

  • Yes

Please confirm that you have tested with all plugins deactivated except the AI plugin.

  • Yes

Please confirm which theme type you used for testing.

  • Block
  • Classic
  • Hybrid (e.g. classic with theme.json)
  • Not sure

Activity

  1. added
    [Type] Bug
    on Jun 17, 2026
  2. Trushiv04 commented on Jun 18, 2026

    @Trushiv04
    Contributor

    I looked into this locally. The flicker appears to come from the inline critical styles in the generated AI admin page, where #wpwrap is given a dark background:

    #wpwrap { background: var(--wpds-color-fg-content-neutral, #1e1e1e); }

    On initial load, before the boot module mounts the app into .boot-layout-container, the CSS variable isn't available yet, so the #1e1e1e fallback paints the entire wrap dark for a moment producing the black flash before content renders.

    Since this lives in an auto generated page file (driven by the boot/routes build), it likely needs to be addressed at the source rather than the generated output. Sharing in case it helps narrow down the fix.

  3. jeffpaul commented on Jun 18, 2026

    @jeffpaul
    Member

    Yeah, I believe there's a related issue in the Gutenberg repo that looked at fixing this on the Connectors screen, perhaps isn't released yet but finding that and mimicking on the AI settings page is probably best.

  4. jeffpaul commented on Jun 18, 2026

    @jeffpaul
    Member

    WordPress/gutenberg#74572 is all I found in searching quickly, but that's not the one I had remembered so some more searching is worthwhile before trying to change anything within the AI plugin.

  5. added this to the Future Release milestone on Jun 18, 2026
  6. moved this from Triage to In discussion / Needs decision in WordPress AI Roadmapon Jun 18, 2026
  7. prasadkarmalkar commented on Jun 21, 2026

    @prasadkarmalkar
    Contributor

    I think WordPress/gutenberg#78493 is the PR about black flash in wp-build. Also, the package is "@wordpress/build": "^0.16.0" here in package.json and latest version is 0.16.1.
    For me, the following steps worked locally:

    1. Update the package
      npm update @wordpress/build
    2. Rebuild the routes
      npm run build:routes
    3. Open build/pages/ai/page-wp-admin.php and confirm the #wpwrap block no longer has background css.

    We may need to update the package.json and package-lock.json

    Screencast

    Screen.Recording.2026-06-21.at.6.10.48.PM.mov
  8. moved this from In discussion / Needs decision to In progress in WordPress AI Roadmapon Jun 21, 2026
  9. modified the milestones: Future Release, 1.1.0 on Jun 22, 2026
  10. justlevine commented on Jun 22, 2026

    @justlevine
    Contributor

    I haven't had time to pull and test locally, but from the screencast it looks like the flicker is still there, it just no longer has the black overlay.

  11. prasadkarmalkar commented on Jun 23, 2026

    @prasadkarmalkar
    Contributor

    Yes, in Gutenberg, only the black flash has been fixed by updating the wordpress/build. So for now, I've updated it, but I think we need to investigate the flicker further. The same flicker is present in Gutenberg as well.

  12. 7 remaining items

  13. added theissue type on Jun 26, 2026
  14. modified the milestones: 1.2.0, 1.3.0 on Jul 14, 2026
  15. jeffpaul commented on Aug 10, 2026

    @jeffpaul
    Member

    @prasadkarmalkar have things improved in Gutenberg such that a package update will resolve things here?

  16. modified the milestones: 1.3.0, 1.4.0 on Aug 13, 2026
  17. modified the milestones: 1.4.0, 1.5.0 on Sep 28, 2026
  18. modified the milestones: 1.5.0, 1.6.0 on Oct 28, 2026
  19. jeffpaul commented on Oct 28, 2026

    @jeffpaul
    Member

    Punting to 1.6.0 while @prasadkarmalkar continues research into resolution options here

  20. prasadkarmalkar commented on Oct 29, 2026

    @prasadkarmalkar
    Contributor

    I looked into this further. Updating @wordpress/build to the latest version (0.26.0) does not fix the flicker. The cause isn't in this plugin's build output; it comes from @wordpress/boot, which both Settings › AI and Settings › Connectors are built on (loaded from core).

    Also when I deactivated the AI plugin still the issue is there for the Connectors page.

    Screencast

    Screen.Recording.2026-10-29.at.12.09.17.PM.mov

    Why it flickers

    • Since 7.0, wp-admin fades between pages on every navigation (@view-transition { navigation: auto } in wp-admin/css/view-transitions.css).
    • Boot gives its main content panel a transition name: .boot-layout__stage { view-transition-name: boot--stage }. This is meant for animating between screens inside a boot app.
    • When navigating from one boot screen to another with a normal page load, the browser captures the old panel as a separate layer and looks for a panel with the same name on the new page. The new page hasn't mounted its JS yet, so there is none.
    • The old panel then animates on its own on top of the page fade: it dims, pops back, then fades out. That's the flicker.
    • Classic screens (General, Writing, etc.) don't have that named panel, which is why switching to or from them looks fine. It only happens between two boot screens.

    How I confirmed it

    I recorded the transitions frame by frame (attached). As a test, I cleared those transition names in a pageswap handler, which runs right before the browser captures the old page:

    addEventListener( 'pageswap', ( e ) => {
    	if ( e.viewTransition ) {
    		document
    			.querySelectorAll( '.boot-layout__stage, .boot-layout__inspector, .boot-layout__canvas' )
    			.forEach( ( el ) => el.style.setProperty( 'view-transition-name', 'none' ) );
    	}
    } );

    Screencast after updating above property

    Screen.Recording.2026-10-29.at.12.16.40.PM.mov

    Debug with help of AI

    Tool: Claude Code
    Model: Opus 5.5
    All things tested and verified manually

  21. jeffpaul commented on Nov 18, 2026

    @jeffpaul
    Member

    @prasadkarmalkar so is there a fix upstream needed in a WP/Gutenberg package to help resolve this?

  22. modified the milestones: 1.6.0, 1.7.0 on Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

[Type] Bug

Type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions