Skip to content

Commit 62710ae

Browse files
committed
pre comments
1 parent 3c380c8 commit 62710ae

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

site/src/contexts/useProxyLatency.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,10 @@ export interface ProxyLatencyReport {
1515
latencyMS: number;
1616
// at is when the latency was recorded.
1717
at: Date;
18-
// nextHopProtocol can determine if HTTP/2 is being used.
19-
// https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/nextHopProtocol
18+
/**
19+
* nextHopProtocol can determine if HTTP/2 is being used.
20+
* https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/nextHopProtocol
21+
*/
2022
nextHopProtocol?: string;
2123
}
2224

site/src/pages/UserSettingsPage/WorkspaceProxyPage/WorkspaceProxyRow.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ export const ProxyRow: FC<ProxyRowProps> = ({ proxy, latency }) => {
3434
case "http/1.1":
3535
extraWarnings.push(
3636
// biome-ignore lint/style/useTemplate: easier to read short lines
37-
`Requests to the proxy are using ${latency.nextHopProtocol}, ` +
38-
"the server might not support HTTP/2. " +
37+
`Requests to the proxy from current browser are using "${latency.nextHopProtocol}". ` +
38+
"The proxy server might not support HTTP/2. " +
3939
"For usability reasons, HTTP/2 or above is recommended. " +
4040
"Pages may fail to load if the web browser's concurrent " +
41-
"connection limit is reached.",
41+
"connection limit per host is reached.",
4242
);
4343
}
4444
}
@@ -134,7 +134,7 @@ const ProxyMessagesRow: FC<ProxyMessagesRowProps> = ({
134134
title={
135135
<span css={{ color: theme.palette.warning.light }}>Warnings</span>
136136
}
137-
messages={proxy.status?.report?.warnings.concat(extraWarnings)}
137+
messages={[...(proxy.status?.report?.warnings ?? []), ...extraWarnings]}
138138
/>
139139
</>
140140
);

0 commit comments

Comments
 (0)