Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
3681a33
feat: Phase 2 architectural foundations and enhanced EXPLAIN visualiz…
nipunaudemy Nov 5, 2025
b5db938
feat: Enhanced D3.js EXPLAIN tree visualization
nipunaudemy Nov 5, 2025
733c825
feat: Add AI-powered EXPLAIN interpretation with RAG citations
nipunaudemy Nov 5, 2025
5380a6f
feat: Implement one-click optimization fixes with Safe Mode
nipunaudemy Nov 5, 2025
0c55bc3
feat: Implement @mydba chat participant with AI-powered commands
nipunaudemy Nov 5, 2025
4e593a8
feat: Implement interactive waterfall chart for query profiling
nipunaudemy Nov 5, 2025
2ae1dc0
fix: resolve database selection and parameter placeholder errors
nipunaudemy Nov 5, 2025
6c3c7a3
fix: resolve EXPLAIN plan tree diagram overflow and boundary issues
nipunaudemy Nov 7, 2025
a8df4c0
feat: Implement advanced Edit Variables UI with risk indicators and v…
nipunaudemy Nov 7, 2025
b1c06ec
docs: add macOS testing fix script and comprehensive troubleshooting …
nipunaudemy Nov 7, 2025
9404598
feat: Implement advanced Process List grouping and lock detection
nipunaudemy Nov 7, 2025
c5d62f9
feat: Implement Query History Service with persistence and analytics
nipunaudemy Nov 7, 2025
cbc7a7b
docs: Core Phase 2 Complete - 100% of planned features delivered
nipunaudemy Nov 7, 2025
0b8733f
fix: resolve 4 critical bugs across validation, profiling, and lock h…
nipunaudemy Nov 7, 2025
b3b4b58
feat: Implement Query History UI with full feature set
nipunaudemy Nov 7, 2025
659bf3a
feat: Set up comprehensive test infrastructure with coverage reporting
nipunaudemy Nov 7, 2025
bf1f79a
feat: Implement Phase 2.5 - Vector-based RAG and Live Documentation P…
nipunaudemy Nov 7, 2025
a36faf8
fix: Resolve all linting errors and add Phase 2.5 completion summary
nipunaudemy Nov 7, 2025
5285e0f
feat: add production readiness infrastructure (Phase 1.5 partial)
nipunaudemy Nov 7, 2025
fd4868d
feat: add audit logging, disposable manager, and error recovery (Phas…
nipunaudemy Nov 7, 2025
b8903b7
chore: whitespace cleanup and documentation updates
nipunaudemy Nov 7, 2025
19e0e7a
feat: add ChatResponseBuilder for rich interactive chat responses
nipunaudemy Nov 7, 2025
fe847de
feat: integrate ChatResponseBuilder into chat command handlers
nipunaudemy Nov 7, 2025
08f455e
feat: add NaturalLanguageQueryParser for SQL generation
nipunaudemy Nov 7, 2025
23866c5
feat: integrate NL parser into chat participant for SQL generation
nipunaudemy Nov 7, 2025
84b86c2
feat: add interactive commands for chat buttons
nipunaudemy Nov 7, 2025
c9e8d3e
feat: polish chat participant with enhanced UX and error handling
nipunaudemy Nov 7, 2025
8ba6f9a
docs: add comprehensive chat participant completion report
nipunaudemy Nov 7, 2025
65ee2e4
docs: fix whitespace in completion report
nipunaudemy Nov 7, 2025
ef44c68
feat: implement configuration reload without restart
nipunaudemy Nov 7, 2025
6e68b5d
feat: add AI provider fallback chain for resilience
nipunaudemy Nov 7, 2025
5764349
docs: Phase 1.5 completion report - Production Ready
nipunaudemy Nov 7, 2025
7f96d5d
feat: add comprehensive unit test infrastructure
nipunaudemy Nov 7, 2025
3cc8a31
test: fix whitespace in test files (Jest auto-format)
nipunaudemy Nov 7, 2025
494d860
test: fix all test failures - 100% passing (154/154 tests)
nipunaudemy Nov 7, 2025
bb26798
feat: upgrade EXPLAIN viewer to use AIServiceCoordinator (Phase 3)
nipunaudemy Nov 7, 2025
7f74a08
docs: move One-Click Fixes to Phase 3
nipunaudemy Nov 7, 2025
2f5f236
feat: upgrade Query Profiling to use AIServiceCoordinator (Phase 5 Co…
nipunaudemy Nov 7, 2025
34331bf
docs: add Visual Query Analysis completion report
nipunaudemy Nov 7, 2025
46332fd
docs: update ROADMAP with Milestone 5 completion
nipunaudemy Nov 7, 2025
ea86694
docs: cleanup docs folder - keep only essential documents
nipunaudemy Nov 7, 2025
f03c880
fix: resolve all TypeScript compilation errors for CI
nipunaudemy Nov 7, 2025
b25f4b1
fix: resolve security vulnerabilities and linting issues
nipunaudemy Nov 7, 2025
f29a3f6
fix: resolve test failures in sql-validator and query-anonymizer
nipunaudemy Nov 7, 2025
4ddb2fa
fix: address Cursor Bugbot review comments
nipunaudemy Nov 7, 2025
0ca1833
docs: add Milestone 12 (UX & Code Quality) to Phase 3 roadmap
nipunaudemy Nov 7, 2025
9a528c9
fix: address all Cursor Bugbot review comments (10/10 fixed)
nipunaudemy Nov 7, 2025
c7be598
fix: add missing ParsedQuery import and replace any types
nipunaudemy Nov 7, 2025
8ec0924
fix: prevent race condition in transaction rollback
nipunaudemy Nov 7, 2025
5bb7238
fix: resolve null reference and span tracking bugs
nipunaudemy Nov 7, 2025
1e4c010
fix: AI variable description treating system variables as SQL queries
nipunaudemy Nov 7, 2025
304cc27
feat: type-aware variable value escaping and core service improvements
nipunaudemy Nov 7, 2025
115a0bc
fix: initialize d3NodeId counter to prevent NaN node IDs in EXPLAIN d…
nipunaudemy Nov 7, 2025
188e45a
feat(prd): add InnoDB Status Monitor and enhanced Replication Status …
nipunaudemy Nov 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 33 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,27 @@
[![Version](https://img.shields.io/badge/version-0.1.0-blue.svg)](https://marketplace.visualstudio.com/items?itemName=mydba.mydba)
[![License](https://img.shields.io/badge/license-Apache%202.0-green.svg)](LICENSE)
[![VSCode](https://img.shields.io/badge/VSCode-1.85%2B-blue.svg)](https://code.visualstudio.com/)
[![Phase 1](https://img.shields.io/badge/Phase%201-Complete-brightgreen.svg)](docs/PHASE1_COMPLETION_PLAN.md)
[![Tests](https://img.shields.io/badge/tests-passing-brightgreen.svg)](https://github.com/your-org/mydba/actions)
[![Coverage](https://img.shields.io/badge/coverage-%3E70%25-brightgreen.svg)](coverage/index.html)
[![Tests](https://img.shields.io/badge/tests-186_passing-brightgreen.svg)](https://github.com/your-org/mydba/actions)
[![Coverage](https://img.shields.io/badge/coverage-10.76%25-yellow.svg)](coverage/index.html)
Copy link

Choose a reason for hiding this comment

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

Bug: Coverage Badge Inconsistency

The coverage badge shows 10.76% coverage but the PR description claims 70%+ coverage and the test command shows coverage thresholds requiring 70%. This inconsistency suggests either the badge wasn't updated after running tests, or the actual coverage doesn't meet the claimed threshold, which would cause CI failures.

Fix in CursorΒ Fix in Web

[![License Compliance](https://img.shields.io/badge/licenses-compliant-brightgreen.svg)](https://github.com/your-org/mydba/actions)
[![PR Checks](https://img.shields.io/badge/PR%20checks-automated-blue.svg)](https://github.com/your-org/mydba/actions)

MyDBA is an AI-powered VSCode extension that brings database management, monitoring, and optimization directly into your development environment. Built for developers and database administrators who want intelligent insights without leaving their IDE.

## πŸš€ Features

### Phase 1 MVP βœ… (Complete)
- **Multi-Database Support**: MySQL 8.0+, MariaDB 10.6+ (GA versions only)
- **AI-Powered Query Analysis**: Multi-provider support (VSCode LM, OpenAI, Anthropic, Ollama)
- **Visual EXPLAIN Plans**: Interactive tree diagrams with pain point highlighting
- **Query Profiling**: Performance Schema integration with waterfall charts
- **Database Explorer**: Tree view with databases, tables, indexes, and processes
- **Enhanced Process List**: Transaction detection with grouping by user/host/query
- **Enhanced Process List**: Transaction detection with grouping by user/host/query, lock status badges
- **Query History**: Track executed queries with favorites, search, and replay
- **Security-First Design**: Credential isolation, production safeguards, query anonymization
- **Documentation-Grounded AI**: RAG system with MySQL/MariaDB docs to reduce hallucinations
- **Chat Integration**: `@mydba` commands in VSCode Chat with natural language support
- **Editor Compatibility**: Works in VSCode, Cursor, Windsurf, and VSCodium
- **Comprehensive Testing**: Integration tests with Docker, 70%+ code coverage
- **Testing**: 186 unit tests passing, integration tests with Docker (coverage improving to 70%)

### Metrics Dashboard

Expand Down Expand Up @@ -120,7 +120,6 @@ FLUSH PRIVILEGES;

**Quick Links**:
- πŸ“– [Database Setup Guide](docs/DATABASE_SETUP.md) - Detailed setup instructions
- ⚑ [Quick Reference](docs/QUICK_REFERENCE.md) - Quick setup checklist and commands
- πŸ§ͺ [Testing Guide](test/MARIADB_TESTING.md) - Docker setup for development

## πŸ› οΈ Installation
Expand Down Expand Up @@ -282,18 +281,40 @@ No configuration needed! If you have GitHub Copilot, MyDBA will automatically us
}
```

## πŸ’¬ VSCode Chat Integration
## πŸ’¬ VSCode Chat Integration ✨ NEW

Use `@mydba` in VSCode Chat for natural language database assistance:
Use `@mydba` in VSCode Chat for conversational database assistance powered by AI.

### Available Commands

| Command | Description | Example |
|---------|-------------|---------|
| `/analyze` | Analyze query for anti-patterns and optimization opportunities | `@mydba /analyze SELECT * FROM users` |
| `/explain` | Visualize query execution plan with pain point detection | `@mydba /explain SELECT * FROM orders WHERE status = 'active'` |
| `/profile` | Profile query performance with stage-by-stage breakdown | `@mydba /profile SELECT COUNT(*) FROM large_table` |
| `/optimize` | Get AI-powered optimization suggestions | `@mydba /optimize SELECT * FROM users JOIN orders` |
| `/schema` | Explore table schema and relationships | `@mydba /schema users` |

### Natural Language Queries

Ask questions in plain English:

```
@mydba /analyze SELECT * FROM users WHERE email = 'test@example.com'
@mydba /explain SELECT * FROM orders WHERE created_at > '2024-01-01'
@mydba /profile SELECT COUNT(*) FROM large_table
@mydba how do I optimize this slow query?
@mydba what indexes should I add to the users table?
@mydba why is my query doing a full table scan?
@mydba explain the difference between INNER JOIN and LEFT JOIN
@mydba show me the current connections
```

### Requirements

- VSCode with Chat API support (VSCode 1.90+)
- Requires an AI provider configured (VSCode LM/OpenAI/Anthropic/Ollama)
- Enable with `mydba.ai.chatEnabled: true` (enabled by default)

**Note**: Chat participant is not available in all VSCode-compatible editors. Works best in official VSCode with GitHub Copilot.

## πŸ”’ Security & Privacy

### Data Privacy
Expand Down Expand Up @@ -414,7 +435,6 @@ See [SECURITY.md](SECURITY.md) for security policies and supported versions.
- **Discussions**: [GitHub Discussions](https://github.com/your-org/mydba/discussions)
- **Documentation**:
- [Database Setup Guide](docs/DATABASE_SETUP.md)
- [Quick Reference](docs/QUICK_REFERENCE.md)
- [Testing Guide](test/MARIADB_TESTING.md)

## πŸ™ Acknowledgments
Expand Down
56 changes: 37 additions & 19 deletions docker-compose.test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
version: '3.8'

services:
# MySQL 8.0 for testing
mysql-8.0:
image: mysql:8.0
container_name: mydba-mysql-8.0
Expand All @@ -12,46 +13,63 @@ services:
ports:
- "3306:3306"
volumes:
- ./test/sql:/docker-entrypoint-initdb.d:ro
- ./test/sql/init-mysql.sql:/docker-entrypoint-initdb.d/01-init.sql
- ./test/sql/sample-data.sql:/docker-entrypoint-initdb.d/02-sample-data.sql
command: >
--default-authentication-plugin=mysql_native_password
--performance-schema=ON
--performance-schema-instrument='%=ON'
--performance-schema-consumer-events-statements-current=ON
--performance-schema-consumer-events-statements-history=ON
--performance-schema-consumer-events-transactions-current=ON
--performance-schema-consumer-events-transactions-history=ON
--performance-schema-consumer-events-statements-history-long=ON
--performance-schema-consumer-events-stages-current=ON
--performance-schema-consumer-events-stages-history=ON
--max-connections=200
--slow-query-log=ON
--slow-query-log-file=/var/log/mysql/slow-query.log
--long-query-time=1
--log-queries-not-using-indexes=ON
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
timeout: 20s
retries: 15
interval: 5s
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "root", "-ptest_password"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s

# MariaDB 10.11 LTS for testing
mariadb-10.11:
image: mariadb:10.11
container_name: mydba-mariadb-10.11
environment:
MYSQL_ROOT_PASSWORD: test_password
MYSQL_DATABASE: test_db
MYSQL_USER: test_user
MYSQL_PASSWORD: test_password
MARIADB_ROOT_PASSWORD: test_password
MARIADB_DATABASE: test_db
MARIADB_USER: test_user
MARIADB_PASSWORD: test_password
ports:
- "3307:3306"
volumes:
- ./test/sql:/docker-entrypoint-initdb.d:ro
- ./test/sql/init-mariadb.sql:/docker-entrypoint-initdb.d/01-init.sql
- ./test/sql/sample-data.sql:/docker-entrypoint-initdb.d/02-sample-data.sql
command: >
--performance-schema=ON
--performance-schema-instrument='%=ON'
--performance-schema-consumer-events-statements-current=ON
--performance-schema-consumer-events-statements-history=ON
--performance-schema-consumer-events-statements-history-long=ON
--performance-schema-consumer-events-stages-current=ON
--performance-schema-consumer-events-stages-history=ON
--max-connections=200
--slow-query-log=ON
--slow-query-log-file=/var/log/mysql/slow-query.log
--long-query-time=1
--log-queries-not-using-indexes=ON
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
timeout: 20s
retries: 15
interval: 5s
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s

# Note: Test data initialization is now handled by docker-entrypoint-initdb.d volumes
# SQL files in ./test/sql/ will be automatically executed on container startup
# Order: sample-data.sql, then performance-schema-setup.sql (alphabetical order)
networks:
default:
name: mydba-test-network
Loading
Loading