30 Commits

Author SHA1 Message Date
michael
0d99498c26 style(gui): rustfmt collapse QR QrCode::new line in totp_page 2026-04-27 12:20:47 -07:00
michael
8060364973 feat(gui): TOTP tab with QR code modal + revoke (feature-gated) 2026-04-27 12:10:54 -07:00
michael
30e36ccf5d chore: add totp feature gate (default-on) + data-encoding + qrcode deps
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-27 12:06:05 -07:00
michael
c64068c4b5 Merge branch 'feature/phase-10-firstrun' 2026-04-27 12:05:18 -07:00
michael
0dd4aaf082 docs(gui): VM smoke recipe for the first-run modal 2026-04-27 11:28:33 -07:00
michael
611174859c feat(gui): firstrun modal shows Skip button on daemon-unreachable 2026-04-27 11:27:31 -07:00
michael
9021ff0b3c feat(pkg): autostart .desktop entry running authforge --first-run on GNOME login
GNOME-only autostart entry installed to /etc/xdg/autostart/. Uses
X-GNOME-Autostart-Phase=Initialization so it runs before user
autostarts but after GDM hands the session off. NoDisplay=true keeps
it out of the apps menu — autostart-only.

Plan deviation: project uses debian/rules for installation (no
debian/authforge-gui.install file exists), so the install line goes
there instead.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-27 11:23:28 -07:00
michael
cef468ae7e feat(gui): first-run modal with enrollment + 60s idle watchdog
Replace the prep-lane stub with the real Flow C: a fullscreen,
undecorated adw::ApplicationWindow that queries the daemon's pending
flag for the current user, presents an AdwStatusPage "Get started"
button when a flag is set, runs the Phase 8 enrollment dialog, calls
ClearPendingFlag on success, and exits. A 60s idle watchdog (5s tick)
falls back to gnome-session-quit --logout. EventControllerKey and
GestureClick poke the WatchdogState on activity; missing pending flag
short-circuits to immediate exit so the autostart cost is one D-Bus
call.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-27 11:22:40 -07:00
michael
3b519578c5 feat(gui): WatchdogState pure-logic helper for first-run modal
Convert gui/src/firstrun.rs to a module dir with watchdog.rs, the
pure-logic WatchdogState helper that the GTK widget code in Task 2
will poll. Three unit tests cover fresh/expired/poke transitions.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-27 11:19:46 -07:00
michael
25eed8ff94 docs(gui): smoke-test recipes for Policy and Recovery tabs
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-27 11:18:50 -07:00
michael
008dc160bd feat(gui): Recovery tab with list / generate / revoke + one-shot copy dialog
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-27 11:18:29 -07:00
michael
e19ffc9c9b feat(gui): advanced expander surfaces non-master PAM stacks in Policy tab
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-27 11:16:51 -07:00
michael
ae372df577 feat(gui): PolicyPage subscribes to PolicyChanged for live refresh
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-27 11:16:18 -07:00
michael
a28b5c9ebe feat(gui): Policy tab with three master stacks and lockout-violation banner
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-27 11:15:50 -07:00
michael
b2771e73fa feat(gui): pure-logic helpers for Policy tab (mode mapping, violation grouping)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-27 11:13:53 -07:00
michael
ec22188440 feat(gui): bus client policy + recovery method wrappers
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-27 11:12:54 -07:00
michael
b8e8368a25 feat(gui): bus::Daemon::{get_pending_status,clear_pending_flag} client wrappers
clear_pending_flag is added alongside get_pending_status because Phase 10
needs both — its first-login modal checks status on startup and clears
the flag on successful enrollment. Bundling here keeps the Phase 10 lane
free of bus.rs edits.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-27 10:52:14 -07:00
michael
8d19be3e58 feat(gui): --first-run flag + firstrun::run stub for Phase 10
argv is read manually before adw::Application sees it (GTK's option parser
rejects unknown long flags), then the filtered list is passed to
app.run_with_args. Stub exits cleanly with a stderr breadcrumb so a
developer who passes --first-run before Phase 10 lands doesn't get a
stuck process.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-27 10:45:52 -07:00
michael
a927d96630 refactor(gui): extract AppContext for shared page handles
KeysPage::new now takes a single AppContext that owns parent_window,
toast_overlay, and the shared daemon Rc<RefCell<Option<Daemon>>>. Phases
9, 10, 11, and 12 GUI tab will all consume this struct.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-27 10:42:11 -07:00
michael
27dec5ab4a docs(gui): smoke-test recipe and CI gate 2026-04-27 09:26:17 -07:00
michael
14b473a48a feat(gui): wire adw::ToastOverlay for error surfacing 2026-04-27 09:25:50 -07:00
michael
3fbd872a9c feat(gui): TouchDialog modal racing EnrollOwn against EnrollmentFailed signal
Adds enroll_dialog::present which opens an adw::AlertDialog with a spinner
and races the EnrollOwn call against the EnrollmentFailed signal stream:
- Call returns Ok(_cred) -> close dialog, fire on_success refresh callback.
- Call returns Err -> swap dialog body to the user-message form.
- Signal arrives first -> swap to the signal payload (faster than waiting
  for the call's typed Err to traverse the bus).

KeysPage::start_enroll wires the activated row to present(), passing the
parent window for modal anchoring and a refresh closure as on_success.

Plan deviation: AlertDialog is libadwaita v1_5-gated, so gui/Cargo.toml
enables that feature. Targets Ubuntu 24.04+ (libadwaita 1.5).
2026-04-27 09:24:50 -07:00
michael
f11047fbcb feat(gui): list enrolled credentials with per-row remove + enroll button 2026-04-27 09:21:45 -07:00
michael
5d6b7ceeb0 feat(gui): KeysPage scaffold + tokio runtime in main, gtk::Box layout
KeysPage::new spawns the connect-and-render flow on glib::MainContext::
spawn_local. On success it shows a placeholder PreferencesPage (Task 5
fills in the list); on failure it shows StatusPage with a Retry button
that re-runs the connect attempt.

main.rs installs the multi-thread tokio runtime guard before app.run()
so zbus's tokio futures execute correctly when polled by glib.

Layout deviation from plan: ToolbarView is libadwaita v1_4-gated; the
project sticks with gtk::Box vertical for portability (commit c6a5e94
established this pattern).
2026-04-27 09:20:31 -07:00
michael
d07d3469fe feat(gui): D-Bus client wrapper around AuthForge interface 2026-04-27 09:13:14 -07:00
michael
d7e6d562dd feat(gui): error helper to classify zbus errors and produce user messages 2026-04-27 09:11:06 -07:00
michael
8d6b80276e chore(gui): add zbus + tokio + futures-util deps for D-Bus client 2026-04-27 09:08:02 -07:00
michael
f50c7b2e82 Rename project: ubuntu-fido -> authforge
Renames the package and all artifacts to authforge to drop the
distro-specific prefix, since the roadmap targets Ubuntu + Debian +
KDE + eventually Fedora (option C in the design).

- deb packages: authforge, authforge-{daemon,pam,cli,gui,gnome-integration}
- binaries: authforged, authforgectl, authforge (GUI)
- D-Bus name: io.dangerousthings.AuthForge
- PAM module: pam_authforge_pending.so
- Paths: /etc/authforge/, /var/lib/authforge/, /usr/share/pam-configs/authforge
- PPA: ppa:dangerousthings/authforge

Filesystem path /home/work/VSCodeProjects/ubuntu_fido/ left as-is for
historical reference; can rename later via git mv at the dir level.

Verified: cargo build/test/clippy/fmt clean, pam builds, gui builds,
all 5 debs produced.
2026-04-26 16:53:11 -07:00
michael
c6a5e942c9 Fix GUI placeholder: drop ToolbarView (libadwaita-rs 0.6 feature-gate) 2026-04-26 15:29:25 -07:00
michael
9627ca7533 Add GUI crate skeleton with libadwaita placeholder (build deferred until libgtk-4-dev/libadwaita-1-dev installed) 2026-04-26 14:43:04 -07:00