Skip to content

feat(ubuntu): Native Ubuntu GTK4 Port & Background Updates#28

Merged
lfmundim merged 77 commits into
mainfrom
feature/ubuntu-support
Jun 14, 2026
Merged

feat(ubuntu): Native Ubuntu GTK4 Port & Background Updates#28
lfmundim merged 77 commits into
mainfrom
feature/ubuntu-support

Conversation

@lfmundim

Copy link
Copy Markdown
Owner

Overview

This pull request introduces the brand new native Ubuntu GTK4 port of AzPin, achieving feature parity with macOS and Windows.

Key Features

  • Native GTK4 UI: Fully responsive sidebar, dynamic subscription filtering, and real-time azure state polling.
  • In-App Updater: The UpdaterService queries the GitHub Releases API and presents a one-click download button in Settings for .deb updates.
  • Live Background Updates: The application polls azure in the background to ensure the system tray icon submenus are always accurate.

CI/CD

  • Automated the universal nbgv version injection into the Ubuntu Cargo.toml.
  • Both amd64 and arm64 architectures are now automatically built and packaged.
  • Standardized the output artifact names: AzPin-Ubuntu-x64-v{version}.deb and AzPin-Ubuntu-arm64-v{version}.deb.

Documentation

  • Added the necessary sections to README.md and CHANGELOG.md covering Ubuntu installation and dependencies.

lfmundim added 30 commits June 10, 2026 16:51
@codecov

codecov Bot commented Jun 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.21%. Comparing base (812089d) to head (a2987b9).
⚠️ Report is 16 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #28   +/-   ##
=======================================
  Coverage   98.21%   98.21%           
=======================================
  Files          15       15           
  Lines         674      674           
=======================================
  Hits          662      662           
  Misses         12       12           

☔ View full report in Codecov by Harness.
📢 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.

lfmundim and others added 21 commits June 11, 2026 16:12
- Add snapcraft.yaml manifest for the Ubuntu Rust/GTK4 app
- Configure snapcore/action-build and action-publish in GitHub Actions
- Map existing SVG icon to the Snap package
- Add manual permission instructions for dot-azure plug in README
- Security: PermissionsService now calls ARM permissions endpoint and
  evaluates wildcard patterns (exact, *, trailing /*). Action buttons
  only shown after permissions confirmed; fail-safe (no buttons) until
  first poll cycle completes.
- Fix: az CLI token expiry parsing handles 2.x datetime format
  ("YYYY-MM-DD HH:MM:SS.ffffff") — tokens no longer hardcode 1-hour TTL.
- Fix: all az CLI calls converted to tokio::process::Command (async);
  TokenCache::get_valid_token and ArmService::get_auth_header made async.
- Fix: menu() performs no I/O — account info and permissions read from
  caches populated by async polling loop (Issues 5, 6).
- Fix: single `updated` flag in polling loop — tray refreshes on RG
  content load, not only on state changes (Issue 6).
- Fix: Quit sends through GTK channel to app.quit() instead of
  std::process::exit(0) — SQLite WAL flushed cleanly (Issue 7).
- Fix: emoji (✅ ⚠️ 🟢 🔴 ⚪) replaced with Unicode geometric symbols
  (▶ ■ … ○) per spec (Issue 8).
- Refactor: is_runnable() extracted to utils/resource_type.rs; covers 5
  types including microsoft.web/sites/slots; all inline checks removed.
- Refactor: ResourceState typed enum replaces HashMap<String, String>
  state cache.
- Refactor: portal URLs centralized in utils/portal_url.rs.
- Refactor: icon_mapper uses exact type matching instead of contains().
- Model: ArmResource gains tags field; PinnedResourceGroup gains
  subscription_display_name with automatic DB column migration.
- Tests: resource_type, portal_url, az_cli expiry, permissions wildcard,
  token_cache validity.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ourceGroup literal

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…I steps

Handle::current() panics inside std::thread::spawn — no Tokio context
on the spawned OS thread. Capture handle once in MainWindow::new (called
from GTK callback which runs inside the Tokio runtime) and clone into
each thread closure. Fixes subscriptions never loading in the UI.

Also comment out snap build/publish steps until Snap Store completes
manual review of first submission.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
E0382: tokio_handle moved into the first spawned closure, then reused
by two later closures. Clone the handle outside each move closure so
every consumer owns its own copy. Also adds the missing CHANGELOG
entry for the loading-subscriptions fix.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…pins, GNOME pin icon

- Tray menu: state glyphs (play/stop/ellipsis) moved from resource name
  to the action items themselves; names render plain.
- Browse list: pinning a resource group hides the pin buttons on its
  resources (group pin covers them); unpinning shows them again.
- Pin toggle buttons use view-pin-symbolic instead of
  bookmark-new-symbolic, which rendered as a bookmark.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
az account show returns user.name (e.g. mundim@tableside.dev); parse it
into AzSubscription via new optional AzUser field and render the tray
account row as "✓ user@domain", falling back to the subscription name
when the field is absent. Matches the macOS menubar app.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
When an update is available, the Updates tab now shows
"sudo snap refresh azpin" with a copy-to-clipboard button next to the
existing release-page download button (snap package name from
snapcraft.yaml).

Also fixes handler stacking: Download Update connected a new clicked
handler on every check, so repeated checks opened multiple tabs. The
handler is now connected once and reads the latest release URL from a
shared cell.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Lists every az CLI invocation and ARM endpoint the app performs across
macOS, Windows, and Ubuntu, with exact commands/requests, api-versions,
per-type action mappings, permission gating behavior, and links to the
single service file responsible per platform. Prefaced with the audit
posture: no auth handled by the app, tokens come from the user's
az login session, start/stop/restart are the only writes.

CLAUDE.md gains a hard constraint: any added or changed Azure
interaction must update AZURE.md in the same change. README links the
new doc in Key Docs.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Snap Store manual review of the first submission is complete; restore
the Inject Snap Version / Build Snap / Publish Snap steps on both
amd64 and arm64 jobs, identical to their pre-disable form.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@lfmundim lfmundim merged commit 3e14181 into main Jun 14, 2026
3 checks passed
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.

1 participant