Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions app/client/connect/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,6 @@ import { HrmInputMessage } from '@/types/websocket'
import logger from '@/utils/logger'

export default function ConnectPage() {
const [isReady, setIsReady] = useState(false)
useEffect(() => {
const timer = setTimeout(() => setIsReady(true), 0)
return () => clearTimeout(timer)
}, [])

const [userSettings, setUserSettings] = useUserSettings()
const { userName, userAge, userWeight, gender, unitSystem } = userSettings

Expand Down
10 changes: 0 additions & 10 deletions app/client/experimental/components/ExperimentalAnalyticsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,6 @@ const defaultTimeInZones: Record<HeartRateZone, number> = {
ZONE_6: 0,
}

<<<<<<< HEAD
// Components
import WorkoutSummary from './WorkoutSummary'
import ZoneDistribution from './ZoneDistribution'
import CalorieTracker from './CalorieTracker'
import SessionList from './SessionList'
import SessionDetail from './SessionDetail'

=======
>>>>>>> origin/leader
const HeartRateTimeSeries = dynamic(() => import('./HeartRateTimeSeries'), {
ssr: false,
})
Expand Down
3 changes: 0 additions & 3 deletions components/HrTile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,8 @@ import { HR_ZONE_CONFIG, HeartRateZone } from '@/lib/shared/hr-zones'
import { useTheme, alpha } from '@mui/material/styles'
import { isGenericName } from '@/utils/hrm'
import ControlCard from '@/components/shared/ControlCard'
<<<<<<< HEAD
import { HR_TILE_MIN_HEIGHT, HR_TILE_MAX_HEIGHT } from '@/constants/layout'
=======
import { HrTileProps } from '@/types'
>>>>>>> origin/leader

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

Expand Down
8 changes: 2 additions & 6 deletions context/WebSocketContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,9 @@ export const WebSocketProvider = ({

// Expose connection status for VRT stability
useEffect(() => {
if (typeof document !== 'undefined') {
document.body.setAttribute('data-connection-status', connectionStatus)
}
document.body.setAttribute('data-connection-status', connectionStatus)
return () => {
if (typeof document !== 'undefined') {
document.body.removeAttribute('data-connection-status')
}
document.body.removeAttribute('data-connection-status')
}
}, [connectionStatus])

Expand Down
47 changes: 7 additions & 40 deletions tests/playwright/lib/waits.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,58 +47,25 @@ export async function waitForPageReady(
): Promise<void> {
const {
timeout = WAIT_TIMEOUTS.TEST_READY,
selector = 'main, [role="main"]',
selector = 'main, [data-testid="dashboard"], [role="main"]',
} = options

<<<<<<< HEAD
// Wait for fonts to be loaded
// Wait for fonts
await waitForFontsLoaded(page)

// Wait for a known stable element
await page
.waitForSelector(selector, {
state: 'visible',
timeout,
})
.catch(() => {
console.warn(
`No main element found (selector: "${selector}"), continuing anyway`
)
})

// Wait for skeletons to disappear (dynamic content loading)
// This ensures Spotify/Doc viewers are loaded before snapshot
await page
.waitForSelector('.MuiSkeleton-root', {
state: 'hidden',
timeout: WAIT_TIMEOUTS.LONG, // Skeletons might stay longer
})
.catch(() => {
// It's possible skeletons were never there or are stubborn, continue
// console.warn('Skeletons still visible or timeout waiting for them')
})
=======
// Wait for fonts to be ready
await page.evaluate(async () => {
await document.fonts.ready
})

// Wait for loading skeletons to disappear
// Wait for skeletons (swallow error if none)
await page
.waitForSelector('.MuiSkeleton-root', {
state: 'hidden',
timeout,
})
.catch(() => {
// Ignore errors if skeletons are not found (already hidden/removed)
timeout: WAIT_TIMEOUTS.LONG,
})
.catch(() => {})

// Wait for actual content to be present
await page.waitForSelector('main, [data-testid="dashboard"], [role="main"]', {
// Wait for main content (fail fast)
await page.waitForSelector(selector, {
state: 'visible',
timeout,
})
>>>>>>> origin/leader
}

/**
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading