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

Settings applications tab #412

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

alimirjamali
Copy link
Contributor

@alimirjamali alimirjamali commented Mar 7, 2025

This PR contains 3 individual commits:

  1. Fix for Drag-and-Drop in Qubes VM Settings GUI -> Applications tab
  2. PyQt bindings for QImage tinting
  3. Icons for Qubes VM Settings GUI -> Applications tab

fixes: QubesOS/qubes-issues#9829

The existing patch failed, most probably during migration to PyQt6
Switch from `.ident` property to `.whatsThis()` and `.setWhatsThis()`
Since PyQt6.QtGui.QImage does not provide tinting and the available
effects from `QPainter` does not produce the same result, a helper
function is necessary.
@marmarek
Copy link
Member

marmarek commented Mar 8, 2025

This likely needs --enablerepo flag like here: QubesOS/qubes-core-admin-client@c3759ad

@alimirjamali alimirjamali force-pushed the settings_applications_tab branch from ebaf466 to a6a0b80 Compare March 8, 2025 00:38
@alimirjamali
Copy link
Contributor Author

alimirjamali commented Mar 8, 2025

This likely needs --enablerepo flag like here: QubesOS/qubes-core-admin-client@c3759ad

Did not work

p.s. Trying to fetch it from source.

@qubesos-bot
Copy link

qubesos-bot commented Mar 8, 2025

OpenQA test summary

Complete test suite and dependencies: https://openqa.qubes-os.org/tests/overview?distri=qubesos&version=4.3&build=2025031004-4.3&flavor=pull-requests

Test run included the following:

New failures, excluding unstable

Compared to: https://openqa.qubes-os.org/tests/overview?distri=qubesos&version=4.3&build=2025021804-4.3&flavor=update

Failed tests

32 failures
  • system_tests_whonix

    • whonixcheck: fail (unknown)
      Whonixcheck for anon-whonix failed...

    • whonixcheck: unnamed test (unknown)

    • whonixcheck: fail (unknown)
      Whonixcheck for whonix-gateway-17 failed...

    • whonixcheck: unnamed test (unknown)

    • whonixcheck: fail (unknown)
      Whonixcheck for sys-whonix failed...

    • whonixcheck: unnamed test (unknown)

    • whonixcheck: fail (unknown)
      Whonixcheck for whonix-workstation-17 failed...

    • whonixcheck: unnamed test (unknown)

  • system_tests_suspend

    • suspend: unnamed test (unknown)
    • suspend: Failed (test died)
      # Test died: no candidate needle with tag(s) 'SUSPEND-FAILED' match...
  • system_tests_splitgpg

  • system_tests_qrexec

  • system_tests_kde_gui_interactive

    • simple_gui_apps: unnamed test (unknown)

    • simple_gui_apps: Failed (test died)
      # Test died: no candidate needle with tag(s) 'vm-settings-app-evinc...

    • simple_gui_apps: unnamed test (unknown)

  • system_tests_whonix@hw7

    • whonixcheck: fail (unknown)
      Whonixcheck for anon-whonix failed...

    • whonixcheck: unnamed test (unknown)

    • whonixcheck: fail (unknown)
      Whonixcheck for whonix-gateway-17 failed...

    • whonixcheck: unnamed test (unknown)

    • whonixcheck: fail (unknown)
      Whonixcheck for sys-whonix failed...

    • whonixcheck: unnamed test (unknown)

    • whonixcheck: fail (unknown)
      Whonixcheck for whonix-workstation-17 failed...

    • whonixcheck: unnamed test (unknown)

  • system_tests_basic_vm_qrexec_gui_btrfs

    • TC_03_QvmRevertTemplateChanges: test_000_revert_linux (error)
      subprocess.CalledProcessError: Command '['sha1sum', '/var/lib/qubes...
  • system_tests_suspend@hw1

    • suspend: unnamed test (unknown)
    • suspend: Failed (test died)
      # Test died: no candidate needle with tag(s) 'SUSPEND-FAILED' match...
  • system_tests_extra

Fixed failures

Compared to: https://openqa.qubes-os.org/tests/129058#dependencies

8 fixed
  • system_tests_whonix

  • system_tests_qrexec

  • system_tests_kde_gui_interactive

    • clipboard_and_web: unnamed test (unknown)
    • clipboard_and_web: Failed (test died)
      # Test died: no candidate needle with tag(s) 'clipboard-paste-notif...
  • system_tests_audio

  • system_tests_whonix@hw7

Unstable tests

Performance Tests

Performance degradation:

28 performance degradations
  • dom0_root_seq1m_q8t1_read 3:read_bandwidth_kb: 244937.00 :small_red_triangle_up: ( previous job: 486352.00, degradation: 50.36%)
  • dom0_root_seq1m_q8t1_write 3:write_bandwidth_kb: 208754.00 :small_red_triangle_up: ( previous job: 276742.00, degradation: 75.43%)
  • dom0_root_seq1m_q1t1_read 3:read_bandwidth_kb: 59601.00 :small_red_triangle_up: ( previous job: 423495.00, degradation: 14.07%)
  • dom0_root_seq1m_q1t1_write 3:write_bandwidth_kb: 88041.00 :small_red_triangle_up: ( previous job: 185030.00, degradation: 47.58%)
  • fedora-41-xfce_root_rnd4k_q32t1_write 3:write_bandwidth_kb: 3051.00 :small_red_triangle_up: ( previous job: 3785.00, degradation: 80.61%)
  • fedora-41-xfce_private_rnd4k_q32t1_read 3:read_bandwidth_kb: 79056.00 :small_red_triangle_up: ( previous job: 87999.00, degradation: 89.84%)
  • fedora-41-xfce_private_rnd4k_q32t1_write 3:write_bandwidth_kb: 3156.00 :small_red_triangle_up: ( previous job: 3885.00, degradation: 81.24%)
  • fedora-41-xfce_private_rnd4k_q1t1_write 3:write_bandwidth_kb: 1022.00 :small_red_triangle_up: ( previous job: 1613.00, degradation: 63.36%)
  • fedora-41-xfce_volatile_seq1m_q8t1_read 3:read_bandwidth_kb: 341222.00 :small_red_triangle_up: ( previous job: 392725.00, degradation: 86.89%)
  • fedora-41-xfce_volatile_rnd4k_q32t1_write 3:write_bandwidth_kb: 2308.00 :small_red_triangle_up: ( previous job: 3959.00, degradation: 58.30%)
  • fedora-41-xfce_volatile_rnd4k_q1t1_write 3:write_bandwidth_kb: 1844.00 :small_red_triangle_up: ( previous job: 2693.00, degradation: 68.47%)
  • debian-12-xfce_exec: 8.37 :small_red_triangle_up: ( previous job: 7.15, degradation: 117.01%)
  • debian-12-xfce_exec-data-simplex: 72.77 :small_red_triangle_up: ( previous job: 48.93, degradation: 148.73%)
  • debian-12-xfce_exec-data-duplex: 67.40 :small_red_triangle_up: ( previous job: 50.76, degradation: 132.77%)
  • debian-12-xfce_exec-data-duplex-root: 85.22 :small_red_triangle_up: ( previous job: 64.91, degradation: 131.30%)
  • debian-12-xfce_socket-data-duplex: 162.33 :small_red_triangle_up: ( previous job: 81.49, degradation: 199.21%)
  • fedora-41-xfce_exec-data-simplex: 66.12 :small_red_triangle_up: ( previous job: 49.65, degradation: 133.18%)
  • fedora-41-xfce_exec-data-duplex: 66.77 :small_red_triangle_up: ( previous job: 49.08, degradation: 136.04%)
  • fedora-41-xfce_exec-data-duplex-root: 92.61 :small_red_triangle_up: ( previous job: 81.65, degradation: 113.42%)
  • fedora-41-xfce_socket-data-duplex: 153.65 :small_red_triangle_up: ( previous job: 78.62, degradation: 195.42%)
  • whonix-gateway-17_exec-data-simplex: 59.47 :small_red_triangle_up: ( previous job: 48.76, degradation: 121.95%)
  • whonix-gateway-17_exec-data-duplex: 78.68 :small_red_triangle_up: ( previous job: 48.55, degradation: 162.04%)
  • whonix-gateway-17_exec-data-duplex-root: 93.82 :small_red_triangle_up: ( previous job: 70.13, degradation: 133.79%)
  • whonix-gateway-17_socket-data-duplex: 163.34 :small_red_triangle_up: ( previous job: 82.74, degradation: 197.41%)
  • whonix-workstation-17_exec-data-simplex: 64.19 :small_red_triangle_up: ( previous job: 47.01, degradation: 136.52%)
  • whonix-workstation-17_exec-data-duplex: 72.97 :small_red_triangle_up: ( previous job: 49.48, degradation: 147.48%)
  • whonix-workstation-17_exec-data-duplex-root: 99.46 :small_red_triangle_up: ( previous job: 79.93, degradation: 124.43%)
  • whonix-workstation-17_socket-data-duplex: 162.49 :small_red_triangle_up: ( previous job: 81.71, degradation: 198.86%)

Remaining performance tests:

44 tests
  • dom0_root_rnd4k_q32t1_read 3:read_bandwidth_kb: 100592.00 :small_red_triangle_up: ( previous job: 100699.00, degradation: 99.89%)
  • dom0_root_rnd4k_q32t1_write 3:write_bandwidth_kb: 7527.00 :green_circle: ( previous job: 3277.00, improvement: 229.69%)
  • dom0_root_rnd4k_q1t1_read 3:read_bandwidth_kb: 12093.00 :green_circle: ( previous job: 10163.00, improvement: 118.99%)
  • dom0_root_rnd4k_q1t1_write 3:write_bandwidth_kb: 4856.00 :green_circle: ( previous job: 282.00, improvement: 1721.99%)
  • dom0_varlibqubes_seq1m_q8t1_read 3:read_bandwidth_kb: 495780.00 :green_circle: ( previous job: 475329.00, improvement: 104.30%)
  • dom0_varlibqubes_seq1m_q8t1_write 3:write_bandwidth_kb: 273066.00 :green_circle: ( previous job: 95209.00, improvement: 286.81%)
  • dom0_varlibqubes_seq1m_q1t1_read 3:read_bandwidth_kb: 438001.00 :green_circle: ( previous job: 433474.00, improvement: 101.04%)
  • dom0_varlibqubes_seq1m_q1t1_write 3:write_bandwidth_kb: 184287.00 :green_circle: ( previous job: 164133.00, improvement: 112.28%)
  • dom0_varlibqubes_rnd4k_q32t1_read 3:read_bandwidth_kb: 106824.00 :green_circle: ( previous job: 99808.00, improvement: 107.03%)
  • dom0_varlibqubes_rnd4k_q32t1_write 3:write_bandwidth_kb: 9098.00 :green_circle: ( previous job: 8767.00, improvement: 103.78%)
  • dom0_varlibqubes_rnd4k_q1t1_read 3:read_bandwidth_kb: 7600.00 :green_circle: ( previous job: 7053.00, improvement: 107.76%)
  • dom0_varlibqubes_rnd4k_q1t1_write 3:write_bandwidth_kb: 3803.00 :small_red_triangle_up: ( previous job: 3868.00, degradation: 98.32%)
  • fedora-41-xfce_root_seq1m_q8t1_read 3:read_bandwidth_kb: 387930.00 :small_red_triangle_up: ( previous job: 396586.00, degradation: 97.82%)
  • fedora-41-xfce_root_seq1m_q8t1_write 3:write_bandwidth_kb: 282940.00 :green_circle: ( previous job: 99783.00, improvement: 283.56%)
  • fedora-41-xfce_root_seq1m_q1t1_read 3:read_bandwidth_kb: 320469.00 :small_red_triangle_up: ( previous job: 343795.00, degradation: 93.22%)
  • fedora-41-xfce_root_seq1m_q1t1_write 3:write_bandwidth_kb: 54193.00 :green_circle: ( previous job: 44770.00, improvement: 121.05%)
  • fedora-41-xfce_root_rnd4k_q32t1_read 3:read_bandwidth_kb: 92146.00 :green_circle: ( previous job: 86742.00, improvement: 106.23%)
  • fedora-41-xfce_root_rnd4k_q1t1_read 3:read_bandwidth_kb: 8728.00 :green_circle: ( previous job: 8623.00, improvement: 101.22%)
  • fedora-41-xfce_root_rnd4k_q1t1_write 3:write_bandwidth_kb: 1545.00 :green_circle: ( previous job: 1126.00, improvement: 137.21%)
  • fedora-41-xfce_private_seq1m_q8t1_read 3:read_bandwidth_kb: 384093.00 :small_red_triangle_up: ( previous job: 401907.00, degradation: 95.57%)
  • fedora-41-xfce_private_seq1m_q8t1_write 3:write_bandwidth_kb: 147360.00 :green_circle: ( previous job: 116848.00, improvement: 126.11%)
  • fedora-41-xfce_private_seq1m_q1t1_read 3:read_bandwidth_kb: 330781.00 :small_red_triangle_up: ( previous job: 357875.00, degradation: 92.43%)
  • fedora-41-xfce_private_seq1m_q1t1_write 3:write_bandwidth_kb: 50945.00 :green_circle: ( previous job: 41375.00, improvement: 123.13%)
  • fedora-41-xfce_private_rnd4k_q1t1_read 3:read_bandwidth_kb: 7980.00 :small_red_triangle_up: ( previous job: 8744.00, degradation: 91.26%)
  • fedora-41-xfce_volatile_seq1m_q8t1_write 3:write_bandwidth_kb: 189167.00 :green_circle: ( previous job: 139933.00, improvement: 135.18%)
  • fedora-41-xfce_volatile_seq1m_q1t1_read 3:read_bandwidth_kb: 307410.00 :green_circle: ( previous job: 294875.00, improvement: 104.25%)
  • fedora-41-xfce_volatile_seq1m_q1t1_write 3:write_bandwidth_kb: 126235.00 :green_circle: ( previous job: 78093.00, improvement: 161.65%)
  • fedora-41-xfce_volatile_rnd4k_q32t1_read 3:read_bandwidth_kb: 81383.00 :green_circle: ( previous job: 71108.00, improvement: 114.45%)
  • fedora-41-xfce_volatile_rnd4k_q1t1_read 3:read_bandwidth_kb: 8338.00 :small_red_triangle_up: ( previous job: 8408.00, degradation: 99.17%)
  • debian-12-xfce_exec-root: 29.21 :small_red_triangle_up: ( previous job: 27.97, degradation: 104.45%)
  • debian-12-xfce_socket: 9.11 :small_red_triangle_up: ( previous job: 8.33, degradation: 109.38%)
  • debian-12-xfce_socket-root: 9.02 :small_red_triangle_up: ( previous job: 8.20, degradation: 109.95%)
  • fedora-41-xfce_exec: 9.39 :small_red_triangle_up: ( previous job: 9.13, degradation: 102.76%)
  • fedora-41-xfce_exec-root: 61.54 :small_red_triangle_up: ( previous job: 61.17, degradation: 100.61%)
  • fedora-41-xfce_socket: 8.10 🟢 ( previous job: 8.66, improvement: 93.55%)
  • fedora-41-xfce_socket-root: 8.94 :small_red_triangle_up: ( previous job: 8.61, degradation: 103.89%)
  • whonix-gateway-17_exec: 6.56 🟢 ( previous job: 7.87, improvement: 83.44%)
  • whonix-gateway-17_exec-root: 40.25 :small_red_triangle_up: ( previous job: 38.36, degradation: 104.92%)
  • whonix-gateway-17_socket: 7.39 🟢 ( previous job: 7.54, improvement: 97.92%)
  • whonix-gateway-17_socket-root: 8.70 :small_red_triangle_up: ( previous job: 8.27, degradation: 105.15%)
  • whonix-workstation-17_exec: 8.66 :small_red_triangle_up: ( previous job: 8.23, degradation: 105.24%)
  • whonix-workstation-17_exec-root: 55.52 :small_red_triangle_up: ( previous job: 52.56, degradation: 105.62%)
  • whonix-workstation-17_socket: 8.74 :small_red_triangle_up: ( previous job: 8.21, degradation: 106.50%)
  • whonix-workstation-17_socket-root: 8.57 :small_red_triangle_up: ( previous job: 8.20, degradation: 104.56%)

Copy link

codecov bot commented Mar 8, 2025

Codecov Report

Attention: Patch coverage is 84.00000% with 8 lines in your changes missing coverage. Please review.

Project coverage is 68.50%. Comparing base (6bdf5bd) to head (52f6879).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
qubesmanager/appmenu_select.py 78.37% 8 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #412      +/-   ##
==========================================
+ Coverage   68.33%   68.50%   +0.16%     
==========================================
  Files          17       17              
  Lines        3708     3762      +54     
==========================================
+ Hits         2534     2577      +43     
- Misses       1174     1185      +11     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@alimirjamali
Copy link
Contributor Author

OK. Unittests & Pylint are finally green (after hamnering my way to installing qubesimgconverter). The OpenQA installedTest fails most probably because of the icons.

@marmarek
Copy link
Member

marmarek commented Mar 8, 2025

system_tests_gui_interactive@hw1

* simple_gui_apps: [unnamed test](https://openqa.qubes-os.org/tests/131583#step/simple_gui_apps/19) (unknown)

* simple_gui_apps: [Failed](https://openqa.qubes-os.org/tests/131583#step/simple_gui_apps/20) (test died)
  `# Test died: no candidate needle with tag(s) 'vm-settings-app-xterm...`

Yes, all of those are due to different appearance of the applications tab. If Marta says she likes it, I'll adjust base screenshots ("needles"), unfortunately there is no easy way to do that for external contributors.

Comment on lines +119 to +126
template_icons_path = path.join(
path.expanduser("~"),
".local",
"share",
"qubes-appmenus",
f"{main_template}",
"apps.tempicons",
)
Copy link
Member

Choose a reason for hiding this comment

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

Wouldn't it be better to extend qvm-appmenus to print the path too? Maybe add some "field" like OriginalIconPath?
Especially, the current implementation doesn't handle applications installed in the AppVM itself (you can put applications into ~/.local/share/applications and they will be available same as those in /usr/share/applications in the template).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Wouldn't it be better to extend qvm-appmenus to print the path too? Maybe add some "field" like OriginalIconPath? Especially, the current implementation doesn't handle applications installed in the AppVM itself (you can put applications into ~/.local/share/applications and they will be available same as those in /usr/share/applications in the template).

Yes. It does not work with icons for flatpak, snap and similar cases (will show the VM's label icon instead). But the fix for qvm-appmenus will be for desktop-linux-common repository. I suggest we leave this for a supplementary PR. After qvm-appemnus is patched to provide OriginalIconPath, I will come back and fix it here as well. This PR is already long and complex and I want to work on the pending Qube Comment PRs as well (after some of the pending PRs are concluded).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

P.S. One more consideration. The GUIVM icons in ~/.local/share/qubes-appmenus/VMNAME/apps.icons provided via qvm-appmenus are already tinted (applicable for Qube specific Flatpak, Snap, ...). And we have to consider this as well if we ever want to patch qvm-appmenus to provide real original icon.

Copy link
Member

Choose a reason for hiding this comment

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

The GUIVM icons in ~/.local/share/qubes-appmenus/VMNAME/apps.icons

Yes, but there is also apps.tempicons dir, similar to icons from the template.

The current patch adds regular tinted icons. Option for fade in/out to
regular images (not tinted) icons on mouse hover is on TODO list.

fixes: QubesOS/qubes-issues#9829
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Applications icons to Qubes VM Settings GUI
3 participants