Skip to content

[Bug] /insight command generates report without tab switching - all sections displayed sequentially #2939

@dmitr13

Description

@dmitr13

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:

  1. State for active tab: \const [activeTab, setActiveTab] = useState(0)\
  2. Conditional rendering: \�ctiveTab === 0 && \
  3. Click handlers on navigation buttons to switch tabs
  4. CSS for tab content visibility control

Reproduction Steps

  1. Open Qwen Code
  2. Run /insight\ command
  3. Wait for report generation
  4. Open the generated HTML file in browser
  5. 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:

  1. Tab state management with \useState\
  2. Tab button components
  3. Conditional rendering of sections
  4. 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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions