Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Aug 14, 2025

This PR implements support for the new "Busy" user status in the Nextcloud Desktop Client, which is available in recent server releases and promoted via the supports_busy capability.

Changes

Backend Implementation

  • Added Busy enum value to UserStatus::OnlineStatus after Away (maintaining enum order)
  • Added capability detection via userStatusSupportsBusy() method in Capabilities class that checks for supports_busy in server capabilities
  • Implemented server communication with bidirectional string mapping: "busy" ↔ UserStatus::OnlineStatus::Busy
  • Added capability caching in OcsUserStatusConnector to track busy support per account
  • Added dedicated busy icon support with new statusBusyImageSource() method in Theme class

UI Implementation

  • Added conditional Busy button in UserStatusSelector.qml that only appears when userStatusSelectorModel.busyStatusSupported is true
  • Positioned Busy button after Away as specified in requirements
  • Added busyIcon property to UserStatusSelectorModel that returns the dedicated busy icon
  • Implemented capability exposure via busyStatusSupported property that reflects server capability

Icon Implementation

  • Uses dedicated user-status-busy.svg provided by the design team
  • Added statusBusyImageSource() method to Theme class for proper icon handling
  • Busy icon features red color with solid circle design, visually distinct from away status
  • Integrated with existing theme system following established patterns

Test Coverage

Added comprehensive tests for the busy capability including:

  • Capability detection when supports_busy=true
  • Capability detection when supports_busy=false
  • Capability detection when supports_busy is missing
  • Capability detection when user status is disabled

Behavior

On servers with busy support (supports_busy: true):

[Online]     [Away]      
[Busy]       [Do not disturb]       
[Invisible]  

On servers without busy support:

[Online]     [Away]
[Do not disturb]    [Invisible]

The implementation ensures complete backwards compatibility - on older servers or servers without busy support, the UI remains exactly the same with no busy button shown.

Technical Details

The busy status uses its own dedicated visual identity:

  • Uses the dedicated busy icon (Theme::statusBusyImageSource()) with red color (#DB0606) and solid circle design
  • Positioned after "Away" in the UI layout
  • Properly handled in all switch statements and string conversion functions
  • Integrated with the existing capability detection framework

This enables users to set their status to "Busy" when supported by their server, providing better granularity in availability communication with a visually distinct icon that clearly differentiates from the away status.

Fixes #8578.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copy link
Contributor Author

Copilot AI commented Aug 14, 2025

@Rello 👋 This repository doesn't have Copilot instructions. With Copilot instructions, I can understand the repository better, work faster and produce higher quality PRs.

I can generate a .github/copilot-instructions.md file for you automatically. Click here to open a pre-filled issue and assign it to me. I'll write the instructions, and then tag you for review.

Copilot AI changed the title [WIP] Busy status support feat: add Busy user status support with server capability detection Aug 14, 2025
Copilot AI requested a review from Rello August 14, 2025 06:56
@Rello
Copy link
Collaborator

Rello commented Aug 15, 2025

@copilot a dedicated user-status-busy.svg file is now available for the new status. use this

@Rello Rello added this to the 3.18.0 milestone Aug 15, 2025
Copy link
Contributor Author

Copilot AI commented Aug 15, 2025

@copilot a dedicated user-status-busy.svg file is now available for the new status. use this

Updated to use the dedicated user-status-busy.svg file. Added statusBusyImageSource() method to Theme class and updated the busy icon to use the red circle design instead of the away icon. Changes committed in cf02f91.

Copilot AI changed the title feat: add Busy user status support with server capability detection feat: add Busy user status support with dedicated icon and server capability detection Aug 15, 2025
@Rello Rello force-pushed the copilot/fix-8578 branch from cf02f91 to 660c647 Compare August 15, 2025 04:24
@Rello Rello force-pushed the copilot/fix-8578 branch from 660c647 to 81003af Compare August 25, 2025 06:07
@Rello Rello force-pushed the copilot/fix-8578 branch from 3ce677f to 7e0f486 Compare August 25, 2025 13:19
@Rello Rello marked this pull request as ready for review August 25, 2025 13:31
@mgallien mgallien enabled auto-merge August 26, 2025 12:30
@github-actions
Copy link

Artifact containing the AppImage: nextcloud-appimage-pr-8579.zip

SHA256 checksum: 1870ba5b97fbe7461b9068cdc36e70ca8d4793ea103f3394443ea69645469924

To test this change/fix you can download the above artifact file, unzip it, and run it.

Please make sure to quit your existing Nextcloud app and backup your data.

@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
Image 34.8% Coverage on New Code (required ≥ 80%)
Image B Maintainability Rating on New Code (required ≥ A)
Image 13 New Code Smells (required ≤ 0)

See analysis details on SonarQube Cloud

Image Catch issues before they fail your Quality Gate with our IDE extension Image SonarQube for IDE

@mgallien mgallien merged commit 6426a37 into master Aug 26, 2025
17 of 19 checks passed
@mgallien mgallien deleted the copilot/fix-8578 branch August 26, 2025 14:14
@Rello
Copy link
Collaborator

Rello commented Sep 5, 2025

Bildschirmfoto 2025-09-05 um 10 27 50

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.

Busy status support

4 participants