Skip to content

Conversation

@danielaskdd
Copy link
Collaborator

fix(webui): resolve document status grouping issue in DocumentManager

  • Fix documents being grouped by status after pagination and sorting
  • Use backend-sorted data directly from currentPageDocs instead of re-grouping
  • Preserve backend sort order to prevent status-based grouping
  • Maintain backward compatibility with legacy docs structure
  • Ensure all sorting fields (file name, dates, ID) work correctly without status grouping

The issue occurred because the frontend was re-grouping already-sorted data
from the backend by status, breaking the intended sort order. Now documents
are displayed in the exact order returned by the backend API.

Fixes: Document list sorting by file name was grouping by status instead of
maintaining proper sort order across all documents.

- Move dependency analysis outside graph database lock
- Add persistence call before lock release to prevent dirty reads
This ensures the KG rebuilds maintain the original creation order of the first extraction result for each chunk.
…ve parameter validation for summary configuration

- Update algorithm logic in operate.py for better token management
- Fix health endpoint to use correct parameter names
- Modified _handle_entity_relation_summary to return tuple[str, bool]
- Updated merge functions to log "LLMmerg" vs "Merging" based on actual LLM usage
- Replaced hardcoded fragment count prediction with real-time LLM usage tracking
…mmary

- Add SUMMARY_LENGTH_RECOMMENDED parameter (600 tokens)
- Optimize prompt temple for LLM summary
- Remove hash delimiters
- Consistent section headers
- Add "Output:" labels
- Clean up example formatting
- Remove parameter from function signature
- Access from global_config instead
- Improve code consistency
- Ensure oversized descriptions are force-merged with subsequent ones
- Add len(current_list) <= 2 termination condition to guarantee convergence
- Implement token-based truncation in _summarize_descriptions to prevent overflow
- Fix documents being grouped by status after pagination and sorting
- Use backend-sorted data directly from currentPageDocs instead of re-grouping
- Preserve backend sort order to prevent status-based grouping
- Maintain backward compatibility with legacy docs structure
- Ensure all sorting fields (file name, dates, ID) work correctly without status grouping

The issue occurred because the frontend was re-grouping already-sorted data
from the backend by status, breaking the intended sort order. Now documents
are displayed in the exact order returned by the backend API.

Fixes: Document list sorting by file name was grouping by status instead of
maintaining proper sort order across all documents.
@danielaskdd danielaskdd marked this pull request as ready for review August 26, 2025 15:05
@danielaskdd danielaskdd merged commit c975263 into HKUDS:main Aug 26, 2025
1 check passed
@danielaskdd danielaskdd deleted the fix-file-order branch August 29, 2025 07:30
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