Skip to content

Fix shell's chats not being loaded at start and missing image #18039

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

Merged
merged 2 commits into from
Jun 9, 2025

Conversation

jrainville
Copy link
Member

What does the PR do

Note: review per commit

Fixes #18030

I moved the initialization of the chats to the Nim side. The personal section's chats get loaded on app start now. It will impact the login a little, but not much, since it only loads the model of chats, not messages.

For the image issue, the problem was that the ShellAdaptor didn't have the chatType as an expectedRole. Same for onlineStatus. I guess there is a bug in the SFPM where without the expectedRole, it's undefined at first, but then when you reload the page it works, the bug being that it somehow works on reload.


I also did a clean up of the chat Item and Model because I was annoyed that we always use Item.

Changes Item to ChatItem. initItem to initChatItem.
Plus some clean ups to unused imports.
Adds use of updateRole to the model to clean up the code.
Adds a test file for the chat Model

Affected areas

  • Shell screen (model)
  • Chat Item and Model

Architecture compliance

Screenshot of functionality (including design for comparison)

Screenshot from 2025-06-02 16-53-10

Impact on end user

Fixes the issue

How to test

  • Use the feature flag FLAG_SHELL_ENABLED=1

Risk

Described potential risks and worst case scenarios.

Tick one:

  • Low risk: 2 devs MUST perform testing as specified above and attach their results as comments to this PR before merging.
  • High risk: QA team MUST perform additional testing in the specified affected areas before merging.

@jrainville jrainville requested review from a team, micieslak, caybro, alexjba and noeliaSD as code owners June 2, 2025 20:59
@status-im-auto
Copy link
Member

status-im-auto commented Jun 2, 2025

Jenkins Builds

Click to see older builds (19)
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 4b86e25 #1 2025-06-02 21:06:22 ~6 min tests/nim 📄log
✔️ 4b86e25 #1 2025-06-02 21:08:37 ~8 min macos/aarch64 🍎dmg
✔️ 4b86e25 #1 2025-06-02 21:09:38 ~9 min tests/ui 📄log
✔️ 4b86e25 #1 2025-06-02 21:14:24 ~14 min linux/x86_64 📦tgz
✔️ 4b86e25 #1 2025-06-02 21:15:53 ~16 min linux-nix/x86_64 📦tgz
✔️ 4b86e25 #1 2025-06-02 21:22:11 ~22 min macos/x86_64 🍎dmg
✔️ 4b86e25 #1 2025-06-02 21:25:58 ~26 min windows/x86_64 💿exe
✔️ ae50745 #2 2025-06-04 16:35:25 ~7 min tests/nim 📄log
✔️ ae50745 #2 2025-06-04 16:35:55 ~7 min macos/aarch64 🍎dmg
✔️ ae50745 #2 2025-06-04 16:38:33 ~10 min tests/ui 📄log
✔️ ae50745 #2 2025-06-04 16:42:30 ~14 min linux/x86_64 📦tgz
✔️ ae50745 #2 2025-06-04 16:45:47 ~17 min macos/x86_64 🍎dmg
✔️ ae50745 #2 2025-06-04 16:53:45 ~25 min windows/x86_64 💿exe
✔️ ae50745 #3 2025-06-06 09:27:02 ~6 min tests/nim 📄log
✔️ ae50745 #3 2025-06-06 09:28:21 ~7 min macos/aarch64 🍎dmg
✔️ ae50745 #3 2025-06-06 09:31:10 ~10 min tests/ui 📄log
✔️ ae50745 #3 2025-06-06 09:33:33 ~12 min linux/x86_64 📦tgz
✔️ ae50745 #3 2025-06-06 09:40:35 ~19 min macos/x86_64 🍎dmg
✔️ ae50745 #3 2025-06-06 09:47:12 ~26 min windows/x86_64 💿exe
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 3f37f24 #4 2025-06-06 16:55:07 ~6 min tests/nim 📄log
✔️ 3f37f24 #4 2025-06-06 16:56:46 ~7 min macos/aarch64 🍎dmg
✔️ 3f37f24 #4 2025-06-06 16:59:15 ~10 min tests/ui 📄log
✔️ 3f37f24 #4 2025-06-06 17:03:33 ~14 min linux/x86_64 📦tgz
✔️ 3f37f24 #4 2025-06-06 17:04:55 ~15 min macos/x86_64 🍎dmg
✔️ 3f37f24 #4 2025-06-06 17:11:36 ~22 min windows/x86_64 💿exe
✔️ ded14fc #5 2025-06-09 14:50:57 ~6 min tests/nim 📄log
✔️ ded14fc #5 2025-06-09 14:52:18 ~7 min macos/aarch64 🍎dmg
✔️ ded14fc #5 2025-06-09 14:54:26 ~9 min tests/ui 📄log
✔️ ded14fc #5 2025-06-09 14:57:41 ~13 min linux/x86_64 📦tgz
✔️ ded14fc #5 2025-06-09 15:01:47 ~17 min macos/x86_64 🍎dmg
✔️ ded14fc #5 2025-06-09 15:10:03 ~25 min windows/x86_64 💿exe

Copy link
Member

@caybro caybro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks

@caybro caybro force-pushed the feat/shell-mode-home branch from 971272a to 3fb9f3c Compare June 4, 2025 11:44
@caybro caybro requested a review from a team as a code owner June 4, 2025 11:44
@caybro caybro requested review from Cuteivist and removed request for a team June 4, 2025 11:44
@jrainville jrainville force-pushed the fix/shell-chat-section-load branch from 4b86e25 to ae50745 Compare June 4, 2025 16:27
Base automatically changed from feat/shell-mode-home to master June 6, 2025 09:20
@jrainville jrainville force-pushed the fix/shell-chat-section-load branch from ae50745 to 3f37f24 Compare June 6, 2025 16:48
Fixes #18030

I moved the initialization of the chats to the Nim side. The personal section's chats get loaded on app start now. It will impact the login a little, but not much, since it only loads the model of chats, not messages.

For the image issue, the problem was that the ShellAdaptor didn't have the `chatType` as an `expectedRole`. Same for `onlineStatus`. I guess there is a bug in the SFPM where without the expectedRole, it's undefined at first, but then when you reload the page it works, the bug being that it somehow works on reload.
Changes Item to ChatIte. initItem to initChatItem.
Plus some clean ups to unused imports.
Adds use of `updateRole` to the model to clean up the code.
Adds a test file for the chat Model
@jrainville jrainville force-pushed the fix/shell-chat-section-load branch from 3f37f24 to ded14fc Compare June 9, 2025 14:44
@jrainville jrainville merged commit c742cb3 into master Jun 9, 2025
8 checks passed
@jrainville jrainville deleted the fix/shell-chat-section-load branch June 9, 2025 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Qt6 Shell]: make sure chat section is loaded
4 participants