Conversation
- Initialize MediaQueryList variables as undefined to prevent potential errors if onUnmounted runs before onMounted - Compute initial isMobile/isSmall/isLandscape values synchronously in setup() to avoid layout flash on first render - Extract media query strings to module-level constants
Avoid copying the entire build context to prevent accidentally including sensitive files (.env, credentials, keys). Copy only the specific source directories and config files needed for each build stage. Resolves SonarCloud security hotspot docker:S6497.
- Update backend Dockerfile from golang:1.23 to golang:1.25 to match go.mod requirement (go 1.25.0) - Reuse stored MediaQueryList objects in update() instead of creating new ones via window.matchMedia on every change event
|
koishi510
approved these changes
Mar 14, 2026
There was a problem hiding this comment.
Pull request overview
This PR focuses on improving the frontend’s mobile experience (responsive layout + touch/orientation behavior) and adding basic PWA scaffolding (manifest + service worker), alongside Docker build hardening and documentation updates.
Changes:
- Add mobile/landscape responsive styling across the beach scene and overlay panels, including mobile-specific sprite positioning.
- Introduce PWA assets (manifest, icons, favicon) and production-only service worker registration for offline navigation fallback.
- Harden Docker build contexts by using explicit
COPYand adding.dockerignore; update docs/changelog accordingly.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| frontend/src/styles/reset.css | Makes #app a full-viewport container (100%/hidden/relative). |
| frontend/src/styles/mobile.css | Adds global mobile CSS overrides (overscroll, touch-action, viewport sizing). |
| frontend/src/main.ts | Imports mobile CSS; registers service worker in production. |
| frontend/src/constants/sprites.ts | Extends sprite config with mobile/landscape overrides and refactors data formatting. |
| frontend/src/composables/useParallax.ts | Adjusts parallax range on portrait mobile; adds resize/orientation handlers with cleanup. |
| frontend/src/composables/useIsMobile.ts | New composable for mobile/small/landscape media-query detection. |
| frontend/src/components/scene/SpritesLayer.vue | Uses mobile detection to choose sprite/label styles; improves mobile hit targets and bubble layout. |
| frontend/src/components/scene/NavBar.vue | Mobile sizing adjustments for navbar touch targets and typography. |
| frontend/src/components/scene/HintOverlay.vue | Mobile-specific hint text + responsive hint styling. |
| frontend/src/components/scene/BeachScene.vue | Uses 100dvh fallback pattern; sets scene background. |
| frontend/src/components/overlay/WhisperPanel.vue | Mobile padding/font/tap-target adjustments. |
| frontend/src/components/overlay/TaskPanel.vue | Mobile padding/font/tap-target adjustments. |
| frontend/src/components/overlay/RoleSelectPanel.vue | Updates mobile breakpoint and adds landscape layout rules with dvh fallback. |
| frontend/src/components/overlay/OverlayPanel.vue | Mobile + landscape sizing rules for overlay layouts and close button sizing. |
| frontend/src/components/overlay/MemoryPanel.vue | Mobile layout adjustments (stacking inputs, button sizing, wrapping actions). |
| frontend/src/components/overlay/LandingOverlay.vue | Mobile/extra-small responsive tweaks for landing UI. |
| frontend/src/components/overlay/CommunityPanel.vue | Mobile padding and text sizing for community UI. |
| frontend/src/components/overlay/ChatPanel.vue | Mobile spacing and input sizing tweaks for chat UI. |
| frontend/src/components/overlay/CarPage.vue | Adds mobile quick-access buttons and extensive mobile layout rules for car/photo wall. |
| frontend/src/components/overlay/BarPage.vue | Uses useIsMobile to make card layout responsive; adds mobile CSS. |
| frontend/src/components/overlay/AuthPanel.vue | Mobile padding and input/button sizing. |
| frontend/src/components/overlay/AiMemoryPanel.vue | Mobile padding/sizing; caps list height for small viewports. |
| frontend/public/sw.js | Adds a simple navigation-fallback service worker with basic precache. |
| frontend/public/manifest.json | Adds PWA manifest metadata and icon references. |
| frontend/public/icons/icon-maskable-512.png | Adds PWA maskable icon (Git LFS pointer). |
| frontend/public/icons/icon-512.png | Adds 512px PWA icon (Git LFS pointer). |
| frontend/public/icons/icon-192.png | Adds 192px PWA icon (Git LFS pointer). |
| frontend/public/favicon.svg | Adds new SVG favicon. |
| frontend/index.html | Adds PWA meta/manifest/icon links; updates title and viewport settings. |
| frontend/eslint.config.js | Reformats config; ignores public/ (and other minor config cleanup). |
| frontend/Dockerfile | Hardens build context by explicitly copying only needed files/dirs. |
| frontend/.dockerignore | New dockerignore to avoid shipping secrets/build artifacts into image context. |
| backend/Dockerfile | Updates Go builder image and uses explicit COPY for hardening. |
| backend/.dockerignore | New dockerignore to keep secrets/artifacts out of Docker build context. |
| README.md | Documents mobile/PWA features and notes mobile detection in composables. |
| CHANGELOG.md | Adds 1.2.0 entry describing mobile/PWA + Docker hardening changes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
| - **Event listener leaks**: Extracted anonymous `resize` and `orientationchange` handlers to named functions with proper cleanup in `onUnmounted` (`useParallax.ts`) | ||
| - **useIsMobile layout flash**: Compute initial `isMobile`/`isSmall`/`isLandscape` values synchronously in `setup()` to prevent false → true flicker on first render | ||
| - **useIsMobile MediaQueryList reuse**: `update()` reads `.matches` from stored MQL objects instead of recreating them on each call | ||
| - **Go static analysis**: Replaced `fmt.Errorf` with `errors.New` for constant error strings across `photo.go`, `task.go`, and `whisper.go` (12 occurrences, SA1006) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Related Issue
Summary
Change Type
Self-Check Checklist
Backend (Go):
go build ./...passesgo vet ./...passesgofmtproduces no diffFrontend (Vue):
npm run lintpassesnpm run typecheckpassesGeneral:
Test Steps