Skip to content

[insight] /insight command generates HTML with non-functional navigation tabs when qualitative analysis returns empty object #2773

@1-om

Description

@1-om

What happened?

The /insight command generates an HTML report where navigation tabs (table of contents) are displayed but clicking them does nothing - the page doesn't scroll to corresponding sections. The tabs show click animation feedback but content sections are missing.

The root cause is that the qualitative field in the generated insight data is an empty object {} instead of containing actual analysis data.

Current behavior:

  • React components check t.qualitative && to render navigation and sections
  • An empty object {} is truthy, so navigation tabs render
  • Individual sections check for specific properties like t.qualitative.improvements, t.qualitative.futureOpportunities, etc.
  • Since these properties don't exist, no content sections render
  • Result: Navigation tabs exist but point to nothing

What did you expect to happen?

Either:

  1. The qualitative field should be null/undefined when no meaningful analysis is produced (no navigation shown), OR
  2. The navigation should only render when there's actual content to display

Client information

Qwen Code CLI version: [please check with /about]
Platform: Linux
Data: 124 sessions, 955 messages, 55 days of activity

Anything else we need to know?

Generated data structure shows qualitative: {} (empty) while other analysis fields exist at root level:

{
  "qualitative": {},
  "satisfaction": { "satisfied": 55, "frustrated": 10, ... },
  "friction": { ... },
  "primarySuccess": { ... },
  "outcomes": { ... },
  "topGoals": { ... }
}

Suggested fix: In the minified React code (insight.html line ~35), change:

t.qualitative && e.createElement(...)

to:

Object.keys(t.qualitative||{}).length > 0 && e.createElement(...)

Related issues:

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