Repository navigation
Conversation
✅ Deploy Preview for sunny44-builder ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for base44-platform-starter ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
ozsay
force-pushed
the
codex/white-label-builder-socket
branch
from
September 17, 2026 10:32
2d810d8 to
ec485ac
Compare
The browser now gets a one-app, read-only socket session token from the partner backend instead of the service user's access token. The backend opens it with a workspace key holding apps:watch (BASE44_WATCH_KEY, or BASE44_SVC_KEY when unset). Aligns with the SDK's session contract: getSessionToken instead of refreshToken, onSnapshot instead of onJoined and cursors. The first snapshot loads full history over HTTP; reconnect snapshots merge by id. Message removals apply live, and a missing socket snapshot no longer stops delivery. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ozsay
force-pushed
the
codex/white-label-builder-socket
branch
from
September 29, 2026 10:25
ac058fd to
9230b3c
Compare
Switching apps, unmounting or closing the tab now ends the Base44 socket session instead of leaving it to count against the key's live-session limit for its full hour. The browser holds a handle signed for its user and app, so it can end only its own sessions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The builder socket now sends named public events: apply message.updated, message.removed, app.status_changed and image.resolved directly, and reload on the re-read signals. Tool calls use the public shape (arguments, display, user_input, media results, approval), and the server maps HTTP conversation reads into it. Bumps the SDK preview to the matching platform-client build. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A conversation.changed now rejoins for a snapshot, whose fixture status would overwrite the ready state; a finished build arrives as a status event. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Game assets and videos return a URL alone: a placeholder until image.resolved replaces it, or the finished asset. The widget, the image resolver and the HTTP mapping handle that shape. Bumps the SDK preview to the build with selected_label and URL results. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Sep 30, 2026
The SDK now reports session_revoked when the partner or an admin ends the session, so the chat says live updates are no longer available. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 4, 2026
amitbardos
added a commit
that referenced
this pull request
Oct 4, 2026
…e-label example Replace chat polling in examples/white-label-minimal with live builder updates over the Base44 platform socket, through the Platform SDK (@base44/platform). The partner backend opens a one-app socket session with a workspace key; the browser holds only the session token. Oz Sayag's work from #31, switched to the @base44/platform package. package-lock.json is updated once @base44/platform is published. Co-Authored-By: Oz Sayag <ozs@wix.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
amitbardos
added a commit
that referenced
this pull request
Oct 4, 2026
Replace chat polling in examples/white-label-minimal with the Base44 platform socket, through the Platform SDK (@base44/platform). Kept minimal on purpose: - server: lib/base44/socket-session.ts opens a read-only session for one app with the workspace key, behind the existing sign-in and ownership checks (openBuilderSession action). - browser: lib/chat/live-updates.ts subscribes; the snapshot replaces the chat, then message.updated / message.removed / app.status_changed. - React: components/useBuilderSocket.ts, same interface as the polling hook it replaces, so the UI is unchanged. Socket messages are converted to the shape the existing chat UI renders (lib/chat/live-messages.ts). Production follow-ups (closing the session, history beyond 50 messages, image placeholders) are listed in the README. Based on Oz Sayag's work in #31. package-lock.json is updated once @base44/platform is published. Co-Authored-By: Oz Sayag <ozs@wix.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
amitbardos
added a commit
that referenced
this pull request
Oct 4, 2026
Replace chat polling in examples/white-label-minimal with the Base44 platform socket, through the Platform SDK (@base44/platform). Kept minimal on purpose: - server: lib/base44/socket-session.ts opens a read-only session for one app with the workspace key, behind the existing sign-in and ownership checks (openBuilderSession action). - browser: lib/chat/live-updates.ts subscribes; the snapshot replaces the chat, then message.updated / message.removed / app.status_changed. - React: components/useBuilderSocket.ts, same interface as the polling hook it replaces, so the UI is unchanged. Socket messages are converted to the shape the existing chat UI renders (lib/chat/live-messages.ts). Production follow-ups (closing the session, history beyond 50 messages, image placeholders) are listed in the README. Based on Oz Sayag's work in #31. Co-Authored-By: Oz Sayag <ozs@wix.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
amitbardos
added a commit
that referenced
this pull request
Oct 4, 2026
Replace chat polling in examples/white-label-minimal with the Base44 platform socket, through the Platform SDK (@base44/platform). Kept minimal on purpose: - server: lib/base44/socket-session.ts opens a read-only session for one app with the workspace key, behind the existing sign-in and ownership checks (openBuilderSession action). - browser: lib/chat/live-updates.ts subscribes; the snapshot replaces the chat, then message.updated / message.removed / app.status_changed. - React: components/useBuilderSocket.ts, same interface as the polling hook it replaces, so the UI is unchanged. Socket messages are converted to the shape the existing chat UI renders (lib/chat/live-messages.ts). Production follow-ups (closing the session, history beyond 50 messages, image placeholders) are listed in the README. Based on Oz Sayag's work in #31. Co-authored-by: Oz Sayag <ozs@wix.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
amitbardos
added a commit
that referenced
this pull request
Oct 4, 2026
Replace chat polling in examples/white-label-minimal with the Base44 platform socket, through the Platform SDK (@base44/platform). Kept minimal on purpose: - server: lib/base44/socket-session.ts opens a read-only session for one app with the workspace key, behind the existing sign-in and ownership checks (openBuilderSession action). - browser: lib/chat/live-updates.ts subscribes; the snapshot replaces the chat, then message.updated / message.removed / app.status_changed. - React: components/useBuilderSocket.ts, same interface as the polling hook it replaces, so the UI is unchanged. Socket messages are converted to the shape the existing chat UI renders (lib/chat/live-messages.ts). Production follow-ups (closing the session, history beyond 50 messages, image placeholders) are listed in the README. Based on Oz Sayag's work in #31. Co-Authored-By: Oz Sayag <ozs@wix.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
Closing: Tiny Sunny's live updates now come from @base44/platform's useBase44Chat hook (#79), and the files this changes are no longer on main. |
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
Replace periodic chat polling in
examples/white-label-minimalwith live builder updates over the Base44 platform socket, through the platform SDK (base44/javascript-sdk#286). The backend side is base44-dev/apper#26368 (socket sessions, merged) and base44-dev/apper#27220–#27222 (the declared public events and the white-label audience on/ws).POST /api/base44/socket-sessionrequires a signed-in user, the same origin and app ownership. It then opens a one-app session with a workspace key (POST /api/service/socket-sessions) and returns{ serverUrl, sessionToken }withCache-Control: no-store, private. The token lasts an hour, cannot write, and carries no Base44 identity. The service user's access token no longer reaches the browser.apps:watch. It isBASE44_WATCH_KEY, falling back toBASE44_SVC_KEY, following the existingBASE44_PROVISION_KEYpattern. A key missing the scope surfaces as a configuration error (503).closeBuilderSession, akeepaliverequest toDELETE /api/service/socket-sessions/{id}), freeing the key's live-session limit. The browser holds a handle: the session id signed withNEXTAUTH_SECRETfor this user and app, so a user can end only their own sessions.message.updated,message.removed,app.status_changedandimage.resolvedapply live.conversation.changed,files.changed,branch.deleted,repository.changed,pull_request.changed) and completed mutations reload over HTTP.arguments,display,user_input, mediaresults,approval); the server maps HTTP conversation reads into the same shape, and an approval shows the guard's reason when it has one.main(the workspace stage layout and the builder "Ready" panel). The PR's own earlier commits are kept.@base44/sdktonpm:@base44-preview/sdk@0.8.52-pr.286.be667a9(SDK PR head78c6fd3).Validation
npm run minimal:test: 46 tests passed (23 server and identity, 23 stream, conversation, question and tool-activity). They cover:snapshot_unavailablefallback;session_replaced;/ws/socket.io/, the default namespace,{room, data}events with anapp.snapshoton join, and it rejects a CONNECT without the session token.app.status_changed: aconversation.changedrejoins for a snapshot, whose fixture status would overwrite the ready state.<img>warning and threeno-explicit-anyerrors intests/build-stream.test.ts.@base44/sdkpreview entry changes inpackage-lock.json.Rollout prerequisites
whitelabel-websocketsandbase44-for-platformsflags, plus a key withapps:watchgranted to the apps.Intent (for reviewers & PR Autofix)
What this PR does
Use the platform SDK's builder module for minimal-example chat updates, authenticated by a partner-opened socket session, while keeping the existing HTTP mutations and the readable getting-started structure.
Key decisions & why
What NOT to touch
Tradeoffs / follow-ups
🤖 Generated with Claude Code