Repository navigation
feat: show the device ID used for machine binding - #30
Merged
Merged
Conversation
Settings → About now shows "Geräte-ID: a41f09c2…" / "Device ID: a41f09c2…" under the app version, with a hint that it lets the administrator match the device binding on the server's Users page. The main process derives the short form (first 8 lowercase hex characters of the machine fingerprint sent as X-Machine-Fingerprint) and serves it on the new app:device-id channel; the full fingerprint never reaches the renderer and is never logged. If the fingerprint cannot be computed the channel returns null and the UI shows "nicht verfügbar" / "unavailable". The support bundle carries the same short ID as client.deviceId. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016xX1efcZF1f6G9rhmaJNLD
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Shows the device ID used for machine binding, so an admin can match it against the server's Users page ("Gerätebindung: gebunden an a41f09c2… seit …"), the same way the Android app does in its settings footer.
Geräte-ID: a41f09c2…/Device ID: a41f09c2…, followed by a small hint (also shown as a tooltip): "Damit ordnet der Administrator die Gerätebindung zu." / "Lets your administrator match the device binding."app:device-idchannel (registered insrc/main/main.jsnext tolocale:*), exposed in the preload aswindow.gatecontrol.getDeviceId(), following theapp:version/getVersion()pattern. The main process returns only the first 8 lowercase hex characters ofgetMachineFingerprint()(core); the full 64-hex value never crosses into the renderer and is never logged.null(a warning without the value is logged) and the UI shows "nicht verfügbar" / "unavailable". Nothing throws.client.deviceId(short form,nullif unavailable). This is done by passing a wrapped collector through the existingcreateSupportBundleSender(ctx, { collect })seam, so no core change is needed..monohasuser-select: text) so it can be copied by hand.New module:
src/main/device-id.js(shortDeviceId,withDeviceId).Tests
test/device-id.test.js: 8-char lowercase-hex result (also from uppercase/whitespace input),nullfor throwing/malformed fingerprints, the log line never contains the ID, support bundle getsclient.deviceId(andnullon failure).test/ipc-channels.test.js: the preload'sgetDeviceId()is served by main.js (covered by the existing channel check), main.js wires it toshortDeviceId(getMachineFingerprint, log), the real preload hands the renderer only the short value, preload/renderer never reference the fingerprint, and the failure path returnsnull.#about-device-idshows an 8-hex ID.npm testgreen (syntax check + 62 tests); the Playwright e2e app spec passed againstelectron .under xvfb, and a German screenshot of Settings → About was taken.🤖 Generated with Claude Code
https://claude.ai/code/session_016xX1efcZF1f6G9rhmaJNLD
Generated by Claude Code