Skip to content

Pulse Opens Through Its Universal Links in One Tap, and TimeHuddle No Longer Manages Pulse's App Store Links - #748

Merged
priyamrmore merged 10 commits into
mainfrom
feat/video-conform-v2
Oct 29, 2026
Merged

priyamrmore merged 10 commits into
mainfrom
feat/video-conform-v2

Conversation

@priyamrmore

@priyamrmore priyamrmore commented Oct 26, 2026 •

Copy link
Copy Markdown
Collaborator

Reopens #678, which GitHub hid along with its author's suspended account. Same commits (branch -v2), same description with the stack renumbered; the earlier review threads did not carry over.

export.4.mp4

Summary

Pulse now opens through its own Universal Link / App Link, and TimeHuddle no longer manages Pulse's App Store / Play Store links. On a phone, one tap on Pulse opens the app; when Pulse isn't installed, Pulse's page takes the person to the App Store or Google Play and connects after the install. TimeHuddle only hands out the link.

Built on @mieweb/pulsevault 0.6.0 (the latest release): buildUploadLink({ form: 'https' }) gives https://mieweb.github.io/pulse/open#v=1&artifactId=…&server=…&token=…. The released Pulse app claims that host; its apple-app-site-association and assetlinks.json are live for com.mieweb.pulse. The upload rides in the fragment, so the link host never receives the token.

PR on #746: the video and UI work that used to ride along here now ships in #746, #747 and #750; this PR is only the universal links, and waits on Pulse's App Store / Play Store release. See Stack and merge order below.

How Pulse opens now

Where Tapping Pulse
Phone browser Opens Pulse in one tap. A Universal Link opens the app only from a tap, not from a navigation that waited on the server, so the link is reserved while the chip is on screen and the tap follows it straight away.
TimeHuddle app The OS opens Pulse from the link (AppLauncher.openUrl).
Computer A QR code of the same link; the phone's camera opens Pulse.
Pulse not installed Pulse's page sends the person to the App Store or Google Play, and the link connects after the install.

TimeHuddle no longer manages Pulse's App Store / Play Store links

Gone:

  • the Pulse App Store / Play Store links (PULSE_STORE_URLS) and opening them;
  • guessing whether Pulse is installed: the focus/blur timers (openPulseAppOrStore), the native canOpenUrl check (openNativePulseOrStore), the Android intent:// link with its Play Store fallback;
  • the App Store / Google Play badges in the Pulse window (PulseStoreBadges);
  • the pulsecam scheme queries in ios/App/App/Info.plist (LSApplicationQueriesSchemes) and AndroidManifest.xml (<queries>), which existed only for that check (takes effect with the next native build);
  • the backend's /pulse/open store interstitial (300 lines): now a 302 to Pulse's link with only the pairing parameters, kept for QR codes an older app bundle may still show.

Still there, and why: the account menu's Help → App Store is TimeHuddle's own listing, not Pulse's; the Pulse window's "No Pulse yet? Your phone goes to the App Store or Google Play first." is plain text, linking nowhere.

Changes

  • src/features/pulse-upload/pulseLinks.ts: buildPulseLink builds the one https pairing link (QR target and phone link alike). The package exports buildUploadLink only from its server entry points, so it's built here; a unit test checks the two are identical.
  • usePulseUpload: in a phone's browser the destination's link is reserved while the chip is mounted (reserving writes nothing, it signs a token; an unused one expires), refreshed every 20 minutes (tokens last 30) and after each use, and the tap follows it before anything is awaited. Only if no link is ready yet does the tap reserve and show the window with an Open Pulse link, so it never lands on the wrong page. The TimeHuddle app hands the link to the OS; a computer shows the QR.
  • PulseUploadModal: the QR (computer) or Open Pulse (phone fallback), one line about the store instead of the badges.
  • src/lib/device.ts: down to isNativeApp, getMobileOS, isMobileBrowser, openExternalUrl.
  • meteor-backend/server/pulse-link.js: the /pulse/open redirect; verifyUploadToken no longer exported.
  • Native: pulsecam queries removed from Info.plist and AndroidManifest.xml.

Screenshots

Pulse window on a computer: the QR of Pulse's link, no store badges

17-pulse-window-desktop

On a phone held sideways (the QR beside the words)

13-pulse-window-landscape

Tests

  • Unit: pulseLinks.test.ts checks buildPulseLink equals the package's buildUploadLink({ form: 'https' }) and keeps the token in the fragment; device.test.ts covers what's left.
  • e2e (tickets/pulsevault): the QR window on a computer; one tap in an iPhone browser lands on Pulse's https link (Pulse's page stubbed); /pulse/open?… redirects there with only v, artifactId, server, token.
  • By hand, headless iPhone 13 and Pixel 7 browsers: one tap from a ticket and from Clock out with Pulse lands on the link, with no window; a computer still gets the QR.
  • On this branch (after the split): typecheck, lint, format clean; unit tests 586 / 586.
  • Before the split, the focused e2e set on the old head (tickets/pulsevault, tickets/video-upload, redmine/issue-detail, timesheet/walkthrough, timers/clock-in-then-start, huddle/pulsevault-video): 51 passed; full suite 424 passed, the 6 failures being the mail-dependent specs. Not re-run on the split branch.

Not tested

  • Real phones with and without Pulse installed: the one-tap and store paths were checked in emulated browsers.
  • The TimeHuddle app's path (AppLauncher.openUrl of a Universal Link) and the removed pulsecam queries need a native build.

Stack and merge order

This work used to ship as one PR (#678). It is now five, so each can be reviewed on its own and the universal links can wait for Pulse's store release without holding the rest back.

Order PR Base What
1 #746 main Upload beside Pulse, every video converted; links in the text, Videos everywhere
2 #747 #746 The Clock page's Pulse card, a pending change and an upload's progress
2 #748 #746 Pulse opens through its universal links (waits on Pulse's App Store / Play Store release)
2 #749 #746 Pulse video cards
3 #750 #747 Timesheets as a list of sessions; the Work page in one layout

The three PRs in step 2 are independent of each other and can merge in any order once #746 is in. #750 follows #747. When a base PR merges, retarget the next one to main (GitHub does it when the merged branch is deleted).

Expected conflicts when the step-2 PRs merge after each other, all small:

Merged together, the five come out identical to the old #678 head plus the timesheet work and the video cards (checked file by file). The old heads are tagged backup/video-conform-2026-10-13 and backup/pulse-video-cards-2026-10-13.

…ndles the app store

Squashed from:

* feat(pulse): pair through Pulse's https link; TimeHuddle no longer handles the app store

  @mieweb/pulsevault 0.6.0 builds the https pairing link
  (`buildUploadLink({ form: 'https' })`, https://mieweb.github.io/pulse/open#…),
  a Universal Link / App Link the released Pulse app claims (the domain's
  apple-app-site-association and assetlinks.json are live). Pulse opens from it
  when installed; otherwise Pulse's page sends the person to the App Store or
  Google Play and keeps the link for after the install. So TimeHuddle stops
  deciding any of that:

  - pulseLinks.ts builds that one link (QR target and phone link alike), with
    the upload in the fragment; a unit test checks it equals the package's
    buildUploadLink output.
  - usePulseUpload: the TimeHuddle app hands the link to the OS
    (openExternalUrl → AppLauncher.openUrl); a browser opens the window — a QR
    on a computer, an "Open Pulse" link on a phone (a Universal Link opens the
    app only from a tap, and the tap that started it waited on the reservation).
  - Removed: device.ts's store fallback (openPulseAppOrStore with its
    focus/blur timers, openNativePulseOrStore's canOpenUrl check, the Android
    intent:// link, PULSE_STORE_URLS, getStoreOS), PulseStoreBadges and the
    window's store badges, and the pulsecam query entries in Info.plist and
    AndroidManifest.xml that existed only for canOpenUrl (takes effect with
    the next native build).
  - meteor-backend /pulse/open, the 300-line store interstitial, is now a 302
    to the Pulse link (pairing params only, in the fragment), for QR codes an
    older app bundle may still show. verifyUploadToken is no longer exported.

  Tests: pulseLinks (equals the package), device (what's left); e2e: the QR on
  a computer, "Open Pulse" with the https link in an iPhone browser, and the
  /pulse/open redirect.

* docs(release-notes): Pulse opens from its own link, and the store when it isn't installed (#678)
Squashed from:

* feat(pulse): one tap opens Pulse in a phone's browser

  A Universal Link / App Link opens the app only from a tap, not from a
  navigation that waited on the server, so the previous commit had a phone tap
  Pulse, then "Open Pulse". Now the link is ready before the tap: in a phone's
  browser usePulseUpload reserves the destination's link while the chip is on
  screen (reserving writes nothing, it signs a token; an unused one expires),
  refreshes it every 20 minutes (tokens last 30) and after each use, and the
  tap follows it before anything is awaited — one tap, Pulse is open (or the
  store, from Pulse's page). Only if no link is ready yet does the tap reserve
  and show the window with "Open Pulse". The TimeHuddle app (the OS opens the
  link) and a computer (QR) are unchanged.

  e2e: in an iPhone browser one tap on Pulse lands on the https pairing link.

* docs(release-notes): on a phone, Pulse opens straight away (#678)
Copilot AI balanced review requested due to automatic review settings October 26, 2026 18:31
@github-actions

github-actions Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

🗑️ Preview Environment Cleaned Up

The preview container for this PR has been deleted.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Cached plan reservations can prevent valid clock-ins, and the mobile test has a response-listener race.

3 open issues
What changed in this PR

This PR moves TimeHuddle’s Pulse integration to Pulse-owned Universal Links, building on #746 while leaving store routing to Pulse.

Changes:

  • Prepares pairing links for one-tap mobile launches and uses the same links for desktop QR codes.
  • Removes Pulse store badges, installation checks, and native custom-scheme queries.
  • Replaces the legacy interstitial with a redirect and updates tests and release notes.
File Description
tests/​e2e/​tickets/​pulsevault.spec.ts Covers desktop QR, mobile navigation, and legacy redirects.
src/​lib/​device.ts Removes Pulse-specific launch and store fallback helpers.
src/​lib/​device.test.ts Updates coverage for retained device helpers.
src/​features/​pulse-upload/​usePulseUpload.ts Prepares reservations and opens pairing links by platform.
src/​features/​pulse-upload/​PulseUploadModal.tsx Shows a desktop QR or mobile Open Pulse link.
src/​features/​pulse-upload/​PulseStoreBadges.tsx Removes Pulse store badges.
src/​features/​pulse-upload/​pulseLinks.ts Builds HTTPS pairing links with fragment parameters.
src/​features/​pulse-upload/​pulseLinks.test.ts Checks package parity and fragment encoding.
src/​features/​pulse-upload/​PulseButton.tsx Passes the new link property and updates explanatory comments.
src/​features/​clock/​ClockPage.tsx Passes pairing links to clock upload modals.
release-notes/​1.0.7.md Documents the new Pulse link flow.
meteor-backend/​server/​pulsevault.js Makes token verification internal to the module.
meteor-backend/​server/​pulse-link.js Redirects legacy links to Pulse’s pairing page.
ios/​App/​App/​Info.plist Removes the pulsecam scheme query.
android/​app/​src/​main/​AndroidManifest.xml Removes the pulsecam intent query.

Review effort: Balanced

Comment thread tests/e2e/tickets/pulsevault.spec.ts Resolved
Copilot AI balanced review requested due to automatic review settings October 26, 2026 18:51

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The legacy redirect removes upload-destination and capability validation, allowing trusted TimeHuddle links to forward attacker-controlled pairing parameters.

4 open issues

Review effort: Balanced

Comment thread meteor-backend/server/pulse-link.js Resolved
Copilot AI balanced review requested due to automatic review settings October 26, 2026 20:44

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Pending native launches can still open Pulse for a destination the user has left because cancellation no longer covers the lazy import.

5 open issues

Review effort: Balanced

…unches

Address Copilot review on PR 748:
- /pulse/open forwards only an upload to this backend's PulseVault with a
  token that authorizes its artifact (the allowlist and verifyUploadToken
  check the old page had); anything else gets 400 or 403, not a redirect.
- A clock-in plan prepared ahead on a phone is replaced when you clock in
  or out (`prepareKey`), so a plan recorded later isn't refused for a
  reservation made before that shift.
- Starting Pulse from a prepared link clears an earlier error, as reserving
  did.
- In the app, a launch still loading is cancelled when the destination
  changes or the button unmounts, and openExternalUrl checks that just
  before opening.
- The one-tap e2e waits for the reservation before clicking the ticket that
  triggers it.
Copilot AI balanced review requested due to automatic review settings October 26, 2026 21:08

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

A prepared-token invalidation bug remains, and real-device handoff, native builds, and Pulse’s required store release still need confirmation.

1 open issue
5 resolved since last review

Review effort: Balanced

Address Copilot review on PR 748: any prepareKey change drops the link
prepared before it, so a round trip ('' → shift → '') whose middle
reservation failed or is still pending can't hand back the pre-shift link
that clockInWithPlan would refuse. Regression test for that round trip.
Copilot AI balanced review requested due to automatic review settings October 26, 2026 21:32

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Real-device and native-build validation of launching and post-install pairing remains outstanding, along with confirmation of the required Pulse store release.

1 open issue
1 resolved since last review

Review effort: Balanced

Comment thread release-notes/1.0.7.md Resolved
Also links this PR's release note to #748, which replaced the hidden #678.
Copilot AI balanced review requested due to automatic review settings October 26, 2026 22:18

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Rollout depends on Pulse’s store release and real-device verification of installed, uninstalled, and native-shell link handling.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

Base automatically changed from feat/videos-upload-links-v2 to main October 27, 2026 15:54
Conflicts, all from #747 landing beside #748:
- release-notes/1.0.7.md: main's version; 1.0.7 is tagged, so #748's
  note moves to 1.2.0.md
- PulseButton.tsx: main's in-flight/card code, #748's comment wording
- usePulseUpload.ts: main's progress/activeFile reset, #748's
  AbortController launch
- usePulseUpload.test.ts: both sides' mocks and tests, as separate tests
Copilot AI balanced review requested due to automatic review settings October 29, 2026 17:20

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Pulse’s store release and physical iOS/Android validation remain prerequisites, since emulated browser navigation cannot verify native app handoffs, installed/uninstalled flows, or post-install pairing.

No open issues 🎉

Review effort: Balanced

@SarkarShubhdeep SarkarShubhdeep left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked out e2e flow. Looks simpler now. Approving.

@priyamrmore
priyamrmore merged commit 9cafacf into main Oct 29, 2026
16 checks passed
@morepriyam
morepriyam deleted the feat/video-conform-v2 branch November 16, 2026 16:37
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.

4 participants