1.5 KiB
1.5 KiB
Task Log: Fix Pipeline Status Multi-Tenant Mismatch
Date: 2025-01-25 16:45 Mode: beastmode
Problem
The Documents panel was stuck showing "Processing in Progress" even when the tenant-specific pipeline was not busy. This happened because:
- The global
/healthendpoint returnspipeline_busyfrom global namespace (not tenant-aware) - The
/documents/pipeline_statusendpoint returns tenant-specific pipeline status - The UI used the global
pipelineBusystate from health endpoint to decide which empty state to show
Actions
- Added
getPipelineStatusimport to DocumentManager.tsx - Added
setPipelineBusyhook to update global pipeline state - Modified
handleIntelligentRefreshto fetch tenant-specific pipeline status after documents load - Updated dependency array to include
setPipelineBusyandisTenantContextReady
Decisions
- Chose to update global
pipelineBusystate from DocumentManager rather than modifying the health endpoint - This approach keeps the health endpoint simple and makes the Documents panel the source of truth for tenant-specific pipeline state
Next Steps
- Refresh browser and verify Documents panel shows correct empty state
- When switching tenants/KBs, the pipeline status should update correctly
Lessons/Insights
- In multi-tenant mode, global status endpoints (like /health) don't reflect tenant-specific state
- Components that need tenant-specific data should fetch it directly from tenant-aware endpoints