Skip to content

Comments

feat(frontend): Add persistency of Analytics view after Game End #261#267

Merged
AlexanderHeffernan merged 4 commits intomainfrom
galengreen/hostview
Sep 30, 2025
Merged

feat(frontend): Add persistency of Analytics view after Game End #261#267
AlexanderHeffernan merged 4 commits intomainfrom
galengreen/hostview

Conversation

@galengreen
Copy link
Contributor

No description provided.

- Updated home page images.
- Adjusted backdrop blur effect in ScreenBackground component for improved aesthetics.
- Enhanced reconnectSession logic in APIManager to handle offline sessions for ended games.
- Improved useHostSession to restore session state more effectively based on game status.
- Modified styles in HostView for better responsiveness and layout consistency.
…ssets

- Updated ScreenBackground component to support new props: type, noTree, and text for improved background image handling.
- Adjusted usage of ScreenBackground in HomeView, PracticeView, and QuestionView to reflect new prop functionality.
- Updated home page images for better visual quality.
…ssets

- Updated ScreenBackground component to support new props: type, noTree, and text for improved background image handling.
- Adjusted usage of ScreenBackground in HomeView, PracticeView, and QuestionView to reflect new prop functionality.
- Updated home page images for better visual quality.
@galengreen galengreen self-assigned this Sep 30, 2025
@galengreen galengreen added the frontend Issues related to the frontend. label Sep 30, 2025
@galengreen galengreen added this to the Sprint 11 milestone Sep 30, 2025
@AlexanderHeffernan AlexanderHeffernan merged commit 9ecdab3 into main Sep 30, 2025
1 check passed
Copy link
Contributor

@AlexanderHeffernan AlexanderHeffernan left a comment

Choose a reason for hiding this comment

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

🛡️ Pull Guard

Status: Ready to merge
Blockers: 0
Suggestions: 3
Reviewed: November 20, 2025

Solid implementation of the offline/persistency state for post-game analytics. The logic to bypass the WebSocket connection when the game is over is a smart approach to prevent connection errors.

Strengths

🟡 Suggestions

  • [Risk of Crash] The offlineWs mock in frontend/src/types/APIManager.ts:231 casts a partial object to WebSocket. If HostSession calls methods like addEventListener or removeEventListener (common in socket wrappers), this will throw a runtime error. Recommend adding these as no-op functions to the mock object to be safe.
  • [Refactor] There is significant logic duplication in frontend/src/types/useHostSession.ts when mapping playersData to session.playerQuestions. The code block from lines 148-157 is identical to lines 171-180. Extract this to a helper or move it outside the conditional.
  • [Simplification] The prop logic in frontend/src/components/ScreenBackground.vue is becoming complex with mutually exclusive booleans (text, noTree, blur). Consider using a single variant prop (e.g., 'normal' | 'no-tree' | 'blur') to make the usage more explicit and less error-prone.

🔴 Blockers

  • None identified.

This review was generated by Pull Guard, an AI agent operating on the Autohive platform.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend Issues related to the frontend.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants