fix/mcp-server-promo-loosing-tab

#37
Ekimetrics org
•
edited Jun 17

Summary

  • Remove the floating MCP promo bubble and its deduplicateTabs() JavaScript (introduced in #36), which broke the tab bar on Hugging Face Spaces
  • Keep the MCP Server static tab with link to the MCP Space
  • Fix duplicate tab buttons with a one-line CSS rule: Gradio overflow clones leak into the tab bar when there are many tabs; real buttons always have an id, clones do not

Problem

After #35/#36, the embedded Space showed duplicated tabs (ClimateQ&A, DRIAS, MCP Server) or missing main tabs. Root cause: the promo JS tried to deduplicate tabs by data-tab-id alone, which conflicted with nested sub-tabs and removed real buttons during Gradio hydration.

Adding the 7th top-level tab also triggered Gradio's overflow measurement, leaking clone buttons (no id) into the visible tab list.

Solution

Minimal diff on top of the working app (0c1fcf1 behavior + MCP tab):

  1. Delete front/mcp_promo.py and remove banner/JS from app.py
  2. Hide overflow clones in CSS: .tab-container[role="tablist"] > button[role="tab"]:not([id]) { display: none; }
  3. Keep MCP tab page styles in style.css

No changes to tab ids, elem_ids, or component structure.

image

tompoulenard changed pull request status to open
Ready to merge
This branch is ready to get merged automatically.

Sign up or log in to comment