Skip to content

global config: fix unclickable dom0 file access link#303

Open
Sahilll10 wants to merge 1 commit into
QubesOS:mainfrom
Sahilll10:fix/dom0-link-clickable-clean
Open

global config: fix unclickable dom0 file access link#303
Sahilll10 wants to merge 1 commit into
QubesOS:mainfrom
Sahilll10:fix/dom0-link-clickable-clean

Conversation

@Sahilll10

Copy link
Copy Markdown

The 'Learn about copying to and from dom0' link in the File Access section was not clickable because the parent GtkRadioButton intercepts the click event.

Move the label outside the radio button container so the hyperlink can receive the click event correctly.

Fixes QubesOS/qubes-issues#10743

@ben-grande

Copy link
Copy Markdown

Move the label outside the radio button container so the hyperlink can receive the click event correctly.

Hi. This is not correct. You don't need to move the whole label, just the link to the text above. Have you tested this PR locally? If you haven't, I can guide you on how to do that? Are you running QubesOS? What template are you using for coding?

@Sahilll10 Sahilll10 force-pushed the fix/dom0-link-clickable-clean branch from 21c192c to 5180b89 Compare March 10, 2026 16:11
@Sahilll10

Sahilll10 commented Mar 10, 2026

Copy link
Copy Markdown
Author

Hi @ben-grande

I have updated the fix as you suggested:

  1. kept the descriptive text inside the radio button as copymove_info
  2. extracted only the a href link into a separate GtkLabel (copymove_dom0_link) outside the radio button container.

Ben I don't currently have a dedicated Qubes machine. I'm working on a standard Linux machine for coding currently.
I’m keen to learn the correct workflow and ensure my contributions are properly verified , Please guide me on how to test this feature in QubesOS.

Please Let me know if any further adjustments are required.

@ben-grande

Copy link
Copy Markdown

Ben I don't currently have a dedicated Qubes machine. I'm working on a standard Linux machine for coding currently.

https://doc.qubes-os.org/en/latest/developer/general/developing-gui-applications.html.

I never used it. Give it a try.

@Sahilll10

Sahilll10 commented Mar 10, 2026

Copy link
Copy Markdown
Author

Hi @ben-grande

I have tested locally using the mock Qubes object as per the developer docs

The fix works correctly:

  1. The "Learn about copying to and from dom0." link now appears as a standalone clickable label outside the radio button
    2)GTK correctly receives the click on the standalone copymove_dom0_link label and attempts to open https://www.qubes-os.org/doc/how-to-copy-from-dom0/
  2. The descriptive text remains inside the radio button as copymove_info

Screenshot showing the working link:
Screenshot 2026-03-10 223711

Please let me know if further adjustments are required.

@ben-grande

Copy link
Copy Markdown

Great, now you can see the window. I don't think the link fits well where it is, move it to the first paragraph, at the end, change the text to something like: Copying to and from dom0 is handled differently., with the dot outside of the link.

@Sahilll10 Sahilll10 force-pushed the fix/dom0-link-clickable-clean branch from 5180b89 to dbb4d8b Compare March 11, 2026 13:54
@Sahilll10

Sahilll10 commented Mar 11, 2026

Copy link
Copy Markdown
Author

Hi @ben-grande @marmarta

I have updated as suggested. Moved the link to the end of the first paragraph with the text "Copying to and from dom0 is handled differently" and the dot outside the link.
Tested locally with the mock Qubes object — the link appears correctly in the introductory paragraph, is clickable, and GTK correctly receives the click event and attempts to open the URL.

Screenshot 2026-03-11 191355

Please let me know if further adjustments are required.

@ben-grande

Copy link
Copy Markdown

Ok, now wait a bit. Marta will review when she has time.

@qubesos-bot

Copy link
Copy Markdown

OpenQA test summary

Complete test suite and dependencies: https://openqa.qubes-os.org/tests/overview?distri=qubesos&version=4.3&build=2026031319-4.3-debian&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=2026020304-devel&flavor=update

Failed tests

No failures!

Fixed failures

Compared to: https://openqa.qubes-os.org/tests/166096#dependencies
Nothing fixed

Unstable tests

Details

Performance Tests

Performance degradation:

No issues

Remaining performance tests:

13 tests
  • debian-13-xfce_dom0-dispvm-api (mean:6.539): 78.47 🟢 ( previous job: 79.83, improvement: 98.29%)
  • debian-13-xfce_dom0-dispvm-gui-api (mean:7.827): 93.92 🔻 ( previous job: 92.49, degradation: 101.55%)
  • debian-13-xfce_dom0-dispvm-preload-2-api (mean:3.149): 37.79 🟢 ( previous job: 44.94, improvement: 84.08%)
  • debian-13-xfce_dom0-dispvm-preload-2-delay-0-api (mean:2.917): 35.00 🟢 ( previous job: 41.46, improvement: 84.42%)
  • debian-13-xfce_dom0-dispvm-preload-2-delay-minus-1d2-api (mean:3.307): 39.69 🟢 ( previous job: 47.01, improvement: 84.43%)
  • debian-13-xfce_dom0-dispvm-preload-4-api (mean:2.284): 27.41 🟢 ( previous job: 37.67, improvement: 72.75%)
  • debian-13-xfce_dom0-dispvm-preload-4-delay-0-api (mean:2.809): 33.71 🟢 ( previous job: 36.76, improvement: 91.71%)
  • debian-13-xfce_dom0-dispvm-preload-4-delay-minus-1d2-api (mean:2.441): 29.29 🟢 ( previous job: 37.87, improvement: 77.36%)
  • debian-13-xfce_dom0-dispvm-preload-2-gui-api (mean:4.989): 59.87 🔻 ( previous job: 55.58, degradation: 107.71%)
  • debian-13-xfce_dom0-dispvm-preload-4-gui-api (mean:4.135): 49.62 🔻 ( previous job: 47.73, degradation: 103.97%)
  • debian-13-xfce_dom0-dispvm-preload-6-gui-api (mean:4.198): 50.38 🔻 ( previous job: 47.11, degradation: 106.93%)
  • debian-13-xfce_dom0-vm-api (mean:0.038): 0.45 🔻 ( previous job: 0.41, degradation: 109.93%)
  • debian-13-xfce_dom0-vm-gui-api (mean:0.039): 0.47 🟢 ( previous job: 0.48, improvement: 96.67%)

@marmarek

Copy link
Copy Markdown
Member

PipelineRetry

@codecov

codecov Bot commented Mar 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.98%. Comparing base (d56bb9e) to head (7dae034).
⚠️ Report is 8 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #303      +/-   ##
==========================================
- Coverage   92.99%   92.98%   -0.01%     
==========================================
  Files          64       64              
  Lines       13312    13313       +1     
==========================================
  Hits        12379    12379              
- Misses        933      934       +1     

☔ 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.

@Sahilll10

Copy link
Copy Markdown
Author

@marmarek

The only failing check is codecov/project showing a 0.08% coverage drop. This PR changes only qubes_config/global_config.glade — a GTK XML UI file containing no executable Python code. The 11 additional "uncovered lines" Codecov reports are XML markup being counted incorrectly, not Python logic.
OpenQA ran and reported no failures.

@ben-grande

Copy link
Copy Markdown

The only failing check is codecov/project showing a 0.08% coverage drop.

For PRs like this, codecov/patch is more important.

@marmarta

Copy link
Copy Markdown
Member

This is almost great, but the link is black (probably some CSS issue - I think this is because the text here has color set, which for some GTK-related reason overwrites the link coloring); I think this needs a fix to CSS, too, in particular I think it requires setting link text color to @link-color, currently it's only done for infoboxes (see qubes-global-config-base.css:246):

.info_box link {
    color: @link-color;
}

The 'Copying to and from dom0 is handled differently' link was
inside a GtkRadioButton which intercepted click events.
Move the link to the end of the intro paragraph where it is
clickable regardless of radio button state.

The link appeared black because the explanation class color
overrides GTK's default link color. Add .explanation link rule
to qubes-global-config-base.css following the existing
.info_box link pattern.

Fixes QubesOS/qubes-issues#10743
@Sahilll10 Sahilll10 force-pushed the fix/dom0-link-clickable-clean branch from dbb4d8b to 7dae034 Compare March 18, 2026 20:19
@Sahilll10

Sahilll10 commented Mar 18, 2026

Copy link
Copy Markdown
Author

Hi @marmarta
Added .explanation link { color: @link-color; } to qubes-global-config-base.css following the existing .info_box link pattern at line 246.
The link should now appear in the correct color.

Could you please trigger a pipeline retry?

@marmarta

Copy link
Copy Markdown
Member

Basing on the discussion on the mailing list: was this done by an LLM? If yes, disclosure is missing.

@Sahilll10

Sahilll10 commented Mar 20, 2026

Copy link
Copy Markdown
Author

Basing on the discussion on the mailing list: was this done by an LLM? If yes, disclosure is missing.

Hi @marmarta

As disclosed in the mailing list : “My contributions to QubesOS , running the commands, iterations, fixing the actual bugs are all done by myself and I am confident to explain each and every commit I made”.
I have not used AI in any of the commits in this PR.

Here is the explanation of each line modified/changed in this PR based on my understanding:
Why the radio button blocked clicks?
The link was a GtkLabel with use-markup=True and an <a href> tag inside the radio button container but the GTK's GtkLabel link handling required receiving a button-release-event directly .
Since the parent GtkRadioButton consumed it first moving the label outside the radio button meant no parent widget intercepting the event, so GtkLabel receives it and activates the URI handler.

In global_config.glade — 3 lines changed:
Line 1 (modified):
The first GtkLabel (the intro paragraph) had its label property changed.
The old text ended with Copy/Move to other qube</b>.
The new text adds <a href="https://www.qubes-os.org/doc/how-to-copy-from-dom0/"> Copying to and from dom0 is handled differently</a>. at the end.
This moves the link into the intro paragraph label which is outside any radio button container.

Line 2 (modified):
The copymove_info label inside the radio button had its label property changed.
Old text included the full sentence with the link: " except for dom0, which is handled differently. Learn about copying to and from dom0 . "
The new text is : "You will always be asked for permission when copying and moving files between qubes. The link is removed from here entirely."

Line 3 (modified):
I had to change the packing position of the child from 6 to 7 to adjusts the layout position because the widget structure shifted when the link moved out.

In qubes-global-config-base.css Added these lines :

.explanation link {
    color: @link-color;
}

On digging through I found out that the explanation CSS class has a color property set — GTK's style cascade applies parent color to all children including link pseudo-elements, overriding the theme default. This explicit rule tells GTK to use @link-color for any link inside an explanation-classed widget, same pattern as .info_box link at line 246.

@ben-grande

Copy link
Copy Markdown

PipelineRetryFailed

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.

Qubes Global Config > File Access: "Learn about copying to and from dom0" link unclickable

5 participants