Skip to content

2689 - Loading spinners upkeep#2720

Merged
crivetimihai merged 1 commit intomainfrom
2689-spinners-upkeep
Feb 6, 2026
Merged

2689 - Loading spinners upkeep#2720
crivetimihai merged 1 commit intomainfrom
2689-spinners-upkeep

Conversation

@gcgoncalves
Copy link
Copy Markdown
Collaborator

@gcgoncalves gcgoncalves commented Feb 5, 2026

🐛 Bug-fix PR

📌 Summary

This PR addresses multiple loading spinner issues in the admin UI:

Before - Double spinner:

main.mov

After:

main-fix.mov

Before - Colateral spinner:

1-traces-spinner.mov

After:

1-traces-spinner-fix.mov

Before - Missing spinner:

2-no-spinner.mov

After:

2-no-spinner-fix.mov

Before - Different spinner:

3-different-spinners.mov

After:

3-different-spinners-fix.mov

Fixes #2689

🔁 Reproduction Steps

  1. Access the Admin UI
  2. On each panel, refresh the page.
  3. Observe the loading spinner

🐞 Root Cause

There was a redundant initial placeholder spinner on some of the panels. Some were missing the hx-indicator attribute.

💡 Fix Description

  1. Fixed double loading spinners on initial page load/refresh

    • Removed redundant initial placeholder spinners from Gateways, Catalog, Tools, and Tool Operations panels
    • Now relies solely on HTMX indicators for loading states
    • Affected files: mcpgateway/templates/admin.html
  2. Fixed spurious spinners triggered by background requests

    • Added CSS rules to prevent all .htmx-indicator elements from showing on unrelated requests
    • Scoped indicators to specific panels (#catalog-panel, #tools-panel, #gateways-panel, etc.)
    • Only show indicators when explicitly targeted via hx-indicator attribute
    • Prevents spinners from appearing during background /trace observability requests
    • Affected files: mcpgateway/static/admin.css
  3. Standardized Resources panel loading indicator

    • Replaced simple spinner div with proper HTMX indicator matching other panels
    • Added animated SVG spinner with "Loading resources..." text
    • Affected files: mcpgateway/templates/admin.html
  4. Aligned Prompts panel implementation with other panels

    • Removed dual loading state (inline + external indicator)
    • Standardized to single external HTMX indicator for consistency
    • Removed style="display:none" attribute, now controlled by CSS
    • Affected files: mcpgateway/templates/admin.html

All panels now have consistent loading behavior:

  • Single loading indicator per panel
  • No spurious spinners on background requests
  • Proper HTMX indicator visibility control via CSS

🧪 Verification

Check Command Status
Lint suite make lint
Unit tests make test
Coverage ≥ 80 % make coverage
Manual regression no longer fails steps / screenshots

✅ Checklist

  • Code formatted (make black isort pre-commit)
  • No secrets/credentials committed

@gcgoncalves gcgoncalves requested a review from marekdano February 5, 2026 23:26
@gcgoncalves gcgoncalves added the ui User Interface label Feb 5, 2026
@gcgoncalves gcgoncalves marked this pull request as ready for review February 6, 2026 07:06
Copy link
Copy Markdown
Collaborator

@marekdano marekdano left a comment

Choose a reason for hiding this comment

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

Tested and it looks good!

LGTM

@crivetimihai crivetimihai self-assigned this Feb 6, 2026
This commit addresses multiple loading spinner issues in the admin UI:

1. Fixed double loading spinners on initial page load/refresh
   - Removed redundant initial placeholder spinners from Gateways, Catalog,
     Tools, and Tool Operations panels
   - Now relies solely on HTMX indicators for loading states
   - Affected files: mcpgateway/templates/admin.html

2. Fixed spurious spinners triggered by background requests
   - Added CSS rules to prevent all .htmx-indicator elements from showing
     on unrelated requests
   - Scoped indicators to specific panels
   - Only show indicators when explicitly targeted via hx-indicator attribute
   - Uses proper CSS specificity to ensure targeted indicators are shown
   - Prevents spinners from appearing during background /trace requests
   - Affected files: mcpgateway/static/admin.css

3. Standardized Resources panel loading indicator
   - Replaced simple spinner div with proper HTMX indicator matching other panels
   - Added animated SVG spinner with "Loading resources..." text
   - Affected files: mcpgateway/templates/admin.html

4. Aligned Prompts panel implementation with other panels
   - Removed dual loading state (inline + external indicator)
   - Standardized to single external HTMX indicator for consistency
   - Changed spinner color to indigo for consistency with other panels
   - Affected files: mcpgateway/templates/admin.html

5. Fixed Tool Operations panel loading indicator
   - Added indicator to admin.html (outside swap target) so it exists on
     initial page load
   - Removed duplicate indicator from toolops_partial.html to avoid ID conflict
   - Affected files: mcpgateway/templates/admin.html,
     mcpgateway/templates/toolops_partial.html

All panels now have consistent loading behavior:
- Single loading indicator per panel
- No spurious spinners on background requests
- Proper HTMX indicator visibility control via CSS

Fixes #2689

Signed-off-by: Gabriel Costa <gabrielcg@proton.me>
@crivetimihai crivetimihai merged commit 6b3283e into main Feb 6, 2026
45 checks passed
@crivetimihai crivetimihai deleted the 2689-spinners-upkeep branch February 6, 2026 23:15
kcostell06 pushed a commit to kcostell06/mcp-context-forge that referenced this pull request Feb 24, 2026
This commit addresses multiple loading spinner issues in the admin UI:

1. Fixed double loading spinners on initial page load/refresh
   - Removed redundant initial placeholder spinners from Gateways, Catalog,
     Tools, and Tool Operations panels
   - Now relies solely on HTMX indicators for loading states
   - Affected files: mcpgateway/templates/admin.html

2. Fixed spurious spinners triggered by background requests
   - Added CSS rules to prevent all .htmx-indicator elements from showing
     on unrelated requests
   - Scoped indicators to specific panels
   - Only show indicators when explicitly targeted via hx-indicator attribute
   - Uses proper CSS specificity to ensure targeted indicators are shown
   - Prevents spinners from appearing during background /trace requests
   - Affected files: mcpgateway/static/admin.css

3. Standardized Resources panel loading indicator
   - Replaced simple spinner div with proper HTMX indicator matching other panels
   - Added animated SVG spinner with "Loading resources..." text
   - Affected files: mcpgateway/templates/admin.html

4. Aligned Prompts panel implementation with other panels
   - Removed dual loading state (inline + external indicator)
   - Standardized to single external HTMX indicator for consistency
   - Changed spinner color to indigo for consistency with other panels
   - Affected files: mcpgateway/templates/admin.html

5. Fixed Tool Operations panel loading indicator
   - Added indicator to admin.html (outside swap target) so it exists on
     initial page load
   - Removed duplicate indicator from toolops_partial.html to avoid ID conflict
   - Affected files: mcpgateway/templates/admin.html,
     mcpgateway/templates/toolops_partial.html

All panels now have consistent loading behavior:
- Single loading indicator per panel
- No spurious spinners on background requests
- Proper HTMX indicator visibility control via CSS

Fixes IBM#2689

Signed-off-by: Gabriel Costa <gabrielcg@proton.me>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ui User Interface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG]: MCP Servers/Virtual Servers/Tools - Double loading spinner on refresh

3 participants