Skip to content

Fix stale state, sync races and review nits from ultrareview - #30

Merged
mendescotta merged 2 commits into
mainfrom
fix/ultrareview-findings
Oct 26, 2026
Merged

mendescotta merged 2 commits into
mainfrom
fix/ultrareview-findings

Conversation

@mendescotta

Copy link
Copy Markdown
Owner

Fixes the 2 bugs and 7 nits from an ultrareview of d1d5bb8..main.

Bugs

  • Stale details pane after reload. A reload replaces every list item without a selection-changed signal, so the inspector kept the pre-reload package (e.g. still offering Remove after a force-remove). The pane now re-reads the selected package when loading finishes, or clears if it is gone.
  • Actions during the launch sync. The silent launch SYNC set no busy state, so marking a package re-enabled Apply and a transaction could be previewed against the index the sync was replacing. A syncing flag now joins action_busy/is_loading in one actions_blocked guard used by Apply, reinstall, full upgrade, force-remove and run_maintenance_command (the choke point for every one-off helper command). Blocked commands show a toast. Marks stay editable.

Nits

  • Force-remove: a failed reverse-dependency check is shown as "could not check" instead of "no other installed package depends on it". It warns rather than refuses, since force removal is the recovery path when the package database is unhealthy.
  • Startup tracing: trace writes with writeln! and ignores errors, so a closed stderr cannot panic a reload; costly trace arguments and the frame callback run only when tracing is enabled.
  • Narrow layout: a column toggled in the popover while narrow keeps that choice when the window widens. The saved-columns RefCell is no longer borrowed across set_visible, whose two-way binding fires the toggle handler synchronously.
  • install.sh --uninstall: accepts an older absolute PREFIX so a previous /usr/local install can be removed; relative and ./.. paths are still refused, and installs still require /usr. README notes it.
  • Discover: marks are refreshed for catalog apps only (new states_and_marks_of in both backends), and cards/app page re-render only when a catalog app actually changed. An app-page action refills the page once.
  • Sidebar: removes dead set_ellipsize calls; the effective mode at each site is unchanged.

Validation

  • cargo fmt --check, cargo clippy --all-targets -- -D warnings, cargo test
  • clippy with --features adwaita; clippy and tests with --no-default-features --features apk
  • GTK smoke test (--ignored --test-threads=1), extended with narrow-mode column cases
  • scripts/audit.sh; scripts/test-install-prefix.py (new uninstall cases), test-user-install.py, test-release-lookup.py

New unit tests cover force-remove heading wording and Discover change detection. The details-pane refresh and sync gating are window wiring without automated coverage.

- Re-read the inspected package after every reload so the details pane
  never offers actions for a package that changed or disappeared.
- Treat a repository SYNC as busy: Apply, reinstall, upgrade, force-remove
  and one-off helper commands wait for it instead of previewing against
  the index it is replacing. Blocked commands explain why.
- Force-remove reports a failed reverse-dependency check as unknown rather
  than "no other installed package depends on it".
- Startup tracing ignores stderr write errors and skips its list walk and
  frame callback when disabled.
- Column choices made while narrow survive widening; never hold the
  saved-columns borrow across set_visible.
- install.sh --uninstall accepts an older absolute PREFIX (still rejecting
  relative and dot paths); installs still require /usr.
- Discover refreshes marks only for catalog apps and only re-renders when
  one changed; an app-page action refills the page once.
- Drop dead set_ellipsize calls in the sidebar.
@github-advanced-security

Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

@mendescotta
mendescotta merged commit f41b3af into main Oct 26, 2026
6 checks passed
@mendescotta
mendescotta deleted the fix/ultrareview-findings branch October 26, 2026 14:16
mendescotta added a commit that referenced this pull request Oct 30, 2026
* Fix stale state, sync races and review nits from ultrareview

- Re-read the inspected package after every reload so the details pane
  never offers actions for a package that changed or disappeared.
- Treat a repository SYNC as busy: Apply, reinstall, upgrade, force-remove
  and one-off helper commands wait for it instead of previewing against
  the index it is replacing. Blocked commands explain why.
- Force-remove reports a failed reverse-dependency check as unknown rather
  than "no other installed package depends on it".
- Startup tracing ignores stderr write errors and skips its list walk and
  frame callback when disabled.
- Column choices made while narrow survive widening; never hold the
  saved-columns borrow across set_visible.
- install.sh --uninstall accepts an older absolute PREFIX (still rejecting
  relative and dot paths); installs still require /usr.
- Discover refreshes marks only for catalog apps and only re-renders when
  one changed; an app-page action refills the page once.
- Drop dead set_ellipsize calls in the sidebar.

* Configure GitHub security checks
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.

2 participants