Skip to content

Create entrylist from session result#257

Merged
fabieu merged 4 commits intomainfrom
create-entrylist-from-session-result
Oct 16, 2025
Merged

Create entrylist from session result#257
fabieu merged 4 commits intomainfrom
create-entrylist-from-session-result

Conversation

@fabieu
Copy link
Owner

@fabieu fabieu commented Oct 16, 2025

This pull request introduces significant improvements to the entrylist editor, focusing on enhancing session result integration, streamlining entrylist creation, and improving robustness. The changes include a new workflow for creating entrylists from session results, better handling of file uploads, and some refactoring for clarity and maintainability.

Entrylist Creation & Session Integration

  • Added a new workflow to create entrylists directly from session results, including a dedicated dialog (createFromSessionDialog) and supporting UI components such as the "Create from session" button and session upload handling. This allows users to generate entrylists based on uploaded or selected session data, improving usability for race organizers. [1] [2] [3]
  • Refactored the entrylist creation UI to support both manual creation and creation from session results, with improved button placement and conditional rendering based on service availability. [1] [2]

File Upload Improvements

  • Increased the maximum allowed file size for uploads to 10 MB and limited uploads to a single file at a time, allowing for larger session and entrylist files. [1] [2]
  • Improved upload feedback and error handling, including more informative notifications and validation for uploaded session results.

UI & Dialog Refactoring

  • Reorganized dialog instantiation and usage, replacing the results upload dialog with session upload and create-from-session dialogs, and updating related button labels and layout. [1] [2] [3] [4]
  • Simplified the new entrylist creation workflow by removing confirmation dialogs and directly loading new entrylists.

Robustness & Validation

  • Ensured that internal state is reset when clearing entrylists, preventing stale data from affecting subsequent operations.
  • Improved handling of driver lookup in teams by making it null-safe, reducing the risk of NullPointerException.

Code Quality & Equality Logic

  • Implemented custom equals and hashCode methods for AccDriver, ensuring correct behavior when using drivers as keys in maps or sets, which is essential for tracking laps and session associations. [1] [2]

- Remove confirmation when creating a new entrylist
- Only allow upload of a single entrylist or result file
- Improve variable naming and distinction between session and results
@fabieu fabieu self-assigned this Oct 16, 2025
@fabieu fabieu added the enhancement New feature or request label Oct 16, 2025
@fabieu fabieu requested a review from Copilot October 16, 2025 14:39
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 introduces functionality to create entrylists directly from session results, refactors the UI for better workflow organization, and improves code robustness. The main addition is a new "Create from session" feature that generates an entrylist based on uploaded or selected session data, complementing the existing functionality to update an existing entrylist from session results.

Key Changes:

  • Added createFromSession method to generate new entrylists from session results with automatic driver filtering and entry creation
  • Refactored UI to distinguish between creating new entrylists and loading session results into existing ones, with dedicated dialogs for each workflow
  • Implemented custom equals and hashCode methods for AccDriver to enable proper map-based driver tracking

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
EntrylistEditorView.java Added "Create from session" button and dialog, refactored file upload limits, renamed methods/dialogs for clarity, and reorganized UI components
EntrylistService.java Implemented createFromSession method to generate entrylists from session data, including driver filtering logic
AccTeam.java Made getDriverByIndex null-safe to prevent NPE when drivers list is null
AccDriver.java Added equals and hashCode methods based on playerId for use as map keys

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

…fety

- Improvements to null-safety
- Enhance comments
@fabieu fabieu requested a review from Copilot October 16, 2025 14:53
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

Copilot reviewed 15 out of 15 changed files in this pull request and generated 3 comments.


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

@fabieu fabieu merged commit 47b56ba into main Oct 16, 2025
1 check passed
@fabieu fabieu deleted the create-entrylist-from-session-result branch October 16, 2025 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants