# Implementation Plan: Fix markdown_helper.py for imgui-bundle >=1.92.801

## Phase 1: Red - Confirm bug [checkpoint: pre-existing 7a34edf]
- [x] Task 1.1: Run `tests/test_clean_install.py` in opt-in mode (RUN_CLEAN_INSTALL_TEST=1) - confirm AttributeError on TextEditor.LanguageDefinitionId
- [x] Task 1.2: Capture full traceback for git note

## Phase 2: Green - Apply version-compat shim [checkpoint: 7a34edf]
- [x] Task 2.1: Add module-level `_get_language_id(name)` helper to markdown_helper.py
- [x] Task 2.2: Add module-level `_set_editor_language(editor, lang_obj)` helper
- [x] Task 2.3: Replace `_lang_map` initialization to use `_get_language_id(...)`
- [x] Task 2.4: Replace set/get language calls with shim calls
- [x] Task 2.5: Add parallel `_editor_lang_cache` to track current language tag per editor
- [x] Task 2.6: Handle the "none" fallback case (return None, skip set call)
- [x] Task 2.7: Syntax check (ast.parse)

## Phase 3: Verify [checkpoint: 7a34edf]
- [x] Task 3.1: Run `tests/test_clean_install.py` in opt-in mode - 1 passed in 16.56s
- [x] Task 3.2: Shim import test in local 1.92.5 env - works
- [x] Task 3.3: Shim import test in cloned 1.92.801 env - works (no AttributeError)

## Phase 4: Test URL fix [checkpoint: b306f8f]
- [x] Task 4.1: Test still failed with 404 on /api/mma_status
- [x] Task 4.2: Searched actual endpoints in src/api_hooks.py
- [x] Task 4.3: Correct URL is /api/gui/mma_status (line 181)
- [x] Task 4.4: Updated test, re-ran, PASSED

## Phase 5: Commit + Register
- [x] Task 5.1: Atomic commit (7a34edf) with descriptive message + git note
- [x] Task 5.2: Atomic commit (b306f8f) for test URL fix + git note
- [x] Task 5.3: Update tracks.md to register this fix track
- [ ] Task 5.4: conductor(checkpoint) commit
- [ ] Task 5.5: Clean up demo dir + stale log files
