Skip to content

Conversation

@chiptus
Copy link
Owner

@chiptus chiptus commented Sep 5, 2025

No description provided.

@chiptus chiptus requested a review from Copilot September 5, 2025 10:27
@vercel
Copy link

vercel bot commented Sep 5, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
upline Ready Ready Preview Comment Sep 5, 2025 10:50am

This comment was marked as outdated.

Copy link

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 transforms the application into a Progressive Web App (PWA) with offline support capabilities. The implementation moves away from a custom offline storage system to leverage modern browser APIs and query persistence for better performance and reliability.

  • Configures PWA manifest and service worker for offline functionality
  • Implements query persistence using TanStack Query for offline data caching
  • Refactors voting and notes system to use React Query mutations instead of custom offline hooks
  • Simplifies component architecture by removing offline-specific props and state management

Reviewed Changes

Copilot reviewed 63 out of 65 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
vite.config.ts PWA configuration with service worker and manifest setup
src/main.tsx Query persistence configuration for offline data caching
src/hooks/useOnlineStatus.ts New hook for detecting online/offline status
src/components/ui/OfflineIndicator.tsx Visual indicator for offline state
Multiple voting/notes components Refactored to use React Query mutations directly
Multiple offline-specific files Removed custom offline storage and related services
Comments suppressed due to low confidence (1)

src/pages/SetDetails/SetVotingButtons.tsx:1

  • The function call uses getVoteValue(voteType) but should use config.value since voteType is already the key from VOTES_TYPES array, not the actual vote value.
import { Button } from "@/components/ui/button";

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

<Button
variant="outline"
size="sm"
onClick={() => handleDelete(note.id)}
Copy link

Copilot AI Sep 5, 2025

Choose a reason for hiding this comment

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

The function handleDelete is called but not defined in scope. The function is defined after the return statement but is not accessible due to incorrect placement.

Copilot uses AI. Check for mistakes.
/>
<div className="flex items-center space-x-2">
<Button
onClick={handleSave}
Copy link

Copilot AI Sep 5, 2025

Choose a reason for hiding this comment

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

The function handleSave is called but not defined in scope. The function is defined after the return statement but is not accessible due to incorrect placement.

Copilot uses AI. Check for mistakes.
</Button>
<Button
variant="outline"
onClick={handleCancel}
Copy link

Copilot AI Sep 5, 2025

Choose a reason for hiding this comment

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

The function handleCancel is called but not defined in scope. The function is defined after the return statement but is not accessible due to incorrect placement.

Copilot uses AI. Check for mistakes.
</div>
);

function handleVote(voteType: number) {
Copy link

Copilot AI Sep 5, 2025

Choose a reason for hiding this comment

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

The function handleVote is called on line 27 but is defined after the return statement, making it inaccessible. This will cause a reference error.

Copilot uses AI. Check for mistakes.
const value = getVoteValue(voteType);
if (onVote && value) {
onVote(set.id, value);
async function handleVote(voteType: number) {
Copy link

Copilot AI Sep 5, 2025

Choose a reason for hiding this comment

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

The function handleVote is called on line 56 but is defined after the return statement, making it inaccessible. This will cause a reference error.

Copilot uses AI. Check for mistakes.
@chiptus chiptus merged commit e4b7448 into main Sep 5, 2025
7 checks passed
@chiptus chiptus deleted the refactor/remove-offline branch September 5, 2025 11:00
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.

2 participants