Skip to content

Conversation

victordibia
Copy link
Contributor

@victordibia victordibia commented Oct 10, 2025

Motivation and Context

Add a helpful UI for function approval flow in DevUI and other fixes

Performance & Architecture:

  • Implement lazy loading for entity discovery - entities loaded on-demand instead of at startup
  • Add hot reload capability for development workflow via new reload endpoint
  • Reduce startup time and memory footprint by deferring module imports

Security Enhancements:

  • Remove remote entity loading capabilities (POST /v1/entities/add, DELETE endpoints)
  • DevUI now strictly local development tool - no remote code execution
  • Add explicit security documentation and best practices in README

Frontend Improvements:

  • Migrate to Zustand for centralized state management (replacing prop drilling)
  • Add lightweight zero-dependency markdown renderer with code block copy support
  • Improve gallery UX with setup instructions modal instead of direct URL loading
  • Enhanced message UI with copy functionality and better token usage display

Testing & Quality:

  • Expand test coverage for lazy loading, type detection, and cache invalidation
  • Add comprehensive tests for new behaviors (+231 lines of test code)
  • Improve type safety and documentation throughout

Breaking Changes:

  • Remote entity loading via URLs is no longer supported
  • Entities must be loaded from local filesystem only
image

Description

Contribution Checklist

  • The code builds clean without any errors or warnings
  • The PR follows the Contribution Guidelines
  • All unit tests pass, and I have added new tests where possible
  • Is this a breaking change? If yes, add "[BREAKING]" prefix to the title of the PR.

@markwallace-microsoft
Copy link
Member

markwallace-microsoft commented Oct 10, 2025

Python Test Coverage

Python Test Coverage Report •
FileStmtsMissCoverMissing
TOTAL10361170683% 
report-only-changed-files is enabled. No files were changed during this commit :)

Python Unit Test Overview

Tests Skipped Failures Errors Time
1276 98 💤 0 ❌ 0 🔥 27.954s ⏱️

…ty and state management

Major architectural improvements to DevUI for better performance, security, and developer experience:

Performance & Architecture:
- Implement lazy loading for entity discovery - entities loaded on-demand instead of at startup
- Add hot reload capability for development workflow via new reload endpoint
- Reduce startup time and memory footprint by deferring module imports

Security Enhancements:
- Remove remote entity loading capabilities (POST /v1/entities/add, DELETE endpoints)
- DevUI now strictly local development tool - no remote code execution
- Add explicit security documentation and best practices in README

Frontend Improvements:
- Migrate to Zustand for centralized state management (replacing prop drilling)
- Add lightweight zero-dependency markdown renderer with code block copy support
- Improve gallery UX with setup instructions modal instead of direct URL loading
- Enhanced message UI with copy functionality and better token usage display

Testing & Quality:
- Expand test coverage for lazy loading, type detection, and cache invalidation
- Add comprehensive tests for new behaviors (+231 lines of test code)
- Improve type safety and documentation throughout

Breaking Changes:
- Remote entity loading via URLs is no longer supported
- Entities must be loaded from local filesystem only
@markwallace-microsoft markwallace-microsoft added the documentation Improvements or additions to documentation label Oct 15, 2025
@victordibia victordibia marked this pull request as ready for review October 15, 2025 20:25
@Copilot Copilot AI review requested due to automatic review settings October 15, 2025 20:25
Copy link
Contributor

@Copilot Copilot AI left a comment

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 adds a comprehensive Function Approval UI to DevUI and implements numerous architectural improvements for better performance, security, and developer experience.

Key changes include:

  • Implement lazy loading for entity discovery to reduce startup time and memory usage
  • Add hot reload capability for development workflow
  • Remove remote entity loading capabilities for enhanced security
  • Migrate frontend to Zustand for centralized state management
  • Add lightweight markdown renderer with code block copy support

Reviewed Changes

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

Show a summary per file
File Description
python/packages/devui/tests/test_execution.py Updates test assertions to support "unknown" entity type during discovery phase
python/packages/devui/tests/test_discovery.py Adds comprehensive tests for lazy loading, type detection, and hot reload functionality
python/packages/devui/frontend/vite.config.ts Removes commented build optimization settings
python/packages/devui/frontend/src/types/openai.ts Reorganizes event type definitions and adds turn separator for UI grouping
python/packages/devui/frontend/src/stores/devuiStore.ts Implements centralized Zustand store for unified state management
python/packages/devui/frontend/src/components/ui/markdown-renderer.tsx Adds zero-dependency markdown renderer with code block copy functionality
python/packages/devui/frontend/src/components/layout/settings-modal.tsx Reorders tabs to prioritize Settings over About
python/packages/devui/frontend/src/components/layout/entity-selector.tsx Updates to show lazy loading indicators and removes remote entity management
python/packages/devui/frontend/src/components/layout/deployment-modal.tsx Adds comprehensive deployment guide with Docker and Azure instructions
python/packages/devui/frontend/src/components/features/agent/agent-view.tsx Migrates to Zustand store and adds message copy functionality

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@victordibia victordibia added this pull request to the merge queue Oct 15, 2025
Merged via the queue into microsoft:main with commit b64358d Oct 15, 2025
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants