# Implementation Plan: Fix All Remaining Test Failures

## Phase 1: GUI and Layout Tests [checkpoint: d66afeb]
- [x] Task: Fix `test_gui_discussion_tabs.py` (`AssertionError: 'Original###main' in []`). c8e6a95
- [x] Task: Fix `test_gui_window_controls.py` (`ValueError: not enough values to unpack`). c8545df
- [x] Task: Fix `test_project_settings_rename.py` (Verify "Project Settings" rename in code). 7467725
- [x] Task: Fix `test_session_hub_merge.py` (Add missing tabs Context Composition, Snapshot, Takes to Discussion Hub). 302faad
- [x] Task: Fix `test_preset_windows_layout.py` (Address `None == 'ok'` and timeout issues). 0863559
- [x] Task: Fix `test_shader_live_editor.py` (Ensure `imgui.begin` is called correctly). 5a8ca11
- [x] Task: Conductor - User Manual Verification 'Phase 1: GUI and Layout Tests' (Protocol in workflow.md)

## Phase 2: RAG System Tests
- [x] Task: Fix `test_rag_engine.py` (Resolve `SentenceTransformer` attribute error). 33e532a
- [x] Task: Fix `test_rag_gui_presence.py` (Ensure `_render_rag_panel` is called in `_gui_func`). 1948062
- [x] Task: Fix `test_rag_phase4_final_verify.py` (Address indexing timeout). 2d76381
- [x] Task: Fix `test_rag_phase4_stress.py` (Optimize incremental indexing). 2d76381
- [ ] Task: Conductor - User Manual Verification 'Phase 2: RAG System Tests' (Protocol in workflow.md)

## Phase 3: MMA, Workflow, and Negative Flow Tests
- [x] Task: Fix `test_auto_switch_sim.py` (`AttributeError: 'NoneType' object has no attribute 'get'`). c769a0e
- [x] Task: Fix `test_mma_approval_indicators.py` (Ensure 'APPROVAL PENDING' badge is displayed correctly). c769a0e
- [x] Task: Fix `test_history_manager.py` (Provide missing `context_files` argument to `UISnapshot.__init__`). c769a0e
- [x] Task: Fix `test_z_negative_flows.py` (Fix response event and subprocess timeouts). c769a0e
- [x] Task: Conductor - User Manual Verification 'Phase 3: MMA, Workflow, and Negative Flow Tests' (Protocol in workflow.md)

## Phase 4: Remaining Batched Failures
- [x] Task: Run the test suite and verify if any remaining files from the 45 failed batches still have underlying issues not covered above. 45104af
- [x] Task: Conductor - User Manual Verification 'Phase 4: Remaining Batched Failures' (Protocol in workflow.md)