oficina / equipo Public

native/push

Native slice 2 (plan 2026-11-20-equipo-native-slice-2.md, approved by Paul): push notifications on iPhone and Mac, a Live Activity per task on iPhone, and Set aside (D5). Codes against push/server (2ea81007); the device routes 404 until that lands.

Notifications (iPhone and Mac)

  • Permission is asked once there is a team (after pairing, or at launch on an already paired device), never before. Then the app registers with APNs.
  • PushRegistrar POSTs /push-registrations with the paired device's bearer: lowercase hex token, environment, platform, and on iPhone the push-to-start token (Activity<EquipoTaskAttributes>.pushToStartTokenUpdates). It registers again when a token changes, when another session takes over, and on the next foreground after a send that did not land. A 400 is not resent as is. Signed out, nothing is sent.
  • Environment comes from the build (PushEnvironment): iPhone without an embedded profile (TestFlight, App Store) is production; an Xcode device build reads aps-environment from its development profile; the Simulator is development; the Mac reads its own signed com.apple.developer.aps-environment (Developer ID is production; ad hoc has none and does not register). The APNs key is production only, so development builds register honestly and cannot be reached.
  • Taps (D4, no actions): card opens the conversation at the card, reply the conversation, task the task view. Category needs_you has no actions. The app badge is the Needs you count once known (an unknown count is not zero) and clears on sign out.

Live Activity (iPhone)

  • New SwiftPM target EquipoActivity: EquipoTaskAttributes (attributes {task_id}, ContentState with snake_case CodingKeys and an optional outcome), Roster's Stage, StageTone, Specialist (moved from EquipoKit, re-exported), the presentation and the Lock Screen and Dynamic Island views.
  • Widget extension target EquipoActivityExtension, works.oficina.equipo.activity, embedded in the app; NSSupportsLiveActivities on the app.
  • The layouts: title, five-stop track, the specialist's SF Symbol tile, the activity line; amber while it needs you; the outcome at the end; a cancelled task has no track. Tapping opens the task (works.oficina.equipo://task/<id>, registered on iPhone).
  • The app never starts an activity: the server does (at most three). It sends each running activity's pushTokenUpdates to /push-registrations/activities (after the device's registration; a 404 or 409 is not resent), ends an activity whose task it sees has ended (a lost end push), and ends all of them on sign out.
  • The device credential is now kept AfterFirstUnlockThisDeviceOnly (was WhenUnlockedThisDeviceOnly), so a locked phone woken for a push-started activity can send its token. A slice 1 item is rewritten at launch.

Set aside (D5)

  • Set aside (the x on an open question or decision card) and Undo (the stub "Set aside, still in Needs you"), on iPhone and in the Mac transcript, through POST /cards/{id}/visibility bound to the revision seen; a lost one is resent as itself, a stale one shows the card as it is now. It never answers anything.
  • Needs you lists tasks whose every open card is set aside under "Set aside"; they still count. A report beside a set-aside decision is no longer one line (chat_roster.go).
  • Words are the web's (roster.*); check-parity.py now checks roster.* keys too.

Entitlements and signing

  • native/ios/EquipoPhone.entitlements: aps-environment = $(EQUIPO_APS_ENVIRONMENT) (Debug development, Release production). The extension has none. Its profile goes in OFICINA_ACTIVITY_PROVISIONING_PROFILE.
  • native/macos/DeveloperID.entitlements (com.apple.developer.aps-environment production) and mac-updates.json name ~/private_keys/oficina/profiles/Oficina-Equipo-macOS-Developer-ID.provisionprofile. Ad hoc builds drop the key (bundle-mac.py), so check-native.sh needs no profile.

Evidence

  • native/scripts/check-native.sh passes (fixtures, strings, parity, reference scan, Swift tests, Mac build, unsigned Simulator build with the extension).
  • New tests: PushTests.swift and SetAsideTests.swift; the server's payload goldens are copied into Fixtures/push and decoded as ActivityKit decodes them.
  • Each guard was broken on purpose and its test failed (list in the report).
Commits 0
Discussions 0 0 open
Tasks 0/0 done

Discussions

  • No discussions on this branch yet.

Tasks

  • No tasks yet.

Activity

  • No activity yet.