Qeole / colorediffs

Thunderbird extension to colorize code diffs in messages.
Mozilla Public License 2.0
25 stars 5 forks source link

Messages in Owl mailbox are untouched #119

Open MTCoster opened 2 months ago

MTCoster commented 2 months ago

Pretty much as it says in the title. Any messages in my Owl mailbox aren't colored, but copying them to a local mailbox allows them to be formatted correctly.

The inspector seems to suggest that content.js isn't loaded in (only background.js and transformations.js are).

I found #89 which seems like a very similar issue (Owl being the spiritual successor to ExQuilla) but I can't see how the fix there was ported to the rewritten version of this extension.

Qeole commented 2 months ago

Thanks for reporting!

The inspector seems to suggest that content.js isn't loaded in (only background.js and transformations.js are).

Where do you observe that? Is it in this view from the debugger?

image

That's surprising, because I'd expect content.js to be loaded unconditionally if we pass through registerScripts(), which loads transformation.js :thinking:

I found #89 which seems like a very similar issue (Owl being the spiritual successor to ExQuilla) but I can't see how the fix there was ported to the rewritten version of this extension.

The add-on doesn't work the same now, and it no longer checks the message prefix as it used to do to detect a patch. So the fix that you mention would no longer apply (and the cause for the bug is likely different, as well).

I'm sorry I don't have any Owl account, so I'm not really able to troubleshoot the issue further :disappointed:. Do let me know if you find something or if I can assist in some way, though.

MTCoster commented 2 months ago

Where do you observe that? Is it in this view from the debugger?

Yup, that's right. In a local mailbox I see it like you do:

Screenshot 2024-09-10 at 13 14 35

But in an Owl mailbox it only shows up in the extension thread. I guess that's why the other scripts don't load.

Screenshot 2024-09-10 at 13 11 22

That's surprising, because I'd expect content.js to be loaded unconditionally if we pass through registerScripts(), which loads transformation.js 🤔

That was my interpretation of registerScripts() as well!

The add-on doesn't work the same now, and it no longer checks the message prefix as it used to do to detect a patch. So the fix that you mention would no longer apply (and the cause for the bug is likely different, as well).

I figured it would be something like that.

I'm sorry I don't have any Owl account, so I'm not really able to troubleshoot the issue further 😞. Do let me know if you find something or if I can assist in some way, though.

I've never worked on Thunderbird extensions, but I'm happy to try whatever debugging/troubleshooting steps are necessary. Do you have any suggestions?

Qeole commented 2 months ago

Do you have any suggestions?

Not really sure. You can recompile the add-on locally with make xpi, and load the .xpi file as a temporary add-on in the debug screen (Tools -> Developer Tools -> Debug Add-ons). So I'd probably add some debug statements here and there to see what runs, and what don't; or working with the debugger. I've never been great with Thunderbird's debugger, I'm usually adding a mix of console.warn("stuff") or alert("other stuff"), based on the context. So I'd try to add them around the part where we're supposed to load the script, and inside of the script, and see what I get, or if I get any relevant error in the console...

I have no idea why things run differently for your Owl mailbox, I don't understand why the extension runs in a different thread in that case. Looking at the description of the Owl add-on, it's probable that the developer has more knowledge about add-ons programming, or at least might have knowledge about what differs; maybe it's worth shooting an email to the support address, just to see if they've got an idea of what might be “interfering” with Colored Diffs?