Skip to content

feat(engine): group sync lists each person once, devices by kind; blocked phones fold away - #92

Merged
KennethWKZ merged 1 commit into
mainfrom
feat/sync-blocked-fold
Nov 25, 2026
Merged

KennethWKZ merged 1 commit into
mainfrom
feat/sync-blocked-fold

Conversation

@KennethWKZ

Copy link
Copy Markdown
Owner

Why

One person often uses a phone, a tablet and a laptop, and every browser is its own device to sync (an iPhone's Safari and its home-screen copy are two). "The group" filled up with the same name, and a planner blocked their own devices to tidy it, which keeps those devices' changes to themselves. A planner's second device also couldn't take the planner's name, even once it was a planner.

What changes

  • Device kind. A new record, kit:<device>, carries a kind from a fixed list (Sync.deviceKind): iPhone, iPad, Android, Huawei, Mac, Windows, Chromebook, Linux; home-screen app, Safari, Chrome, Firefox, Edge, Samsung Internet, Huawei, OPPO, Xiaomi or vivo Browser, WeChat. Never the browser's own description. Sent only with the device's name or a change, so a device that only reads stays off the list.
  • One entry per person. "The group" groups devices by name (Sync.byPerson). A person on several devices shows their name once, each device under it with its kind, its badges (This one, Planner), its added stops and its last change. Roles, blocks and stops stay per device: a name proves nothing.
  • A planner's devices share the planner's name once each has given the planner code. Any other device still can't take it; the refusal now says to give the code first if the name is theirs.
  • Blocked phones (N). Blocked devices fold away at the end of the list, with Unblock inside; the fold stays open across redraws.
  • A device telling its kind makes no toast; a device that gave the planner code reads "Ana is a planner now", not "Ana made Ana a planner". "Last change" counts days too.

Docs

ADR-20261002-sync-planners gets a dated amendment (decision index regenerated); guides/trip-page.md § Group sync, the sync-setup skill and the glossary are updated. No database rule change: records stay opaque to it. Phones on an older build ignore kit: records.

Tests

  • Unit: device detection for iPhone, iPad (desktop mode), Android, HarmonyOS NEXT and older Huawei, OPPO, Xiaomi, vivo, Samsung, Mac, Windows, Chromebook and WeChat; the kit record's checks; grouping by name with this device first and blocked devices taken out.
  • E2e: a new two-device test (one person, two devices, the planner-name path); the block test opens the fold before Unblock. sync.spec passes on android-390, chromium-1280, webkit-390 and webkit-1280.
  • pnpm verify and tier 0 pass. Checked by eye at 390 px (WebKit) and desktop (Chromium), light and dark.
  • Not checked on real phones: the Huawei, OPPO, Xiaomi, vivo and WeChat detection follows the way those browsers usually identify themselves.

…cked phones fold away

One person often uses a phone, a tablet and a laptop, and each browser is its own device to sync, so
The group filled with the same name and a planner blocked their own devices to tidy it.

- A device says what kind it is (kit record: iPhone, iPad, Android, Huawei, Mac, Windows; home-screen
  app, Safari, Chrome, OPPO, Xiaomi, vivo, Huawei, Samsung, WeChat), sent with its name or a change only.
- The group shows one entry per name, each device under it with its kind and last change. Roles,
  blocks and stops stay per device.
- A planner's other device may take the planner's name once it has given the planner code; the
  refusal says so.
- Blocked devices fold under Blocked phones (N) with Unblock inside, and the fold stays open across
  redraws.
- A device telling its kind makes no toast; a planner who gave the code reads "is a planner now".

ADR-20261002-sync-planners amended; guide, sync-setup skill and glossary updated.
@KennethWKZ
KennethWKZ merged commit 4f3d7b1 into main Nov 25, 2026
12 checks passed
@KennethWKZ
KennethWKZ deleted the feat/sync-blocked-fold branch November 25, 2026 01:38
@github-actions github-actions Bot mentioned this pull request Nov 25, 2026
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