Skip to content

Implement SimRacing Stewarding suite#288

Draft
Copilot wants to merge 24 commits intomainfrom
copilot/implement-simracing-stewarding-suite
Draft

Implement SimRacing Stewarding suite#288
Copilot wants to merge 24 commits intomainfrom
copilot/implement-simracing-stewarding-suite

Conversation

Copy link
Contributor

Copilot AI commented Feb 19, 2026

Full stewarding module for managing race series, rounds, sessions, incidents, penalties, and appeals. Implements the entity hierarchy: Series → Round → Session, with incidents bound to rounds and differentiated by session.

Data model

  • 13 new tables via Flyway V2_11_0 migration (SQLite + PostgreSQL) using VARCHAR(12) random string primary keys generated by IdGenerator#generateRandomString(12)
  • Core entities: Series, Round, RoundSession, StewardingTrack, PenaltyCatalog, PenaltyDefinition, Incident, StewardDecision, Appeal, ReasoningTemplate, StewardingEntrylist/Entry/Driver
  • Series holds webhook URL, video URL toggle, penalty catalog, description; Round holds track + date range; Session holds datetime range within round boundaries

Roles & access control

  • New ROLE_STEWARD and ROLE_DRIVER user roles (inserted via migration, auto-mapped to Discord role settings)
  • Stewards/Admins: full CRUD on all stewarding entities
  • Drivers: can report incidents via round detail view

Service layer

  • 9 services covering CRUD, ACC entrylist JSON parsing, decision/appeal status workflows, reasoning template placeholder rendering, async Discord webhook notifications with color-coded embeds

UI (Vaadin views)

  • SeriesListViewSeriesDetailViewRoundDetailViewIncidentDetailView with back-navigation throughout
  • Dialog-based entity creation/editing (no /new routes) consistent with existing project patterns
  • NotificationService for all user feedback; grid data refresh instead of full page reloads
  • Track, penalty catalog, and reasoning template management views under STEWARDING menu category

Grid/table consistency

All stewarding grids use GridVariant.LUMO_NO_BORDER, disabled row selection, column reordering, and consistent column sizing matching existing views (leaderboards, BoP, settings).

Original prompt

This section details on the original issue you should resolve

<issue_title>Implement complete SimRacing Stewarding suite</issue_title>
<issue_description>20251222_130650(2).jpg

simracing-stewarding-plan.md

</issue_description>

<agent_instructions>Use the contents of simracing-stewarding-plan.md in the issue description to implement a complete simracing stewarding suite</agent_instructions>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 7 commits February 19, 2026 20:06
Create stewarding tables for both PostgreSQL and SQLite:
- stewarding_track, stewarding_penalty_catalog, stewarding_penalty_definition
- stewarding_reasoning_template, stewarding_race_weekend, stewarding_session
- stewarding_entrylist, stewarding_entrylist_entry, stewarding_entrylist_driver
- stewarding_incident, stewarding_incident_involved_entry
- stewarding_decision, stewarding_appeal

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Create entity classes and enums for the SimRacing Stewarding suite
under entities/stewarding/ package:

Enums: IncidentStatus, AppealStatus, PenaltySessionType, StewSessionType
Entities: StewardingTrack, PenaltyCatalog, PenaltyDefinition, RaceWeekend,
RaceWeekendSession, StewardingEntrylist, StewardingEntrylistEntry,
StewardingEntrylistDriver, Incident, StewardDecision, Appeal,
ReasoningTemplate

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Create 13 annotation-based MyBatis mapper interfaces for the stewarding
domain: StewardingTrackMapper, PenaltyCatalogMapper, PenaltyDefinitionMapper,
RaceWeekendMapper, RaceWeekendSessionMapper, StewardingEntrylistMapper,
StewardingEntrylistEntryMapper, StewardingEntrylistDriverMapper,
StewardingIncidentMapper, StewardingIncidentInvolvedEntryMapper,
StewardDecisionMapper, StewardingAppealMapper, and ReasoningTemplateMapper.

All mappers follow the existing project pattern using @component, @Mapper,
@Results/@resultMap for column mapping, and annotation-based SQL with
@select, @insert, @update, @delete.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Create 9 service classes in the stewarding package:
- StewardingTrackService: CRUD operations for tracks
- PenaltyCatalogService: CRUD for penalty catalogs and definitions
- RaceWeekendService: CRUD for race weekends and sessions with eager loading
- StewardingEntrylistService: Entrylist management with ACC JSON parsing
- StewardingIncidentService: Incident management with involved entries
- StewardDecisionService: Decision making and revision workflow
- StewardingAppealService: Appeal filing and review workflow
- ReasoningTemplateService: Template CRUD with variable rendering
- StewardingDiscordNotificationService: Async Discord webhook notifications

All services are gated behind @Profile(SpringProfile.STEWARDING) and follow
existing project patterns with @requiredargsconstructor and @transactional.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Create 10 view files in the stewarding package:
- RaceWeekendListView: Grid of race weekends with admin create button
- RaceWeekendFormView: Form to create new race weekends
- RaceWeekendDetailView: Weekend details with Sessions/Incidents/Entrylist tabs
- RaceWeekendSessionDetailView: Session details with incident grid
- IncidentDetailView: Incident details with decision/appeal management
- StewardingTrackListView: Grid of stewarding tracks
- StewardingTrackFormView: Form to create new tracks
- PenaltyCatalogListView: Grid of penalty catalogs
- PenaltyCatalogDetailView: Catalog details with penalty definitions
- ReasoningTemplateListView: Grid of reasoning templates with dialog form

All views follow existing codebase patterns: extend BaseView, use
@Profile(SpringProfile.STEWARDING), MainLayout routing, and initialize
UI in beforeEnter().

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: fabieu <43068791+fabieu@users.noreply.github.com>
Add unit tests for ReasoningTemplateService, StewardingEntrylistService,
and PenaltyCatalogService following existing codebase test patterns with
@SpringBootTest, @activeprofiles, and @MockitoBean.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI changed the title [WIP] Implement complete SimRacing Stewarding suite Implement SimRacing Stewarding suite Feb 19, 2026
Copilot AI requested a review from fabieu February 19, 2026 20:40
…grid formatting consistent

Co-authored-by: fabieu <43068791+fabieu@users.noreply.github.com>
Copilot AI changed the title Implement SimRacing Stewarding suite Stewarding UI: dialog-based creation, consistent grids, STEWARD/DRIVER roles Feb 19, 2026
…scription formatting

Co-authored-by: fabieu <43068791+fabieu@users.noreply.github.com>
Copilot AI changed the title Stewarding UI: dialog-based creation, consistent grids, STEWARD/DRIVER roles Implement SimRacing Stewarding suite with dialog-based UI, STEWARD/DRIVER roles, and functional session/incident workflows Feb 19, 2026
Copilot AI and others added 2 commits February 19, 2026 22:52
…, map markers

- RaceWeekendDetailView: Add back button, videoUrlEnabled display, edit/delete
  weekend dialogs, remove entrylist tab (moved to session level)
- RaceWeekendSessionDetailView: Add back button, entrylist upload/display,
  MultiSelectComboBox for involved cars, map marker fields, conditional video URL,
  edit/delete session buttons
- IncidentDetailView: Add back button, map marker coordinate display
- PenaltyCatalogDetailView: Add back button
- RaceWeekendListView: Add videoUrlEnabled checkbox to new weekend dialog

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: fabieu <43068791+fabieu@users.noreply.github.com>
Copilot AI changed the title Implement SimRacing Stewarding suite with dialog-based UI, STEWARD/DRIVER roles, and functional session/incident workflows Implement SimRacing Stewarding suite Feb 19, 2026
Copilot AI and others added 2 commits February 19, 2026 23:25
- Create Flyway V2_14_0 migrations for SQLite and PostgreSQL
- Add Series entity (new top-level, absorbs description/webhook/penalty from RaceWeekend)
- Add Round entity (renamed from RaceWeekend, with series_id FK)
- Add RoundSession entity (renamed from RaceWeekendSession, with roundId FK)
- Update StewardingEntrylist to use roundId instead of raceWeekendId/sessionId
- Delete old RaceWeekend and RaceWeekendSession entity files
- Use source_race_weekend_id for deterministic migration mapping

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…apper

- Create SeriesMapper for stewarding_series table
- Create RoundMapper for stewarding_race_weekend table (replacing RaceWeekendMapper)
- Create RoundSessionMapper for stewarding_session table (replacing RaceWeekendSessionMapper)
- Update StewardingEntrylistMapper to use round_id instead of race_weekend_id/session_id
- Delete old RaceWeekendMapper and RaceWeekendSessionMapper

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI and others added 3 commits February 19, 2026 23:35
…layer

- Create SeriesService for Series CRUD with PenaltyCatalog enrichment
- Create RoundService for Round + RoundSession CRUD with Track enrichment
- Delete RaceWeekendService (replaced by SeriesService + RoundService)
- Update StewardingEntrylistService to use round-level operations
- Update StewardingDiscordNotificationService to get webhook URL from Series

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Create SeriesListView at /stewarding/series
- Create SeriesDetailView at /stewarding/series/:seriesId
- Create RoundDetailView at /stewarding/series/:seriesId/rounds/:roundId
- Update IncidentDetailView route to /stewarding/series/:seriesId/rounds/:roundId/incidents/:incidentId
- Delete RaceWeekendListView, RaceWeekendDetailView, RaceWeekendSessionDetailView
- Update MenuService to reference SeriesListView

Sessions are now listed within the Round detail (not navigable as separate pages).
Entrylist and incident reporting are scoped to the Round level.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ly migration)

Co-authored-by: fabieu <43068791+fabieu@users.noreply.github.com>
Copilot AI and others added 6 commits February 20, 2026 22:34
…RCHAR(12) PKs and stewarding_round

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…tring

Update all stewarding entity classes to use String instead of Integer for
primary key (id) and foreign key fields. User-related FK fields
(decidedByUserId, filedByUserId, respondedByUserId, reportedByUserId)
and non-stewarding FKs (carModelId) remain as Integer.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…xplicit ID in INSERT

- Use stewarding_round instead of stewarding_race_weekend
- Use round_id instead of race_weekend_id
- Remove @options(useGeneratedKeys) from INSERT methods
- Add id to INSERT column list and #{id} to VALUES
- Change all ID parameters from Integer to String
- Update all service and view callers accordingly

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add IdGenerator dependency to all 9 stewarding service classes and call
idGenerator.generateRandomString(12) in their create methods before
inserting entities into the database.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… reload with grid refresh in stewarding views

Replace raw Notification.show() calls with NotificationService methods
(showSuccessNotification/showErrorNotification) across all 8 stewarding
view files. Replace ui.getPage().reload() with grid.setItems() for list
views and ui.navigate() for detail views to avoid full page reloads.

Files changed:
- SeriesListView: grid refresh after series creation
- StewardingTrackListView: grid refresh after track creation
- PenaltyCatalogListView: grid refresh after catalog creation
- ReasoningTemplateListView: grid refresh after template creation
- PenaltyCatalogDetailView: grid refresh after penalty definition added
- SeriesDetailView: navigate for series update, grid refresh for rounds
- RoundDetailView: navigate for session/incident/entrylist/round changes
- IncidentDetailView: navigate for decision save

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- StewardingEntrylistServiceTest: use 'round1' instead of '1', add IdGenerator mock
- PenaltyCatalogServiceTest: use descriptive String IDs, add IdGenerator mock
- ReasoningTemplateServiceTest: use descriptive String IDs, add IdGenerator mock

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI changed the title Implement SimRacing Stewarding suite with Series → Round → Session hierarchy Implement SimRacing Stewarding suite Feb 20, 2026
…tabase

Co-authored-by: fabieu <43068791+fabieu@users.noreply.github.com>
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.

Implement complete SimRacing Stewarding suite

2 participants