antonio-mello-ai commented on PR #63467:
URL: https://github.com/apache/airflow/pull/63467#issuecomment-4058332125

   @bbovenzi Thanks for the review! Here are the screenshots and my thoughts on 
the streaming logs concern.
   
   ## Screenshot
   
   The search feature in action — searching for "DAILY_INSIGHTS" across task 
logs with 11 matches found:
   
   _(I'll attach the screenshot and GIF in a follow-up edit — GitHub CLI 
doesn't support image uploads)_
   
   ## Features shown
   
   - **Search input** in the log header bar with match counter (e.g., "1/11")
   - **Yellow highlighting** on all matching log lines
   - **Orange highlighting** on the current/active match
   - **Navigation arrows** (up/down) to cycle through matches
   - **Clear button** (X) to reset the search
   - **Auto-scroll** to bring the current match into view in the virtualized 
list
   
   ## On streaming logs and API-layer search
   
   Good point about streaming logs. The current implementation searches over 
the **already-fetched log content** on the client side. Here's my thinking:
   
   1. **Current behavior**: Search operates on whatever log data has been 
loaded/fetched so far. If logs are still streaming in, new lines won't be in 
the search results until the data is re-processed.
   
   2. **Why client-side is still useful**: For the common case of reviewing 
completed task logs (which is the majority of log viewing), client-side search 
works well and provides instant feedback without API round-trips.
   
   3. **Potential improvement for streaming**: We could re-run the search when 
`fetchedData` changes (i.e., when new streaming data arrives). This would keep 
matches up-to-date as logs stream in. The search already recomputes on every 
render since it reads from `fetchedData`.
   
   4. **API-layer search**: Moving search to the API would help for very large 
logs where we don't want to load everything client-side, but that's a bigger 
architectural change. The client-side approach provides immediate value for the 
current log viewing model.
   
   Would you prefer I add a note in the UI when logs are still loading (e.g., 
"Results may be incomplete while logs are loading") to address the misleading 
matches concern? Or do you think re-running the search as streaming data 
arrives is sufficient?
   
   Happy to iterate on this based on your feedback.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to