Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"clsx": "^2.1.1",
"d3": "^7.9.0",
"dotenv": "^16.4.7",
"layerchart": "^1.0.0",
"layerchart": "^1.0.1",
"lodash": "^4.17.21",
"svelte-inspect-value": "0.2.0",
"svelte-ux": "^1.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,9 @@
<PercentileLineChart
data={columnSummary}
{xDomain}
onbrushend={(detail: { xDomain?: DomainType }) =>
detail.xDomain && (xDomain = detail.xDomain)}
onbrushend={(detail: { xDomain?: DomainType }) => {
xDomain = detail.xDomain;
}}
Comment on lines +74 to +76
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Type safety concern with direct assignment.

Direct assignment of potentially undefined detail.xDomain may cause inconsistent behavior.


🏁 Script executed:

#!/bin/bash
# Check how xDomain is handled elsewhere in the codebase
rg "xDomain\s*=\s*\w+\.xDomain" --type svelte
# Check if null checks were previously used with xDomain assignment
rg "xDomain\s*=.*\?\?" --type svelte

Length of output: 148


Below is a revised shell script to re-run the search using a glob pattern (since Svelte isn’t recognized as a file type) so we can verify how xDomain is assigned throughout the code:

Re-verify xDomain usage for type safety.
Please check the output of these commands to ensure that assignments, especially of potentially undefined values, are handled safely.


🏁 Script executed:

[run_scripts]
#!/bin/bash
# Re-run search in .svelte files for xDomain assignments.
rg "xDomain\s*=\s*\w+\.xDomain" --glob "*.svelte"
echo "------"
# Look for any null-coalescing checks in xDomain assignments.
rg "xDomain\s*=.*\?\?" --glob "*.svelte"

Length of output: 648


Action Required: Add safeguard for xDomain assignment.
Direct assignment of detail.xDomain in both summary and drift pages may cause type-safety issues. Consider adding a fallback or explicit null/undefined check (e.g., using ?? defaultValue) to ensure a valid value.

  • Files affected:
    • frontend/src/routes/[conf]/[name]/observability/summary/+page.svelte (line 74-76)
    • frontend/src/routes/[conf]/[name]/observability/drift/+page.svelte

renderContext="canvas"
/>
</div>
Expand Down