Repository navigation
Pulse Opens Through Its Universal Links in One Tap, and TimeHuddle No Longer Manages Pulse's App Store Links - #748
Conversation
…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)
🗑️ Preview Environment Cleaned UpThe preview container for this PR has been deleted. |
There was a problem hiding this comment.
🟡 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
…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.
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.
There was a problem hiding this comment.
🔵 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
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
There was a problem hiding this comment.
🔵 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
left a comment
There was a problem hiding this comment.
Checked out e2e flow. Looks simpler now. Approving.



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/pulsevault0.6.0 (the latest release):buildUploadLink({ form: 'https' })giveshttps://mieweb.github.io/pulse/open#v=1&artifactId=…&server=…&token=…. The released Pulse app claims that host; itsapple-app-site-associationandassetlinks.jsonare live forcom.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
AppLauncher.openUrl).TimeHuddle no longer manages Pulse's App Store / Play Store links
Gone:
PULSE_STORE_URLS) and opening them;openPulseAppOrStore), the nativecanOpenUrlcheck (openNativePulseOrStore), the Androidintent://link with its Play Store fallback;PulseStoreBadges);pulsecamscheme queries inios/App/App/Info.plist(LSApplicationQueriesSchemes) andAndroidManifest.xml(<queries>), which existed only for that check (takes effect with the next native build);/pulse/openstore 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:buildPulseLinkbuilds the one https pairing link (QR target and phone link alike). The package exportsbuildUploadLinkonly 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 toisNativeApp,getMobileOS,isMobileBrowser,openExternalUrl.meteor-backend/server/pulse-link.js: the/pulse/openredirect;verifyUploadTokenno longer exported.pulsecamqueries removed fromInfo.plistandAndroidManifest.xml.Screenshots
Pulse window on a computer: the QR of Pulse's link, no store badges
On a phone held sideways (the QR beside the words)
Tests
pulseLinks.test.tschecksbuildPulseLinkequals the package'sbuildUploadLink({ form: 'https' })and keeps the token in the fragment;device.test.tscovers what's left.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 onlyv,artifactId,server,token.typecheck,lint,formatclean; unit tests 586 / 586.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
AppLauncher.openUrlof a Universal Link) and the removedpulsecamqueries 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.
mainThe 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:
release-notes/1.0.7.md: every PR adds its own section and its own line to the PR list. Keep both sides.src/features/pulse-upload/PulseButton.tsx(Pulse Opens Through Its Universal Links in One Tap, and TimeHuddle No Longer Manages Pulse's App Store Links #748 against The Clock Page's Pulse Card, a Pending Change and an Upload's Progress Fit Every Screen #747/Timesheets as a List of Sessions, and the Work Page in One Layout, on Every Screen #711): one comment abovenote. Keep The Clock Page's Pulse Card, a Pending Change and an Upload's Progress Fit Every Screen #747's code with Pulse Opens Through Its Universal Links in One Tap, and TimeHuddle No Longer Manages Pulse's App Store Links #748's wording ("Beside the chip, the same words the window uses…").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-13andbackup/pulse-video-cards-2026-10-13.