Skip to content

Introduce splitting preferences in chucks#33

Draft
tordans wants to merge 2 commits intoosmlab:mainfrom
tordans:user-pref
Draft

Introduce splitting preferences in chucks#33
tordans wants to merge 2 commits intoosmlab:mainfrom
tordans:user-pref

Conversation

@tordans
Copy link
Copy Markdown

@tordans tordans commented Feb 1, 2026

I looked into how to implement #32

The discussion at openstreetmap/openstreetmap-website#6399 (comment) does not sound like a large limit will happen or at least not any time soon. Based on this, having tooling that handles the splitting / chucking will be very usefull.

This PR implements what @k-yle suggested in #32 (comment) - the way I understood it.

I spend most of my time working on the examples to see they make sense to me and cover edge cases.
The code and tests are generated an not reviewed by me, yet. — This will have to follow.
I also did not test the actual feature, yet. I was looking into setting up a /demo app that could be part of this repo which allows to use (a few) of the examples on the staging/production OSM server.

The main ideal of the change here is, that they replace the get/update/deletePreferences helper with new ones which allow to handle one key-value or split the values. They also add optional parsing/validation.

This means however, that the old APIs would be deprecated or removed. They are deprecated in this PR… except for getPreferences which I overwrote for a different purpose: Do get a list of all preferences for this user. So the current state is not ideal. I will either have to remove the two left over deprecations or remove the new function or rename the new function…


So what is this draft about ATM:

  1. Lets talk about the examples to see I am on the right track here.
  2. Would a /demo app be something for this repo?
  3. How should I handle the deprecation / name conflict?

@tordans
Copy link
Copy Markdown
Author

tordans commented Apr 4, 2026

@k-yle ping on this topic to request guidance and opinion on if and how you thing this could be moved forward. Especially the 3 questions above.

Ensure updatePreference does not leave conflicting single/split copies after writes, and make merged preference reads deterministic so split values consistently win when valid. Add regression tests for migration paths and refresh e2e snapshots to keep the suite green with current API responses.
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.

1 participant