Mover mensagens de chat para um novo canal as embaralhou todas

Movi 28 mensagens de um canal para um novo e todas saíram de ordem:

Hmmm. Sou só eu, ou estas parecem estar fora de ordem agora? :thinking:

Dei outra olhada nas postagens fora de ordem em https://meta.discourse.org/chat/channel/147/chat?messageId=2644, e parece que todas têm o mesmo timestamp.

6 curtidas

Obrigado por relatar isso, eu tentei levar isso em consideração com o recurso, mas acho que tive um pouco de sorte com os testes que fiz :sweat_smile: Então, de fato, definimos todos os timestamps para a mesma coisa aqui:

O problema é que não queremos intercalar as mensagens movidas entre as mensagens existentes do canal, e isso fica cada vez mais difícil quanto mais mensagens você move.

Uma pergunta antes de me aprofundar nisso – você consegue se lembrar e identificar quais mensagens estão fora do lugar? São apenas algumas, ou elas estão completamente fora de ordem? Acho que o que possivelmente causou a discrepância é que, quando estamos buscando mensagens para um canal, fazemos isso por ordem de ID (que ordenamos DESC e depois revertemos na maioria dos casos):

Enquanto no message mover eu estou ordenando por created_at para manter a ordem, o que pode causar algumas pequenas discrepâncias:

Tenho algumas ideias sobre como podemos abordar isso (talvez mudar o message mover para ordenar por ID ou mudar o controller para ordenar por created_at seja o suficiente, preferindo o último porque acho que faria mais sentido), mas gostaria de saber o quão bagunçada a ordem está, se for possível dizer.

5 curtidas

I un-deleted them from the original channel after I noticed they were jumbled in the new one. I should be able to quote them in order here: :crossed_fingers:

Original order
Originally sent in The Chat Feedback topic
JammyDodger

I'm looking for ways we can capture the essence of the new chat flow as a demonstration of how chat can be the seeds of bigger discussion

Has anyone got any ideas on how we can do that from where we are now with the chat-testing here on Meta?

The feedback points are great, and I think they will be calved off into their own proper topics shortly too, but I was hoping for something that would work as a great exemplar for anyone just joining the @chat-testers. Something that people can just look at and go 'Aaaah. Yes, I wasn't sure at first, but I see how can chat can be the pre-cursor to in depth discussion'

I may be asking too much :slightly_smiling_face:

RGJ

TBH I don't see how chat can be the pre-cursor to in depth discussion :thinking:

But that might be because I'm old

JammyDodger

So we're looking for an example that will help change @RGJ's mind too :slightly_smiling_face:

Moin

I like the example here. But that example does not fit here. Maybe the topic could be about a feature you miss just now. Something you wouldn't start a topic because for example you don’t have time to check whether there is a similar feature request or you think no one else will be interested into that.

JammyDodger

@Moin, your search skills are always a blessing :slightly_smiling_face:

I was looking for one about seeds and trees, but couldn't find it on here

But, yes. Some kind of relaxed/friendly/informal chat in which an idea forms through the course of the easy back-and-forth, and then inspires a proper discussion topic

oshyan

This is 100% my interest and use-case for chat. But can you clarify exactly what you mean by an example of this. Are you interested in, say, samples of a chat (regardless of whether it happened in Discourse chat) that could/should/would have (obviously) led to deeper discussion and/or did lead to deeper discussion but in an arguably less ideal medium for it (chat vs. forum)? If that's the case I may need a little to find some, but I absolutely have good examples from my productivity community. If you're looking for examples in Discourse chat, specifically, that's going to be harder to find. But I absolutely think this is a big value of chat in Discourse, and depending on the community, it will play a bigger or smaller role.

Jonathan_Poyer

I think showcase a discussion around a new feature is actually a nice way to demo it at least during the first moment of that idea. For some people, this spark of discussion is during the time of development or about to begin. There are always more things to discuss about and referring to a topic (or multiple) makes sense.

oshyan

As a perhaps more conceptual example of a situation where chat can (and should) quickly turn into a topic, even mid-way through a discussion, this is something that often happens in software dev management communities I'm part of, as well as my productivity community:

  • New person joins chat and asks a seemingly simple or innocuous question
  • Responses from highly informed and/or impassioned regulars quickly grow to 10s of lines of text, paragraph breaks start happening, and that chat channel becomes saturated only with discussion on this one question (topic)
  • Everything becomes difficult to respond to as each "message" includes lots of points and ideas and no select-to-quote/reply feature makes parsing and responding to each thing difficult
  • These conversations are also often valuable debates that would quickly disappear in the subsequent flow of a chat, so even retroactively moving them to a Topic is potentially very valuable
JammyDodger

I think I was initially looking for something we could provide as an example topic/chat here on Meta to demonstrate to people new to Discourse Chat of how it could gel nicely with pre-existing ideas of the 'long-form paragraph' view of Discourse

So even something that we created to neatly demonstrate the principle

Though it sounds like you have lots of examples that would make a great discussion topic :slightly_smiling_face:

I think anything that can help people easily visualise where in their forum structure chat can slot into would be useful. I am open to all ideas :+1:

agungor

I feel that this conversation is becoming such an example per se. :smiley:

Jonathan_Poyer

Feels like something that would become a thread on other platforms would either need to turn into another chat or a split off topic. But at the same time, topic feel also more like long term discussion vs one-off as here?

jimkleiber

Maybe one way is to quote the initial chat message that started the idea into a topic: How can chat seed topic discussions?

This can give visibility to people who aren't in the chat, especially if the topic starts with a question

but ironically I'm answering here lol

Hmm, I just tried to quote my replies here into that same topic but I think I only have the option to quote into a new topic, not an existing one

JammyDodger

I was just mulling that over. :slightly_smiling_face: I was working out if I could make a topic with each person's chat as a reply somehow, as there were no suitable chat channels to slide them to. But now you've made it I can see that it could have its own chat channel, and we could move this conversation there :+1:

jimkleiber

Ah yes, almost like creating the topic that will create the new chat channel

and then the topic can be filled with just quotes from the chat, pulling the highlights

Jumbled
oshyan

This is 100% my interest and use-case for chat. But can you clarify exactly what you mean by an example of this. Are you interested in, say, samples of a chat (regardless of whether it happened in Discourse chat) that could/should/would have (obviously) led to deeper discussion and/or did lead to deeper discussion but in an arguably less ideal medium for it (chat vs. forum)? If that's the case I may need a little to find some, but I absolutely have good examples from my productivity community. If you're looking for examples in Discourse chat, specifically, that's going to be harder to find. But I absolutely think this is a big value of chat in Discourse, and depending on the community, it will play a bigger or smaller role.

Jonathan_Poyer

I think showcase a discussion around a new feature is actually a nice way to demo it at least during the first moment of that idea. For some people, this spark of discussion is during the time of development or about to begin. There are always more things to discuss about and referring to a topic (or multiple) makes sense.

oshyan

As a perhaps more conceptual example of a situation where chat can (and should) quickly turn into a topic, even mid-way through a discussion, this is something that often happens in software dev management communities I'm part of, as well as my productivity community:

  • New person joins chat and asks a seemingly simple or innocuous question
  • Responses from highly informed and/or impassioned regulars quickly grow to 10s of lines of text, paragraph breaks start happening, and that chat channel becomes saturated only with discussion on this one question (topic)
  • Everything becomes difficult to respond to as each "message" includes lots of points and ideas and no select-to-quote/reply feature makes parsing and responding to each thing difficult
  • These conversations are also often valuable debates that would quickly disappear in the subsequent flow of a chat, so even retroactively moving them to a Topic is potentially very valuable
JammyDodger

I think I was initially looking for something we could provide as an example topic/chat here on Meta to demonstrate to people new to Discourse Chat of how it could gel nicely with pre-existing ideas of the 'long-form paragraph' view of Discourse

So even something that we created to neatly demonstrate the principle

I think anything that can help people easily visualise where in their forum structure chat can slot into would be useful. I am open to all ideas :+1:

I'm looking for ways we can capture the essence of the new chat flow as a demonstration of how chat can be the seeds of bigger discussion

Though it sounds like you have lots of examples that would make a great discussion topic :slightly_smiling_face:

Has anyone got any ideas on how we can do that from where we are now with the chat-testing here on Meta?

RGJ

TBH I don't see how chat can be the pre-cursor to in depth discussion :thinking:

agungor

I feel that this conversation is becoming such an example per se. :smiley:

Jonathan_Poyer

Feels like something that would become a thread on other platforms would either need to turn into another chat or a split off topic. But at the same time, topic feel also more like long term discussion vs one-off as here?

JammyDodger

The feedback points are great, and I think they will be calved off into their own proper topics shortly too, but I was hoping for something that would work as a great exemplar for anyone just joining the @chat-testers. Something that people can just look at and go 'Aaaah. Yes, I wasn't sure at first, but I see how can chat can be the pre-cursor to in depth discussion'

jimkleiber

Maybe one way is to quote the initial chat message that started the idea into a topic: How can chat seed topic discussions?

This can give visibility to people who aren't in the chat, especially if the topic starts with a question

JammyDodger

I think, at least. :slightly_smiling_face: I'll double-check my thinking before I do anything

I may be asking too much :slightly_smiling_face:

jimkleiber

but ironically I'm answering here lol

RGJ

But that might be because I'm old

JammyDodger

I was just mulling that over. :slightly_smiling_face: I was working out if I could make a topic with each person's chat as a reply somehow, as there were no suitable chat channels to slide them to. But now you've made it I can see that it could have its own chat channel, and we could move this conversation there :+1:

jimkleiber

Ah yes, almost like creating the topic that will create the new chat channel

JammyDodger

So we're looking for an example that will help change @RGJ's mind too :slightly_smiling_face:

jimkleiber

and then the topic can be filled with just quotes from the chat, pulling the highlights

Moin

I like the example here. But that example does not fit here. Maybe the topic could be about a feature you miss just now. Something you wouldn't start a topic because for example you don’t have time to check whether there is a similar feature request or you think no one else will be interested into that.

JammyDodger

@Moin, your search skills are always a blessing :slightly_smiling_face:

I was looking for one about seeds and trees, but couldn't find it on here

But, yes. Some kind of relaxed/friendly/informal chat in which an idea forms through the course of the easy back-and-forth, and then inspires a proper discussion topic

2 curtidas

Fico pensando quando é preferível mover mensagens em vez de citá-las. Talvez dependa se já existe um tópico ou não? Não tenho certeza. Em que cenários um dos seguintes seria melhor para incentivar as pessoas?\n\n1. Citar mensagens de chat em um tópico existente\n2. Mover mensagens de chat para um tópico existente\n3. Citar mensagens de chat para um novo tópico\n4. Mover mensagens de chat para um novo tópico\n\nComo sequências de mensagens de chat são, erm, mais “conversacionais” do que tópicos, tenho a impressão de que podemos querer incentivar mais a citação do que a movimentação, em geral.\n\nExistem casos que as pessoas observaram ou têm em mente onde você pensa: “não, citar não seria bom aqui. definitivamente precisamos movê-los em vez disso”?

2 curtidas

Se você apenas citar, a discussão poderá continuar em dois lugares.

@Moin você está sugerindo que mover mensagens seria preferível quando você realmente quer evitar isso?

Obrigado por fazer isso – isso está completamente confuso! Terei que fazer alguns testes locais com conjuntos de mensagens maiores. Acho que, no mínimo, isso será necessário:

No entanto, geralmente fico apreensivo em ordenar por ID por causa de inconsistências estranhas, acho que ordenar mensagens por created_at seria melhor em geral para os canais. @j.jaffeux ou @mcwumbly, quais são seus pensamentos sobre isso? Se decidirmos fazer isso, o mover de mensagens pode precisar espaçar artificialmente os valores de created_at em 10ms cada, mais ou menos, para uma ordenação consistente.

Acho que, em geral, se forem totalmente irrelevantes para o canal atual, seria melhor movê-las para um canal mais apropriado. Usamos isso muitas vezes anteriormente internamente quando usávamos o Mattermost. Por exemplo, um monte de resposta a incidentes no canal geral que deveriam ser movidos para o canal incidente para um melhor registro. Ou, bate-papo ocioso em um canal que é melhor estar no canal aleatório.

Não acho que haja valor nesses casos de citar e deixar lixo antigo para trás, e como Moin diz, as coisas podem então ficar confusas, onde a discussão continua em dois lugares diferentes.

Tenha em mente que essas duas opções não existem atualmente. Removemos “Mover para Tópico” porque na implementação inicial estava criando uma postagem por mensagem de chat e também não estava excluindo as mensagens originais no canal. Se no futuro quisermos fazer isso novamente, precisará:

  • a) citar lotes de mensagens juntas (digamos, 100 por postagem) usando o recurso de citação de chat e
  • b) excluir os originais no canal para evitar duplicação.
5 curtidas

Abster-me-ei de comentar sobre a implementação para ordenar postagens e deixarei que @j.jaffeux comente sobre esse aspecto.

Ah, sim. Eu não estava perguntando sobre mover mensagens de chat dentro do chat, mas posso ver como isso pode ser útil, e não tem o problema de tentar converter forma curta em forma longa (ou vice-versa) “na postagem”.

Faz sentido. Gosto da forma geral de citar como mais uma “transcrição” como esta, porque acho que provavelmente será lida dessa forma de qualquer maneira. No passado, quando usei o recurso de transcrição do Slack, muitas vezes me vi envolvendo-o em [details] também, e resumindo as coisas no corpo principal da postagem.

Outro pensamento que tive nessa linha pode ser ter um recurso mais sofisticado de “expandir contexto”, para que você possa citar uma única mensagem, mas depois carregar mensagens adicionais em linha sob demanda para ver mais contexto do chat sem sair do tópico.

Sou cético quanto à necessidade ou valor dessa parte ao referenciar discussões na fronteira entre a via lenta e a via rápida.

4 curtidas

Isso só aconteceria se você escolhesse Mover para Tópico. Por que manter as coisas no canal se a sua intenção era movê-las? Já tivemos algumas discussões sobre isso internamente. Claro, apenas uma citação normal de mensagens em um tópico não excluiria nada.

Uma curiosidade para você: a classe que gera as citações é, na verdade, chamada ChatTranscriptService :slight_smile:

Isso é interessante, na verdade temos algo semelhante com nossas citações de tópicos (você provavelmente já viu isso). Provavelmente seria útil obter um pouco mais de contexto sem ter que visitar o canal.

3 curtidas

Eu diria que o caso de uso para mover é:

  • Temos um canal dedicado à discussão sobre “Baleias”
  • Um monte de gente começa a ter uma discussão envolvente sobre “Pinguins” porque esqueceram de clicar em “#pinguim” e as coisas esquentaram
  • Um moderador intervém e :foot: move a conversa sobre Pinguins para o canal dos Pinguins.

Eu acho que a coisa fundamental aqui é a reordenação.

Eu diria que “fudge created_at” é a única solução sensata aqui porque você quer que tudo seja movido em um bloco? Além disso, tecnicamente, ele é criado no momento em que é movido.

5 curtidas

Sim, acho que estou me perguntando se é necessário, ou se citação/transcrição é a coisa a se concentrar em fazer funcionar muito bem.

3 curtidas

Sim, eu faria isso 100% se nossa rota normal de mensagens GET para um canal fosse ordenada por created_at, é isso que quero resolver, estava apenas me perguntando se Joffrey tinha algum conhecimento histórico sobre isso. Se não, mudarei ambas as coisas de uma vez.

2 curtidas

Sim, estou 100% com o Sam e você😁 Mover tudo de uma vez e dar a ele o created_at do momento da movimentação é a única abordagem sensata na minha opinião. Caso contrário, isso abre uma gigantesca caixa de Pandora… como saberei onde encontrá-lo? Receber notificações não lidas para coisas criadas antes da minha última leitura? não, não, não

4 curtidas

Legal, vou ajustar a ferramenta de mover para que as mensagens movidas fiquem no :sparkles: futuro :sparkles: com um pequeno incremento espaçado, e fazer com que as mensagens do chat sejam ordenadas por created_at em vez de ID no controller geral :+1:

3 curtidas

Acabei de mesclar isso na esperança de resolver o problema:

Não fiz nada para espaçar artificialmente created_at para o futuro por enquanto, então vamos ver como isso vai primeiro.

4 curtidas

Este tópico foi fechado automaticamente após 11 dias. Novas respostas não são mais permitidas.