ChatPatches icon indicating copy to clipboard operation
ChatPatches copied to clipboard

Wait for chat history to load before displaying new messages in chat

Open JustJum11 opened this issue 6 months ago • 10 comments

Is your feature request related to a problem? Please describe.

When I enter a world and messages get sent into chat immediately, then after ~1-2 seconds the chat history can suddenly appear in chat AFTER those messages, making those messages disappear to the top of the chat message list (Making those messages effectively unreadable).

Describe the solution you'd like

If the chat history has not been fully loaded into chat, prevent any new messages from being displayed (Keeping them in some sort of queue). Then when the chat history fully loads in, those messages will then be displayed in chat.

Not sure if this is a bug or not since I don't remember having this issue ages ago, so I just put it as a feature request.

JustJum11 avatar Aug 23 '25 19:08 JustJum11

yup this is a bug, thanks for reporting. should be a simple fix, but i never noticed this bc it always loads right as i join, so ill probably have to send you some dev builds to ensure it works

mrbuilder1961 avatar Aug 24 '25 01:08 mrbuilder1961

lmk if this works! help

mrbuilder1961 avatar Aug 24 '25 04:08 mrbuilder1961

Tried the alpha.5 build you linked and the issue still happens

JustJum11 avatar Aug 24 '25 10:08 JustJum11

is the input box not grayed out?

mrbuilder1961 avatar Aug 24 '25 14:08 mrbuilder1961

It's pretty laggy when it's loading (Since it's loading the world at the same time) so I can't really tell.

But it's not really my own messages I'm concerned about, it's messages from other players / the server being sent as soon as I join. A consistent way for me to reproduce this is to join the CubeCraft server, which has a welcome message each time. But the chat history loads in after that welcome message is sent, so I can't actually read it (You can check Minecraft's log for what the message is supposed to be, or just disable Chat Patches).

About the input box being grayed out however, if I download the Stfu mod (lol yeah unusual name), for whatever reason, it delays the chat history loading time by a good few seconds, enough for me to try typing into chat, and it does let me send messages before the chat history loads in (The input box is not grayed out). But idk if this is just Stfu interfering with Chat Patches since it does has some chat features.

JustJum11 avatar Aug 24 '25 15:08 JustJum11

okay i understand, i thought this was more of a singleplayer issue. i guess i'll have to make some sort of queue to redirect messages to while the chat is loading - or just insert them at the beginning.

about STFU, just by skimming its description, it seems like it will cause issues w chat patches; particularly the compact chat spam.

mrbuilder1961 avatar Aug 24 '25 19:08 mrbuilder1961

again, i cant test this myself, but hopefully this will work or at least be closer: https://github.com/mrbuilder1961/ChatPatches/actions/runs/17193567451/artifacts/3838847151

mrbuilder1961 avatar Aug 24 '25 20:08 mrbuilder1961

Unfortunately it's the same.

Just for more context, here is the mc log: https://mclo.gs/zPUdXlX (You can ignore all the passenger and carrot stick rendering warnings, they happen in vanilla too)

On line 266, you can see it starts to load the chat history. On line 267, CubeCraft sends a welcome message into chat. On line 315, it finishes loading the chat history and sends it into chat. On line 321, CubeCraft sends another message about unclaimed rewards which appears in chat after the chat history.

And as you can see here, the first welcome message CubeCraft sends is not visible:

Image

JustJum11 avatar Aug 25 '25 10:08 JustJum11

So will this be "Wont Fix"? That's fine if it is, since it's not a big deal. But I just had an idea on how to possibly indirectly fix this, that's maybe a bit easier, if you're still up for it. Maybe it could load the chat history on game startup instead of when joining a world the first time, if that's even possible. Because once the chat history loads upon joining the first world in a session, if I leave and rejoin another world, the chat history appears to already be loaded. So I'm assuming the chat history can like, be loaded while not even in a world? Idk how the mod works exactly so sorry if this just isn't a thing that's possible to do.

JustJum11 avatar Nov 14 '25 15:11 JustJum11

oh that's weird, i didn't mean to mark this as completed. your idea is what the mod used to do, but it doesn't work anymore because a) the chat hud where messages are stored doesn't exist until you load into a world (done in sync w/ chat log) and b) the text codec cannot be used when you're not in game for whatever reason... still working on that one.

mrbuilder1961 avatar Nov 14 '25 15:11 mrbuilder1961