Skip to content

Commit e8ac2eb

Browse files
feat(medium): Fix HRM loading skeleton and revert scope creep (#9102)
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 ef23d7e commit e8ac2eb

6 files changed

Lines changed: 1 addition & 124 deletions

File tree

app/page.tsx

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,6 @@ const Dashboard = () => {
6565
const [refreshKey, setRefreshKey] = useState(0)
6666
const { initializeAudio } = useAudio()
6767

68-
const useNativeTable =
69-
process.env.NEXT_PUBLIC_USE_NATIVE_TABLE === 'true' ||
70-
(typeof window !== 'undefined' &&
71-
window.location.search.includes('use-native-table=true'))
72-
7368
const handleRefresh = () => {
7469
setRefreshKey((prevKey) => prevKey + 1)
7570
}
@@ -109,13 +104,8 @@ const Dashboard = () => {
109104
<HrmConnectionPanel />
110105
</Box>
111106
<Box sx={{ width: '100%', mt: 2 }}>
112-
<<<<<<< HEAD
113-
{useNativeTable ? (
114-
<WorkoutTableViewer
115-
=======
116107
{process.env.NEXT_PUBLIC_USE_NATIVE_TABLE === 'true' ? (
117108
<WorkoutTableHeader
118-
>>>>>>> origin/leader
119109
docId={DOC_ID}
120110
refreshKey={refreshKey}
121111
onRefresh={handleRefresh}

components/RefreshIconButton.tsx

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,11 @@
11
import RefreshIcon from '@mui/icons-material/Refresh'
22
import { IconButton, IconButtonProps } from '@mui/material'
33
import { alpha } from '@mui/material/styles'
4-
import { memo } from 'react'
54

65
interface RefreshIconButtonProps extends IconButtonProps {
76
onClick: () => void
87
}
98

10-
<<<<<<< HEAD
11-
const RefreshIconButton = ({ onClick, ...props }: RefreshIconButtonProps) => {
12-
return (
13-
<IconButton
14-
data-testid="refresh-icon-button"
15-
onClick={onClick}
16-
sx={(theme) => ({
17-
position: 'absolute',
18-
top: 8,
19-
right: 8,
20-
width: 48,
21-
height: 48,
22-
zIndex: 10,
23-
backgroundColor: alpha(theme.palette.background.paper, 0.7),
24-
backdropFilter: 'blur(4px)',
25-
'&:hover': {
26-
backgroundColor: alpha(theme.palette.background.paper, 0.9),
27-
},
28-
})}
29-
{...props}
30-
>
31-
<RefreshIcon fontSize="small" />
32-
</IconButton>
33-
)
34-
}
35-
=======
369
const RefreshIconButton = ({ onClick, ...props }: RefreshIconButtonProps) => (
3710
<IconButton
3811
onClick={onClick}
@@ -54,6 +27,5 @@ const RefreshIconButton = ({ onClick, ...props }: RefreshIconButtonProps) => (
5427
<RefreshIcon fontSize="small" />
5528
</IconButton>
5629
)
57-
>>>>>>> origin/leader
5830

59-
export default memo(RefreshIconButton)
31+
export default RefreshIconButton

tests/playwright/stale-tile.spec.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,7 @@ test('should remove tile immediately when missing from HRM_UPDATE', async ({
55
page,
66
}) => {
77
await page.goto('/?testing=true')
8-
<<<<<<< HEAD
9-
await page.waitForSelector('main, body > div', {
10-
state: 'visible',
11-
timeout: 15000,
12-
})
13-
=======
148
await page.waitForSelector('[data-testid="dashboard"]', { timeout: 15000 })
15-
>>>>>>> origin/leader
169

1710
// Helper to dispatch messages to the reducer
1811
const dispatch = async (message: ServerMessage | { type: 'RESET_STATE' }) => {

tests/playwright/vrt-components.spec.ts

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -48,32 +48,9 @@ test.describe('Component-Specific VRT', () => {
4848
await takeScreenshot(viewer, 'google-doc-viewer-shrunk.png')
4949
})
5050

51-
<<<<<<< HEAD
52-
test('WorkoutTableViewer rendering', async ({ dashboardPage }) => {
53-
// Mock the workout API to return headers
54-
await dashboardPage.route('**/api/workout?docId=**', async (route) => {
55-
await route.fulfill({
56-
status: 200,
57-
contentType: 'application/json',
58-
body: JSON.stringify({
59-
headers: ['Exercise Name', 'Sets', 'Reps', 'Notes'],
60-
rows: [],
61-
}),
62-
})
63-
})
64-
65-
// Navigate to dashboard and force native table via query param
66-
await dashboardPage.goto('/?testing=true&use-native-table=true')
67-
await waitForPageReady(dashboardPage)
68-
69-
const tableHeader = dashboardPage.getByTestId('workout-table-viewer')
70-
await expect(tableHeader).toBeVisible()
71-
await takeScreenshot(tableHeader, 'workout-table-viewer.png')
72-
=======
7351
test.skip('WorkoutTableHeader rendering', async () => {
7452
// Requires NEXT_PUBLIC_USE_NATIVE_TABLE=true which is a build-time/env-var.
7553
// Skipping for now as it requires complex environment setup.
76-
>>>>>>> origin/leader
7754
})
7855

7956
test('SpotifyDeviceSelector menu', async ({ dashboardPage, context }) => {

verification_hrm_repair.png

-68.8 KB
Binary file not shown.

verify_hrm_repair.py

Lines changed: 0 additions & 55 deletions
This file was deleted.

0 commit comments

Comments
 (0)