Here is the complete **Stage 2** implementation for the **`testing.html`** frontend.
This update resolves the visual bugs, eliminates the rendering memory leaks, adds robust input cleaning, fixes the Plotly chart scaling, and completely overhauls the TSV export so that the critical scientific math (p-values) is actually saved to your computer.
You can copy and replace your existing `testing.html` file with this:
```html
GeneInsights - Overlap & Enrichment Dashboard
GeneInsights
Network & Enrichment Dashboard
Full Pipeline Analysis - Set Logic, Hypergeometric Enrichment, Network Connectivity, and Physical Protein Cross-talk in a single unified view.
Crunching math and rendering networks...
Results Dashboard
1. Overlap Analysis (Set Theory)
Unique to Up
Shared Terms
Unique to Down
2. Pathway Significance & Intensity
3. Gene-Concept Network (CNET)
GO Pathway Hub Up-regulated Gene Down-regulated Gene