Skip to content

Performance optimization for Chat attach picker & Added comprehensive Testing flow#52

Merged
ric-v merged 12 commits intodev-asterix:mainfrom
ric-v:main
Feb 8, 2026
Merged

Performance optimization for Chat attach picker & Added comprehensive Testing flow#52
ric-v merged 12 commits intodev-asterix:mainfrom
ric-v:main

Conversation

@ric-v
Copy link
Member

@ric-v ric-v commented Feb 8, 2026

This pull request introduces a comprehensive overhaul of the testing and optimization infrastructure for the project. It adds robust CI/CD workflows, Docker-based integration testing for multiple PostgreSQL versions, improved Makefile targets for test automation, and updates documentation to reflect these changes. Additionally, it brings in performance optimization documentation for handling large database operations and connection pool management.

Testing Infrastructure Enhancements:

  • Added .github/workflows/test.yml for matrix-based CI/CD testing across Node.js (18.x, 20.x, 22.x) and PostgreSQL (12-17), including unit, integration, renderer component, Docker-based tests, coverage reporting, and security audit.
  • Introduced docker-compose.test.yml to spin up PostgreSQL containers (versions 12, 14, 15, 16, 17) for integration and compatibility testing.
  • Expanded Makefile with granular targets for unit, integration, renderer, all tests, coverage, Docker lifecycle, and full suite orchestration. Help output now documents all testing commands. (Fef274e4L54R54, [1] [2]
  • Updated .nycrc.json to configure code coverage thresholds, reporters, and source mapping for TypeScript files.
  • Improved README.md with quickstart instructions, Docker-based test workflow, Makefile usage, and detailed testing infrastructure overview. [1] [2]

Performance Optimization Documentation:

  • Added docs/OPTIMIZATION_SUMMARY.md detailing adaptive schema cache TTL, connection pool metrics and idle timeout, debounced tree refresh, tree view virtualization, and debounce utilities for large schema handling.

Other updates:

  • Updated .vscodeignore to exclude coverage and virtual environment directories.
  • Added new changelog entries for unreleased features and improvements related to connection safety, auto-LIMIT, EXPLAIN integration, and table intelligence.

Top changes grouped by theme:

Testing Infrastructure

  • Added a CI workflow (.github/workflows/test.yml) for matrix testing (Node.js 18-22, PostgreSQL 12-17), coverage reporting, and security audit.
  • Introduced docker-compose.test.yml for multi-version PostgreSQL integration testing via Docker.
  • Expanded Makefile with granular test and Docker targets, plus improved help documentation. (Fef274e4L54R54, [1] [2]
  • Updated .nycrc.json for TypeScript coverage configuration.
  • Improved README.md with test quickstart, Docker workflow, Makefile usage, and infrastructure overview. [1] [2]

Performance Optimization

  • Added docs/OPTIMIZATION_SUMMARY.md describing adaptive cache TTL, connection pool metrics, debounced tree refresh, and tree view virtualization for large schema handling.

Miscellaneous

  • Updated .vscodeignore to exclude coverage and virtual environment directories.
  • Added new changelog entries for unreleased features and improvements.This pull request introduces a comprehensive overhaul of the project's testing infrastructure, CI/CD pipeline, and performance documentation. It adds robust support for multi-version PostgreSQL integration testing, improves test coverage reporting, and documents recent large-scale performance optimizations. The changes increase test reliability, make it easier to run and monitor tests locally and in CI, and provide clear guidelines and scripts for contributors.

Testing & CI Infrastructure

  • Added a new GitHub Actions workflow (.github/workflows/test.yml) that runs unit, integration, renderer component, and Docker-based version compatibility tests across multiple Node.js and PostgreSQL versions, with coverage reporting and security audits.
  • Introduced a docker-compose.test.yml file for spinning up PostgreSQL containers (versions 12, 14, 15, 16, 17) for local and CI integration testing.
  • Expanded the Makefile with targets for running all types of tests, generating coverage reports, and managing Docker test containers. The help output now documents these commands for easier onboarding. [1] [2] [3]
  • Added a .nycrc.json configuration for NYC (Istanbul) to standardize code coverage reporting, including and excluding appropriate files, and enabling various report formats.
  • Updated the README.md with a detailed "Testing" section, providing quick start instructions, Docker usage, Makefile targets, and a summary of the testing infrastructure and CI/CD matrix. [1] [2]

Performance Optimization Documentation

  • Added docs/OPTIMIZATION_SUMMARY.md, which details recent large-scale optimizations: adaptive schema cache TTL, connection pool metrics and idle cleanup, debounced tree refresh, tree view virtualization, and a new debounce utility. The document also provides testing recommendations and future enhancement ideas.

Minor Enhancements

  • Added new commands to the package.json for editing connections and attaching to the SQL Assistant, as well as a configuration option to flag slow queries in history/results. [1] [2] [3] [4] [5]

These changes collectively make the project more maintainable, easier to test across environments, and better documented for both contributors and users.


Testing & CI/CD Improvements

  • Added a comprehensive GitHub Actions workflow for multi-version Node.js and PostgreSQL testing, coverage, and security audit. (.github/workflows/test.yml)
  • Introduced Docker Compose setup for PostgreSQL 12-17 integration testing. (docker-compose.test.yml)
  • Enhanced Makefile with granular test, coverage, and Docker management targets, plus improved help documentation. (Makefile) [1] [2] [3]
  • Added NYC configuration for unified coverage reporting. (.nycrc.json)
  • Expanded README.md with clear, actionable testing instructions and infrastructure overview. (README.md) [1] [2]

Performance Documentation

  • Documented large operation optimizations and new performance features in docs/OPTIMIZATION_SUMMARY.md.

Minor Features

  • Added new commands and configuration for connection editing, SQL Assistant, and slow query threshold in package.json. [1] [2] [3] [4] [5]

ric-v and others added 12 commits February 3, 2026 21:20
…ent enhancements

- Added adaptive schema cache TTL to optimize cache behavior based on access patterns.
- Introduced connection pool metrics and automatic idle timeout for better resource management.
- Implemented debounced tree refresh to improve UI performance during rapid operations.
- Added support for tree view virtualization to enhance handling of large schemas.
- Created a new debouncer utility for optimizing function calls.
- Developed an ExplainProvider for visualizing EXPLAIN ANALYZE plans in a webview.
- Implemented a TransactionToolbarManager for managing transaction controls in notebooks.
- Enhanced TransactionManager to support savepoints, isolation levels, and auto-rollback features.
- Updated UI components for transaction management, including buttons and status indicators.
…components

- Introduced TestDatabaseSetup for managing test database connections and schema setup.
- Added TestTimer and CoverageReporter for performance measurement and coverage reporting.
- Created unit tests for various renderer components, including notebook cell rendering, dashboard components, form validation, and accessibility features.
- Enhanced chat templates with breadcrumb navigation for database object selection.
- Implemented hierarchy navigation in chat scripts to improve user experience when selecting database objects.
- Updated styles for breadcrumb navigation and mention items to enhance UI clarity and usability.
…tures

- Added commands for table profiling and activity statistics, including cmdTableProfile and cmdTableActivity.
- Implemented cmdExplainQuery to allow users to generate EXPLAIN and EXPLAIN ANALYZE queries directly from notebook cells.
- Introduced QueryCodeLensProvider to provide EXPLAIN options in notebook cells for SQL queries.
- Enhanced the QueryHistoryProvider with rerunQuery and compareQueries functionalities for better query management.
- Added new SQL queries for table statistics, column details, and index usage in the profile module.
- Updated the SqlExecutor to apply auto-LIMIT to SELECT queries for performance optimization.
- Registered new commands in commands.ts for table profiling, activity, and index usage.
- Improved error handling and user feedback throughout the new features.
@ric-v ric-v merged commit 7ec71e0 into dev-asterix:main Feb 8, 2026
3 of 14 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.

1 participant