Skip to content

feat: track stand assignment source with colour-coded tag items#610

Draft
MrAdder wants to merge 24 commits intoVATSIM-UK:mainfrom
MrAdder:issue-604a
Draft

feat: track stand assignment source with colour-coded tag items#610
MrAdder wants to merge 24 commits intoVATSIM-UK:mainfrom
MrAdder:issue-604a

Conversation

@MrAdder
Copy link
Contributor

@MrAdder MrAdder commented Mar 16, 2026

Fixes #604

⚠️ Hard dependency: VATSIM-UK/uk-controller-api#1817 needs to be deployed before this is merged.

Stand assignments now know how they were made. Whether a stand was assigned by a controller, auto-assigned by the system, or allocated by the reservation or VAA allocator, that information is now tracked and shown in EuroScope.

Tag item 110 shows the source as a colour-coded indicator — each source gets its own configurable colour saved to user settings. Tag item 200 gets a short suffix (USER, AUTO, RES , VAA ) so it's visible at a glance in the tag itself.

Also fixed a latent crash in FlightPlanEvent where a stale stand ID could cause a past-the-end dereference — it now logs a warning and returns early instead.

Under the hood:

  • Fixed linker errors by adding the new files to CMakeLists.txt (they were just missing)
  • Added missing direct #includes that were previously only pulled in transitively
  • Cleaned up the tests — extracted helpers and replaced a wall of near-identical test cases with table-driven loops

Copy link
Contributor Author

@MrAdder MrAdder left a comment

Choose a reason for hiding this comment

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

Due to the changes to the test test/plugin/stands/StandEventHandlerTest.cpp to reduce duplication the test/plugin/ecfmp/AircraftFlowMeasureMapTest.cpp needed to be reworked as it pulled from it

@kristiankunc
Copy link
Contributor

Have you managed to test it locally?

@MrAdder
Copy link
Contributor Author

MrAdder commented Mar 17, 2026 via email

@MrAdder
Copy link
Contributor Author

MrAdder commented Mar 17, 2026

So currently have API response from the logs highlighted response for user requested

image

Forgot to add the menu items so it wont render working on a build now, for some reason DevContainer give CURL errors so using the CI workflow for build

@MrAdder
Copy link
Contributor Author

MrAdder commented Mar 17, 2026

Works also Adds a Tag item which is also shown in screenshots AUTO/USER/VAA(may be of use later when I dig into the API further possibly to tag Event Slots with for my other PR for the Event Planning system)

Not sure on the colour Selection as it brings up one window for USER you select Color then you Select the Color for AUTO, will quite happily take suggestions on that.

Still Tweaking but feel free to review while in Draft/Make Suggestions

image image image image

Restricted color Selector to just User and System Auto for now until functionality is worked in on API end
@19wintersp
Copy link
Contributor

I'll look at the code when this is out of draft.

Not sure on the colour Selection as it brings up one window for USER you select Color then you Select the Color for AUTO, will quite happily take suggestions on that.

I think the UX here could be improved somewhat; if it is to be made configurable like this, then at least a dialogue should be shown with a form containing the different options. Having popups appear and disappear in sequence with no feedback is not ideal.

Does this even need to be configurable? I think the colours could certainly be made into a loadable plugin setting, but I don't think they warrant having their own UI and a place in the (already quite full) OP menu. Open to discussion on this point, but adding another useless configuration item for users to pointlessly change seems unnecessary to me.

@CLC0609
Copy link

CLC0609 commented Mar 17, 2026

Completely agree, I don't think this needs to be configurable.

@MrAdder
Copy link
Contributor Author

MrAdder commented Mar 17, 2026

Currently they are stored in the Data/Settings/Local/<AIRPORT>/Plugins.txt

UK Controller Plugin:stand_colour_user:255,128,128
UK Controller Plugin:stand_colour_reservation_allocator:255,0,0
UK Controller Plugin:stand_colour_vaa_allocator:128,255,128
UK Controller Plugin:stand_colour_system_auto:255,0,255

So potentially configurator change in the controller pack? so I can ditch the OP menu option

and I just change the defaults to white?

  • user = Controller changed
  • reservation_allocator = Requested stand by pilot
  • vaa_allocator = Is a potential WIP on the API side
  • system_auto = Generic stand allocation from the API

Also thank you for your inputs

@19wintersp
Copy link
Contributor

19wintersp commented Mar 17, 2026

I see no need to move settings out of the Plugin and into the Configurator; I would leave the settings serialisation as-is, remove the configuration UI from this patch, and leave it to be set in the Pack. As above, I see no value in letting users change these colours; there is precedent enough for hard-coding things as these, though leaving it as a plugin setting seems a fair middle ground.

@MrAdder
Copy link
Contributor Author

MrAdder commented Mar 17, 2026

Defaults are hard coded anyway (Shown below) I think the grey one for system needs to not be grey especially on some dark SMRs e.g. Heathrow, so going forward will remove the UI and leave in the Plugin setting options from above, and not worry about the configurator in the controller pack.

        static constexpr COLORREF DEFAULT_RESERVATION_COLOUR = RGB(255, 255, 0); // yellow
        static constexpr COLORREF DEFAULT_VAA_COLOUR = RGB(0, 255, 255);         // cyan
        static constexpr COLORREF DEFAULT_SYSTEM_COLOUR = RGB(180, 180, 180);    // grey

@kristiankunc
Copy link
Contributor

Agree with the points above - having a custom UI is overkill. Let's stick to 2/3 distict colors for now and KISS

@sonarqubecloud
Copy link

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.

Show Pilot Requested stands differently to allocated stands

4 participants