Boost: pair a computer from the phone on HM-BOOST-01

Open
#66 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
react-native, typescript

Research direction

Start by reading the design issue #53 and the pairing work in #63; this issue says implementation is blocked until the design is accepted. Then inspect apps/mobile/worklets/wallet, apps/mobile/src/adapters/net.ts, and the listed mobile screens and tests. Done means pairing works on a real arm64 phone, privacy counts every contacted host, and the Android build and listed checks pass.

Written by the indexing model from the issue text.

Description

copy device-lab help wanted privacy ui

Why

HM-BOOST-01, "Pair and configure a Boost", is the phone's Boost screen (PRD section 2.7), and US-BOOST-01 starts there. The same pairing serves changing phones (US-MOVE-01), so this also builds the transport EP-13 needs.

What to do

  1. The transport, where the design put it: a plugin in QVAC's worklet (apps/mobile/qvac.config.json, scripts/qvac-bundle.mjs), or Hermit's own worklet in apps/mobile/worklets/boost (new), built like apps/mobile/worklets/wallet, with an Expo config plugin like apps/mobile/plugins/with-wallet-worklet.js. Install handlers for uncaught errors, so a transport fault can't end the app. Add any worklet tests to the test script in apps/mobile/package.json.
  2. The adapter, apps/mobile/src/adapters/boost.ts (new). It starts and stops the transport, hands the handshake hash and the bytes to the pairing core, and suspends when the app leaves the screen.
  3. The key. A new pairing key pair in the Keystore-backed secure store, added to SECRET_KEYS in packages/core/src/erase.ts. Only its public key leaves the phone.
  4. Counting. Every bootstrap node, relay and computer address the phone contacts is counted and listed on HM-SET-02 (apps/mobile/src/app/privacy.tsx), as the design says. Extend apps/mobile/src/adapters/net.ts if the design asks for it.
  5. The screen, apps/mobile/src/app/boost.tsx (new): read the computer's QR (or what the design chose instead), show the 6-digit code, confirm or cancel, then show the paired computer with Unpair. Reach it from Settings (apps/mobile/src/app/settings.tsx) or with one line in MENU (apps/mobile/src/components/MenuSheet.tsx). Its states go in docs/prd/hermit-ui-states-and-edge-cases.md.
  6. Copy, with keys like HM-BOOST-01.title, in packages/copy/locales/en.json and es-419.json.
  7. The camera, if the design uses it: asked for with a reason and a "Not now" (US-ONB-08), and added to PRD section 2.15.

Tests first: the adapter's logic and the screen's view model, under node --test (apps/mobile/src/*.test.ts), with the transport faked.

Done when

  • On a real arm64 phone, the dev build pairs with the desktop app, or with the pairing spike's computer script. A wrong code fails closed, and Unpair works.
  • HM-SET-02 lists every host the pairing contacted.
  • Screenshots in light and Deep sea, in es-419 and en, with made-up names.
  • The Android check builds the APK.

How to check

pnpm --filter @hermit/mobile test
pnpm check:privacy && pnpm typecheck && pnpm lint && pnpm test
node scripts/guard/check.mjs --patterns scripts/guard/patterns.txt

Then build the dev app (CONTRIBUTING.md, Build the Android app) and pair it with a computer.

Depends on

  • Blocked by the design in #53.
  • #63

Keep in mind

  • Keys never leave the phone. Pairing sends no chat, memory or message content.
  • react-native-bare-kit stays at ~0.16.0 and @qvac/sdk stays pinned exactly. Add packages with npx expo install. Never edit apps/mobile/android by hand.
  • Every string in packages/copy, in both locales, with tú in Spanish and no em or en dashes.
  • The mascot is locked. If the screen shows it, use the existing 10-boost pose (apps/mobile/src/mascot-rig.ts).
  • Open a pull request only once everything under Depends on is accepted or merged, and a maintainer has said so here (AGENTS.md: code for a feature without an accepted issue may be closed).
Dominant language
TypeScript
Stars
11
Forks
0
Avg merge
10m
Merged PRs (30d)
6

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from DojoCodingLabs/hermit

All issues in DojoCodingLabs/hermit

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.