-
Notifications
You must be signed in to change notification settings - Fork 711
fix: issue 9566 #9602
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
base: main
Are you sure you want to change the base?
fix: issue 9566 #9602
Conversation
|
Failed to generate code suggestions for PR |
Greptile OverviewGreptile SummaryThis PR fixes issue #9566 where 3-digit numbers below 600 were incorrectly colored as HTTP status codes in the logs page. The fix replaces the overly broad regex pattern Key Changes:
Impact:
Confidence Score: 5/5
Important Files ChangedFile Analysis
Sequence DiagramsequenceDiagram
participant User
participant LogsPage
participant useLogsHighlighter
participant useTextHighlighter
participant detectSemanticType
User->>LogsPage: Views logs containing "147 test address"
LogsPage->>useLogsHighlighter: colorizedJson(data)
useLogsHighlighter->>useTextHighlighter: processTextWithHighlights("147 test address")
useTextHighlighter->>detectSemanticType: detectSemanticType("147")
Note over detectSemanticType: OLD: /^[1-5]\d{2}$/ matches "147" ❌
Note over detectSemanticType: NEW: Strict pattern rejects "147" ✓
detectSemanticType-->>useTextHighlighter: "default" (not status-code)
useTextHighlighter-->>useLogsHighlighter: Styled HTML (no red color)
useLogsHighlighter-->>LogsPage: Rendered HTML
LogsPage-->>User: "147" displayed in normal color ✓
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
4 files reviewed, no comments
This pr fixes the issue in #9566