Skip to content

Commit 3d507dd

Browse files
committed
green????
1 parent 053cb48 commit 3d507dd

File tree

12 files changed

+32
-24
lines changed

12 files changed

+32
-24
lines changed

site/src/hooks/useEmbeddedMetadata.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,7 @@ export function makeUseEmbeddedMetadata(
223223
manager.getMetadata,
224224
);
225225

226+
// biome-ignore lint/correctness/useExhaustiveDependencies(manager.clearMetadataByKey): baked into containing hook
226227
const stableMetadataResult = useMemo<UseEmbeddedMetadataResult>(() => {
227228
return {
228229
metadata,

site/src/modules/dashboard/DeploymentBanner/DeploymentBannerView.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,7 @@ export const DeploymentBannerView: FC<DeploymentBannerViewProps> = ({
9898
return "just now";
9999
}
100100
return dayjs().to(dayjs(stats.collected_at));
101-
// eslint-disable-next-line react-hooks/exhaustive-deps -- We want this to periodically update!
102-
}, [timeUntilRefresh, stats]);
101+
}, [stats, fetchStats]);
103102

104103
const healthErrors = health ? getHealthErrors(health) : [];
105104
const displayLatency = stats?.workspaces.connection_latency_ms.P50 || -1;

site/src/modules/resources/AgentMetadata.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@ const StaticWidth: FC<HTMLAttributes<HTMLDivElement>> = ({
181181
}) => {
182182
const ref = useRef<HTMLDivElement>(null);
183183

184+
// biome-ignore lint/correctness/useExhaustiveDependencies: consider refactoring
184185
useLayoutEffect(() => {
185186
// Ignore this in storybook
186187
if (!ref.current || process.env.STORYBOOK === "true") {

site/src/modules/resources/AgentRow.tsx

Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -121,37 +121,35 @@ export const AgentRow: FC<AgentRowProps> = ({
121121
}, [agent.lifecycle_state, hasStartupFeatures]);
122122

123123
// This is a layout effect to remove flicker when we're scrolling to the bottom.
124+
// biome-ignore lint/correctness/useExhaustiveDependencies: consider refactoring
124125
useLayoutEffect(() => {
125126
// If we're currently watching the bottom, we always want to stay at the bottom.
126127
if (bottomOfLogs && logListRef.current) {
127128
logListRef.current.scrollToItem(startupLogs.length - 1, "end");
128129
}
129-
}, [showLogs, startupLogs, logListRef, bottomOfLogs]);
130+
}, [showLogs, startupLogs, bottomOfLogs]);
130131

131132
// This is a bit of a hack on the react-window API to get the scroll position.
132133
// If we're scrolled to the bottom, we want to keep the list scrolled to the bottom.
133134
// This makes it feel similar to a terminal that auto-scrolls downwards!
134-
const handleLogScroll = useCallback(
135-
(props: ListOnScrollProps) => {
136-
if (
137-
props.scrollOffset === 0 ||
138-
props.scrollUpdateWasRequested ||
139-
!logListDivRef.current
140-
) {
141-
return;
142-
}
143-
// The parent holds the height of the list!
144-
const parent = logListDivRef.current.parentElement;
145-
if (!parent) {
146-
return;
147-
}
148-
const distanceFromBottom =
149-
logListDivRef.current.scrollHeight -
150-
(props.scrollOffset + parent.clientHeight);
151-
setBottomOfLogs(distanceFromBottom < AGENT_LOG_LINE_HEIGHT);
152-
},
153-
[logListDivRef],
154-
);
135+
const handleLogScroll = useCallback((props: ListOnScrollProps) => {
136+
if (
137+
props.scrollOffset === 0 ||
138+
props.scrollUpdateWasRequested ||
139+
!logListDivRef.current
140+
) {
141+
return;
142+
}
143+
// The parent holds the height of the list!
144+
const parent = logListDivRef.current.parentElement;
145+
if (!parent) {
146+
return;
147+
}
148+
const distanceFromBottom =
149+
logListDivRef.current.scrollHeight -
150+
(props.scrollOffset + parent.clientHeight);
151+
setBottomOfLogs(distanceFromBottom < AGENT_LOG_LINE_HEIGHT);
152+
}, []);
155153

156154
return (
157155
<Stack

site/src/modules/templates/useWatchVersionLogs.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ export const useWatchVersionLogs = (
1010
const templateVersionId = templateVersion?.id;
1111
const templateVersionStatus = templateVersion?.job.status;
1212

13+
// biome-ignore lint/correctness/useExhaustiveDependencies: consider refactoring
1314
useEffect(() => {
1415
setLogs(undefined);
1516
}, [templateVersionId]);

site/src/pages/CreateTemplatePage/BuildLogsDrawer.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,12 @@ export const BuildLogsDrawer: FC<BuildLogsDrawerProps> = ({
3838
}, 0);
3939
};
4040

41+
// biome-ignore lint/correctness/useExhaustiveDependencies: consider refactoring
4142
useLayoutEffect(() => {
4243
scrollToBottom();
4344
}, [logs]);
4445

46+
// biome-ignore lint/correctness/useExhaustiveDependencies: consider refactoring
4547
useLayoutEffect(() => {
4648
if (drawerProps.open) {
4749
scrollToBottom();

site/src/pages/TemplatePage/TemplateSummaryPage/TemplateSummaryPageView.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ export const TemplateSummaryPageView: FC<TemplateSummaryPageViewProps> = ({
2424
const navigate = useNavigate();
2525
const location = useLocation();
2626

27+
// biome-ignore lint/correctness/useExhaustiveDependencies: consider refactoring
2728
useEffect(() => {
2829
if (location.hash === "#readme") {
2930
// We moved the readme to the docs page, but we known that some users

site/src/pages/TemplateVersionEditorPage/TemplateVersionEditor.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ export const TemplateVersionEditor: FC<TemplateVersionEditorProps> = ({
178178

179179
// Auto scroll
180180
const logsContentRef = useRef<HTMLDivElement>(null);
181+
// biome-ignore lint/correctness/useExhaustiveDependencies: consider refactoring
181182
useEffect(() => {
182183
if (logsContentRef.current) {
183184
logsContentRef.current.scrollTop = logsContentRef.current.scrollHeight;

site/src/pages/WorkspacePage/WorkspaceBuildProgress.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ export const WorkspaceBuildProgress: FC<WorkspaceBuildProgressProps> = ({
7777
// By default workspace is updated every second, which can cause visual stutter
7878
// when the build estimate is a few seconds. The timer ensures no observable
7979
// stutter in all cases.
80+
// biome-ignore lint/correctness/useExhaustiveDependencies: consider refactoring
8081
useEffect(() => {
8182
const updateProgress = () => {
8283
if (

site/src/pages/WorkspacePage/WorkspaceNotifications/WorkspaceNotifications.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ export const WorkspaceNotifications: FC<WorkspaceNotificationsProps> = ({
153153
// figure out if this effect really should run every render (possibly meaning
154154
// no dependency array at all), or how to get the array stabilized (ideal)
155155
const now = dayjs();
156+
// biome-ignore lint/correctness/useExhaustiveDependencies: consider refactoring
156157
useEffect(() => {
157158
if (
158159
workspace.latest_build.status !== "pending" ||

0 commit comments

Comments
 (0)