Skip to content

Commit b57fc16

Browse files
authored
Merge branch 'main' into fix/delimited_identifier
2 parents 82233e4 + dbf1682 commit b57fc16

21 files changed

Lines changed: 1009 additions & 96 deletions

.changeset/bright-taxis-grow.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@hyperdx/app": patch
3+
---
4+
5+
feat: Allow selection of log and metric source on K8s dashboard

.changeset/rude-pants-yell.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@hyperdx/app": minor
3+
---
4+
5+
feat: add refresh to existing preset dashboards

.changeset/tricky-brooms-thank.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@hyperdx/common-utils": patch
3+
"@hyperdx/app": patch
4+
---
5+
6+
feat: Add percentages to filter values

.changeset/wicked-stingrays-tie.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@hyperdx/app": patch
3+
---
4+
5+
Fixes typo in type definition
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Claude Code Review
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize]
6+
# Optional: Only run on specific file changes
7+
# paths:
8+
# - "src/**/*.ts"
9+
# - "src/**/*.tsx"
10+
# - "src/**/*.js"
11+
# - "src/**/*.jsx"
12+
13+
jobs:
14+
claude-review:
15+
# Optional: Filter by PR author
16+
# if: |
17+
# github.event.pull_request.user.login == 'external-contributor' ||
18+
# github.event.pull_request.user.login == 'new-developer' ||
19+
# github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR'
20+
21+
runs-on: ubuntu-latest
22+
permissions:
23+
contents: read
24+
pull-requests: read
25+
issues: read
26+
id-token: write
27+
28+
steps:
29+
- name: Checkout repository
30+
uses: actions/checkout@v4
31+
with:
32+
fetch-depth: 1
33+
34+
- name: Run Claude Code Review
35+
id: claude-review
36+
uses: anthropics/claude-code-action@v1
37+
with:
38+
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
39+
prompt: |
40+
REPO: ${{ github.repository }}
41+
PR NUMBER: ${{ github.event.pull_request.number }}
42+
43+
Please review this pull request and provide feedback on:
44+
- Code quality and best practices
45+
- Potential bugs or issues
46+
- Performance considerations
47+
- Security concerns
48+
- Test coverage
49+
50+
Use the repository's CLAUDE.md for guidance on style and conventions. Be constructive and helpful in your feedback.
51+
52+
Use `gh pr comment` with your Bash tool to leave your review as a comment on the PR.
53+
54+
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
55+
# or https://docs.claude.com/en/docs/claude-code/sdk#command-line for available options
56+
claude_args: '--allowed-tools "Bash(gh issue view:*),Bash(gh search:*),Bash(gh issue list:*),Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(gh pr list:*)"'
57+

.github/workflows/claude.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Claude Code
2+
3+
on:
4+
issue_comment:
5+
types: [created]
6+
pull_request_review_comment:
7+
types: [created]
8+
issues:
9+
types: [opened, assigned]
10+
pull_request_review:
11+
types: [submitted]
12+
13+
jobs:
14+
claude:
15+
if: |
16+
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
17+
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
18+
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
19+
(github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
20+
runs-on: ubuntu-latest
21+
permissions:
22+
contents: read
23+
pull-requests: read
24+
issues: read
25+
id-token: write
26+
actions: read # Required for Claude to read CI results on PRs
27+
steps:
28+
- name: Checkout repository
29+
uses: actions/checkout@v4
30+
with:
31+
fetch-depth: 1
32+
33+
- name: Run Claude Code
34+
id: claude
35+
uses: anthropics/claude-code-action@v1
36+
with:
37+
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
38+
39+
# This is an optional setting that allows Claude to read CI results on PRs
40+
additional_permissions: |
41+
actions: read
42+
43+
# Optional: Give a custom prompt to Claude. If this is not specified, Claude will perform the instructions specified in the comment that tagged it.
44+
# prompt: 'Update the pull request description to include a summary of changes.'
45+
46+
# Optional: Add claude_args to customize behavior and configuration
47+
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
48+
# or https://docs.claude.com/en/docs/claude-code/sdk#command-line for available options
49+
# claude_args: '--model claude-opus-4-1-20250805 --allowed-tools Bash(gh pr:*)'
50+

packages/app/src/ClickhousePage.tsx

Lines changed: 39 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import {
2020
SegmentedControl,
2121
Tabs,
2222
Text,
23+
Tooltip,
2324
} from '@mantine/core';
2425
import ReactCodeMirror from '@uiw/react-codemirror';
2526

@@ -33,6 +34,7 @@ import DBHeatmapChart from './components/DBHeatmapChart';
3334
import { DBSqlRowTable } from './components/DBRowTable';
3435
import DBTableChart from './components/DBTableChart';
3536
import OnboardingModal from './components/OnboardingModal';
37+
import { useDashboardRefresh } from './hooks/useDashboardRefresh';
3638
import { useConnections } from './connection';
3739
import { parseTimeQuery, useNewTimeQuery } from './timeQuery';
3840

@@ -457,6 +459,15 @@ function ClickhousePage() {
457459
// showRelativeInterval: isLive,
458460
});
459461

462+
// For future use if Live button is added
463+
const [isLive, setIsLive] = useState(false);
464+
465+
const { manualRefreshCooloff, refresh } = useDashboardRefresh({
466+
searchedTimeRange,
467+
onTimeRangeSelect,
468+
isLive,
469+
});
470+
460471
const filters = useMemo(() => {
461472
const { latencyMin, latencyMax } = latencyFilter;
462473
return [
@@ -497,21 +508,35 @@ function ClickhousePage() {
497508
size="xs"
498509
/>
499510
</Group>
500-
<form
501-
onSubmit={e => {
502-
e.preventDefault();
503-
onSearch(displayedTimeInputValue);
504-
return false;
505-
}}
506-
>
507-
<TimePicker
508-
inputValue={displayedTimeInputValue}
509-
setInputValue={setDisplayedTimeInputValue}
510-
onSearch={range => {
511-
onSearch(range);
511+
<Group gap="xs">
512+
<form
513+
onSubmit={e => {
514+
e.preventDefault();
515+
onSearch(displayedTimeInputValue);
516+
return false;
512517
}}
513-
/>
514-
</form>
518+
>
519+
<TimePicker
520+
inputValue={displayedTimeInputValue}
521+
setInputValue={setDisplayedTimeInputValue}
522+
onSearch={onSearch}
523+
/>
524+
</form>
525+
<Tooltip withArrow label="Refresh dashboard" fz="xs" color="gray">
526+
<Button
527+
onClick={refresh}
528+
loading={manualRefreshCooloff}
529+
disabled={manualRefreshCooloff}
530+
color="gray"
531+
variant="outline"
532+
title="Refresh dashboard"
533+
aria-label="Refresh dashboard"
534+
px="xs"
535+
>
536+
<i className="bi bi-arrow-clockwise fs-5"></i>
537+
</Button>
538+
</Tooltip>
539+
</Group>
515540
</Group>
516541
<Tabs
517542
mt="md"

packages/app/src/DBSearchPage.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ import {
5555
useDocumentVisibility,
5656
} from '@mantine/hooks';
5757
import { notifications } from '@mantine/notifications';
58-
import { useIsFetching } from '@tanstack/react-query';
58+
import { keepPreviousData, useIsFetching } from '@tanstack/react-query';
5959
import { SortingState } from '@tanstack/react-table';
6060
import CodeMirror from '@uiw/react-codemirror';
6161

@@ -1099,7 +1099,10 @@ function DBSearchPage() {
10991099
}
11001100
}, [isReady, queryReady, isChartConfigLoading, onSearch]);
11011101

1102-
const { data: aliasMap } = useAliasMapFromChartConfig(dbSqlRowTableConfig);
1102+
const { data: aliasMap } = useAliasMapFromChartConfig(dbSqlRowTableConfig, {
1103+
placeholderData: keepPreviousData,
1104+
queryKey: ['aliasMap', dbSqlRowTableConfig, 'withPlaceholder'],
1105+
});
11031106

11041107
const aliasWith = useMemo(
11051108
() =>

0 commit comments

Comments
 (0)