Skip to content

Dev#166

Merged
4rthurCai merged 4 commits into
mainfrom
dev
Mar 14, 2026
Merged

Dev#166
4rthurCai merged 4 commits into
mainfrom
dev

Conversation

@4rthurCai
Copy link
Copy Markdown
Collaborator

@4rthurCai 4rthurCai commented Mar 14, 2026

Related Issue

Summary

Change Type

  • New Feature (feat)
  • Bug Fix (fix)
  • Refactoring (refactor)
  • Documentation (docs)
  • Dependency / Configuration (chore)

Self-Check Checklist

Backend (Go):

  • go build ./... passes
  • go vet ./... passes
  • gofmt produces no diff

Frontend (Vue):

  • npm run lint passes
  • npm run typecheck passes

General:

  • Removed all temporary debug output
  • No sensitive data in the code

Test Steps

  1. Pull branch and install dependencies:
    cd backend && go mod download
    cd ../frontend && npm install
  2. Start the application:
    make dev-backend    # Terminal 1
    make dev-frontend   # Terminal 2
  3. Verification steps:
    • ...

Copilot AI review requested due to automatic review settings March 14, 2026 17:17
@4rthurCai 4rthurCai requested a review from koishi510 as a code owner March 14, 2026 17:17
- 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
@sonarqubecloud
Copy link
Copy Markdown

@4rthurCai 4rthurCai merged commit 7332b4a into main Mar 14, 2026
14 checks passed
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 COPY and 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.

Comment thread CHANGELOG.md
- **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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants