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

   @bbovenzi Thanks for catching these — all three issues are fixed. Squashed 
into a single commit (`a4eb4e2`) for cleaner review.
   
   Here's exactly where to look for each fix:
   
   **1. Highlight colors** (your feedback: `bg.muted` lacks contrast)
   - `utils.ts:83-88` — `getHighlightColor()` now returns `yellow.emphasized` 
(active match) and `yellow.subtle` (other matches)
   - `HighlightedText.tsx:38` — `<Mark bg="yellow.subtle">` for inline text
   
   **2. Off-by-one** (highlight on wrong line)
   - Root cause: search used `getTextLines()` which didn't filter empty lines, 
while rendering used `parsedLogs` which did — indices diverged
   - `useLogs.tsx:253-263` — new `searchableText` array derived from 
`parsedLogs` via `innerText()`, ensuring 1:1 alignment with rendered output
   - `Logs.tsx:117-127` — search now iterates `searchableText` instead of 
`textLines`
   
   **3. Log groups** (indices and highlighting thrown off)
   - Same root cause — `searchableText` is derived post-grouping, so indices 
match collapsed groups
   - `TaskLogContent.tsx:91-113` — `ForceOpenDetails` component auto-expands 
`<details>` when a group contains the active match
   - `TaskLogContent.tsx:267-275` — only wraps match lines with 
`HighlightedText`, renders non-matches directly
   
   **Unchanged files** (no bug-fix changes, context only): 
`LogSearchInput.tsx`, `LogSearchInput.test.tsx`, `Logs.test.tsx`, 
`TaskLogHeader.tsx`, `dag.json` — these are the original feature code, rebased 
and squashed but functionally identical to what you approved.
   
   **Known limitation**: Inline `<Mark>` highlighting works on string content 
only. For structured JSX log lines, the full-line yellow background applies but 
individual words aren't marked. Splitting JSX nodes would require refactoring 
`renderStructuredLog`.


-- 
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