Small fixes to the existing UI#35
Conversation
Greptile SummaryThis PR polishes the Investigation details UI across the dashboard. Key changes include: restyling chart tooltips to a lighter theme, improving X-axis tick alignment in all three error frequency charts (Sentry, Datadog, Grafana), refining accordion border handling, adding a custom scrollbar to the code block component, adding a relative time badge to the investigation header, and renaming the verdict section to "Hypothesis".
Confidence Score: 3/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[InvestigationDetailsHeader] -->|uses| B[Tooltip + Badge for relative time]
A -->|uses| C[Divider]
D[IntegrationDetailsEvidenceChain] -->|renders| E[EvidenceChainItemCard]
E -->|contains| F[Accordion with shadow-xs]
E -->|renders| G{Check Source}
G -->|Sentry| H[SentryErrorFrequency]
G -->|Datadog| I[DatadogErrorFrequency]
G -->|Grafana| J[GrafanaErrorFrequency]
G -->|GitHub| K[CorrelatedCodeChange]
H & I & J -->|custom tick renderer| L[XAxis with aligned labels]
H & I & J -->|tooltip| M[ChartTooltipContent - light theme]
K -->|nested| N[Accordion per file]
K -->|single link| O["View in GitHub ⚠️ uses matchedDiffFiles[0] only"]
N -->|contains| P[CodeBlock with custom-scrollbar]
Prompt To Fix All With AIThis is a comment left during a code review.
Path: services/dashboard/src/pages/Investigation/components/CorrelatedCodeChange.tsx
Line: 66-78
Comment:
**GitHub link only references the first file's commit**
By moving the "View in GitHub" button outside the per-file accordion and hardcoding `matchedDiffFiles[0]`, this link will always point to the first file's `repoName` and `sha`. Since `matchedDiffFiles` is flattened from a `Record<string, ICodeChangeDiff>` (keyed by repo name) with multiple commits, files can originate from different repositories or different commit SHAs. In that case, the link will be incorrect for every file except the first one.
Previously each file had its own correctly-scoped link. If the intent is a single button for cleaner UI, consider either linking to the repo/org level or keeping per-file links inside the accordion.
How can I resolve this? If you propose a fix, please make it concise.
---
This is a comment left during a code review.
Path: services/dashboard/src/pages/Investigation/components/InvestigationDetailsHeader.tsx
Line: 30
Comment:
**Trailing space in the JSM source string**
`"JSM "` has a trailing space that will render as visible whitespace in the UI (e.g., in the source badge text). This appears to be unintentional.
```suggestion
const source = pdDetails ? "PagerDuty" : "JSM";
```
How can I resolve this? If you propose a fix, please make it concise.
---
This is a comment left during a code review.
Path: services/dashboard/src/index.css
Line: 41
Comment:
**`overflow: overlay` is deprecated**
`overflow: overlay` has been deprecated and is now treated as `auto` in modern browsers. Since the wrapper div in `CodeBlock.tsx` already applies `overflow-x-auto` via Tailwind, this line is effectively a no-op in current browsers and may cause unexpected behavior in older ones. Consider removing it to avoid confusion.
```suggestion
overflow-x: auto;
```
How can I resolve this? If you propose a fix, please make it concise.Last reviewed commit: 89a6219 |
| {matchedDiffFiles.length > 0 && ( | ||
| <div className="flex justify-end mt-4"> | ||
| <Button | ||
| color="link-gray" | ||
| size="sm" | ||
| iconTrailing={<LinkExternal01 size={16} />} | ||
| href={`https://github.com/${matchedDiffFiles[0].repoName}/commit/${matchedDiffFiles[0].sha}`} | ||
| target="_blank" | ||
| rel="noopener noreferrer" | ||
| > | ||
| View in GitHub | ||
| </Button> | ||
| </div> |
There was a problem hiding this comment.
GitHub link only references the first file's commit
By moving the "View in GitHub" button outside the per-file accordion and hardcoding matchedDiffFiles[0], this link will always point to the first file's repoName and sha. Since matchedDiffFiles is flattened from a Record<string, ICodeChangeDiff> (keyed by repo name) with multiple commits, files can originate from different repositories or different commit SHAs. In that case, the link will be incorrect for every file except the first one.
Previously each file had its own correctly-scoped link. If the intent is a single button for cleaner UI, consider either linking to the repo/org level or keeping per-file links inside the accordion.
Prompt To Fix With AI
This is a comment left during a code review.
Path: services/dashboard/src/pages/Investigation/components/CorrelatedCodeChange.tsx
Line: 66-78
Comment:
**GitHub link only references the first file's commit**
By moving the "View in GitHub" button outside the per-file accordion and hardcoding `matchedDiffFiles[0]`, this link will always point to the first file's `repoName` and `sha`. Since `matchedDiffFiles` is flattened from a `Record<string, ICodeChangeDiff>` (keyed by repo name) with multiple commits, files can originate from different repositories or different commit SHAs. In that case, the link will be incorrect for every file except the first one.
Previously each file had its own correctly-scoped link. If the intent is a single button for cleaner UI, consider either linking to the repo/org level or keeping per-file links inside the accordion.
How can I resolve this? If you propose a fix, please make it concise.| const statusText = getStatusText(jsmDetails, pdDetails); | ||
| const priority = getPriorityText(jsmDetails, pdDetails); | ||
|
|
||
| const source = pdDetails ? "PagerDuty" : "JSM "; |
There was a problem hiding this comment.
Trailing space in the JSM source string
"JSM " has a trailing space that will render as visible whitespace in the UI (e.g., in the source badge text). This appears to be unintentional.
| const source = pdDetails ? "PagerDuty" : "JSM "; | |
| const source = pdDetails ? "PagerDuty" : "JSM"; |
Prompt To Fix With AI
This is a comment left during a code review.
Path: services/dashboard/src/pages/Investigation/components/InvestigationDetailsHeader.tsx
Line: 30
Comment:
**Trailing space in the JSM source string**
`"JSM "` has a trailing space that will render as visible whitespace in the UI (e.g., in the source badge text). This appears to be unintentional.
```suggestion
const source = pdDetails ? "PagerDuty" : "JSM";
```
How can I resolve this? If you propose a fix, please make it concise.There was a problem hiding this comment.
@farhinhusain0 This is critical. Remove the space
services/dashboard/src/index.css
Outdated
| scrollbar-color: transparent transparent; | ||
| transition: scrollbar-color 0.3s ease; | ||
| /* Use overlay scrollbar if supported to prevent layout shift */ | ||
| overflow: overlay; |
There was a problem hiding this comment.
overflow: overlay is deprecated
overflow: overlay has been deprecated and is now treated as auto in modern browsers. Since the wrapper div in CodeBlock.tsx already applies overflow-x-auto via Tailwind, this line is effectively a no-op in current browsers and may cause unexpected behavior in older ones. Consider removing it to avoid confusion.
| overflow: overlay; | |
| overflow-x: auto; |
Prompt To Fix With AI
This is a comment left during a code review.
Path: services/dashboard/src/index.css
Line: 41
Comment:
**`overflow: overlay` is deprecated**
`overflow: overlay` has been deprecated and is now treated as `auto` in modern browsers. Since the wrapper div in `CodeBlock.tsx` already applies `overflow-x-auto` via Tailwind, this line is effectively a no-op in current browsers and may cause unexpected behavior in older ones. Consider removing it to avoid confusion.
```suggestion
overflow-x: auto;
```
How can I resolve this? If you propose a fix, please make it concise.
moshfiqrony
left a comment
There was a problem hiding this comment.
@farhinhusain0 I have couple of feedback. Let me know if any of them is not making sense.
| {matchedDiffFiles.length > 0 && ( | ||
| <div className="flex justify-end mt-4"> | ||
| <Button | ||
| color="link-gray" | ||
| size="sm" | ||
| iconTrailing={<LinkExternal01 size={16} />} | ||
| href={`https://github.com/${matchedDiffFiles[0].repoName}/commit/${matchedDiffFiles[0].sha}`} | ||
| target="_blank" | ||
| rel="noopener noreferrer" | ||
| > | ||
| View in GitHub | ||
| </Button> | ||
| </div> |
There was a problem hiding this comment.
@farhinhusain0 In the GitHub changes we can have multiple file changes as the culprit. So adding only one button doesn't make sense. That's why we are rendering a button for each file so that by clicking on the button they can see on which commit they did the change.
| tick={({ x, y, payload }) => { | ||
| const isFirst = payload.value === chartTicks[0]; | ||
| const isLast = payload.value === chartTicks[chartTicks.length - 1]; | ||
| return ( | ||
| <text | ||
| x={x} | ||
| y={y + 8} | ||
| dominantBaseline="hanging" | ||
| textAnchor={isFirst ? "start" : isLast ? "end" : "middle"} | ||
| fill="currentColor" |
There was a problem hiding this comment.
@farhinhusain0 As we are converting the chartTicks to a fn. I think then we can convert the ticks to a function as well.
There was a problem hiding this comment.
Updated using Antigravity, not really sure whether it fixed what you wanted though. So please double check.
| interval="preserveStartEnd" | ||
| dataKey="value" | ||
| tickFormatter={(value) => Number(value).toLocaleString()} | ||
| width={32} |
There was a problem hiding this comment.
Does adding width works responsively when window size changes @farhinhusain0 ?
There was a problem hiding this comment.
Updated using Claude, not really sure whether it fixed what you wanted though. So please double check.
| (item) => item.timestamp, | ||
| )} | ||
| ticks={chartTicks} | ||
| tick={({ x, y, payload }) => { |
There was a problem hiding this comment.
@farhinhusain0 Same here. As we moved chartTicks we should move the tick to a function as well
There was a problem hiding this comment.
Updated using Antigravity, not really sure whether it fixed what you wanted though. So please double check.
| (item) => item.timestamp, | ||
| )} | ||
| ticks={chartTicks} | ||
| tick={({ x, y, payload }) => { |
There was a problem hiding this comment.
@farhinhusain0 Same feedback of moving tick to a function as well
There was a problem hiding this comment.
Updated using Antigravity, not really sure whether it fixed what you wanted though. So please double check.

Reviewed current timeline UI and fixed small changes like padding, shadows, icons, etc