Description
When generating a Qwen Code Insights report using the /insight\ command, the generated HTML file has no working tab/section switching functionality. All sections are rendered sequentially in one long scrollable page instead of being displayed as separate switchable tabs.
Expected Behavior
The insight report should have a working tab navigation system where:
- Each section (What You Work On, How You Use Qwen, Impressive Things, etc.) is displayed in a separate tab
- Navigation buttons switch between sections
- Only one section is visible at a time
Actual Behavior
- All sections are rendered one after another in a single long document
- The Table of Contents (TOC) contains only anchor links that scroll to sections
- No visual separation or tab switching between sections
- Users see only the first section "What You Work On" with charts, and must scroll down extensively to see other sections
Technical Details
Root Cause Location: \packages/web-templates/src/generated/insightTemplate.ts\ inside the compiled \cli.js\
Problem: The React component template renders all sections without state management for tab switching.
Missing:
- State for active tab: \const [activeTab, setActiveTab] = useState(0)\
- Conditional rendering: \�ctiveTab === 0 && \
- Click handlers on navigation buttons to switch tabs
- CSS for tab content visibility control
Reproduction Steps
- Open Qwen Code
- Run /insight\ command
- Wait for report generation
- Open the generated HTML file in browser
- Observe: All sections displayed in one long page, no tab switching
Environment
- OS: Windows (win32)
- Qwen Code Version: v2.1.0+
- Browser: Any (Chrome, Edge, Firefox)
- Node.js: v22.x
Proposed Solution
Update the insight template to add:
- Tab state management with \useState\
- Tab button components
- Conditional rendering of sections
- CSS for tab visibility control
Impact
- Severity: Medium
- Users Affected: All users of the /insight\ command
- UX Impact: Poor readability, extensive scrolling required
Workaround
A post-processing script has been created that fixes the generated HTML by adding proper tab switching logic.
Description
When generating a Qwen Code Insights report using the /insight\ command, the generated HTML file has no working tab/section switching functionality. All sections are rendered sequentially in one long scrollable page instead of being displayed as separate switchable tabs.
Expected Behavior
The insight report should have a working tab navigation system where:
Actual Behavior
Technical Details
Root Cause Location: \packages/web-templates/src/generated/insightTemplate.ts\ inside the compiled \cli.js\
Problem: The React component template renders all sections without state management for tab switching.
Missing:
Reproduction Steps
Environment
Proposed Solution
Update the insight template to add:
Impact
Workaround
A post-processing script has been created that fixes the generated HTML by adding proper tab switching logic.