Catching Up
These last few weeks have been pretty hectic due to me moving countries and such, so I have not had the time to write a blog post detailing my weekly progress, because of this I have decided to compress it all into a singular blog post talking about all the changes I have been working on and what I plan on doing in the future.
The NewMailNotifier Agent
In the last blog post I wrote I talked about the progress that had been made in the newmailnotifier
agent, and that in the following weeks I would finish implementing the changes and testing its funcionality. Well, it ended up taking quite a bit longer as I found that several other files had to also be moved to KMail from KDE-PIM Runtime, and these ones were being used in the runtime repo. The files I have found so far and that I have been looking into are:
- newmailnotificationhistorybrowsertext.cpp
- newmailnotificationhistorybrowsertext.h
- newmailnotificationhistorybrowsertextwidget.cpp
- newmailnotificationhistorybrowsertextwidget.h
- newmailnotificationhistorydialog.cpp
- newmailnotificationhistorydialog.h
- newmailnotificationhistorywidget.cpp
- newmailnotificationhistorywidget.h
- newmailnotifieropenfolderjob.cpp
- newmailnotifieropenfolderjob.h
- newmailnotifiershowmessagejob.cpp
- newmailnotifiershowmessagejob.h
The Troublesome Migration Agent
The MR for the singleshot capability in the Akonadi repo was given the green light and just recently got merged. On the other hand, the MR with the changes for the agent received feedback and several improvements were requested.
Most importantly, Carl brought to my attention how recent MR’s by Nicolas Fella removed the job tracker from the migration agent, thus making it unnecessary to add it as a temporary folder. Both the requested changes and the removal of the folder have been carried out, while doing so I even realized that in my singleshot MR I was missing the addition of the new finished()
signal in the agentbase header file, which I have now also added.
After doing this though, I once again focused on the problem that persisted, the singleshot capability not working properly. The migration agent would initialize without issue when running the Akonadi server but would then not shut down after completing its tasks. I knew that the isPluginOpen()
method worked in sending the finished
signal, as when I opened and closed the plugin the agent would shut down correctly.
With the help of my mentor Claudio, we found that the migrations were in fact not even running, the agent would start but the jobs would fail to run, because of this the logic implemented to signal the finilization of a job never had the chance to run, and thus isPluginOpen()
remained untouched.
Furthermore, the way I had designed the plugin letting the agent know that it was open had proven to be insufficient, as the migrations (once we get them to run as intended) would emit the jobFinished()
signal after concluding, thus triggering the isPluginOpen()
method with the default value of false and shutting down the agent, even if the plugin was still open.
The times the singleshot capability did work (when opening and closing the plugin), we also found that the status would show as “Broken” and the statusMessage as “Unable to start”, which may need changing, but most troubling was that the opening of the plugin would not restart the agent, therefore only showing an empty config window. I need to find a way to either restart from the agent itself or notify Akonadi so that it restarts it when the plugin runs.
Current Status and What’s Next
The GSOC concludes next week and these last few weeks have not seen any MR requests from my part, so my plan is to continue with the refactoring beyond the end of the programme, working on completing the NewMailNotifier and Migration agents, as well as dealing with a few of the agents in KMail, namely MailFilter, MailMerge and the UnifiedMailBox.
As of now, the identified issues to solve regarding the Migration agent are:
- The agent not knowing if the plugin is open or closed when emitting the
finished()
signal. - The migrations not running.
- The status and statusMessage showing as “Broken” and “Unable to start”, respectively.
- The agent not being able to restart itself.
In the case of the NewMailNotifier:
- Complete the transfer of the UI related logic to KMail
- Test the D-Bus connection and the modified slotShowNotificationHistory()
While there’s still work ahead, I feel that these weeks have been invaluable in terms of learning, debugging, and understanding the bigger picture of how the different Akonadi agents fit together. The experience has been both challenging and rewarding, and I’m looking forward to tackling the remaining issues with a clearer path forward.
Although GSoC is officially ending, this is just a milestone rather than a finish line, and I’m excited to continue contributing to Merkuro and the KDE ecosystem as a whole.