feat: track stand assignment source with colour-coded tag items#610
Conversation
…mproved source handling
… stands source group
…ed configuration handling
|
Have you managed to test it locally? |
|
On my todo list
…On Tue, 17 Mar 2026 at 13:52, Kristián Kunc ***@***.***> wrote:
*kristiankunc* left a comment (VATSIM-UK/uk-controller-plugin#610)
<#610 (comment)>
Have you managed to test it locally?
—
Reply to this email directly, view it on GitHub
<#610 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA4XK7GMNOZFNCBEQ2QIFQT4RFKAFAVCNFSM6AAAAACWT4JD6OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DANZVGEYTSNJQGM>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
--
This email and any files transmitted with it are confidential and contain
privileged or copyright information. It is intended solely for the
individual(s) to whom it is addressed. You must not present this message to
another party without gaining permission from the sender. If you are not
the intended recipient you must not copy, distribute or use this email or
the information contained in it for any purpose other than to notify us.
If you have received this message in error, please notify the sender
immediately, and delete this email from your system. We do not guarantee
that this material is free from viruses or any other defects although due
care has been taken to minimise the risk.
|
Push for CI build due to issues with the DevContainer
Restricted color Selector to just User and System Auto for now until functionality is worked in on API end
|
I'll look at the code when this is out of draft.
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. |
|
Completely agree, I don't think this needs to be configurable. |
|
Currently they are stored in the UK Controller Plugin:stand_colour_user:255,128,128 So potentially configurator change in the controller pack? so I can ditch the OP menu option and I just change the defaults to white?
Also thank you for your inputs |
|
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. |
|
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. |
|
Agree with the points above - having a custom UI is overkill. Let's stick to 2/3 distict colors for now and KISS |
Add Unknown source colour and adjust default palette, include logger header, and simplify user-setting loading. - Introduce DEFAULT_UNKNOWN_COLOUR and add StandAssignment::Source::Unknown into the sourceColours defaults and loading loop so unknown assignments have a defined colour. - Update default colours for reservation, VAA and system to new values. - Replace the custom SourceColourDefault struct with a simple array of sources and streamline reading colour entries from UserSetting. - Add utils/log/LoggerFunctions.h and remove an unused stdexcept include. Refactor StandEventHandler for clarity and correctness: - Forward SetAssignedStand(callsign, id) to the source-aware overload to ensure assignments always have a source. - Consolidate tag colour application so tag colour is set consistently. - Reorder and clean up many methods (validation, message parsing, API requests, push event processing, flightplan handling, assignment/unassignment flows) for readability and maintainability without changing external behaviour. - Fix some control flow and API handling points (mass assignment loading, push event processing, async API calls). Overall this change improves colour handling for unknown sources and restructures the event handler code for clarity and consistency.
|
Good colour selection IMO, will test it all once compiled again |
Extra }
Update include path from utils/log/LoggerFunctions.h to log/LoggerFunctions.h to match refactored headers. Also correct the constexpr sourceColourDefaults array size from 4 to 5 to match the number of initializer elements, preventing mismatched-size/overflow issues.
|
My take on the colours: |
Introduce a local alias `Source` for `StandAssignment::Source` and replace the verbose constexpr array initialization with a compact single-brace initializer for `sourceColourDefaults`. This reduces repetition, removes the extra nested-brace style, and improves readability.
|
I'll defer my final review until the colours are decided, but if you could try to fix the new "code smell" (I'm happy to ignore the shadowing ones; probably a result of some other include) before then that would be great. edit: I've actually had a quick look at the code; could the addition of the new
I agree the grey and white are fairly similar; my original justification for that was that the distinction between Auto and User is also fairly subtle. However, I can now see how User may need to be flagged more evidently for cases where pilots verbally report a stand request to eg. AIR before handover to GMC, to which end I'd agree with your suggestion. Comments still universally welcome, of course, but I'll update the table accordingly. |
Replace the type alias with C++20's `using enum StandAssignment::Source` to bring enumerators into scope, and update the constexpr defaults array to use the fully-qualified enum type with unqualified enumerator initializers. This is a non-functional cleanup to reduce redundant qualification and improve readability.
Introduce C++20 'using enum' for StandAssignment::Source to allow unqualified enum constants, simplifying switch cases and initializer lists. Updates made in StandColourConfiguration.cpp, StandEventHandler.cpp and the corresponding test to improve readability with no behavioral changes. Co-Authored-By: Copilot <198982749+Copilot@users.noreply.github.com>
|
Sonar may still have 3 smells .... however will test this once its compiled |
|
Let's see what Patrick think but I probably wouldn't stress over them to much - it's only the three shadowing ones. And if nobody else has got anything with the colors you can bake those in as well now. |
|
If the SonarQube analysis doesn't let you use |
Replace DEFAULT_UNKNOWN_COLOUR with the shared DEFAULT_COLOUR for the Unknown StandAssignment source and remove the now-unused DEFAULT_UNKNOWN_COLOUR constant. This unifies the default gray value and reduces duplicated color definitions (updated StandColourConfiguration.cpp and StandColourConfiguration.h).
|
Have all the commenst been resolved? |
|
Yes, they have
This email and any files transmitted with it are confidential and contain
privileged or copyright information. It is intended solely for the
individual(s) to whom it is addressed. You must not present this message to
another party without gaining permission from the sender. If you are not
the intended recipient you must not copy, distribute or use this email or
the information contained in it for any purpose other than to notify us.
If you have received this message in error, please notify the sender
immediately, and delete this email from your system. We do not guarantee
that this material is free from viruses or any other defects although due
care has been taken to minimise the risk.
…On Wed, 22 Apr 2026 at 19:31, Kristián Kunc ***@***.***> wrote:
*kristiankunc* left a comment (VATSIM-UK/uk-controller-plugin#610)
<#610?email_source=notifications&email_token=AA4XK7HNGCWQOKTHUO7CE6L4XEFWPA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTIMRZHA4TMMZUGY2KM4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJNLQOJPWG33NNVSW45C7N5YGK3S7MNWGSY3L#issuecomment-4298963464>
Have all the commenst been resolved?
—
Reply to this email directly, view it on GitHub
<#610?email_source=notifications&email_token=AA4XK7HNGCWQOKTHUO7CE6L4XEFWPA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTIMRZHA4TMMZUGY2KM4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJNLQOJPWG33NNVSW45C7N5YGK3S7MNWGSY3L#issuecomment-4298963464>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA4XK7AAZ5R2AWQCGIAQ7J34XEFWPAVCNFSM6AAAAACWT4JD6OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DEOJYHE3DGNBWGQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
19wintersp
left a comment
There was a problem hiding this comment.
Trivial things from a cursory overview; I will check fully once these are changed but hopefully that should be all.
Co-authored-by: Patrick Winters <61561933+19wintersp@users.noreply.github.com>
Co-authored-by: Patrick Winters <61561933+19wintersp@users.noreply.github.com>
Wrap the source/color entries in an extra set of braces in StandColourConfiguration.cpp so the initializer is correctly interpreted for sourceColours (prevents ambiguous/invalid initializer parsing). Also normalize spacing of inline comments in StandColourConfiguration.h for consistent formatting.
|
|
🎉 This PR is included in version 5.19.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |










Fixes #604
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
FlightPlanEventwhere a stale stand ID could cause a past-the-end dereference — it now logs a warning and returns early instead.Under the hood:
CMakeLists.txt(they were just missing)#includes that were previously only pulled in transitively