Omit a null hostId from thread tabs responses so older mobile builds still sync - #2144
Merged
SawyerHood merged 1 commit intoAug 21, 2026
Merged
Conversation
…still sync Installed mobile builds parse the tabs routes with a strict copy of the contract that predates hostId. The server now emits hostId: null, so those builds reject every response and show "Couldn't sync tabs" when a host-file link opens a panel tab. Omit the field when it is null; current clients default it back. Co-Authored-By: Claude <noreply@anthropic.com>
SawyerHood
deleted the
bb/fix-inaccessible-mobile-images-thr_fs3nw3qdvi
branch
August 21, 2026 04:32
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.
What was wrong
Image links in the mobile app failed with a "Couldn't sync tabs" toast. The links and the image routes were fine. A tap opens a
host-file-previewpanel tab, and the app then syncs the tab strip withGET/PUT /threads/:id/tabs. #2005 addedhostIdtohost-file-previewtabs with.default(null), so the server now emitshostId: nullin every tabs response. Installed mobile builds bundle a.strict()copy ofthreadTabsResponseSchemathat predates the field, so their SDK rejects the whole response (Unrecognized key: hostId), the mutation errors, and the tab never settles. Phones cannot update in step with the server, so the server must stay readable by the shipped schema.What changed
apps/server/src/routes/threads/tabs.ts: the GET and PUT responses omithostIdwhen it isnull, onhost-file-previewtabs and onhost-file-previewfile-opener owners of plugin-panel tabs. A non-nullhostIdstill travels. Current clients parse the omission back tonullthrough the schema default.packages/server-contract: addedThreadTabsWireResponse(z.inputof the response schema) and typed both tabs routes with it.No daemon wire change, so no
HOST_DAEMON_PROTOCOL_VERSIONbump.How you verified
apps/server/test/public/public-thread-tabs.test.tsthat fails before the route change (expected … to not have property "hostId") and passes after it.pnpm exec turbo run test --filter=@bb/server -- test/public/public-thread-tabs.test.ts: 3/3 pass.@bb/server-contracttests: 58/58 pass.pnpm exec turbo run typecheckfor@bb/server,@bb/sdk,@bb/app,@bb/mobile,@bb/demo-server: pass.bee.getbb.appserver on a current Metro bundle; storage and host-file image links open the panel tab and the lightbox.Fixes #