feat: generalize debug thread view and improve UI contrast#216
feat: generalize debug thread view and improve UI contrast#216Pavilion4ik wants to merge 1 commit into
Conversation
- Extend debug thread support to non-threaded orchestrators and processors - Delegate debug message generation to orchestrators via get_debug_messages() - Synthesize debug info from session metadata for one-shot workflows - Add specialized debug data for flashcards and educator assistant workflows - Improve UI contrast and readability in the admin debug thread view - Darken text and enhance message bubble styling for better visibility - Add tests to verify debug message generation from session metadata
|
Thanks for the pull request, @Pavilion4ik! This repository is currently maintained by Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review. 🔘 Get product approvalIf you haven't already, check this list to see if your contribution needs to go through the product review process.
🔘 Provide contextTo help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:
🔘 Get a green buildIf one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green. DetailsWhere can I find more information?If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources: When can I expect my changes to be merged?Our goal is to get community contributions seen and reviewed as efficiently as possible. However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:
💡 As a result it may take up to several weeks or months to complete a review and merge your PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #216 +/- ##
==========================================
- Coverage 95.13% 95.09% -0.05%
==========================================
Files 67 67
Lines 7322 7403 +81
Branches 387 395 +8
==========================================
+ Hits 6966 7040 +74
- Misses 267 269 +2
- Partials 89 94 +5
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
felipemontoya
left a comment
There was a problem hiding this comment.
I have not yet tested this in my dev, but overall looks good. I'll come back aftertrying it
| """ | ||
| Return debug messages from the session's thread and metadata. | ||
| """ | ||
| import json # pylint: disable=import-outside-toplevel |
There was a problem hiding this comment.
can we move this out to the top? something as basic as json should not conflict
| session-based ones) should override this to provide relevant | ||
| interaction history or state. | ||
| """ | ||
| return [] |
There was a problem hiding this comment.
would it make sense to return a message like
"role": "system",
"content": f"your {classname} orchestrator does not support debug messages",
"source": "system",
so that when the orchestrator does not override this, the user gets the right info?
felipemontoya
left a comment
There was a problem hiding this comment.
After the static commit I tried to run this in my local environment to no avail.
The debug view continues to work for threaded openai threaded conversations and does not work for other types of orchestrator (e.g the educator_question assist)
I believe this comes down to the fact that we are not storing the remote_id or the submission id in the non-threaded orchestrators. I think making this work more reliably would require that.
What?
This PR generalizes the AI Workflow Session DEBUG view to support non-threaded orchestrators and processors, while also significantly improving the UI contrast of the debug interface.
Key Technical Changes
get_debug_messages()inBaseOrchestratorSessionBasedOrchestratornow synthesizes debug messages from session metadata (task status, results, errors), enabling debugging for "one-shot" workflows that don't use threaded conversation historyFlashCardsOrchestratorandEducatorAssistantOrchestratorto surface internal state like generated cards or collection URLsdebug_thread.htmltemplateWhy?
Issue: #204