Repository navigation
Commit 83b72a3
fix(plugins): default reminders and workflows off for fresh installs (#2291)
**Category:** improvement
**User Impact:** Fresh installs start with Reminders and Workflows off.
Existing installs keep both features available, including when their
settings were never changed.
**Problem:** Changing only the bundled defaults would silently disable
these features for existing profiles without overrides. That stops local
reminder notifications and removes the controls for workflows that can
still run on the relay.
**Solution:** Change the browser and native defaults to Off, then save
each known bundled plugin's resolved state. Existing profiles without a
Reminders or Workflows flag retain their former On state. Saved On/Off
choices always win; a deliberate reset uses current defaults. If an
automatic native snapshot cannot be saved, startup uses the resolved
values and later catalog reads retry. Explicit changes and reset still
report write failures. Browser reset backs up the original settings and
atomically replaces their key, preserving the original if the
replacement fails.
The native migration checks whether the plugin-profile directory existed
before acquiring the registry lock. Browser storage checks for prior
plugin settings or client records before client initialization. New
devices or cleared local profiles count as fresh even if the account has
older relay data. No relay usage scan, registry schema change, or
activation/UI redesign is involved.
The accepted [plugin-defaults
decision](https://github.com/block/buzz-app/blob/eda7b3f0350da6b480cd3b97d1d032c0a251331f/docs/plugin-defaults.md)
makes future default-off changes apply only to fresh installs. Both
storage owners now retain known states across subsequent releases; the
decision also requires legacy backfills for users who skip releases that
would have saved those states.
<details>
<summary>File changes</summary>
- `src/bundled/index.ts` and `crates/plugin-manager/src/lib.rs`: new
defaults, native profile detection, initialization under the existing
lock, and explicit reset behavior.
- `src/plugins/storage.ts`: equivalent browser initialization,
saved-choice precedence, and recovery behavior.
- Native management tests, frontend storage tests, and app composition
tests: cold launch/reopen, untouched upgrade, partial and explicit
choices, future default changes, storage failure, and recovery.
- Browser fixture and feature journeys: explicit opt-ins where optional
features are required; model fresh plugin choices before seeding
community records.
- `tests/browser/plugin-defaults.spec.mjs`: real app startup without
fixture storage, plus migrated activation, working Workflows navigation,
deliberate disable, and reload.
- `AGENTS.md`, `docs/plugin-defaults.md`, `docs/plugin-architecture.md`,
and `docs/buzz-help.md`: the durable policy and user-facing behavior.
</details>
### Reproduction steps
1. Open a fresh disposable profile. Reminders and Workflows should offer
**Enable** under Settings → Plugins → Manage plugins, including after
another launch.
2. Upgrade an existing profile that previously opened Buzz but never
saved plugin choices. Both should remain on, and the Workflows page
should remain usable.
3. Repeat with saved On and Off choices. Those choices should remain
effective.
4. Enable or disable either plugin through Settings and reload. The
choice should persist.
5. After deliberately recovering/resetting plugin settings, both should
be off and remain off after reopening.
### Validation
Current head **`eda7b3f03`** fixes native automatic snapshot failures in
`46756c962` and browser reset replacement failures in `eda7b3f03`.
- New regressions failed on the previous implementation: the native
catalog returned a snapshot write error, and both browser reset cases
lost their original key. With the fixes, all **104 native package
tests** and **130 frontend plugin-owner/app-composition tests** passed.
- At clean `eda7b3f03`, the complete `plugin-defaults.spec.mjs` and
`launch-home.spec.mjs` passed **22/22 cases** in Chromium and WebKit,
including the recovery/reset UI (`pnpm test:browser
tests/browser/plugin-defaults.spec.mjs
tests/browser/launch-home.spec.mjs --project=chromium --project=webkit
--no-deps`). Two workers, zero retries. No browser cases or fixtures
changed in this follow-up.
- Commit and pre-push checks passed. Native first-launch snapshot
failure can still leave a directory that a later process classifies as
an existing profile; the decision document records this limitation.
Restart stability requires a successful snapshot save.
The earlier merge head **`ff8e6c9ed`** brings in main `517443522`
without rewriting the published branch. The merge applied without
conflicts and includes the mainline history geometry / Virtua fix.
- The complete `plugin-defaults.spec.mjs` and `history-loading.spec.mjs`
passed **48/48 cases** in Chromium and WebKit at the clean merge head,
in 2.1 minutes (`pnpm test:browser
tests/browser/plugin-defaults.spec.mjs
tests/browser/history-loading.spec.mjs --project=chromium
--project=webkit --no-deps`). Two workers, zero retries; unrelated
measurement projects were excluded.
- Blob comparisons confirm the native manager, browser plugin storage,
frontend default declarations, and decision document are identical to
`e6f8f4a07`. The history spec matches main exactly except for the
explicit Workflows fixture opt-in; main's assertions remain intact.
- Mandatory pre-push checks passed: TypeScript and related unit tests,
design-system checks, workspace Clippy and publication checks. The PR
remains ready for review; native UI / human migration acceptance remains
pending.
At clean commit `31d97764c`:
- `pnpm exec vitest run src/plugins src/app/pages.integration.test.mjs`:
**128 passed**, 11 complete files.
- `cargo test -p buzzodz-plugins --locked`: **103 passed** across the
complete package suite.
- `pnpm test:browser tests/browser/plugin-defaults.spec.mjs
tests/browser/notification-settings.spec.mjs
tests/browser/settings.spec.mjs --project=chromium --project=webkit
--no-deps`: **38 passed** in 1.3 minutes. Unrelated measurement projects
were excluded.
- The new frontend regression suite produced six failures against the
previous browser storage implementation at `73a0bd246`, then passed with
this migration. The comparison used a temporary Vite transform without
editing production working-tree files.
- Mandatory commit and pre-push checks passed: formatting, TypeScript
and related unit tests, design checks, workspace Clippy, and publication
checks. A merge simulation against current `origin/main` completed
without conflicts.
Two browser journeys were added (four cases across the engines), with
none removed. They exercise app startup ordering and plugin
activation/Settings integration; the state matrix remains in storage
tests. Fixture datasets and workers are unchanged. A comparative
setup-cost benchmark was not run; no performance claim is made.
The earlier broader run at `15c902232` passed 337/340 cases across 19
complete specs. Its three failures reproduced on unchanged upstream
`134248ba7`: macOS Alt+ArrowUp scrolling in both engines and sidebar
keyboard focus in WebKit. That broader set has not been rerun locally
for this migration; current hosted CI supplies the broad check.
Native UI walkthrough and human acceptance of this migration remain
pending.
### Review follow-up at `e6f8f4a07`
- Extended the existing native/desktop parity test to guard the
legacy-On migration set. No production declarations changed.
- Added an isolated browser page with no fixture init scripts, seeded
only with a client record. It checks both plugins stay On across
reopening. This adds one journey (two engine cases); none were removed.
- All **103 native package tests** and all **10 cases in the complete
plugin-defaults browser spec** passed at the clean follow-up commit.
Mandatory pre-push checks passed.
- Investigated the advisory CI drag-loop failure. On clean pre-fix main
[`b293002a0`](b293002),
using its frozen dependencies and no changes from this PR, the same
assertion failed twice in 10 Chromium repetitions: 4 drag steps versus
at least 6. Its 10 WebKit repetitions passed locally. The assertion
counts drag steps, not message rows.
- Current main
[`3fabf1be4`](3fabf1b)
passed **20/20** repetitions across both engines. It already contains
the shorter viewport / available-distance adjustment from
[`f557d0a5`](f557d0a),
along with a newer Virtua patch. The comparison does not isolate those
two mainline adjustments. This establishes that the failure exists
independently of this PR; the unrelated scrolling test remains unchanged
here.
Comparison command: `pnpm test:browser
tests/browser/history-loading.spec.mjs --project=chromium
--project=webkit --no-deps --grep 'a held pointer scrolls across the
page without being pulled back' --repeat-each=10`. Local headless macOS
runs used two workers and zero retries. Baseline traces were retained.
CI originally reported [3 steps in
Chromium](https://github.com/block/buzz-app/actions/runs/41732891881/job/126254970681)
and [5 in
WebKit](https://github.com/block/buzz-app/actions/runs/41732891881/job/126254970956).
### Screenshots
Fresh-profile controls are visually unchanged by the migration. These
captures are from the earlier built-app walkthrough with disposable
data; the migration is covered by the current tests above.
| Plugin | Fresh profile |
| --- | --- |
| Reminders | 
|
| Workflows | 
|
---------
Signed-off-by: Taylor Ho <[email protected]>
Co-authored-by: Carl <acda9e433d19dcd0e6b6840f7f4b98f3a56f1fab98049d444c087019e6d36560@feedback.communities.buzz.xyz>1 parent 73255c5 commit 83b72a3
28 files changed
Lines changed: 796 additions & 107 deletions
File tree
- crates/plugin-manager
- src
- tests
- docs
- src
- app
- bundled
- plugins
- tests/browser
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
84 | 88 | | |
85 | 89 | | |
86 | 90 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
507 | 507 | | |
508 | 508 | | |
509 | 509 | | |
510 | | - | |
511 | 510 | | |
512 | 511 | | |
513 | 512 | | |
514 | 513 | | |
515 | 514 | | |
516 | | - | |
517 | 515 | | |
518 | 516 | | |
519 | 517 | | |
| |||
603 | 601 | | |
604 | 602 | | |
605 | 603 | | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
606 | 620 | | |
607 | 621 | | |
608 | 622 | | |
| |||
798 | 812 | | |
799 | 813 | | |
800 | 814 | | |
| 815 | + | |
801 | 816 | | |
802 | 817 | | |
803 | 818 | | |
| |||
814 | 829 | | |
815 | 830 | | |
816 | 831 | | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
817 | 835 | | |
818 | | - | |
| 836 | + | |
819 | 837 | | |
820 | 838 | | |
821 | 839 | | |
| 840 | + | |
822 | 841 | | |
823 | 842 | | |
824 | 843 | | |
| |||
850 | 869 | | |
851 | 870 | | |
852 | 871 | | |
853 | | - | |
854 | | - | |
855 | | - | |
856 | | - | |
857 | | - | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
858 | 875 | | |
859 | 876 | | |
860 | | - | |
861 | | - | |
862 | 877 | | |
863 | 878 | | |
864 | 879 | | |
| |||
883 | 898 | | |
884 | 899 | | |
885 | 900 | | |
886 | | - | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
887 | 904 | | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
888 | 909 | | |
889 | 910 | | |
890 | 911 | | |
| |||
1314 | 1335 | | |
1315 | 1336 | | |
1316 | 1337 | | |
1317 | | - | |
| 1338 | + | |
| 1339 | + | |
| 1340 | + | |
1318 | 1341 | | |
1319 | 1342 | | |
1320 | 1343 | | |
| |||
1627 | 1650 | | |
1628 | 1651 | | |
1629 | 1652 | | |
| 1653 | + | |
| 1654 | + | |
| 1655 | + | |
| 1656 | + | |
| 1657 | + | |
| 1658 | + | |
| 1659 | + | |
| 1660 | + | |
| 1661 | + | |
| 1662 | + | |
| 1663 | + | |
| 1664 | + | |
| 1665 | + | |
| 1666 | + | |
| 1667 | + | |
| 1668 | + | |
| 1669 | + | |
| 1670 | + | |
| 1671 | + | |
| 1672 | + | |
| 1673 | + | |
| 1674 | + | |
| 1675 | + | |
| 1676 | + | |
| 1677 | + | |
| 1678 | + | |
| 1679 | + | |
1630 | 1680 | | |
1631 | 1681 | | |
1632 | 1682 | | |
| |||
2476 | 2526 | | |
2477 | 2527 | | |
2478 | 2528 | | |
2479 | | - | |
2480 | | - | |
2481 | | - | |
2482 | | - | |
2483 | | - | |
| 2529 | + | |
| 2530 | + | |
2484 | 2531 | | |
2485 | 2532 | | |
2486 | 2533 | | |
| |||
0 commit comments