Boost: pair a phone from the desktop app

未关闭
#67 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
20/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
typescript

调研方向

Start by reading the designs in #53 and #52 and the dependent issues #65 and #63; this work is blocked until those are accepted or merged and a maintainer approves proceeding. Then inspect apps/boost, the pairing core in packages/boost, and packages/core/src/qr.ts; use the desktop test command with a faked transport. Done means the pairing, refusal, and unpair cases pass, followed by a two machine check and screenshots in both locales.

由索引模型根据 Issue 内容生成。

描述

copy help wanted privacy ui

Why

US-BOOST-01: the user pairs the laptop running Boost with the phone, through FR-MOVE-01's QR and 6-digit flow, and "the computer never holds the user's keys". This is the computer's half.

What to do

In apps/boost, with the pairing core from packages/boost:

  1. Make and keep the computer's own key pair, where the stack decision says.
  2. Show the QR with the payload the design fixed, drawn with encodeQr (packages/core/src/qr.ts) if it fits.
  3. Listen on the transport the design picked, with the LAN path and the DHT as decided. Accept one phone, show the 6-digit code, and ask the user to confirm it matches the phone's.
  4. Keep the phone's public key, and accept only that phone afterwards.
  5. Unpair: forget the key and close the phone's connections. A turn in flight ends as the design says.
  6. Count every peer and bootstrap host the app contacts, on the app's host list.

Tests first for each step, with the transport faked.

Done when

  • In tests, and once by hand on two machines: the pairing spike's phone script pairs, a wrong code fails closed, a second phone is refused, and after Unpair the first phone is refused too.
  • Screenshots of each pairing state, in es-419 and en.

How to check

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

Then pair by hand with the pairing spike's phone script on a second machine.

Depends on

  • Blocked by the designs in #53 and #52.
  • #65
  • #63

Keep in mind

  • The computer keeps the phone's public key and nothing about the user.
  • No server of ours in the middle. A relay, if the design allows one, is the user's own.
  • Strings in packages/copy, in both locales, with no em or en dashes.
  • 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).
主要语言
TypeScript
星标
11
派生
0
平均合并
10 分钟
30 天内合并 PR
6

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

DojoCodingLabs/hermit 的其他 Issue

查看 DojoCodingLabs/hermit 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。