Skip to content

Make preview updates reliable and non-disruptive - #379

Merged
NotASithLord merged 4 commits into
mainfrom
preview-auto-update
Aug 10, 2026
Merged

Make preview updates reliable and non-disruptive#379
NotASithLord merged 4 commits into
mainfrom
preview-auto-update

Conversation

@NotASithLord

Copy link
Copy Markdown
Owner

Summary

  • Check the self-hosted preview feed at startup.
  • Apply downloaded Chrome updates only when no turn, goal, extension surface, or engine tab is live.
  • Keep Firefox on its native update lifecycle and show an explicit install offer when the startup feed check finds a newer signed package.
  • Limit install offers to the exact versioned Firefox asset in this repository.
  • Keep store and unpacked builds as structural no-ops.

This extracts the preview-update work from #374 onto current main. Jonathan Bursztyn authored the original implementation and visual baseline work. The unrelated UI and confirmation redesign from that branch is intentionally excluded.

Review fixes

  • Closed the asynchronous quiet-state reload race.
  • Added bounded exponential retry for headless work.
  • Added synchronous Chrome listener registration with safe setting hydration, disable, re-enable, and reset behavior.
  • Removed Firefox update-listener interception.
  • Revalidated persisted notices and required feed version, release tag, repository path, and asset name to agree.
  • Added narrow side-panel and full-page notice coverage with keyboard, target-size, dismissal, and exact-link checks.

Verification

  • Full Bun suite: 5,760 passed
  • Focused update and settings tests: passed
  • Typecheck, ESLint, boundary, source hygiene, copy hygiene, invariants, and diff checks: passed
  • Full rendered E2E before final focused fixes: 67 states, 322/322 checks
  • Final focused rendered checks: settings row passed; update notice 5/5 at narrow and full-page widths
  • Independent correctness, security, performance, user UX, and model UX adversarial reviews: clean

@github-actions

github-actions Bot commented Aug 10, 2026

Copy link
Copy Markdown

The UI renders differently than the committed baselines — 3 of 54 screens changed (before ⟶ after below).

Multi-turnmulti-turn-transcript · up to 1.32% changed

dark — 1.32% of pixels (before ⟶ after)

Multi-turn dark before/after

options-behavioroptions-behavior · up to 0.34% changed

dark — 0.34% of pixels (before ⟶ after)

options-behavior dark before/after

light — 0.34% of pixels (before ⟶ after)

options-behavior light before/after

Full-res before/after/diff PNGs: download the visual-diff-… artifact.

Intended? Re-run this workflow on the branch with update_visual_baselines checked, then commit the fresh baselines/linux-x64/ and regenerate GALLERY.md with bun run gallery.

github-actions Bot added a commit that referenced this pull request Aug 10, 2026
jonybur and others added 4 commits August 10, 2026 02:26
Preview installs are self-hosted (update_url feeds -> GitHub release
artifacts), but peerd's offscreen keepalive holds the MV3 SW alive, which
is exactly the state where Chrome parks a downloaded extension update
forever. background/update-check.js closes that gap: Chrome forces the
update_url poll at boot and reloads when a downloaded update can apply
with nothing live (no turn or goal run, no UI port, no engine tab, no
other extension page), re-attempting when a surface closes; Firefox (no
requestUpdateCheck API) reads the gecko feed and offers the XPI in a
notice, persisted in storage.session so it survives event-page respawns.

The onUpdateAvailable listener registers ONLY on self-hosted manifests:
on Firefox a listener's mere presence defers every add-on update until
reload()/browser restart, so a listener on the store package would break
AMO's automatic updates; a disabled toggle there restores the
no-listener default (apply immediately). Feed update_links are pinned to
github.com/peerd.ai and version strings shape-checked before they reach
the notice.

Setting: autoUpdateEnabled, a preview-only channel key (absent from
store CHANNEL_DEFAULTS, patch-gated on key presence), default ON, with
an Auto-update toggle in Settings -> Behavior. Dev (load-unpacked) has
no update_url so every path is a structural no-op there. The side
panel's NoticeBar gains a generic https-only open-url action.

Signed-off-by: Jonathan Bursztyn <jobur93@gmail.com>
The options-behavior captures moved 0.32% - the new Auto-update row in
the Behavior band. Reseeded on the CI authority via the
update_visual_baselines dispatch and eyeballed per PNG; goal-running
(0.01%, a tool-card ms flap) and multi-turn-transcript.dark (0.0000%
within tolerance) rode along from the fresh capture.

Signed-off-by: Jonathan Bursztyn <jobur93@gmail.com>
Keep Firefox on its native update lifecycle, close Chrome quiet-state races, bound deferred retries, and validate install offers against the exact release asset. Add narrow and full-page notice coverage.
@github-actions

github-actions Bot commented Aug 10, 2026

Copy link
Copy Markdown

Visual regression

No visual drift. Every state renders identically to the committed baselines.

📸 Browse the visual gallery — 54 baseline screens (light + dark) as of this commit.

@NotASithLord
NotASithLord merged commit df12e27 into main Aug 10, 2026
19 checks passed
@NotASithLord
NotASithLord deleted the preview-auto-update branch August 10, 2026 00:34
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