Skip to content

feat(tauri-updater): add shared update controller and dialog#56

Merged
ElbertePlinio merged 5 commits into
mainfrom
feat/36-tauri-updater
Jul 23, 2026
Merged

feat(tauri-updater): add shared update controller and dialog#56
ElbertePlinio merged 5 commits into
mainfrom
feat/36-tauri-updater

Conversation

@ElbertePlinio

Copy link
Copy Markdown
Member

Summary

PR 2 of #36@pickforge/tauri-updater: the shared update path for PickForge, PickScribe, and PickGauge.

  • headless injected update controller with the locked state machine (idle→checking→available→downloading→installing→restarting, dismissed, recoverable error), one gated silent startup check per process, check({ manual: true }) for Settings-style re-checks (bypasses dismissal + gate cache, non-silent errors), monotonic generation guard against late-resolving checks, install re-entrancy guard
  • pickforge-update-dialog Web Component: native <dialog>, stable DOM across renders (showModal once per open, persistent polite live region, entrance animation on open only), notes solely in the bounded scrollable block, full --pf-* token conformance incl. canonical glass-strong + scrim per branding-visual COMPONENTS.md §13 (PR 1, merged)
  • injected Tauri adapter over check()/downloadAndInstall()/relaunch(); no import side effects; deterministic tests via injected adapters
  • fixture with all five contract states reachable via ?scenario= links

Refs #36 (PR 2 of 5 — PR 3–5 app integrations follow behind the studioUpdateDialog flag; PR 1 merged as pickforge/branding-visual#10).

Validation

  • typecheck, 291 tests (16 files), coverage 94.13% package statements, workspace build — all green
  • serious-class local review: 3 independent reviewers (correctness/races, tests/operational, conformance/a11y) + 1 targeted fix-verification round — all 10 adjudicated findings fixed and verified clean; KISS verdicts keep
  • deferred with rationale: design-lead visual acceptance runs at PR 3 when rendered captures exist in real apps (contract's stated evidence); fixture captures queued behind current GUI-lane work
  • no UNRELEASED.md in this repo (library workspace; release notes ride the npm publish + dependent app releases)

Add check({ manual: true }) so PickForge's Settings action can clear a
dismissed state, bypass the process-gate cache with a fresh
adapter.check(), and surface errors non-silently. Also drop a
late-resolving automatic check's transition to available if the user
dismissed meanwhile, keeping the dismissed state's stored update.
Swap the flat backdrop scrim and blur(24px) card treatment for the
canonical color-mix(--pf-surface) scrim and glass-strong recipe
(blur(20px) saturate(160%), --pf-surface-1 at 85%) per the
branding-visual PR-1 audit.
Add a monotonic check-generation guard so a stale silent/auto check
result can never clobber a newer manual (or newer manual) result, and
apply the same dismissed-preserving bookkeeping to the failure path
that already existed for the success path. Retry after a failed check
now replays the check with the same manual/auto mode it originally
ran with, so retrying a failed manual check performs a fresh
adapter.check() instead of reusing the process gate's cached result.
Also add a one-line re-entrancy guard so a second install() call
while one is in flight is a no-op.
Build the <dialog> subtree once and mutate its text/children in place
instead of rebuilding the whole shadow tree via innerHTML on every
state tick, so showModal() and the entrance animation only fire on
the closed-to-open transition and the aria-live status node keeps its
identity for assistive tech. The description paragraph now shows a
fixed sentence per state; the bounded/scrollable notes <pre> is the
sole place release notes render. Add -webkit-backdrop-filter for
WebKit webviews, and extend the fixture with scenario toggles that
reach a failed check, a failed install, and an indeterminate download.
@ElbertePlinio
ElbertePlinio merged commit b936e7e into main Jul 23, 2026
2 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