Skip to content

fix(navigation): import HealthDashboardScreen and AchievementsScreen (Closes #209) - #212

Merged
Him-an-shi merged 1 commit into
Him-an-shi:mainfrom
SakethSumanBathini:fix/209-missing-screen-imports
Aug 3, 2026
Merged

fix(navigation): import HealthDashboardScreen and AchievementsScreen (Closes #209)#212
Him-an-shi merged 1 commit into
Him-an-shi:mainfrom
SakethSumanBathini:fix/209-missing-screen-imports

Conversation

@SakethSumanBathini

Copy link
Copy Markdown
Contributor

Closes #209

Cause

The first possibility listed in the issue. AppNavigator.js registers the screen at line 91:

<Stack.Screen name="HealthDashboard" component={HealthDashboardScreen} />

but the file has no import for it. Fifteen other screens are imported at lines 9-23; this one was missed.

The component itself is fine — frontend/screens/HealthDashboardScreen.js is 228 lines with a single named export at line 20, matching every sibling, and the path is correct. Only the import line is absent.

That also explains why the failure is a bare ReferenceError rather than a module-resolution error: there is nothing for the bundler to resolve, so the identifier is simply undefined when the navigator is constructed.

A second occurrence of the same bug

Auditing every component={...} reference in the file turned up AchievementsScreen at line 93 in exactly the same state — file present, named export, no import.

Fixing only the reported screen would have moved the crash rather than removed it. Both are fixed here.

components referenced : 17
resolvable            : 17
UNRESOLVED            : none

Change

Two import lines, following the existing convention:

import { HealthDashboardScreen } from '../screens/HealthDashboardScreen'
import { AchievementsScreen } from '../screens/AchievementsScreen'

Verification

Verified in a running web build. Both the Health Dashboard and the Achievements screen render, with no ReferenceError in the console.

Getting there took a detour worth flagging: npx expo start --web doesn't bundle at all on a clean install, for an unrelated reason — frontend/.babelrc shadows babel.config.js, so babel-preset-expo never loads and Expo's own Flow-typed source fails to parse. Raised separately as #. Renaming .babelrc aside unblocks the bundle, and that's how this fix was confirmed end to end.

Also checked statically: every component={...} reference in every navigator file resolves to an import or local declaration, and AppNavigator.js parses cleanly as ESM + JSX.

Why this class of bug ships silently

There's no ESLint config in the repo. no-undef — on by default in eslint:recommended — catches exactly this, at commit time rather than at runtime in the web build.

Worth adding as a follow-up if useful. Both bugs here would have been caught before merge, and it's the kind of thing that recurs each time a screen is added.

Note on the console output in the issue

The expo-notifications web warning and the Google/Apple CORS errors are unaffected by this change — they come from connectivity checks rather than app code, as the issue already suspected.

@vercel

vercel Bot commented Aug 3, 2026

Copy link
Copy Markdown

@SakethSumanBathini is attempting to deploy a commit to the himanshipathak-240263-3015's projects Team on Vercel.

A member of the Team first needs to authorize it.

@Him-an-shi
Him-an-shi merged commit 48b1067 into Him-an-shi:main Aug 3, 2026
1 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: HealthDashboardScreen is not defined on Web

2 participants