fix/mcp-server-promo-loosing-tab
#37
by tompoulenard - opened
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):
- Delete
front/mcp_promo.pyand remove banner/JS fromapp.py - Hide overflow clones in CSS:
.tab-container[role="tablist"] > button[role="tab"]:not([id]) { display: none; } - Keep MCP tab page styles in
style.css
No changes to tab ids, elem_ids, or component structure.
tompoulenard changed pull request status to open
