Ensure splash hides reliably, surface auth UI on auth errors, and fix asset paths - #1
Ensure splash hides reliably, surface auth UI on auth errors, and fix asset paths#1SinsOfCode wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3f3cce009c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| <!-- ==================== SCRIPTS ==================== --> | ||
| <script src="js/firebase.js"></script> | ||
| <script src="js/utils.js"></script> | ||
| <script src="js/auth.js"></script> | ||
| <script src="js/app.js"></script> | ||
| <script src="js/feed.js"></script> | ||
| <script src="js/camera.js"></script> | ||
| <script src="js/comments.js"></script> | ||
| <script src="js/stories.js"></script> | ||
| <script src="js/chat.js"></script> | ||
| <script src="js/friends.js"></script> | ||
| <script src="js/profile.js"></script> | ||
| <script src="js/settings.js"></script> | ||
| <script src="js/admin.js"></script> | ||
| <script src="firebase.js"></script> | ||
| <script src="utils.js"></script> | ||
| <script src="auth.js"></script> | ||
| <script src="app.js"></script> |
There was a problem hiding this comment.
Keep module scripts or stub all referenced handlers
The script list now loads only firebase.js, utils.js, auth.js, and app.js, but the HTML still wires many actions to globals such as settings.open(), messages.switchTab(), chat.send(), comments.post(), profile.edit(), etc. (see the onclick handlers throughout index.html, e.g., around lines 329–339, 287–310). Without the removed module scripts (e.g., settings.js, chat.js, comments.js), those globals are never defined, so the first user interaction will throw ReferenceError and leave the UI unresponsive for those flows. If the intent is to trim scripts, you’ll need fallback stubs for all referenced modules or to remove/disable the corresponding handlers in the HTML.
Useful? React with 👍 / 👎.
Motivation
Description
index.htmlto loadstyle.cssfrom the repo root and trimmed script includes to onlyfirebase.js,utils.js,auth.js, and the newapp.js.app.jswhich implementssetScreenVisibility,safelyRunAuthListener(with an error callback that shows the auth screen),registerFallbacksforapp,nav,camera, andstory, andhideSplashAfterDelayto hide the splash after a short delay.DOMContentLoaded, and the Firebase auth listener runs onloadfor clearer startup sequencing.Testing
python -m http.server 8000and confirmed the app served assets successfully. (succeeded)artifacts/vibe-auth-screen.png, which shows the auth screen rendered after the splash (succeeded).Codex Task