Skip to content

Send Google/Firebase profile picture to Bloom editor on login (BL-16516)#615

Merged
StephenMcConnel merged 1 commit into
masterfrom
BL-16516GoogleAvatars
Jul 8, 2026
Merged

Send Google/Firebase profile picture to Bloom editor on login (BL-16516)#615
StephenMcConnel merged 1 commit into
masterfrom
BL-16516GoogleAvatars

Conversation

@hatton

@hatton hatton commented Jul 8, 2026

Copy link
Copy Markdown
Member

[Claude Opus 4.8]

Summary

Adds an optional photoUrl field to the browser→Bloom-desktop external/login POST so the Bloom editor can show the user's Google profile picture after login.

photoUrl carries the Firebase user.photoURL (Google profile picture); it is null for logins without one (e.g. email-password). It is threaded firebase.tsconnectParseServerinformEditorOfSuccessfulLogin as a plain string param, keeping editor.ts free of any firebase import.

Deploy-order independence (intentional)

The field is purely additive and optional, so blorg and the Bloom desktop app can deploy independently in any order:

  • An older deployed Bloom simply ignores the extra field (tolerant JSON parse).
  • No existing field is renamed or removed.
  • We send null (never "", never a fabricated value) when there's no picture.

This is the website half of a two-repo change; the Bloom desktop side is implemented separately.

Verification

  • Lint clean on the 3 changed files.
  • Full TS test suite: 125/125 passing.
  • E2E (real Firebase Google sign-in → running Bloom) not exercisable in this environment.

Ref: https://issues.bloomlibrary.org/youtrack/issue/BL-16516


This change is Reviewable

Add an optional `photoUrl` field to the external/login POST body sent to
the Bloom desktop editor. It carries the Firebase user.photoURL (Google
profile picture), and is null for logins without one (e.g. email-password).

The field is purely additive and optional so blorg and Bloom can deploy
independently in any order: an older Bloom ignores the extra field.

photoUrl is threaded firebase.ts -> connectParseServer ->
informEditorOfSuccessfulLogin as a plain param, keeping editor.ts free of
any firebase import.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@greptile-apps

greptile-apps Bot commented Jul 8, 2026

Copy link
Copy Markdown

Greptile Summary

Threads the Firebase user.photoURL value through the login pipeline (firebase.tsconnectParseServerinformEditorOfSuccessfulLogin) and includes it as a new photoUrl field in the browser→Bloom-desktop external/login POST body.

  • Empty string is normalized to null at the source (user.photoURL || null), and the ?? null in the POST payload ensures undefined is also serialized as JSON null rather than silently dropped — so the field is always present in the payload.
  • The new parameter is optional at every callsite, making the change backward-compatible with both older callers and older Bloom desktop builds that ignore the extra field.

Important Files Changed

Filename Overview
src/authentication/firebase/firebase.ts Extracts `user.photoURL
src/connection/ParseServerConnection.ts Adds an optional `photoUrl?: string
src/editor.ts Adds optional photoUrl param and includes it in the POST body as photoUrl: photoUrl ?? null, correctly coercing undefined to null so the field is always present in the JSON payload.

Reviews (1): Last reviewed commit: "BL-16516 Send Google/Firebase profile pi..." | Re-trigger Greptile

Comment thread src/editor.ts
@hatton

hatton commented Jul 8, 2026

Copy link
Copy Markdown
Member Author

[Claude Opus 4.8] Consulted Devin on 2026-07-08 13:21 UTC up to commit a5a52fe1. Result: 0 bugs, 1 Investigate flag (posted as an inline thread on src/editor.ts), 2 Informational items (not posted — low signal).

@StephenMcConnel StephenMcConnel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@StephenMcConnel reviewed 3 files and all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion.

@StephenMcConnel StephenMcConnel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

@StephenMcConnel made 1 comment.
Reviewable status: all files reviewed, 1 unresolved discussion.

@StephenMcConnel StephenMcConnel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@StephenMcConnel resolved 1 discussion.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on hatton).

@StephenMcConnel StephenMcConnel merged commit 5f14a26 into master Jul 8, 2026
2 checks passed
@StephenMcConnel StephenMcConnel deleted the BL-16516GoogleAvatars branch July 8, 2026 22:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants