Commit graph

390 commits

Author SHA1 Message Date
Claude
fd6360d7d8
Add 4 advanced programming activities with algorithm education
NEW ACTIVITIES:

activity48-monty-hall-simulation.yaml - Monty Hall paradox proof
- Simulate stay vs switch strategies
- Prove switching wins 2/3 through code
- Any programming language support

activity49-multi-armed-bandit.yaml - Adaptive algorithms beat A/B testing
- Epsilon-greedy implementation
- 88% regret reduction vs traditional A/B
- Real-world applications (web optimization, clinical trials)

activity50-genetic-algorithms.yaml - Evolution-based optimization
- String evolution challenge
- Fitness, selection, crossover, mutation
- 803,181x faster than brute force

activity51-connect-four.yaml - Complete game development
- 2D arrays and game state
- Win detection algorithms (horizontal, vertical, diagonal)
- Full game loop implementation

All activities:
- Support ANY programming language choice
- Follow pedagogical best practices (concepts first, code in feedback)
- Validate with zero errors/warnings
- Engaging and fun (aha moments, real games, simulations)
2025-11-09 16:07:15 +00:00
Claude
4e72fed8be
Add game theory programming courses for Python and C
NEW ACTIVITIES:

activity46-game-theory-python.yaml - Game theory implementation in Python
- Representing games with dictionaries
- Payoff matrix as dict with tuple keys
- Query functions and game simulation
- One-shot and repeated games
- Tit-for-Tat strategy implementation
- Function composition and abstraction

activity47-game-theory-c.yaml - Game theory implementation in C
- Defining Payoff struct for outcomes
- 2D arrays for payoff matrices
- Memory-efficient game representation
- Strategy lookup functions
- Enum for self-documenting code
- Pointer and struct fundamentals

Both activities:
- Teach programming through game theory concepts
- Follow pedagogical best practice (concepts first, code examples in feedback)
- Validate with zero errors/warnings
- Progressive difficulty (structures → functions → simulation)
- Real-world application of abstract concepts
- Engage students with strategic thinking + coding
2025-11-09 15:36:12 +00:00
Claude
b8bf7261cb
Add complete statistics and game theory curriculum (6 activities)
NEW ACTIVITIES:

activity40-statistics-101.yaml - Foundational statistics
- Central tendency, spread, probability, distributions
- Real-world applications and critical thinking

activity41-game-theory-101.yaml - Strategic fundamentals
- Prisoner's Dilemma, Nash Equilibrium, dominant strategies

activity42-game-theory-201.yaml - Advanced concepts
- Mixed strategies, repeated games, Tit-for-Tat

activity43-game-theory-301.yaml - Cooperative games
- Coalition formation, Shapley value, fair division

activity44-game-theory-401.yaml - Information asymmetry
- Signaling, screening, adverse selection

activity45-game-theory-501.yaml - Mechanism design
- Auction theory, Vickrey auctions, incentive compatibility

All activities:
- Validate with zero errors/warnings
- Follow expert guide requirements
- Include engaging examples
- Terminate properly
- Support language switching
2025-11-09 15:27:38 +00:00
Claude
31e357e8bf
Add statistics and game theory 101 activities plus pedagogical fixes 2025-11-09 15:25:04 +00:00
Claude
e4ab13ae78
Fix pedagogical issue: Don't show code examples before asking students to write code
PROBLEM: activity37 was showing complete code examples in Python, JavaScript,
Java, and C++ BEFORE asking students to write code themselves. This turns
learning into copy-paste practice.

FIXED:
- Hello World section: Removed multi-language code examples from content_blocks
- Variables section: Removed multi-language code examples from content_blocks
- Now explains CONCEPTS (what, why, how languages differ) without showing syntax
- Code examples remain in AI feedback for when students struggle or ask for help

PEDAGOGICAL APPROACH:
1. Explain the concept (stdout, variables, etc.)
2. Explain language differences conceptually (dynamic vs static typing)
3. Ask students to TRY writing code in THEIR language
4. Provide language-specific examples in AI FEEDBACK if they struggle

This way students actually have to THINK and LEARN, not just copy.

UPDATED CLAUDE.md:
- Added new pitfall: "Showing answers before questions"
- Guidance: Explain concepts in content_blocks, provide code examples in ai_feedback

Still validates perfectly with zero errors/warnings.
2025-11-09 15:09:50 +00:00
Claude
10d0ec27a2
Add two fashion activities: modern style and historical journey
activity38-fashion-today.yaml - Fun, interactive style discovery
- Personal style identification (classic, boho, streetwear, etc.)
- Color psychology and preferences
- Outfit building for occasions
- Statement pieces and accessories
- Fashion philosophy reflection
- Encourages self-expression and confidence

activity39-fashion-history.yaml - Educational timeline 1800-2025
- Victorian era corsets and social restrictions
- 1920s flappers and women's liberation
- WWII rationing and practical fashion
- 1950s ultra-femininity and gender politics
- 1960s-70s revolution (mod, hippie, disco, punk)
- 1980s excess and 1990s grunge backlash
- 2000s-2010s fast fashion and social media
- 2020s sustainability, inclusivity, technology
- Critical thinking about fashion as social mirror

Both activities:
- Follow expert guide validation requirements
- Include engaging content with emojis and formatting
- Support language switching
- Use metadata strategically
- Have multiple response paths with tailored feedback
- Terminate properly with activity_completed markers
- Passed activity_yaml_validator.py with zero errors/warnings
2025-11-09 14:50:04 +00:00
Claude
3df69c83cd
Add comprehensive activity creation expert guide to CLAUDE.md
This guide empowers agents to create activities that validate properly,
are fun and engaging, and terminate correctly.

Key additions:
- Core activity structure with detailed examples
- Critical validation requirements checklist
- Four termination patterns with code examples
- Ten engagement techniques from successful activities
- Best practices for activity development
- Common pitfalls table with fixes
- Complete development workflow
- Quick reference for essential fields
- Minimal working activity example

References activity26-magic-8-ball.yaml, activity31-scientific-method.yaml,
and activity37-programming-languages.yaml as exemplary activities.
2025-11-09 14:36:10 +00:00
698857e04e
Merge pull request #22 from russellballestrini/claude/review-research-directory-011CUxEBYqsik2pWtWM3UufC
Review Research Directory Structure
2025-11-09 09:28:48 -05:00
Claude
cfc2a8ad08
Expand stdout explanation with comprehensive technical details
- Added 53 new lines of stdout/standard output explanation
- Broke down terminology: standard, output, stdout/STDOUT
- Explained the three standard streams (stdin, stdout, stderr)
- Added visual diagram of stdout flow
- Included Unix/1970s historical context
- Explained why it's called "standard"
- Added advanced redirection concepts (pipes, file redirection)
- Total file now 1,948 lines (up from 1,895)
- Validation passed successfully
2025-11-09 11:56:22 +00:00
Claude
3ef98143b2
Expand activity37 with comprehensive fundamental explanations
- Increased from 1,148 to 1,895 lines (+65%)
- Added detailed explanations before each coding exercise
- Enhanced Hello World section with stdout concepts and multi-language examples
- Expanded Variables section with box analogy, naming rules, and typing differences
- Enhanced Data Types with comprehensive type explanations and string formatting
- Expanded If Statements with conditional logic fundamentals and comparison operators
- Enhanced Loops with detailed for loop explanations, execution traces, and common patterns
- Expanded Functions with DRY principle, parameter explanations, and best practices
- Enhanced Return Values with display vs return differences and common mistakes
- All sections now teach fundamentals thoroughly before asking students to code
- Validation passed successfully
2025-11-09 11:31:28 +00:00
9ad911c615
Merge pull request #21 from russellballestrini/claude/merge-new-yamls-011CUwF3BsT47vPjtkvSq2r7
Merge new YAML configuration files
2025-11-08 18:04:53 -05:00
c294814e60
Delete fix_all_new_activities.py 2025-11-08 18:04:26 -05:00
0b41cab970
Delete fix_activity37.py 2025-11-08 18:04:13 -05:00
Claude
6fa1b15188
Add auto-growing textarea for chat input
- Textarea now automatically expands as user types multiline messages
- Resets to minimum height after message is sent
- CSS: Set min-height (60px) and max-height (400px) with auto overflow
- Removed fixed rows attribute to allow dynamic height
- Disabled manual resize to prevent user confusion
- Provides better UX for composing longer messages
2025-11-08 23:02:24 +00:00
Claude
0560de004d
Add fix scripts for activity YAML corrections
These scripts document the automated fixes applied to activities 30-37:
- fix_activity37.py: Changes 'close' bucket behavior + fixes completion
- fix_all_new_activities.py: Fixes final step completion for all activities

Keeping for reference and potential reuse on future activities.
2025-11-08 23:00:01 +00:00
Claude
f774d36d74
Fix activity completion and progression issues in activities 30-37
This commit addresses two critical issues:

1. Completion Bug (activities 30-37):
   - Final steps were looping forever, preventing activity completion
   - Fixed by removing next_section_and_step from completion transitions
   - Kept off_topic transition looping to avoid validator terminal step errors
   - Activities now complete properly when users give valid final answers

2. Activity37 Bucket Logic:
   - Changed "close" bucket to retry same step instead of advancing
   - Only "correct" bucket now advances to next step
   - All other buckets (close, incomplete, wrong_language, etc.) retry
   - This ensures students must get correct answers to progress

Technical Details:
- Final steps are not considered "terminal" if at least one transition
  has next_section_and_step (validator requirement)
- Off-topic transitions loop back to allow another attempt
- Completion happens when get_next_step() returns None, None

Validation:
- All 8 activities pass activity_yaml_validator.py
- No errors or warnings

Affects: activity30-37 (all new merged activities)
2025-11-08 22:59:06 +00:00
08bbc47a6b
Merge pull request #20 from russellballestrini/claude/expand-research-yamls-011CUvoNn9xvytg4xr5eJ7Rx
Generate synthetic activities from research YAMLs
2025-11-08 15:07:53 -05:00
Claude
fd78927e7c
Fix MODEL_X references to use dynamic model registry
When MODEL_X references (MODEL_0, MODEL_1, etc.) are used, the code now
properly looks up actual model names from the dynamic registry (MODEL_CLIENT_MAP)
instead of hardcoding "model" or requiring MODEL_NAME_X environment variables.

Changes:
- app.py: Look up models from MODEL_CLIENT_MAP for the specified endpoint
- guarded_ai.py: Query endpoints for actual model names at initialization
- guarded_ai.py: Use dynamic registry for MODEL_X lookups

This fixes the "model not found" error when using activities with MODEL_X
references like activity37.
2025-11-08 19:58:21 +00:00
Claude
3c3b8bd493
Change default model from MODEL_1 to MODEL_0 to match stable config
Respects existing stable configuration where:
- MODEL_0 = Hermes (default for classification and feedback)
- MODEL_1 = Qwen (for code generation)
- MODEL_2 = GPT

Updated:
- All function defaults in activity.py: MODEL_1 -> MODEL_0
- activity37: Uses MODEL_0 for classification, MODEL_1 for code feedback

This works with the existing environment variable setup without requiring changes to vars.sh.
2025-11-08 19:53:46 +00:00
Claude
8cebcbf118
Add MODEL_X reference support to app.py
Critical fix for activity model configuration:
- Handle MODEL_1, MODEL_2, MODEL_3 references in get_openai_client_and_model()
- Look up MODEL_ENDPOINT_{n}, MODEL_API_KEY_{n}, MODEL_NAME_{n} from environment
- Fall back gracefully to default model if MODEL_{n} not configured
- Matches implementation in research/guarded_ai.py

Fixes error: 'NoneType' object has no attribute 'chat'
This error occurred when activities tried to use classifier_model="MODEL_1"
but the app didn't know how to resolve the MODEL_X reference.

Now activity37 (programming languages) will work correctly with:
- classifier_model: "MODEL_1" (Hermes for classification)
- feedback_model: "MODEL_3" (Qwen3-Coder for code generation)
2025-11-08 19:47:32 +00:00
Claude
0f06772afb
Fix critical model name issue and validator warning
Critical fix for guarded_ai.py:
- Add MODEL_NAME_{n} environment variable support
- Fixes hard-coded "model" string that breaks Azure OpenAI and other endpoints
- Falls back to "model" if MODEL_NAME_{n} not specified
- Some endpoints require actual deployment name in model parameter

Validator improvement:
- Allow feedback_prompts as alternative to feedback_tokens_for_ai
- Prevents false warning when using metadata_feedback_filter with new prompt system

Documentation:
- Added MODEL_NAME_{n} examples to CLAUDE.md
- Documented that Azure and similar endpoints need this variable

All 8 activities validated: 0 errors, 0 warnings
2025-11-08 19:38:15 +00:00
Claude
82aeeab094
Document classifier_model and feedback_model in CLAUDE.md
Added comprehensive Activity YAML Schema section covering:
- Model Configuration feature (classifier_model and feedback_model)
- Why separate models (speed, quality, cost, flexibility)
- Model defaults (MODEL_1/Hermes as universal default)
- Recommended model combinations table
- Environment variable configuration
- Example programming activity with dual models
- Activity YAML validation instructions
- CLI testing with model configuration
- Qwen3-Coder-30B setup guide (llama.cpp and ollama)

This documents the new dual-model architecture that allows:
- Fast classification with Hermes (8B)
- Specialized feedback with domain models (e.g., Qwen3-Coder 30B)
- Activity and step-level model overrides
2025-11-08 19:34:00 +00:00
Claude
1c5a4960fd
Update NEW_ACTIVITIES_PLAN.md with completion status
Transformed planning document into comprehensive completion report:
- Status: 8 activities completed (30-37), 6,112 lines of YAML
- Documented new classifier_model and feedback_model feature
- Added model setup guide for Qwen3-Coder-30B
- Detailed activity summaries with special features
- Technical architecture and implementation decisions
- Usage examples and future enhancements

Key highlights:
- All activities validated with 0 errors
- Dual-model architecture explained
- Activity 37 flagship feature: universal programming language support
- Hermes excellence in role-playing scenarios
2025-11-08 19:32:00 +00:00
Claude
f87824bc56
Add Qwen3-Coder-30B setup documentation to activity37
Added detailed comments showing how to use the recommended model:
- hf.co/unsloth/Qwen3-Coder-30B-A3B-Instruct-GGUF:Q4_K_M
- Setup instructions for llama.cpp (with GPU offloading)
- Alternative setup with ollama
- Environment variable configuration examples

This 30B parameter model is specifically optimized for code generation
across all programming languages, making it perfect for the universal
programming activity.
2025-11-08 19:27:27 +00:00
Claude
c51b2c7900
Update guarded_ai.py to support classifier_model and feedback_model
Changes:
- Enhanced get_openai_client_and_model() to support MODEL_X references
- Added model parameter (default "MODEL_1") to all AI functions:
  - categorize_response()
  - generate_ai_feedback()
  - provide_feedback()
  - provide_feedback_prompts()
  - translate_text()
- Updated simulate_activity() to:
  - Read classifier_model and feedback_model from YAML
  - Support step-level model overrides
  - Pass appropriate models to classifier vs feedback functions

This ensures the CLI simulation tool matches the production activity.py behavior.
2025-11-08 19:23:29 +00:00
Claude
e3c1547a0f
Set Hermes (MODEL_1) as default for all model parameters
Hermes is always available in every install, making it the perfect default.
All model parameters now default to "MODEL_1" instead of None:
- classifier_model: Fast, accurate classification
- feedback_model: Great for role-playing and general feedback

Activities can still override these defaults:
- At activity level for all steps
- At step level for specific interactions

This ensures activities work out-of-the-box without requiring model configuration.
2025-11-08 19:08:23 +00:00
Claude
1c347ea060
Add classifier_model and feedback_model support to YAML schema
Allow activities to specify separate models for classification and feedback:
- classifier_model: Used for categorizing user responses into buckets
- feedback_model: Used for generating AI feedback and translations

Both fields can be set at activity level (defaults) and overridden at step level.

Updated activity37 to use:
- MODEL_1 (Hermes) for classification
- MODEL_3 (Qwen 3 Coder) for feedback

This allows using specialized models for different tasks, e.g., fast classification
with accurate feedback generation from domain-specific models.
2025-11-08 18:58:29 +00:00
Claude
11e705be97
Add 3 extensive educational activities (American History, Biblical History, Programming)
Created 3 comprehensive educational activities without embedded Python:

1. activity35-american-history.yaml - Advanced American History for gifted students
   - Founding principles and Constitutional design
   - Civil War causes and Reconstruction failure
   - Civil Rights Movement strategies
   - Primary source analysis and critical historical thinking
   - Connects past to present issues

2. activity36-biblical-history.yaml - Biblical History & Ancient Near East
   - Ancient Near Eastern context (Mesopotamia, Egypt, Canaan)
   - Archaeological evidence and historical reconstruction
   - Israelite history (Exodus, Monarchy, Exile)
   - Roman period and early Christianity
   - Foundation myths vs historical facts
   - Cultural adaptation and religious transformation

3. activity37-programming-languages.yaml - Universal Programming Concepts
   - Student chooses ANY programming language (Python, C++, COBOL, anything)
   - AI adapts all examples/feedback to chosen language via metadata
   - Covers: stdout/output, variables, data types, control flow, loops, functions
   - All examples use stdout to display messages
   - Concepts applicable to every language
   - Language-specific syntax provided by AI

All activities:
- Use only YAML features (no embedded Python)
- Validate successfully with 0 errors
- Provide sophisticated educational content
- Use AI feedback for personalization
- Include critical thinking and reflection
- Track progress via metadata

Total: 8 new educational activities across 2 commits (5 from previous commit + 3 now)
2025-11-08 18:47:31 +00:00
1a9be3c420
Merge pull request #19 from russellballestrini/claude/fix-dark-mode-scrollbars-011CUvsF4XTDVgET5n5Prtjd
Fix scrollbars appearance in dark mode
2025-11-08 13:44:47 -05:00
Claude
31152c295b
Refactor CSS from inline to external stylesheet
Move all CSS from base.html to static/css/style.css for better:
- Separation of concerns
- Browser caching
- Maintainability
- Code organization

Changes:
- Created static/css/style.css with all application styles
- Updated base.html to link to external stylesheet
- Reduced base.html from ~980 to ~407 lines
2025-11-08 18:41:56 +00:00
Claude
0ecf6f9bca
Improve dark mode scrollbar styling for Chrome
Add custom scrollbar styles that properly match dark and light themes:
- Webkit browsers: styled scrollbars with theme-appropriate colors
- Firefox: thin scrollbars with matching color scheme
- Dark mode: darker gray scrollbars that blend with the UI
- Light mode: light gray scrollbars for better visibility
2025-11-08 18:07:46 +00:00
Claude
b9d278c01c
Add venv/ to .gitignore 2025-11-08 17:36:05 +00:00
Claude
994d5e5de9
Add 5 new educational activities without embedded Python
Created 5 comprehensive educational activities that use only YAML features
(buckets, transitions, metadata operations, AI feedback) without Python scripts:

- activity30-logic-puzzles.yaml: Critical thinking through deductive reasoning,
  contrapositives, syllogisms, and knights/knaves puzzles

- activity31-scientific-method.yaml: Learn scientific method through historical
  case studies (Semmelweis, Newton) and experimental design principles

- activity32-world-geography.yaml: Choose-your-own-adventure journey exploring
  continents, countries, capitals, and cultural facts

- activity33-environmental-science.yaml: Role-playing as environmental consultant
  making sustainability decisions on transportation, energy, land use, waste, and food

- activity34-media-literacy.yaml: Develop critical media consumption skills,
  evaluate sources, recognize bias, fact-check claims, and spot manipulation

All activities:
- Follow existing YAML schema and validate successfully
- Use Socratic buckets for educational feedback
- Include set_language support
- Track progress via metadata
- Provide AI-generated personalized feedback
- Are educational, engaging, and progressively challenging
- Include final reflection steps

Also added NEW_ACTIVITIES_PLAN.md documenting the planning process and
design rationale for each activity.
2025-11-08 17:34:33 +00:00
ed63672e66
Merge pull request #18 from russellballestrini/claude/improve-dark-mode-output-011CUvnEP44R3WNw6F9qQxiP
Improve dark mode styling and readability
2025-11-08 12:06:44 -05:00
Claude
6402fdb139
Improve link colors for dark mode visibility
Added CSS variables for link colors with better contrast:
- Light mode: #0066cc (normal), #004499 (hover)
- Dark mode: #58a6ff (normal), #79b8ff (hover)

Applied general link styling rules that adapt to both themes,
ensuring links are clearly visible and distinguishable in dark mode.
2025-11-08 17:06:27 +00:00
Claude
5a74092c77
Improve code execution output styling for dark mode
Added CSS variables for code execution result colors that adapt to theme:
- --text-info: Blue for informational text (language labels)
- --text-success: Green for successful output
- --text-error: Red for errors and warnings

Updated JavaScript to use CSS variables instead of hard-coded colors,
ensuring proper contrast and readability in both light and dark modes.
2025-11-08 17:03:50 +00:00
44ae3dd882
Merge pull request #17 from russellballestrini/claude/improve-theme-011CUvhRSTfsJnZzFkVBuiK5
Find Better Theme for Project
2025-11-08 11:11:25 -05:00
6f06e43cbb
Merge pull request #16 from russellballestrini/claude/opencompletion-ex-makeover-011CUvXcfjHUFytTM7B4C6UR
Tests
2025-11-08 11:09:07 -05:00
Claude
9df6a8b8fa
Improve exception handling in integration test tearDown methods
Address CodeRabbit feedback by replacing bare except clauses with
specific Exception handling:
- test_activity_integration.py: Fix 2 tearDown methods
- test_app_integration.py: Fix 1 tearDown method

Changes:
- Replace bare 'except:' with 'except Exception as e:'
- Add explanatory comments for why exceptions are caught
- Maintain same functionality while improving code quality

Tests still pass: 11/13 integration tests passing (85%)
2025-11-08 16:08:25 +00:00
Claude
b61f7944d3
Improve code highlighter theme for dark mode
- Switch from default highlight.js theme to GitHub themes
- Use github-dark theme for dark mode with better color contrast
- Use github theme for light mode
- Dynamically switch themes when user toggles dark/light mode
- Apply correct theme on page load based on saved preferences
2025-11-08 15:59:26 +00:00
48fc6f472f
Merge pull request #15 from russellballestrini/claude/dark-light-mode-switcher-011CUvfdzJCM7ejET2CEB9n8
Add dark mode toggle with local storage
2025-11-08 10:42:59 -05:00
Claude
5f01ffbef1
Move inline CSS to stylesheet
- Moved all theme-related inline styles to CSS rules
- Created proper selectors for labels, inputs, and buttons
- Added utility-belt class to mobile menu for consistent styling
- Removed redundant inline style attributes
2025-11-08 15:41:45 +00:00
Claude
bdf2863083
Fix integration tests and configure uncloseai.com models
Major improvements to test_activity_integration.py:
- Configure tests to use uncloseai.com models (hermes-3-llama-3.1-405b and qwen-2.5-72b)
- Fix Flask app and activity module configuration in test setUp
- Properly initialize MODEL_CLIENT_MAP with test models
- Set up activity.app, activity.db, and activity.get_room for proper test isolation
- Fix file path handling in create_test_activity_file()
- Improve activity YAML structure to avoid premature activity completion
- Add session refresh to handle database state properly

Test results improved from 3/9 passing to 7/9 passing (78% pass rate):
✓ test_cancel_activity
✓ test_display_activity_metadata
✓ test_execute_processing_script_with_metadata_operations
✓ test_handle_activity_response_correct_answer
✓ test_start_activity
✓ test_activity_state_metadata_persistence
✓ test_metadata_update_and_remove

Remaining issues (edge cases):
- test_handle_activity_response_increments_attempts: attempts counter behavior on incorrect answers
- test_loop_through_steps_until_question: step navigation emit count
2025-11-08 15:40:35 +00:00
Claude
314651e910
Add dark/light mode theme switcher with localStorage persistence
- Added CSS variables for light and dark themes
- Implemented theme toggle buttons in both desktop sidebar and mobile menu
- Added JavaScript logic to switch themes and persist choice in localStorage
- Applied dark theme styling to all UI elements including code blocks
- Theme is applied immediately on page load to prevent flash
2025-11-08 15:39:23 +00:00
Claude
c4cd185adc
Add integration tests for activity.py and app.py
New integration test files:
- test_activity_integration.py: 3 passing tests
  - Activity state metadata persistence
  - Metadata update and remove operations
  - Processing script execution with metadata

- test_app_integration.py: 4 passing tests
  - Group consecutive roles utility function
  - Room user workflow (add/remove users)
  - Message persistence and retrieval
  - Activity state workflow

Coverage improvements:
- Overall: 70% → 72% (+2%)
- Tests passing: 174 → 181 (+7)
- models.py: 100% coverage (from 55%)
- activity.py: 22% coverage (from 20%)
- New integration tests: 7 passing

Total test suite: 181 passing, 72% coverage
2025-11-08 14:18:56 +00:00
Claude
24ca0aab72
Add comprehensive unit tests for models.py and activity.py
- models.py: 55% → 100% coverage (29 tests)
  - Complete Room model testing (user management)
  - Complete UserSession model testing
  - Complete Message model testing (token counting, image detection)
  - Complete ActivityState model testing (metadata operations)

- activity.py: 14% → 20% coverage (25 tests)
  - get_activity_content with path traversal protection
  - execute_processing_script for Python execution
  - get_next_step for navigation
  - categorize_response for AI categorization
  - generate_ai_feedback for feedback generation
  - translate_text for translations
  - provide_feedback for feedback systems

Total: 54 new unit tests added, 135 tests now passing
2025-11-08 14:11:43 +00:00
Claude
62bc2d72c5
Improve test infrastructure and fix test failures
- Add pytest.ini configuration for better test organization
- Fix test file naming conflicts (rename test_guarded_ai.py)
- Improve database test setup in conftest.py with proper fixtures
- Remove duplicate test_app_feedback.py (functionality covered in test_guarded_ai_functions.py)
- Fix database initialization issues in integration tests
- All working tests now passing (120 passed, 65% coverage)
2025-11-08 14:04:09 +00:00
e74827061e modified: templates/chat.html 2025-11-08 06:56:18 -05:00
b95390f34c Implement async code execution with smart polling and cancel button
- Switch from sync /execute to async /execute/async with polling
- Poll intervals: 300ms, 750ms, 1450ms, 2350ms, 3000ms, 4600ms, 6600ms+
- Show cancel button after 3 seconds if job still running
- Display partial output when cancelled or timed out
- Add Copy and Run buttons to bottom of truncated code blocks (next to Show More)
- Prevents accidental cancels and DoS from spam-clicking
2025-11-07 19:32:47 -05:00
4f3dd882ba modified: CLAUDE.md
modified:   templates/chat.html
	new file:   test_code_execution.html
2025-11-07 13:31:27 -05:00