## [Bug] Missing or Incorrect Hover Definitions in Python Playground Lessons #161

Closed
opened 2026-05-17 22:30:36 +00:00 by enjin2310 · 1 comment

Classification

Type: Bug
Priority: Medium
Component: Python Playground / Syntax Tooltip System

Summary

In the Python Playground, hovering over syntax elements (keywords, functions, literals) either shows no definition or displays an incorrect one. The expected behavior is that each syntax term should consistently display its definition or concept, even if it has appeared in previous lessons.

Steps to Reproduce

  1. Navigate to learn.spikersoft.com/tools/python-playground.
  2. Open Lesson 20200 – Addition or any other Python lesson.
  3. Hover over syntax elements such as def, return, None, or a + b.
  4. Observe that either no tooltip appears or the displayed definition is unrelated to the hovered term.

Expected Behavior

  • Each syntax element should display its correct definition or concept when hovered.
  • Definitions should remain consistent across lessons, even if previously introduced.
  • The Lesson Concepts panel should update dynamically to reflect the hovered term.

Actual Behavior

  • Hovering over syntax elements often shows no tooltip.
  • Occasionally, unrelated or outdated definitions appear (e.g., showing None when hovering over def).
  • The Lesson Concepts panel does not update correctly.

Evidence

The attached screenshot shows Lesson 20200 – Addition, where hovering over def or a + b fails to display the expected definitions. The Lesson Concepts panel incorrectly shows the concept for None instead.

Environment

  • Browser: Microsoft Edge
  • OS: Windows 10
  • Lesson ID: 20200
  • Version: v2026.05.17a

Possible Root Cause

  • The hover detection system may not be properly linked to the syntax registry for Python lessons.
  • Missing or broken metadata mappings between syntax tokens and concept definitions.
  • The concept registry may not refresh when switching lessons or hovering over new terms.

Suggested Fix

  • Reconnect hover event listeners to the correct syntax registry.
  • Ensure concept definitions are cached and reloaded per lesson context.
  • Validate that each syntax token has an associated concept entry in the registry.

Additional Notes

This issue reduces the educational value of the playground by removing contextual learning cues. Consistent hover definitions are essential for reinforcing syntax understanding across lessons.

### Classification **Type:** Bug **Priority:** Medium **Component:** Python Playground / Syntax Tooltip System ### Summary In the **Python Playground**, hovering over syntax elements (keywords, functions, literals) either shows no definition or displays an incorrect one. The expected behavior is that each syntax term should consistently display its definition or concept, even if it has appeared in previous lessons. ### Steps to Reproduce 1. Navigate to [learn.spikersoft.com/tools/python-playground](https://learn.spikersoft.com/tools/python-playground). 2. Open **Lesson 20200 – Addition** or any other Python lesson. 3. Hover over syntax elements such as `def`, `return`, `None`, or `a + b`. 4. Observe that either no tooltip appears or the displayed definition is unrelated to the hovered term. ### Expected Behavior - Each syntax element should display its correct definition or concept when hovered. - Definitions should remain consistent across lessons, even if previously introduced. - The **Lesson Concepts** panel should update dynamically to reflect the hovered term. ### Actual Behavior - Hovering over syntax elements often shows no tooltip. - Occasionally, unrelated or outdated definitions appear (e.g., showing `None` when hovering over `def`). - The **Lesson Concepts** panel does not update correctly. ### Evidence The attached screenshot shows **Lesson 20200 – Addition**, where hovering over `def` or `a + b` fails to display the expected definitions. The **Lesson Concepts** panel incorrectly shows the concept for `None` instead. ### Environment - **Browser:** Microsoft Edge - **OS:** Windows 10 - **Lesson ID:** 20200 - **Version:** v2026.05.17a ### Possible Root Cause - The hover detection system may not be properly linked to the syntax registry for Python lessons. - Missing or broken metadata mappings between syntax tokens and concept definitions. - The concept registry may not refresh when switching lessons or hovering over new terms. ### Suggested Fix - Reconnect hover event listeners to the correct syntax registry. - Ensure concept definitions are cached and reloaded per lesson context. - Validate that each syntax token has an associated concept entry in the registry. ### Additional Notes This issue reduces the educational value of the playground by removing contextual learning cues. Consistent hover definitions are essential for reinforcing syntax understanding across lessons.
Owner

Resolved on master (same root cause as #153). With the Python concept registry now populated and wired, lookup() resolves each hovered token to its own concept — the "hovering def shows the None card" mismatch was a stale/empty-registry artifact and no longer occurs.

Regression tests in spikersoft-angular PR #28 explicitly assert that def resolves to the function-definition concept and NOT to None, that + (lesson 20200) resolves to the arithmetic concept, and that cosmetic forms like print()/PRINT still resolve.

Resolved on `master` (same root cause as #153). With the Python concept registry now populated and wired, `lookup()` resolves each hovered token to its own concept — the "hovering `def` shows the `None` card" mismatch was a stale/empty-registry artifact and no longer occurs. Regression tests in spikersoft-angular PR #28 explicitly assert that `def` resolves to the function-definition concept and NOT to `None`, that `+` (lesson 20200) resolves to the arithmetic concept, and that cosmetic forms like `print()`/`PRINT` still resolve.
Sign in to join this conversation.