Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pressing up to edit latest message stopped working #19908

Closed
thany opened this issue Nov 26, 2021 · 15 comments
Closed

Pressing up to edit latest message stopped working #19908

thany opened this issue Nov 26, 2021 · 15 comments
Assignees
Labels
A-Composer A-Message-Editing A-Shortcuts Keyboard shortcuts A-Timeline O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Minor Impairs non-critical functionality or suitable workarounds exist T-Defect X-Cannot-Reproduce

Comments

@thany
Copy link

thany commented Nov 26, 2021

Steps to reproduce

  1. In a chat view
  2. Send a message
  3. Press the up-key to edit that message

Outcome

What did you expect?

The most recently sent message goes into edit mode

What happened instead?

Nothing

Operating system

Windows 10 21H2

Application version

Element version: 1.9.5 Olm version: 3.2.3

How did you install the app?

From https://element.io/, and self-updates

Homeserver

matrix.org

Will you send logs?

No

@thany thany added the T-Defect label Nov 26, 2021
@t3chguy
Copy link
Member

t3chguy commented Nov 26, 2021

Cannot reproduce

Screen.Recording.2021-11-26.at.12.50.52.mov

@dualfade
Copy link

dualfade commented Nov 26, 2021

This is not working in linux either ( as I just went hunting I found this ).

UP arrow works --
Clicking any of the message popup buttons does not --

Installed --
[0] % yalocs | ag chromium
local/chromium 96.0.4664.45-2

Button press: edit/reply/options/react... Nothing happens.

Thanks.
~!>D

@thany
Copy link
Author

thany commented Nov 29, 2021

It suddenly started working again, but it now manages to jump to edit a message I sent days ago.
Yes, of course, there are newer messages sent after that.

Clicking the edit icon on newer messages works fine.

Honestly, I'm baffled at why it is so difficult to just grab the latest sent message by the current user and throw it in edit mode... How does it decide which message to edit??

@t3chguy
Copy link
Member

t3chguy commented Nov 29, 2021

Related #16402

@thany
Copy link
Author

thany commented Nov 30, 2021

Maybe, #16402 would merely confirm that it's throwing the wrong message into edit mode...

@clusidc
Copy link

clusidc commented Dec 15, 2021

Got the same problem with the Desktop client. (Element 1.9.7 and OLM 3.2.8)
Arrow key up sometimes does not do anything. Sometimes it opens a random old message for editing. After a fresh restart (close element from the taskbar) it works again.

The issue happens sporadically, although it might have to do something with the first start after windows boot as the issue only arised (as i remember) one time per day.

@thany
Copy link
Author

thany commented Dec 20, 2021

After a fresh restart (close element from the taskbar) it works again.

Not for me. I haven't seen it working, not once, since I first noticed this issue. And I make a lot of typos, and I'm OCD enough to also want to correct them, so I'm already on the cusp of demanding some bloody priority.

The issue happens sporadically, although it might have to do something with the first start after windows boot as the issue only arised (as i remember) one time per day.

I'm happy for you.

But as for the devs: why is it so hard to:

  1. Find the most recent post by the current user
  2. Throw it in edit mode

Surely, it can't be more complicated than that. I'm very curious what the logic is currently. How does it find a random older message to be the "most recent" and viable for editing?

@thany
Copy link
Author

thany commented Jan 22, 2022

This is still happening on the latest version:

Element version: 1.9.9
Olm version: 3.2.8

Not trying to be impatient. It's just a really obvious bug and this not working properly is quite annoying when it selects the wrong (or no) message again. It's what I'd call "low hanging fruit".

@thany
Copy link
Author

thany commented Mar 25, 2022

Okay, so I though this was fixed, but the issue cropped up again.

I still would very much like to know how this possibly could not work. How hard is it, I mean honestly, to find the most recent message sent by the current user? And then just throw it in edit mode?

I'm not expierenced in native apps, but I do know that this can't possibly be hard in any way, shape, or form. So, something REALLY weird or REALLY benign must be throwing in a wrench.

@robintown
Copy link
Member

Hi @thany, the reason this hasn't been fixed yet is that we haven't determined how to reproduce it. It would help if you could share some details:

  • The composer is focused when you try pressing up, correct?
  • Is it possible that there are >100 events between your latest message and the bottom of the timeline?
  • Could you share a screenshot of what the timeline looks like when this occurs?

@robintown robintown added A-Composer S-Minor Impairs non-critical functionality or suitable workarounds exist O-Uncommon Most users are unlikely to come across this or unexpected workflow labels Mar 25, 2022
@clusidc
Copy link

clusidc commented Mar 25, 2022

Hey, i am not thany, but the problem still persists here, too.

What did i do:

  • Shutdown windows PC with element Desktop opened. (not in focus)
  • (Receive error Message from Origin (EA game launcher) about some weird access violations on the ram (Problem with Element also happens without Origin opened, though, but i once had a similar Message from Element in the shutdown screen))
  • write >100 Messages on Android app
  • be frustrated by a weird and never-has-been-noticed 1 Message per second rate, blamed it on wifi but probably was not the reason. (bad Home server config? need to redo it anyways in the near future)
  • Start Windows PC. Start Element. Element loads the latest messages and scrolls to the bottom.
  • Nothing looks out of the place really. grafik
  • close element by x in window and reopen it does not work
  • close Element from Task bar (icon in the bottom right)
  • start element
  • press arrow up (no messages in between)
  • arrow up works

I got an error message which might or might not correlate to the problem:
Error opening the database: IndexError(IOError(IOError { path: None, err: Custom { kind: Other, error: "Invalid MAC" } }))

Edit:
My friend now complained he couldnt edit his last message from over 100 messages ago. Element Desktop stayed open the whole time I did my test.

@thany
Copy link
Author

thany commented Mar 26, 2022

@robintown

I don't know how to reproduce it either. But I do know that it's never long before the problem pops up again, after working correctly for a seemingly random amount of time (could be days).

I understand that a reliable reproduction path is important. I'm a developer myself, and intermittent bugs are annoying for a developer to be told to fix. However, if you study the source, surely you are able to come up with a set of exact circumstances that have to be met in order for this feature to work correctly?

I ask for this in bug reports sometimes, simply to trigger someone to start thinking about how their feature actually works. If a straight answer for this isn't coming, in my mind it means it must be either plain vanilla simple, or gas factory level complicated.

Anyway,

The composer is focused when you try pressing up, correct?

Yup.

Is it possible that there are >100 events between your latest message and the bottom of the timeline?

Nope, the bottom of the timeline is my message. That's what I'm trying to edit. There's hardly ever more than a few messages between the bottom of the timeline and my most recent message.

Could you share a screenshot of what the timeline looks like when this occurs?

Not right now as it randomly started working correctly again 🤷🏻‍♂️
But I promise the timeline looks totally normal when this happens, and either:

  • Nothing gets thrown into edit mode in case this feature doesn't work at all, or
  • A much earlier message is thrown into edit mode, and the timeline scrolls up to there to get that message in the viewport

@t3chguy
Copy link
Member

t3chguy commented Mar 29, 2022

@thany I may have accidentally found the cause for it, being a stale editState being left around for a variety of means.

Presuming fixed by matrix-org/matrix-react-sdk#8184

Once you're on a version with that fix and if you see it again, please shout.

@t3chguy t3chguy closed this as completed Mar 29, 2022
@t3chguy t3chguy self-assigned this Mar 29, 2022
@t3chguy t3chguy added this to In Review in Web App Team Mar 29, 2022
@t3chguy t3chguy moved this from In Review to In Test in Web App Team Mar 29, 2022
@thany
Copy link
Author

thany commented May 31, 2022

@t3chguy The problem is back. Can you reopen, or should I create a new one?

@robintown
Copy link
Member

@thany Please create a new ticket for that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Composer A-Message-Editing A-Shortcuts Keyboard shortcuts A-Timeline O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Minor Impairs non-critical functionality or suitable workarounds exist T-Defect X-Cannot-Reproduce
Projects
None yet
Development

No branches or pull requests

6 participants