Skip to content

Commit a16343e

Browse files
fix(pr): Resolve conflicts and address audit directives (#9096)
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> Co-authored-by: arii <342438+arii@users.noreply.github.com>
1 parent 85c57a1 commit a16343e

16 files changed

Lines changed: 9 additions & 65 deletions

app/client/connect/page.tsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,6 @@ import { HrmInputMessage } from '@/types/websocket'
2424
import logger from '@/utils/logger'
2525

2626
export default function ConnectPage() {
27-
const [isReady, setIsReady] = useState(false)
28-
useEffect(() => {
29-
const timer = setTimeout(() => setIsReady(true), 0)
30-
return () => clearTimeout(timer)
31-
}, [])
32-
3327
const [userSettings, setUserSettings] = useUserSettings()
3428
const { userName, userAge, userWeight, gender, unitSystem } = userSettings
3529

app/client/experimental/components/ExperimentalAnalyticsPage.tsx

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,6 @@ const defaultTimeInZones: Record<HeartRateZone, number> = {
3131
ZONE_6: 0,
3232
}
3333

34-
<<<<<<< HEAD
35-
// Components
36-
import WorkoutSummary from './WorkoutSummary'
37-
import ZoneDistribution from './ZoneDistribution'
38-
import CalorieTracker from './CalorieTracker'
39-
import SessionList from './SessionList'
40-
import SessionDetail from './SessionDetail'
41-
42-
=======
43-
>>>>>>> origin/leader
4434
const HeartRateTimeSeries = dynamic(() => import('./HeartRateTimeSeries'), {
4535
ssr: false,
4636
})

components/HrTile.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,8 @@ import { HR_ZONE_CONFIG, HeartRateZone } from '@/lib/shared/hr-zones'
99
import { useTheme, alpha } from '@mui/material/styles'
1010
import { isGenericName } from '@/utils/hrm'
1111
import ControlCard from '@/components/shared/ControlCard'
12-
<<<<<<< HEAD
1312
import { HR_TILE_MIN_HEIGHT, HR_TILE_MAX_HEIGHT } from '@/constants/layout'
14-
=======
1513
import { HrTileProps } from '@/types'
16-
>>>>>>> origin/leader
1714

1815
const HERO_FONT_FAMILY = 'var(--font-roboto-mono), "Courier New", monospace'
1916

context/WebSocketContext.tsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -105,13 +105,9 @@ export const WebSocketProvider = ({
105105

106106
// Expose connection status for VRT stability
107107
useEffect(() => {
108-
if (typeof document !== 'undefined') {
109-
document.body.setAttribute('data-connection-status', connectionStatus)
110-
}
108+
document.body.setAttribute('data-connection-status', connectionStatus)
111109
return () => {
112-
if (typeof document !== 'undefined') {
113-
document.body.removeAttribute('data-connection-status')
114-
}
110+
document.body.removeAttribute('data-connection-status')
115111
}
116112
}, [connectionStatus])
117113

tests/playwright/lib/waits.ts

Lines changed: 7 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -47,58 +47,25 @@ export async function waitForPageReady(
4747
): Promise<void> {
4848
const {
4949
timeout = WAIT_TIMEOUTS.TEST_READY,
50-
selector = 'main, [role="main"]',
50+
selector = 'main, [data-testid="dashboard"], [role="main"]',
5151
} = options
5252

53-
<<<<<<< HEAD
54-
// Wait for fonts to be loaded
53+
// Wait for fonts
5554
await waitForFontsLoaded(page)
5655

57-
// Wait for a known stable element
58-
await page
59-
.waitForSelector(selector, {
60-
state: 'visible',
61-
timeout,
62-
})
63-
.catch(() => {
64-
console.warn(
65-
`No main element found (selector: "${selector}"), continuing anyway`
66-
)
67-
})
68-
69-
// Wait for skeletons to disappear (dynamic content loading)
70-
// This ensures Spotify/Doc viewers are loaded before snapshot
71-
await page
72-
.waitForSelector('.MuiSkeleton-root', {
73-
state: 'hidden',
74-
timeout: WAIT_TIMEOUTS.LONG, // Skeletons might stay longer
75-
})
76-
.catch(() => {
77-
// It's possible skeletons were never there or are stubborn, continue
78-
// console.warn('Skeletons still visible or timeout waiting for them')
79-
})
80-
=======
81-
// Wait for fonts to be ready
82-
await page.evaluate(async () => {
83-
await document.fonts.ready
84-
})
85-
86-
// Wait for loading skeletons to disappear
56+
// Wait for skeletons (swallow error if none)
8757
await page
8858
.waitForSelector('.MuiSkeleton-root', {
8959
state: 'hidden',
90-
timeout,
91-
})
92-
.catch(() => {
93-
// Ignore errors if skeletons are not found (already hidden/removed)
60+
timeout: WAIT_TIMEOUTS.LONG,
9461
})
62+
.catch(() => {})
9563

96-
// Wait for actual content to be present
97-
await page.waitForSelector('main, [data-testid="dashboard"], [role="main"]', {
64+
// Wait for main content (fail fast)
65+
await page.waitForSelector(selector, {
9866
state: 'visible',
9967
timeout,
10068
})
101-
>>>>>>> origin/leader
10269
}
10370

10471
/**
232 Bytes
Loading
22.2 KB
Loading
6.22 KB
Loading
9.38 KB
Loading
9.86 KB
Loading

0 commit comments

Comments
 (0)