Repository navigation
feat(account): confirm a device's removal on every PC (experimental, off by default) #3208
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
67d2e23
aa4b372
5299589
981623c
1ea98c6
962a64c
51ad113
d9e2c61
857fc79
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| ### Added | ||
| - Experimental, off by default (Settings → Experimental → Account: confirm removals on every PC): | ||
| removing a device from your account shows, for every PC, whether that PC reports it removed, and | ||
| the device that removed it brings the removal to each PC it connects to until every PC has it, | ||
| even one whose mailbox never got it. "It was lost or stolen" when removing a device lists the | ||
| devices it added, so you can remove them too, one by one. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -804,6 +804,20 @@ export class DeviceStore { | |
| /** Every key this PC keeps out, signed removal or not (a Revoke here, a record that no longer parses): /api/account/status `blocked`. */ | ||
| tombstoneKeys(): string[] { return [...new Set(this.tombstones.map((t) => t.key))]; } | ||
|
|
||
| /** | ||
| * Keys of rows paired on this PC itself (no `added_by`, never moved onto their key by a `link`): /api/account/status | ||
| * `paired_here`, what a client needs before it calls a removal "paired again" here. | ||
| */ | ||
| pairedHereKeys(): string[] { | ||
| return [...new Set(this.devices.filter((d) => d.relay_public_key !== undefined && d.added_by === undefined && d.linked_at === undefined && !this.stale(d)).map((d) => d.relay_public_key!))]; | ||
|
Comment on lines
+811
to
+812
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| } | ||
|
|
||
| /** Keys removed here with no row left for them (a stale row counts as gone): /api/account/status `tombstones`. */ | ||
| removedKeys(): string[] { | ||
| return [...new Set(this.tombstones.filter((t) => !this.devices.some((d) => d.relay_public_key === t.key && !this.stale(d))).map((t) => t.key))]; | ||
| } | ||
|
|
||
|
|
||
| /** The signed `add`s behind this PC's account rows, as received: what /api/account/status lists. One that no longer parses or names another key is left out. */ | ||
| accountAdds(): AddRecord[] { | ||
| const account = this.account(); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Script executed:
Repository: devswha/ovis
Length of output: 42037
Script executed:
Repository: devswha/ovis
Length of output: 37914
Document both enrollment modes.
When
accountRemovalReportsis disabled,enrollPcincludes kept removals as records. The default isfalse, so the current paragraph gives incorrect protocol guidance. State that only the enabled mode sends kept removals asheldkeys.Suggested documentation fix
Committable suggestion