Feat/dashboard sse progress#1031
Closed
theonlychant wants to merge 5 commits intoamd:mainfrom
Closed
Conversation
- Restore except HTTPException: raise in documents.py to prevent OSError handler from swallowing upstream HTTP exceptions - Replace bare except Exception: pass in _register_tools across chat, docqa, and fileio agents with specific ImportError/ AttributeError catches that log and re-raise unexpected errors - Fix mutable default: rag_documents Optional[list[str]] = None in docqa agent dataclass - Expand test_agents_split.py to assert tool_registry contents after instantiation, not just that instantiation succeeds
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Surfaces the existing SSE event stream on the Triage Dashboard during long-running inbox scans, giving users real-time step-by-step feedback instead of an indeterminate spinner.
Why
Refresh and pre-scan runs against a busy inbox can take tens of seconds. With no per-step feedback the UI reads as broken. The agent already emits
tool_start,tool_result,status, andcancelledevents throughSSEOutputHandler— this PR wires those events to three new dashboard components so the user can see what the agent is doing, watch cards stream in as they're classified, and cancel a run mid-flight if needed.Linked issue
Closes #1015
Changes
useSSEProgresshook subscribes to the dashboard's existing SSE connection and fans state out to consumers; no new event types introducedProgressStripshows current step in human-readable terms (tool_start→ label map with fallback); displays count/percentage when the event carries pagination metadataStreamingCardsanimates classified cards into the Surfaced column one-by-one as eachtool_resultarrives, instead of all-at-once at the endCancelButtonvisible while a run is in-flight; POSTs to/api/canceland clears on the existingcancelledSSE eventpre_scan_inbox_impl,draft_reply,fetch_calendar; generic fallback for any other tool)SSEOutputHandleris unchangedTest plan
python util/lint.py --allpassespytest tests/unit/passesProgressStripupdates step label on eachtool_startand shows a message count during classificationpre_scan_inbox)tool_start,tool_result,status,thinking,cancelled)