Skip to content

feat(settings): add a Diagnostics page that checks runtime dependencies - #1735

Merged
l0gicgate merged 4 commits into
mainfrom
feat/1734-settings-diagnostics
Oct 17, 2026
Merged

l0gicgate merged 4 commits into
mainfrom
feat/1734-settings-diagnostics

Conversation

@l0gicgate

@l0gicgate l0gicgate commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Description

Adds Settings → Diagnostics, so users and maintainers can find out why previews, thumbnails, network locations, drives or desktop integration don't work. Nothing runs until Run is selected, and no check changes or installs anything.

Where possible a check runs the feature itself instead of looking for a binary. It renders a sample image through a one-shot bubblewrap sandbox and through the pooled workers, a sample PDF and a one-second video through the same thumbnail path as the file list, and reads FFprobe metadata for a sample WAV. It also tests the HTTPS connection to the update server through api.github.com/rate_limit, which doesn't count against the rate limit. The remaining checks cover sandbox helper tools (looked up on the sandbox's build-time PATH, not the user's), GStreamer audio elements and sink, GVfs and the SFTP/SMB/FTP/WebDAV/MTP/AFC/gphoto2 backends, UDisks2 and the volume monitor, xdg-desktop-portal, Secret Service, folder monitoring and the inotify limit, the terminal, GtkSourceView language data, the MIME database, RAR support and custom actions.

Results stream in as each check finishes, below a compact System box with the version and environment details. Each result is marked passed, warning or problem, says what is affected and, when it knows the package, shows an install command for the distribution detected from os-release. The command can be copied or run in the user's terminal with its play button; the words are passed as arguments rather than through a shell, and the terminal stays open until Enter is pressed. Copy report copies everything, with version, installation method, toolkit, GStreamer, kernel, desktop, display server and renderer, for bug reports. The bug report form gets an optional field for it.

Developer notes are in docs/diagnostics.md. All strings are translated into the 11 supported languages.

Visual evidence

screenrecording-2026-10-17_15-29-09.mp4

How to test

  1. Open Settings and select Diagnostics in the sidebar.
  2. Select Run.
  3. Uninstall an optional tool such as ffmpegthumbnailer or squashfs-tools (or start Strata with GIO_USE_VFS=local), then select Run again.
  4. Select the play button in the install command for the missing tool.
  5. Select Copy report and paste it into a text editor.

Expected result: Every row moves from "Checking…" to a result within a few seconds, and the summary shows the counts. On a complete install, the sandbox, worker, PDF, video and audio rows pass. A missing tool shows a warning with an install command for your distribution, and GIO_USE_VFS=local shows the GVfs problem, with the remote backends reported as unavailable. The play button opens your terminal running the install command, which waits for Enter before closing. The pasted report lists the environment details shown in the System box and every result grouped by section.

Related issue

Closes #1734

Settings → Diagnostics runs on-demand checks of the components Strata
relies on but does not link against. Where possible it exercises the
feature itself: sample image, PDF, video and audio files go through the
real preview sandbox and worker pool, and the update server connection
is tested. It also checks sandbox helper tools, GStreamer audio output,
GVfs and its remote and device backends, UDisks2, the desktop portal,
Secret Service, folder monitoring, the terminal, syntax highlighting
data, the MIME database and custom actions.

Each result shows what is affected and, when known, the install command
for the detected distribution. Copy report copies the results with
version and environment details for bug reports.

Refs #1734
…gnostics

Place the Copy report and Run buttons below the description, styled
like the desktop integration actions with Run as the primary action.
A compact System box above the results shows the version and
environment details the report includes.

Install commands get a play button that runs them in the user's
terminal. The command words are passed as arguments rather than
through a shell, and the window stays open until Enter is pressed.

Refs #1734
Expose workers_supported directly instead of wrapping it, and remove a
test whose assertions only restated one-line status mappings.

Refs #1734
@l0gicgate

Copy link
Copy Markdown
Contributor Author

Review

Merged main (f9301e55) without conflicts. I found nothing that blocks merge.

What I checked

  • Running install commands: package names go through PackageManager::install_command's allowlist (alphanumerics plus .+_-), and the words reach sh -c only as positional arguments, so no shell parsing happens. install_commands_run_as_arguments_and_wait_before_closing covers this.
  • Threads: the language manager, folder monitor and actions catalog run on the GTK thread. Workers send through an mpsc channel, and the timer polling it holds only a weak reference to the page, so closing Settings mid-run drops the receiver cleanly. actions::shared().reload() notifies listeners only when the catalog actually changed.
  • Eager page build: diagnostics_page() only builds widgets and probes nothing until Run, so it doesn't conflict with the lazy-page rule for Updates.
  • Sample files: the Y4M frame sizes (4:2:0, 32×32) and the WAV header are correct. sample_documents_render_through_the_preview_helper confirms that the PNG and PDF samples render.
  • Translations: the i18n catalog coverage and interpolation tests pass for all 11 locales.

Changes in d4540c1

  • Removed sandbox::browser::workers_available(), a documented one-line wrapper. workers_supported() is now pub(crate) and called directly.
  • Removed single_value_checks_map_their_input. Its assertions only repeated one-line status mappings (rar_archives(false) → Warning, terminal(None) → TerminalMissing and so on). The table tests for sandbox, video, media, audio, GVfs, bus, monitoring and actions decisions are kept.
  • Corrected the row_text test helper's doc comment, which didn't mention the fix flag it returns.

Comment audit: I read every added comment. The rest explain non-obvious constraints: GTK-thread-only probes, the rate-limit-free endpoint, the sandbox path lookup, the reasoning behind the positional arguments, and the GROUPS invariant.

Local verification (scoped: this PR touches no shared infrastructure):

  • ./scripts/test-headless.py -- diagnostics:: settings:: i18n:: sandbox::: 156 passed, 0 failed
  • cargo fmt --all --check, cargo clippy --all-targets --all-features -- -D warnings and git diff --check: all clean
  • No manual UI run. The review changed no UI, and the PR's own captures cover the page.

CI: all required checks pass on d4540c1.

Still open: the visual evidence in the PR description has to be uploaded through the GitHub editor.

@l0gicgate
l0gicgate merged commit 30a1603 into main Oct 17, 2026
12 checks passed
@l0gicgate
l0gicgate deleted the feat/1734-settings-diagnostics branch October 17, 2026 21:50
l0gicgate added a commit that referenced this pull request Oct 20, 2026
…ompat-followups

Resolves the catalog, services, preview test, context menu, theme and
typed-navigation conflicts, and adapts what main added since the fork to
this branch's rules:

- The user stylesheet (#1758) is watched through the monitors worker and
  re-read off the UI thread.
- The Diagnostics page (#1735) and the Integrations page (#1748) detect
  the package manager and resolve the terminal off the UI thread; the
  Run-in-terminal button spawns through the reaper closure.
- Connect to server (#1726) waits for a native path's asynchronous
  validation instead of pinning and closing at once.
- The pinned-places tests read the GTK bookmarks file through
  adapters::bookmarks after the settings writer settles.
- Traditional Chinese (#1745) gets the strings this branch adds.
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.

feat(settings): add a Diagnostics page that checks runtime dependencies

1 participant