Skip to content

Conversation

@MAG-ElliotMorris
Copy link
Contributor

@MAG-ElliotMorris MAG-ElliotMorris commented Sep 25, 2025

Read the default settings now returned from login, and provide them in the LoginState return.

As LoginState is common, had to move existing settings structures to common also, which is what makes this a breaking change.
This entailed the removal/splitting up of the ApplicationSettings.h file, I've just put the stuff that remained from there in ApplicationSettingsSystem

Breaking Changes

  • csp::systems::SettingsCollection relocated to csp::common::SettingsCollection.
  • csp::systems::ApplicationSettings relocated to csp::common::ApplicationSettings.

New Api
Returned object from Login, LoginState now contains:

  • csp::common::List<csp::common::ApplicationSettings> DefaultApplicationSettings
  • csp::common::List<csp::common::SettingsCollection> DefaultSettings;

Important

The test will fail until CHS have resolved their issue with seeding Local MCS. Internal slack thread here. It passes against live MCS.

This change is rather non-symmetric. Mapping UserSettings to SettingsCollection but not mirroring the same with ApplicationSettings makes it rather tricky to reason about what setting is relevent to the SettingsSystem and what isn't, both from an api consumer perspective as well as a library developer trying to maintain module boundaries perspective. You'll see some of that in this PR.

@github-actions
Copy link

🚀 Pull Request Review Guidelines

Thank you for taking the time to review this Pull Request. The following is a summary of our Pull Request guidelines. The full guidelines can be found here.

💬 How to Provide Feedback

We use a comment ladder when leaving review comments to avoid any ambiguity.

Tag Is response required? Is a change required? May the PR author resolve?
[Fix] ✔️ ✔️
[Consider] ✔️ ✔️
[Question] ✔️
[Nit] ✔️
[Comment] ✔️

All comments should be prefixed with one of the above tags, for example:
[fix] Your editor is still set to use tabs instead of spaces, or this file is old and needs to be reformatted.

⚠️ Reviewers should be sure to resolve conversations if they feel their feedback has been addressed sufficiently.

🎯 PR Author Focus Areas

  • Link Commits to Conversations After making a change in response to a reviewer's comment, link the specific commit in the comment thread. This will allow the reviewer to view the change without having to hunt the codebase for it.
  • Breaking Changes Any breaking changes made to the public interface must be specifically called out in the PR. The preferred format is a bullet list enumerating the specific nature of the change/s, as well as the types and method signatures that are affected. If necessary, migration guidance should also be provided here.

Thanks again for taking the time to review this Pull Request.

@MAG-ElliotMorris MAG-ElliotMorris force-pushed the work/OF-1733-login-contexts branch from 8b8305d to 80b4bd1 Compare September 25, 2025 14:13
@MAG-ElliotMorris MAG-ElliotMorris self-assigned this Sep 25, 2025
@MAG-ElliotMorris MAG-ElliotMorris marked this pull request as ready for review September 25, 2025 14:20
@MAG-ElliotMorris MAG-ElliotMorris requested a review from a team as a code owner September 25, 2025 14:20
Copy link
Contributor

@MAG-ChristopherAtkinson MAG-ChristopherAtkinson left a comment

Choose a reason for hiding this comment

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

Overall the changes look good, @MAG-AdamThorn raise a good point around result objects that I have commented on, will leave this unapproved until thread are resolved.

@MAG-ElliotMorris
Copy link
Contributor Author

@MAG-AdamThorn @MAG-ChristopherAtkinson

We can't move the Result objects themselves to Settings.h because they are not common types, so they can't be in the include set of that file. I will have to re-instate the deleted file.

@MAG-ElliotMorris
Copy link
Contributor Author

MAG-ElliotMorris commented Sep 26, 2025

I have also added a commit that disables the test on local mcs, hopefully temporarily. CHS have tried to ship changes that seed local MCS but it hasn't taken properly as yet.

Proof that this works against live, since there's really no proof in the PR given the local MCS seeding issue:
image

Need to do this because we need to put them on the login response, which is common.

It's a bit awkward, as we also have the result types which are `systems`. I'm thinking that result types should begin to be centralised into their own namespace.

As `ApplicationSettings` only had the result type stuff left in the file, I deleted it and put it into `ApplicationSettingsSystem` ... although honestly i'm not sure about this. It's non-symmetric with the already non-symettrically named `SettingsCollection`
If the server returns default settings, put them in the login response.
Just an organizational choice.
Hopefully temporary skip that will be removed shortly when localMCS is seeding correctly.
@MAG-ElliotMorris MAG-ElliotMorris force-pushed the work/OF-1733-login-contexts branch from b171b72 to d71caf3 Compare September 29, 2025 08:54
@MAG-ElliotMorris MAG-ElliotMorris merged commit 775dd9f into magnopus-opensource:main Sep 29, 2025
9 checks passed
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.

3 participants