Skip to content

fix(thread): composer uploads key on the signed-in account from the first frame - #5143

Closed
stamp-build[bot] wants to merge 1 commit into
mainfrom
agent/lagoon/composer-upload-owner-sync
Closed

stamp-build[bot] wants to merge 1 commit into
mainfrom
agent/lagoon/composer-upload-owner-sync

Conversation

@stamp-build

@stamp-build stamp-build Bot commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

Lagoon from raft opened this pull request through Stamp
View in Stamp →


Android 1.27.0 release blocker, root fix. Pick an album image in a cached conversation and tap Done in the editor, and the tile stays on "Checking file…" (artin's report; Reef reproduced it on TestBed 1.27.0).

Cause. attachmentUploads = composerDraftUploads.forOwner(currentSession?.user?.id, server). currentSession is loaded asynchronously, so on a cached conversation's first frame the store is the account-"" one. That frame now shows the full page (#5104). Uploads started from it, or from handlers it registered, write their outcome there. The composer's applier, once the session arrives, watches the real account's store and never sees the result. When the page is opened again, its own first frame adopts the result from the "" store, which is why leaving and returning "fixes" it.

Fix. The account falls back to sharedStores.currentAuthenticatedRouteOwner(storeScope)?.accountId, which is known synchronously and already backs knownEntityAccountId on the same page. The store is therefore the same from the first frame, whichever closure starts the upload. #5139 (handlers call the latest upload function) stays as a second line of defence.

Tests. No new unit test, because the cause is the first-frame session timing inside ThreadPage. This will be verified on Reef's TestBed repro and on artin's device with an alpha build of this change. No changeset: the regression hasn't shipped. Will be cherry-picked to release/1.27.0.

🤖 Generated with Claude Code

…irst frame

The upload store was keyed on the session the page loads asynchronously,
so a cached conversation (full page on frame 1 since #5104) used the
account-"" store until the session arrived. Uploads started from that
frame, or by a handler registered on it, landed where the composer never
looks and the tile stayed on "Checking file…". The account now falls
back to the signed-in route owner, which is known synchronously, as
knownEntityAccountId already does.

Reproduced by Reef on 1.27.0 (TestBed) and in artin's logs.

Co-authored-by: bytemain <13938334+bytemain@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@stamp-build

stamp-build Bot commented Nov 20, 2026

Copy link
Copy Markdown
Contributor Author

Merged by Stamp in batch 7fa83bbd6a5680b3d5cdd4a2621e7d0d: 67e5dfc . The batch passed its required CI; this PR is closed because its commit was included by fast-forward.

Review in stamp.build

@stamp-build stamp-build Bot closed this Nov 20, 2026
stamp-build Bot added a commit that referenced this pull request Nov 20, 2026
…sion, Assistant row, translation placeholder, reset-notice polling) (#5158)

* fix(auth): Home re-reads the two-step reset notice at most every 30 s (#5137)

Stamp-Batch: 6a2458c9389667280f1501268968583f
Original-Head: 84a763f
Signed-off-by: Stamp Queue <stamp-queue@stamp.build>
(cherry picked from commit 636993f)

* fix(thread): a translating message shows placeholder bars down its whole height (#5141)

Stamp-Batch: 6a2458c9389667280f1501268968583f
Original-Head: 32fe17d
Signed-off-by: Stamp Queue <stamp-queue@stamp.build>
(cherry picked from commit c78a6a1)

* fix(thread): composer uploads key on the signed-in account from the first frame (#5143)

Stamp-Batch: 7fa83bbd6a5680b3d5cdd4a2621e7d0d
Original-Head: 53a7a74
Signed-off-by: Stamp Queue <stamp-queue@stamp.build>
(cherry picked from commit 67e5dfc)

* fix(assistant): phone Home shows the Assistant row (the layout decides, not the desktop-mode setting) (#5151)

Backport of #5151 (head cde2b9f) to release/1.27.0.

* fix(thread): an edited or annotated image no longer sticks on "Checking file…"

The event-bus effects that take the image editor's Done (and the other
composer events) are keyed only on the thread, so they kept the first
frame's copy of uploadComposerAttachmentFiles. On that frame the session
is not loaded yet, so the copy holds the upload store of account "".
The upload ran and succeeded there, but the composer applies outcomes
from the signed-in account's store, so the tile never left "Checking
file…". Since #5104 a cached conversation renders the full page on its
first frame, before the session is captured, which exposed this on
Android 1.27.0.

The effects now call the latest copy through rememberUpdatedState.

* fix(thread): a share sent while its files upload is sent with the loaded session

The external-share auto-send collector is keyed only on the thread, so it
kept the first frame's performComposerSend, whose session and provenance
are null before the session loads: the send was rejected
(authority_changed_before_message_send) and the share never went out.
It now calls the latest copy through rememberUpdatedState.

* fix(thread): latest-upload and latest-send wrappers are lambdas, not function references

A local function reference compares equal across compositions (equals
ignores the captured locals), so rememberUpdatedState's structural
policy kept the first frame's copy and the previous commit had no
effect. Found by Reef in the alpha's dex.

* fix(thread): seed first-frame session and provenance on cached opens and harden null-owner effects

* refactor(thread): extract performance-gate and task-conversation helpers from SharedThreadRouteContentContent

Co-authored-by: Lagoon <raft+lagoon@agents.stamp.build>
Co-authored-by: Reef <raft+reef@agents.stamp.build>
Co-authored-by: bytemain <13938334+bytemain@users.noreply.github.com>
stamp-build Bot added a commit that referenced this pull request Nov 21, 2026
…re already on main) (#5189)

* docs(release): 1.27.0 Android, iOS and Google Play notes

Aggregated from the 126 accepted changesets at release/1.27.0 (9c9f114).
Diagnostics-only changesets omitted; flagged rollouts marked as gradual.

* docs(release): 1.27.0 notes leave out the personal assistant (still gated)

* fix: 1.27.0 release candidate fixes (stuck upload and first-frame session, Assistant row, translation placeholder, reset-notice polling) (#5158)

* fix(auth): Home re-reads the two-step reset notice at most every 30 s (#5137)

Stamp-Batch: 6a2458c9389667280f1501268968583f
Original-Head: 84a763f
Signed-off-by: Stamp Queue <stamp-queue@stamp.build>
(cherry picked from commit 636993f)

* fix(thread): a translating message shows placeholder bars down its whole height (#5141)

Stamp-Batch: 6a2458c9389667280f1501268968583f
Original-Head: 32fe17d
Signed-off-by: Stamp Queue <stamp-queue@stamp.build>
(cherry picked from commit c78a6a1)

* fix(thread): composer uploads key on the signed-in account from the first frame (#5143)

Stamp-Batch: 7fa83bbd6a5680b3d5cdd4a2621e7d0d
Original-Head: 53a7a74
Signed-off-by: Stamp Queue <stamp-queue@stamp.build>
(cherry picked from commit 67e5dfc)

* fix(assistant): phone Home shows the Assistant row (the layout decides, not the desktop-mode setting) (#5151)

Backport of #5151 (head cde2b9f) to release/1.27.0.

* fix(thread): an edited or annotated image no longer sticks on "Checking file…"

The event-bus effects that take the image editor's Done (and the other
composer events) are keyed only on the thread, so they kept the first
frame's copy of uploadComposerAttachmentFiles. On that frame the session
is not loaded yet, so the copy holds the upload store of account "".
The upload ran and succeeded there, but the composer applies outcomes
from the signed-in account's store, so the tile never left "Checking
file…". Since #5104 a cached conversation renders the full page on its
first frame, before the session is captured, which exposed this on
Android 1.27.0.

The effects now call the latest copy through rememberUpdatedState.

* fix(thread): a share sent while its files upload is sent with the loaded session

The external-share auto-send collector is keyed only on the thread, so it
kept the first frame's performComposerSend, whose session and provenance
are null before the session loads: the send was rejected
(authority_changed_before_message_send) and the share never went out.
It now calls the latest copy through rememberUpdatedState.

* fix(thread): latest-upload and latest-send wrappers are lambdas, not function references

A local function reference compares equal across compositions (equals
ignores the captured locals), so rememberUpdatedState's structural
policy kept the first frame's copy and the previous commit had no
effect. Found by Reef in the alpha's dex.

* fix(thread): seed first-frame session and provenance on cached opens and harden null-owner effects

* refactor(thread): extract performance-gate and task-conversation helpers from SharedThreadRouteContentContent

* chore(release): merge back 1.27.0 (release notes; the release fixes are already on main)

Squash of the merge of v1.27.0 into main. What main gains: the 1.27.0 Android, iOS and Google
Play notes (change-logs/1.27.0/{android,ios,play}). The release branch's code fixes (#5137, #5139,
#5141, #5143, #5151, squashed there as #5158) were cherry-picked from main, so main already has
them; ThreadPage.kt keeps main's newer version.

Co-authored-by: stamp-build[bot] <328845999+stamp-build[bot]@users.noreply.github.com>
Co-authored-by: Lagoon <raft+lagoon@agents.stamp.build>
Co-authored-by: Reef <raft+reef@agents.stamp.build>
Co-authored-by: bytemain <13938334+bytemain@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants