Skip to content

fix(template): replace hardcoded era data with dynamic LEARNING.topicEvolution#41

Merged
simongonzalezdc merged 1 commit into
mainfrom
fix/learning-chart-dynamic-era-data
May 27, 2026
Merged

fix(template): replace hardcoded era data with dynamic LEARNING.topicEvolution#41
simongonzalezdc merged 1 commit into
mainfrom
fix/learning-chart-dynamic-era-data

Conversation

@simongonzalezdc
Copy link
Copy Markdown
Member

@simongonzalezdc simongonzalezdc commented May 27, 2026

Two template fixes that eliminate era scanner false positives across all projects:

Chart 2 (Topic Evolution)
Was hardcoded with Liminal-specific era data (Era 1, Era 2, Era 3 named refs). Every other project's era scanner was flagging these as stale references against their own commit-eras.json. Now reads from LEARNING.topicEvolution — populated from YouTube AI video topic breakdown per phase. Shows noData() if absent.

search_timeline
Was accessing s.query but the data pipeline writes s.title. Added fallback: s.query || s.title with 'Searched for ' prefix stripped.


View with Codesmith Autofix with Codesmith
Need help on this PR? Tag @codesmith with what you need. Autofix is disabled.

Summary by CodeRabbit

  • Bug Fixes
    • Fixed the "Topic Evolution" chart to display actual runtime data instead of hardcoded values, with improved handling when no data is available.
    • Improved query text display in the "Search Archive" chart for better accuracy and clarity.

Review Change Stack

…Evolution

- Chart 2 (Topic Evolution): was hardcoded with Liminal project era data
  (Era 1/2/3 refs caused era scanner false positives on all other projects)
  Now reads from LEARNING.topicEvolution — shows noData() if absent
- search_timeline: use s.query || s.title with 'Searched for' prefix stripped
  (defensive fallback handles both field name conventions)
@simongonzalezdc simongonzalezdc merged commit f8e74ce into main May 27, 2026
2 of 12 checks passed
@simongonzalezdc simongonzalezdc deleted the fix/learning-chart-dynamic-era-data branch May 27, 2026 02:51
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 27, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 4299d53b-32d2-4d9a-971e-651d9811b9b5

📥 Commits

Reviewing files that changed from the base of the PR and between 7e4fc21 and faec112.

📒 Files selected for processing (1)
  • archaeology/visualization/template.html

📝 Walkthrough

Walkthrough

Two visualization charts in a template are updated: the Learning Curve chart derives eras from runtime data with empty-data handling, and the Search Timeline chart extracts query text from data properties with prefix stripping.

Changes

Visualization Template Updates

Layer / File(s) Summary
Learning Curve chart eras binding
archaeology/visualization/template.html
Topic Evolution chart eras series now derives from LEARNING.topicEvolution at runtime instead of hardcoded data, with noData early return when eras list is empty.
Search Timeline query text extraction
archaeology/visualization/template.html
Active Research Timeline chart query display text now uses s.query with fallback to s.title, and strips leading "Searched for " prefix before rendering.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/learning-chart-dynamic-era-data

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: faec1129fb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +1640 to +1641
const eras = LEARNING.topicEvolution || [];
if (!eras.length) { noData(el, 'Topic evolution data not available', 380); return; }
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Populate topic evolution before requiring it

When reports are generated through the inspected visualize path, PROJECT_DATA is just the inlined deliverables/data.json plus commit-era top-level fields (archaeology/cli.py lines 530-545), and the data generator does not emit learning.topicEvolution at all (scripts/data/generate_data_json.py builds only telemetry/codebase/developer fields). With this change, those normal generated reports take the [] fallback and always render “Topic evolution data not available,” so the chart disappears for every project unless someone hand-edits a non-produced field into the JSON.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant