Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Ensure UI feedback message for batch processing completion #170

Conversation

fg-nava
Copy link
Contributor

@fg-nava fg-nava commented Jan 9, 2025

fix: resolve missing batch processing UI feedback message

Ticket

https://navalabs.atlassian.net/browse/DST-709

Changes

  • Updated message formatting in chainlit.py to ensure completion status is visible in UI
  • Added proper metadata tracking for processing status
  • Made completion message more descriptive by including result filename

Context for reviewers

The batch processing feature was not showing completion messages in the UI, even though they were being logged successfully. Investigation showed that messages with author "backend" were not consistently visible in the Chainlit UI.

Key changes:

  • Added metadata to include processing status and file information
  • Made completion message more informative by including the output filename
  • Ensured consistent message visibility throughout the processing flow

This PR is part of improving the batch processing feature's user experience, following the fix for CPU usage issues in DST-688.

Testing

Tested locally with the following scenarios:

  1. Uploaded a CSV file with valid questions

    • Confirmed "File processed, results attached" message appears with download link
    • Verified file downloads successfully
  2. Uploaded a CSV without a "question" column

    • Confirmed error message appears with proper formatting
  3. Verified all status messages appear in sequence:

    • "Please upload a CSV file..."
    • "Received file, processing..."
    • "File processed, results attached"
  4. Screenshot:

    Screenshot 2025-01-09 at 1 31 45 PM

@fg-nava fg-nava requested a review from a team January 9, 2025 21:37
Copy link

github-actions bot commented Jan 9, 2025

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
2845 2543 89% 80% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
app/src/batch_process.py 100% 🟢
TOTAL 100% 🟢

updated for commit: b3c3886 by action🐍

@yoomlam yoomlam changed the base branch from main to DST-688-debug-batch-processing-limitations January 9, 2025 23:18
@yoomlam yoomlam changed the title Dst 709 UI feedback batch processing fix: Ensure UI feedback message for batch processing completion Jan 9, 2025
@yoomlam yoomlam changed the base branch from DST-688-debug-batch-processing-limitations to DST-688-batch-processing-limitations January 9, 2025 23:19
app/src/chainlit.py Outdated Show resolved Hide resolved
@fg-nava fg-nava merged commit 025092d into DST-688-batch-processing-limitations Jan 10, 2025
4 checks passed
@fg-nava fg-nava deleted the DST-709-ui-feedback-batch-processing branch January 10, 2025 18:28
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.

3 participants