Trading UI window gets de synced if the villager is leveled up and then given a trade by commands while UI is open.
In our datapack we run a function that targets the cartographer through hidden advancements and adds trades to their system additionally to the existing trades, outside of the datadriven trade system. With 26.3 snapshot changes, the UI does not need to close anymore for the trades to be updated for player. However we relied on the player having to close the system and this causes now the UI to de sync. in the attachments i added a video showcasing how its expected to work and the actual bug
Expected result: The cartographer gains a new trade at the top of the list with a new trade that does not impact the existing trades
See attachment 2026-08-12 13-31-02.mp4
What actually happens: the trade is added but doesn't show up in the UI yet, which causes the intractable trade fields to not work correctly anymore until the player leaves the UI and Re-enters it
See attachment 2026-08-12 13-38-46.mp4
Thank you for helping us improve Minecraft! We saved your files: