Skip to content

Commit 8d534da

Browse files
authored
fix: session panel display state (#845)
1 parent 1e9b828 commit 8d534da

File tree

4 files changed

+20
-15
lines changed

4 files changed

+20
-15
lines changed

.changeset/smooth-suns-shop.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+
fixed ui state on session panel to be inline with ui

packages/app/src/TeamPage.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ function ConnectionsSection() {
105105
const [isCreatingConnection, setIsCreatingConnection] = useState(false);
106106

107107
return (
108-
<Box>
108+
<Box id="connections">
109109
<Text size="md" c="gray.4">
110110
Connections
111111
</Text>
@@ -205,7 +205,7 @@ function SourcesSection() {
205205
const [isCreatingSource, setIsCreatingSource] = useState(false);
206206

207207
return (
208-
<Box>
208+
<Box id="sources">
209209
<Text size="md" c="gray.4">
210210
Sources
211211
</Text>
@@ -479,7 +479,7 @@ function TeamMembersSection() {
479479
};
480480

481481
return (
482-
<Box>
482+
<Box id="team_members">
483483
<Text size="md" c="gray.4">
484484
Team
485485
</Text>
@@ -906,7 +906,7 @@ function IntegrationsSection() {
906906
] = useDisclosure();
907907

908908
return (
909-
<Box>
909+
<Box id="integrations">
910910
<Text size="md" c="gray.4">
911911
Integrations
912912
</Text>
@@ -997,7 +997,7 @@ function TeamNameSection() {
997997
[refetchTeam, setTeamName, team?.name],
998998
);
999999
return (
1000-
<Box>
1000+
<Box id="team_name">
10011001
<Text size="md" c="gray.4">
10021002
Team Name
10031003
</Text>
@@ -1097,7 +1097,7 @@ const APIKeyCopyButton = ({
10971097
);
10981098
};
10991099

1100-
function ApiKeySection() {
1100+
function ApiKeysSection() {
11011101
const { data: team, refetch: refetchTeam } = api.useTeam();
11021102
const { data: me, isLoading: isLoadingMe } = api.useMe();
11031103
const rotateTeamApiKey = api.useRotateTeamApiKey();
@@ -1130,7 +1130,7 @@ function ApiKeySection() {
11301130
};
11311131

11321132
return (
1133-
<Box>
1133+
<Box id="api_keys">
11341134
<Text size="md" c="gray.4">
11351135
API Keys
11361136
</Text>
@@ -1233,7 +1233,7 @@ export default function TeamPage() {
12331233
<ConnectionsSection />
12341234
<IntegrationsSection />
12351235
<TeamNameSection />
1236-
<ApiKeySection />
1236+
<ApiKeysSection />
12371237

12381238
{hasAllowedAuthMethods && (
12391239
<>

packages/app/src/components/DBRowSidePanel.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ export default function DBRowSidePanel({
316316
text: 'Surrounding Context',
317317
value: Tab.Context,
318318
},
319-
...(rumSessionId != null && source.sessionSourceId
319+
...(rumSessionId != null
320320
? [
321321
{
322322
text: 'Session Replay',

packages/app/src/components/DBSessionPanel.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { useMemo } from 'react';
2+
import Link from 'next/link';
23
import { Loader } from '@mantine/core';
34

45
import SessionSubpanel from '@/SessionSubpanel';
@@ -99,11 +100,11 @@ export const DBSessionPanel = ({
99100
setSubDrawerOpen: (open: boolean) => void;
100101
}) => {
101102
const { data: traceSource } = useSource({ id: traceSourceId });
102-
const { data: sessionSource } = useSource({
103+
const { data: sessionSource, isLoading: isSessionSourceLoading } = useSource({
103104
id: traceSource?.sessionSourceId,
104105
});
105106

106-
if (!traceSource || !sessionSource) {
107+
if (!traceSource || (!sessionSource && isSessionSourceLoading)) {
107108
return <Loader />;
108109
}
109110

@@ -113,10 +114,9 @@ export const DBSessionPanel = ({
113114
<div className="m-2 fs-8 p-4">
114115
No correlated session source found.
115116
<br />
116-
Go to Team Settings and update <strong>
117-
{traceSource?.name}
118-
</strong>{' '}
119-
source to include the correlated session source.
117+
Go to <Link href="/team#sources">Team Settings</Link> and update the{' '}
118+
<strong>{traceSource?.name}</strong> source to include the correlated
119+
session source.
120120
</div>
121121
) : rumSessionId && traceSource ? (
122122
<SessionSubpanel

0 commit comments

Comments
 (0)