Skip to content

Windows fixes#100

Merged
MarcSkovMadsen merged 12 commits into
mainfrom
fix/windows-fixes
Jan 16, 2026
Merged

Windows fixes#100
MarcSkovMadsen merged 12 commits into
mainfrom
fix/windows-fixes

Conversation

@MarcSkovMadsen

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings January 11, 2026 19:51

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR implements Windows-specific fixes and improvements to code execution in the HoloViz MCP display server. The changes introduce a new module execution pattern, add concurrency protection for database operations, and include comprehensive test coverage for the new functionality.

Changes:

  • Implements execute_in_module() utility to properly execute Python code in module namespaces, fixing issues with Panel decorators (@pn.cache, @pn.depends) on Windows
  • Adds async locking to DocumentationIndexer to prevent database corruption from concurrent access
  • Fixes attribute access bug in add_page.py (dict access on Snippet object)
  • Adds 369 lines of comprehensive tests for the new execution utilities
  • Updates documentation with ECharts formatter guidance and tutorial improvements

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
tests/display_mcp/test_utils.py Adds extensive test coverage for execute_in_module, including cleanup behavior, decorator support, and integration tests with _execute_code
src/holoviz_mcp/holoviz_mcp/data.py Adds async lock initialization and wraps database query methods (search, get_document, list_projects, search_get_reference_guide) with lock protection
src/holoviz_mcp/display_mcp/utils.py Introduces execute_in_module function to properly execute code in module namespace, updates validate_code to use it
src/holoviz_mcp/display_mcp/pages/view_page.py Refactors _execute_code to use execute_in_module with proper cleanup logic for both jupyter and panel methods
src/holoviz_mcp/display_mcp/pages/add_page.py Fixes bug: changes result["id"] to result.id for correct Snippet object attribute access
src/holoviz_mcp/config/resources/skills/panel.md Adds critical documentation about ECharts JSON serialization limitations and proper formatter usage
docs/tutorials/stock-analysis.md Minor documentation improvements to tutorial prompts

Comment thread src/holoviz_mcp/display_mcp/utils.py Outdated
Comment thread src/holoviz_mcp/holoviz_mcp/data.py Outdated
Comment thread src/holoviz_mcp/holoviz_mcp/data.py Outdated
Comment thread src/holoviz_mcp/holoviz_mcp/data.py
Comment thread tests/display_mcp/test_utils.py Outdated
@MarcSkovMadsen

Copy link
Copy Markdown
Owner Author

@copilot open a new pull request to apply changes based on the comments in this thread

Copilot AI commented Jan 11, 2026

Copy link
Copy Markdown
Contributor

@MarcSkovMadsen I've opened a new pull request, #101, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI and others added 8 commits January 11, 2026 20:13
…x asyncio.Lock init, protect index_documentation with lock, remove useless try-except

Co-authored-by: MarcSkovMadsen <42288570+MarcSkovMadsen@users.noreply.github.com>
Address code review feedback: fix exception handling, async lock initialization, and concurrency protection
@MarcSkovMadsen MarcSkovMadsen merged commit fd1b11d into main Jan 16, 2026
9 of 15 checks passed
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.

3 participants