diff --git a/bskyweb/cmd/bskyweb/passdata.go b/bskyweb/cmd/bskyweb/passdata.go index ec994aa63e..3fbb28b605 100644 --- a/bskyweb/cmd/bskyweb/passdata.go +++ b/bskyweb/cmd/bskyweb/passdata.go @@ -108,10 +108,14 @@ func BuildPassJSON(did, handle, displayName, pdsHost, theme, teamID string, crea createdAtISO = createdAt.UTC().Format(time.RFC3339) } + // avoid an unused variable when displayName is empty - we keep memberName + // computed for a possible future design, but the current layout uses + // handle directly. + _ = memberName + pdsField := passField{Key: "pds", Label: "PDS", Value: pdsHost} - nameField := passField{Key: "name", Label: "NAME", Value: memberName} - didField := passField{Key: "did", Label: "DID", Value: did} - sinceField := passField{Key: "since", Label: "MEMBER SINCE", Value: createdAtISO, DateStyle: "PKDateStyleShort"} + handleField := passField{Key: "handle", Label: "Handle", Value: handle} + sinceField := passField{Key: "since", Label: "Member Since", Value: createdAtISO, DateStyle: "PKDateStyleShort"} backFields := []passField{ {Key: "about", Label: "About", Value: "Scan the QR code to view this Bluesky profile."}, {Key: "url", Label: "Profile URL", Value: profileURL}, @@ -124,20 +128,25 @@ func BuildPassJSON(did, handle, displayName, pdsHost, theme, teamID string, crea TeamIdentifier: teamID, OrganizationName: "Bluesky", Description: "Bluesky profile - " + atHandle, - LogoText: "Bluesky", - ForegroundColor: "rgb(255, 255, 255)", - LabelColor: "rgb(255, 255, 255)", - BackgroundColor: ThemeBackgroundRGB(theme), + // logoText omitted - the logo image already carries the "Bluesky" + // wordmark; setting both would render the brand name twice. + LogoText: "", + ForegroundColor: "rgb(255, 255, 255)", + LabelColor: "rgb(255, 255, 255)", + BackgroundColor: ThemeBackgroundRGB(theme), + // iOS <= 26 fallback: handle as primary, since as secondary (stacked). Generic: passFields{ HeaderFields: []passField{pdsField}, - PrimaryFields: []passField{nameField}, - SecondaryFields: []passField{didField, sinceField}, + PrimaryFields: []passField{handleField}, + SecondaryFields: []passField{sinceField}, BackFields: backFields, }, + // iOS 27+: handle and since side-by-side in primaryFields, matching + // what Pass Designer exports. PosterGeneric: posterFields{ HeaderFields: []passField{pdsField}, - PrimaryFields: []passField{nameField}, - SecondaryFields: []passField{didField, sinceField}, + PrimaryFields: []passField{handleField, sinceField}, + SecondaryFields: []passField{}, AuxiliaryFields: []passField{}, FooterFields: []passField{}, BackFields: backFields, diff --git a/bskyweb/cmd/bskyweb/testdata/pass-dawn.golden.json b/bskyweb/cmd/bskyweb/testdata/pass-dawn.golden.json index 01bbad242f..2ec0fb3f3c 100644 --- a/bskyweb/cmd/bskyweb/testdata/pass-dawn.golden.json +++ b/bskyweb/cmd/bskyweb/testdata/pass-dawn.golden.json @@ -5,7 +5,7 @@ "teamIdentifier": "TEAMID00", "organizationName": "Bluesky", "description": "Bluesky profile - @alice.bsky.social", - "logoText": "Bluesky", + "logoText": "", "foregroundColor": "rgb(255, 255, 255)", "labelColor": "rgb(255, 255, 255)", "backgroundColor": "rgb(255, 109, 190)", @@ -19,20 +19,15 @@ ], "primaryFields": [ { - "key": "name", - "label": "NAME", - "value": "Alice" + "key": "handle", + "label": "Handle", + "value": "alice.bsky.social" } ], "secondaryFields": [ - { - "key": "did", - "label": "DID", - "value": "did:plc:abc123" - }, { "key": "since", - "label": "MEMBER SINCE", + "label": "Member Since", "value": "2026-01-25T23:59:05Z", "dateStyle": "PKDateStyleShort" } @@ -60,24 +55,18 @@ ], "primaryFields": [ { - "key": "name", - "label": "NAME", - "value": "Alice" - } - ], - "secondaryFields": [ - { - "key": "did", - "label": "DID", - "value": "did:plc:abc123" + "key": "handle", + "label": "Handle", + "value": "alice.bsky.social" }, { "key": "since", - "label": "MEMBER SINCE", + "label": "Member Since", "value": "2026-01-25T23:59:05Z", "dateStyle": "PKDateStyleShort" } ], + "secondaryFields": [], "auxiliaryFields": [], "footerFields": [], "backFields": [ diff --git a/bskyweb/cmd/bskyweb/testdata/pass-day.golden.json b/bskyweb/cmd/bskyweb/testdata/pass-day.golden.json index 48918d03a0..90e10a7bfe 100644 --- a/bskyweb/cmd/bskyweb/testdata/pass-day.golden.json +++ b/bskyweb/cmd/bskyweb/testdata/pass-day.golden.json @@ -5,7 +5,7 @@ "teamIdentifier": "TEAMID00", "organizationName": "Bluesky", "description": "Bluesky profile - @alice.bsky.social", - "logoText": "Bluesky", + "logoText": "", "foregroundColor": "rgb(255, 255, 255)", "labelColor": "rgb(255, 255, 255)", "backgroundColor": "rgb(117, 175, 255)", @@ -19,20 +19,15 @@ ], "primaryFields": [ { - "key": "name", - "label": "NAME", - "value": "Alice" + "key": "handle", + "label": "Handle", + "value": "alice.bsky.social" } ], "secondaryFields": [ - { - "key": "did", - "label": "DID", - "value": "did:plc:abc123" - }, { "key": "since", - "label": "MEMBER SINCE", + "label": "Member Since", "value": "2026-01-25T23:59:05Z", "dateStyle": "PKDateStyleShort" } @@ -60,24 +55,18 @@ ], "primaryFields": [ { - "key": "name", - "label": "NAME", - "value": "Alice" - } - ], - "secondaryFields": [ - { - "key": "did", - "label": "DID", - "value": "did:plc:abc123" + "key": "handle", + "label": "Handle", + "value": "alice.bsky.social" }, { "key": "since", - "label": "MEMBER SINCE", + "label": "Member Since", "value": "2026-01-25T23:59:05Z", "dateStyle": "PKDateStyleShort" } ], + "secondaryFields": [], "auxiliaryFields": [], "footerFields": [], "backFields": [ diff --git a/bskyweb/cmd/bskyweb/testdata/pass-dusk.golden.json b/bskyweb/cmd/bskyweb/testdata/pass-dusk.golden.json index 6ae6712586..cdda0b2bf6 100644 --- a/bskyweb/cmd/bskyweb/testdata/pass-dusk.golden.json +++ b/bskyweb/cmd/bskyweb/testdata/pass-dusk.golden.json @@ -5,7 +5,7 @@ "teamIdentifier": "TEAMID00", "organizationName": "Bluesky", "description": "Bluesky profile - @alice.bsky.social", - "logoText": "Bluesky", + "logoText": "", "foregroundColor": "rgb(255, 255, 255)", "labelColor": "rgb(255, 255, 255)", "backgroundColor": "rgb(177, 90, 162)", @@ -19,20 +19,15 @@ ], "primaryFields": [ { - "key": "name", - "label": "NAME", - "value": "Alice" + "key": "handle", + "label": "Handle", + "value": "alice.bsky.social" } ], "secondaryFields": [ - { - "key": "did", - "label": "DID", - "value": "did:plc:abc123" - }, { "key": "since", - "label": "MEMBER SINCE", + "label": "Member Since", "value": "2026-01-25T23:59:05Z", "dateStyle": "PKDateStyleShort" } @@ -60,24 +55,18 @@ ], "primaryFields": [ { - "key": "name", - "label": "NAME", - "value": "Alice" - } - ], - "secondaryFields": [ - { - "key": "did", - "label": "DID", - "value": "did:plc:abc123" + "key": "handle", + "label": "Handle", + "value": "alice.bsky.social" }, { "key": "since", - "label": "MEMBER SINCE", + "label": "Member Since", "value": "2026-01-25T23:59:05Z", "dateStyle": "PKDateStyleShort" } ], + "secondaryFields": [], "auxiliaryFields": [], "footerFields": [], "backFields": [ diff --git a/bskyweb/cmd/bskyweb/testdata/pass-night.golden.json b/bskyweb/cmd/bskyweb/testdata/pass-night.golden.json index 0076094636..e3d9686618 100644 --- a/bskyweb/cmd/bskyweb/testdata/pass-night.golden.json +++ b/bskyweb/cmd/bskyweb/testdata/pass-night.golden.json @@ -5,7 +5,7 @@ "teamIdentifier": "TEAMID00", "organizationName": "Bluesky", "description": "Bluesky profile - @alice.bsky.social", - "logoText": "Bluesky", + "logoText": "", "foregroundColor": "rgb(255, 255, 255)", "labelColor": "rgb(255, 255, 255)", "backgroundColor": "rgb(0, 21, 51)", @@ -19,20 +19,15 @@ ], "primaryFields": [ { - "key": "name", - "label": "NAME", - "value": "Alice" + "key": "handle", + "label": "Handle", + "value": "alice.bsky.social" } ], "secondaryFields": [ - { - "key": "did", - "label": "DID", - "value": "did:plc:abc123" - }, { "key": "since", - "label": "MEMBER SINCE", + "label": "Member Since", "value": "2026-01-25T23:59:05Z", "dateStyle": "PKDateStyleShort" } @@ -60,24 +55,18 @@ ], "primaryFields": [ { - "key": "name", - "label": "NAME", - "value": "Alice" - } - ], - "secondaryFields": [ - { - "key": "did", - "label": "DID", - "value": "did:plc:abc123" + "key": "handle", + "label": "Handle", + "value": "alice.bsky.social" }, { "key": "since", - "label": "MEMBER SINCE", + "label": "Member Since", "value": "2026-01-25T23:59:05Z", "dateStyle": "PKDateStyleShort" } ], + "secondaryFields": [], "auxiliaryFields": [], "footerFields": [], "backFields": [