# pet.trezy.devicePreference

> Published by [trezy.pet](https://lexicon.garden/identity/did:plc:ollch4g7tes2reb5eceiwuol)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:ollch4g7tes2reb5eceiwuol/pet.trezy.devicePreference)
- [Documentation](https://lexicon.garden/lexicon/did:plc:ollch4g7tes2reb5eceiwuol/pet.trezy.devicePreference/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:ollch4g7tes2reb5eceiwuol/pet.trezy.devicePreference/examples)

## Definitions

### `pet.trezy.devicePreference`

**Type**: `record`

**Key**: `any`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `label` | `string` | No | A coarse, human-readable name for the device list — "Chrome on macOS", never a full user-agent string. Somebody cleaning up stale entries has to be able to tell which row is their old phone; unlabelled rows make the delete button unanswerable. Coarse on purpose: browser family and platform family only, which is enough to recognise and too little to single anybody out. |
| `typeMode` | `string` | Yes | Required here, unlike on the account row: a device row IS the override, so one without a mode says nothing and should have been deleted instead. |
| `updatedAt` | `string` (datetime) | Yes |  |
| `lastSeenAt` | `string` (datetime) | No | When this device last opened the game, so a stale row can be recognised and deleted. This is the one genuinely time-revealing field in the game, which is why it exists only for overridden devices and only inside the space. |
| `fingerprint` | `string` | No | A hash of a few coarse, stable device traits, used ONLY to re-find this row after the browser's local storage has been cleared — see src/lib/device.ts. ⚠ IT IS BEST-EFFORT AND MUST NEVER BE TREATED AS AN IDENTITY. It is matched only when exactly one row matches, because two identical phones on one account produce the same hash and silently merging them would change the typeface on a device the player never touched. |

## Raw Schema

```json
{
  "id": "pet.trezy.devicePreference",
  "defs": {
    "main": {
      "key": "any",
      "type": "record",
      "record": {
        "type": "object",
        "required": [
          "typeMode",
          "updatedAt"
        ],
        "properties": {
          "label": {
            "type": "string",
            "maxLength": 60,
            "description": "A coarse, human-readable name for the device list — \"Chrome on macOS\", never a full user-agent string. Somebody cleaning up stale entries has to be able to tell which row is their old phone; unlabelled rows make the delete button unanswerable. Coarse on purpose: browser family and platform family only, which is enough to recognise and too little to single anybody out."
          },
          "typeMode": {
            "type": "string",
            "description": "Required here, unlike on the account row: a device row IS the override, so one without a mode says nothing and should have been deleted instead.",
            "knownValues": [
              "pixel",
              "softer",
              "system"
            ]
          },
          "updatedAt": {
            "type": "string",
            "format": "datetime"
          },
          "lastSeenAt": {
            "type": "string",
            "format": "datetime",
            "description": "When this device last opened the game, so a stale row can be recognised and deleted. This is the one genuinely time-revealing field in the game, which is why it exists only for overridden devices and only inside the space."
          },
          "fingerprint": {
            "type": "string",
            "maxLength": 64,
            "description": "A hash of a few coarse, stable device traits, used ONLY to re-find this row after the browser's local storage has been cleared — see src/lib/device.ts. ⚠ IT IS BEST-EFFORT AND MUST NEVER BE TREATED AS AN IDENTITY. It is matched only when exactly one row matches, because two identical phones on one account produce the same hash and silently merging them would change the typeface on a device the player never touched."
          }
        },
        "description": "One device that has been given its own text style, keyed by a device id. ⚠ A ROW EXISTS ONLY FOR A DEVICE THE PLAYER HAS DELIBERATELY OVERRIDDEN. Writing one for every device somebody signs in on would build a presence log — how many devices they own and when each was last awake — for no benefit, since a device with no override needs nothing remembered about it. Few rows, each one something the player chose, is also what makes the device list short enough to be worth reading."
      }
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
