Commit graph

599 commits

Author SHA1 Message Date
Raphaël MANSUY
cefece087e cherry-pick 1a4d6775 2025-12-04 19:18:15 +08:00
Raphaël MANSUY
c9e5988349 cherry-pick b81b8620 2025-12-04 19:18:15 +08:00
Raphaël MANSUY
71bb5642e3 cherry-pick d550f1c5 2025-12-04 19:18:14 +08:00
Raphaël MANSUY
6b1e95dbf7 cherry-pick bf6ca9dd 2025-12-04 19:18:14 +08:00
Raphaël MANSUY
94646e6186 cherry-pick 7b1f8e0f 2025-12-04 19:18:14 +08:00
Raphaël MANSUY
d4c1a5c190 cherry-pick 0c1cb7b7 2025-12-04 19:18:14 +08:00
Raphaël MANSUY
18ed0a82e9 cherry-pick 0aef6a16 2025-12-04 19:18:14 +08:00
Raphaël MANSUY
201084e05a cherry-pick cf2a024e 2025-12-04 19:18:14 +08:00
Raphaël MANSUY
282dacc291 cherry-pick d4abe704 2025-12-04 19:18:14 +08:00
Raphaël MANSUY
6bd9a64fce cherry-pick b1a4e7d7 2025-12-04 19:18:13 +08:00
Raphaël MANSUY
c658f85131 cherry-pick 19a41584 2025-12-04 19:18:13 +08:00
Raphaël MANSUY
c96bc06153 cherry-pick 7297ca1d 2025-12-04 19:18:13 +08:00
Raphaël MANSUY
93acccf818 cherry-pick ffcd75a4 2025-12-04 19:18:13 +08:00
Raphaël MANSUY
dd1961ee48 cherry-pick e20f86a0 2025-12-04 19:18:13 +08:00
Raphaël MANSUY
2962839642 cherry-pick dd4c988b 2025-12-04 19:18:13 +08:00
Raphaël MANSUY
b56071c815 cherry-pick d5e7b230 2025-12-04 19:18:13 +08:00
Raphaël MANSUY
e64223dda9 cherry-pick d3b5cb63 2025-12-04 19:18:12 +08:00
Raphaël MANSUY
39ed70578b cherry-pick bd487a45 2025-12-04 19:18:12 +08:00
Raphaël MANSUY
80b959980d cherry-pick 7545fa72 2025-12-04 19:18:12 +08:00
Raphaël MANSUY
c5ea12a69c cherry-pick 68bee74d 2025-12-04 19:18:12 +08:00
Raphaël MANSUY
ca37eed4bc cherry-pick 5ca4792c 2025-12-04 19:18:12 +08:00
Raphaël MANSUY
a2910287b9 cherry-pick 42b09b10 2025-12-04 19:18:12 +08:00
Raphaël MANSUY
f6a743ba48 cherry-pick 2bb9ec13 2025-12-04 19:18:12 +08:00
Raphaël MANSUY
38c39069fa cherry-pick 29bd027a 2025-12-04 19:18:12 +08:00
Raphaël MANSUY
9bd4d049a3 cherry-pick 0ca71a57 2025-12-04 19:18:11 +08:00
Raphaël MANSUY
d2c19d3e64 cherry-pick f4acb25c 2025-12-04 19:18:11 +08:00
Raphaël MANSUY
373f1c8873 cherry-pick e2431b67 2025-12-04 19:18:11 +08:00
Raphaël MANSUY
b2f0a2eb2e cherry-pick 9ae1c7fc 2025-12-04 19:18:11 +08:00
Raphaël MANSUY
5fbecd7389 cherry-pick 587a930b 2025-12-04 19:18:11 +08:00
Raphaël MANSUY
9cdce488c8 cherry-pick 245c0c32 (resolved) 2025-12-04 19:17:52 +08:00
Raphaël MANSUY
a7c088ff8f cherry-pick 1f3d7006 (resolved) 2025-12-04 19:17:52 +08:00
Raphaël MANSUY
984ba31203 cherry-pick 15bfd9fa (resolved) 2025-12-04 19:17:52 +08:00
Raphaël MANSUY
142fcf9592 cherry-pick 80f2e691 2025-12-04 19:17:51 +08:00
Raphaël MANSUY
97fdc7c428 cherry-pick df52ce98 2025-12-04 19:17:47 +08:00
Raphaël MANSUY
922c2e7f7f cherry-pick c0b1552e (resolved) 2025-12-04 19:17:47 +08:00
Raphaël MANSUY
338328ae81 cherry-pick 8f4bfbf1 2025-12-04 19:15:04 +08:00
Raphaël MANSUY
fe49220b23 cherry-pick 3f6423df 2025-12-04 19:15:04 +08:00
Raphaël MANSUY
7fa3cab355 cherry-pick 162370b6 2025-12-04 19:14:29 +08:00
yangdx
7e591a81c0 Clean up duplicate dependencies in package.json and lock file
• Remove duplicate katex entries
• Remove duplicate lucide-react entries
• Remove duplicate mermaid entries
• Remove duplicate @types/bun entries
• Fix trailing commas in JSON

(cherry picked from commit 459e4ddc09)
2025-12-04 19:11:23 +08:00
yangdx
4cc6388742 Add auto-refresh of popular labels when pipeline completes
• Monitor pipeline busy->idle transitions
• Reload labels on dropdown open if needed
• Add onBeforeOpen callback to AsyncSelect
• Clear refresh flags after processing
• Improve label sync with backend state

(cherry picked from commit 58c83f9da5)
2025-12-04 19:11:15 +08:00
yangdx
46c13e23f0 Add confirmation dialog for pipeline cancellation
(cherry picked from commit 81e3496aa4)
2025-12-04 19:11:15 +08:00
yangdx
74d0a22020 Add pipeline cancellation feature with UI and i18n support
- Add cancelPipeline API endpoint
- Add cancel button to status dialog
- Update status response type
- Add cancellation UI translations
- Handle cancellation request states

(cherry picked from commit f89b5ab101)
2025-12-04 19:11:15 +08:00
yangdx
7404f76d8c Optimize chat performance by reducing animations in inactive tabs
• Add isTabActive prop to ChatMessage
• Disable spinner in inactive tabs
• Reduce opacity for inactive content
• Hide loading indicator when inactive
• Pass tab state from RetrievalTesting

(cherry picked from commit dab1c35834)
2025-12-04 19:11:08 +08:00
zl7261
cbdba2a744 web_ui: check node source and target
(cherry picked from commit 6a8de2edb2)
2025-12-04 19:11:07 +08:00
yangdx
411290a013 Add mhchem extension support for chemistry formulas in ChatMessage
(cherry picked from commit aeaa0b32f9)
2025-12-04 19:09:07 +08:00
yangdx
2d85e9f2f8 Fix swagger docs page problem in dev mode
- Add /static to VITE_API_ENDPOINTS
- Update proxy rewrite rules
- Include static file serving
- Sync sample env file

(cherry picked from commit ee7c683fa7)
2025-12-04 19:09:02 +08:00
yangdx
ec9b4862d0 Simplify pipeline status dialog by consolidating message sections
• Remove separate latest message section
• Combine into single pipeline messages area
• Add overflow-x-hidden for better display
• Change break-words to break-all
• Update translations across all locales

(cherry picked from commit 2476d6b7f8)
2025-12-04 19:09:01 +08:00
yangdx
c2620efc5e Update truncation message format in properties tooltip
(cherry picked from commit 019dff5248)
2025-12-04 19:09:00 +08:00
Raphael MANSUY
fe9b8ec02a
tests: stabilize integration tests + skip external services; fix multi-tenant API behavior and idempotency (#4)
* feat: Implement multi-tenant architecture with tenant and knowledge base models

- Added data models for tenants, knowledge bases, and related configurations.
- Introduced role and permission management for users in the multi-tenant system.
- Created a service layer for managing tenants and knowledge bases, including CRUD operations.
- Developed a tenant-aware instance manager for LightRAG with caching and isolation features.
- Added a migration script to transition existing workspace-based deployments to the new multi-tenant architecture.

* chore: ignore lightrag/api/webui/assets/ directory

* chore: stop tracking lightrag/api/webui/assets (ignore in .gitignore)

* feat: Initialize LightRAG Multi-Tenant Stack with PostgreSQL

- Added README.md for project overview, setup instructions, and architecture details.
- Created docker-compose.yml to define services: PostgreSQL, Redis, LightRAG API, and Web UI.
- Introduced env.example for environment variable configuration.
- Implemented init-postgres.sql for PostgreSQL schema initialization with multi-tenant support.
- Added reproduce_issue.py for testing default tenant access via API.

* feat: Enhance TenantSelector and update related components for improved multi-tenant support

* feat: Enhance testing capabilities and update documentation

- Updated Makefile to include new test commands for various modes (compatibility, isolation, multi-tenant, security, coverage, and dry-run).
- Modified API health check endpoint in Makefile to reflect new port configuration.
- Updated QUICK_START.md and README.md to reflect changes in service URLs and ports.
- Added environment variables for testing modes in env.example.
- Introduced run_all_tests.sh script to automate testing across different modes.
- Created conftest.py for pytest configuration, including database fixtures and mock services.
- Implemented database helper functions for streamlined database operations in tests.
- Added test collection hooks to skip tests based on the current MULTITENANT_MODE.

* feat: Implement multi-tenant support with demo mode enabled by default

- Added multi-tenant configuration to the environment and Docker setup.
- Created pre-configured demo tenants (acme-corp and techstart) for testing.
- Updated API endpoints to support tenant-specific data access.
- Enhanced Makefile commands for better service management and database operations.
- Introduced user-tenant membership system with role-based access control.
- Added comprehensive documentation for multi-tenant setup and usage.
- Fixed issues with document visibility in multi-tenant environments.
- Implemented necessary database migrations for user memberships and legacy support.

* feat(audit): Add final audit report for multi-tenant implementation

- Documented overall assessment, architecture overview, test results, security findings, and recommendations.
- Included detailed findings on critical security issues and architectural concerns.

fix(security): Implement security fixes based on audit findings

- Removed global RAG fallback and enforced strict tenant context.
- Configured super-admin access and required user authentication for tenant access.
- Cleared localStorage on logout and improved error handling in WebUI.

chore(logs): Create task logs for audit and security fixes implementation

- Documented actions, decisions, and next steps for both audit and security fixes.
- Summarized test results and remaining recommendations.

chore(scripts): Enhance development stack management scripts

- Added scripts for cleaning, starting, and stopping the development stack.
- Improved output messages and ensured graceful shutdown of services.

feat(starter): Initialize PostgreSQL with AGE extension support

- Created initialization scripts for PostgreSQL extensions including uuid-ossp, vector, and AGE.
- Ensured successful installation and verification of extensions.

* feat: Implement auto-select for first tenant and KB on initial load in WebUI

- Removed WEBUI_INITIAL_STATE_FIX.md as the issue is resolved.
- Added useTenantInitialization hook to automatically select the first available tenant and KB on app load.
- Integrated the new hook into the Root component of the WebUI.
- Updated RetrievalTesting component to ensure a KB is selected before allowing user interaction.
- Created end-to-end tests for multi-tenant isolation and real service interactions.
- Added scripts for starting, stopping, and cleaning the development stack.
- Enhanced API and tenant routes to support tenant-specific pipeline status initialization.
- Updated constants for backend URL to reflect the correct port.
- Improved error handling and logging in various components.

* feat: Add multi-tenant support with enhanced E2E testing scripts and client functionality

* update client

* Add integration and unit tests for multi-tenant API, models, security, and storage

- Implement integration tests for tenant and knowledge base management endpoints in `test_tenant_api_routes.py`.
- Create unit tests for tenant isolation, model validation, and role permissions in `test_tenant_models.py`.
- Add security tests to enforce role-based permissions and context validation in `test_tenant_security.py`.
- Develop tests for tenant-aware storage operations and context isolation in `test_tenant_storage_phase3.py`.

* feat(e2e): Implement OpenAI model support and database reset functionality

* Add comprehensive test suite for gpt-5-nano compatibility

- Introduced tests for parameter normalization, embeddings, and entity extraction.
- Implemented direct API testing for gpt-5-nano.
- Validated .env configuration loading and OpenAI API connectivity.
- Analyzed reasoning token overhead with various token limits.
- Documented test procedures and expected outcomes in README files.
- Ensured all tests pass for production readiness.

* kg(postgres_impl): ensure AGE extension is loaded in session and configure graph initialization

* dev: add hybrid dev helper scripts, Makefile, docker-compose.dev-db and local development docs

* feat(dev): add dev helper scripts and local development documentation for hybrid setup

* feat(multi-tenant): add detailed specifications and logs for multi-tenant improvements, including UX, backend handling, and ingestion pipeline

* feat(migration): add generated tenant/kb columns, indexes, triggers; drop unused tables; update schema and docs

* test(backward-compat): adapt tests to new StorageNameSpace/TenantService APIs (use concrete dummy storages)

* chore: multi-tenant and UX updates — docs, webui, storage, tenant service adjustments

* tests: stabilize integration tests + skip external services; fix multi-tenant API behavior and idempotency

- gpt5_nano_compatibility: add pytest-asyncio markers, skip when OPENAI key missing, prevent module-level asyncio.run collection, add conftest
- Ollama tests: add server availability check and skip markers; avoid pytest collection warnings by renaming helper classes
- Graph storage tests: rename interactive test functions to avoid pytest collection
- Document & Tenant routes: support external_ids for idempotency; ensure HTTPExceptions are re-raised
- LightRAG core: support external_ids in apipeline_enqueue_documents and idempotent logic
- Tests updated to match API changes (tenant routes & document routes)
- Add logs and scripts for inspection and audit
2025-12-04 16:04:21 +08:00
yangdx
19073319c1 Add @tanstack/react-table dependency for table functionality
• Add react-table v8.21.3
• Include table-core dependency
• Update package.json
• Update bun.lock file
2025-10-01 00:32:19 +08:00