Skip to content

fix(session): replace a pending photo with its drawn copy - #298

Merged
Tarquinen merged 1 commit into
devfrom
drawing-replaces-photo
Nov 24, 2026
Merged

Tarquinen merged 1 commit into
devfrom
drawing-replaces-photo

Conversation

@Tarquinen

Copy link
Copy Markdown
Member

Drawing on a photo that's already in the composer added the drawn copy beside it, so the message carried both and the original had to be removed by hand.

Now the drawn copy takes the original's place in the row.

replace.mp4
  • A drawing made from the transcript, a file or a video still adds a new image, since there's no pending photo to replace (a video's frame sits beside its video).
  • The attachment row no longer scrolls to its end when a photo is swapped, only when a card is added. Without this a replaced photo in a long row jumped to the row's start.
  • iOS (PR #335) keeps both images; the parity rows note the difference.

Motion: none added. The existing hand-off flight lands on the same tile.

Verified: scripts/check.sh on the VM; the new aDrawingOnAPendingPhotoTakesItsPlace fails when the reducer appends. On the emulator: replaced the middle of three photos, replaced a photo in a scrolling row (row stays put), drew on a pending video (frame added, video kept).

Draw on Image from a photo already in the composer added the drawn copy
beside the original, so the message carried both. The drawn copy now takes
the original's place: DrawingAdded names the pending photo it was drawn on
and the reducer swaps it in at the same index.

A drawing from the transcript, a file or a video is still added as a new
image. The attachment row scrolls to its end only when a card is added, so
a swapped photo in a long row no longer jumps to the row's start.

iOS (PR #335) keeps both images; docs/parity/session.md notes the
difference.

Verified: scripts/check.sh on the VM; aDrawingOnAPendingPhotoTakesItsPlace
fails when the reducer appends. Emulator: replaced the middle of three
photos, replaced a photo in a scrolling row, drew on a pending video.
@Tarquinen
Tarquinen merged commit c2311a6 into dev Nov 24, 2026
3 checks passed
@Tarquinen
Tarquinen deleted the drawing-replaces-photo branch November 24, 2026 05:51
ClankerGuru pushed a commit to ClankerGuru/opencode-android that referenced this pull request Nov 25, 2026
…o#229)

* perf(session): coalesce family reads during subagent bursts

Every FamilyRefreshRequested (Home sends one per new subagent) cancelled the
family read in flight, started it over, and relisted shells and jobs. Ten
subagents starting at once walked the family ten times.

Ports iOS anomalyco#298 (fd33dc04, CoalescedRead): a family request while a read is in
flight queues exactly one follow-up read. Only the last answer of a queued run
sets familyReadAt, and leaving the screen forgets the queued read. Shells and
jobs aren't family, so FamilyRefreshRequested no longer relists them; a new
event stream (EventStreamConnected) does, so a reconnect still catches missed
shell exits and job settles.

Tests: ported aBurstOfSubagentsWalksTheFamilyTwice,
onlyTheLastQueuedFamilyAnswerMakesItFresh, leavingTheScreenForgetsTheFamilyWalk
and aNewStreamRelistsShells; the first three fail with the old
FamilyRefreshRequested. The two reconnect job tests now reconnect through
EventStreamConnected, as on iOS, and three reconnect tests stub the new lists.

Verified: full scripts/check.sh on the Android VM passes.

* fix(session): keep family read state honest in the app store

Review fixes for coalesced family reads:
- CoalescedRead is a plain data class. The Store drops a state equal to the
  last one, so the always-equal version lost the in-flight and queued flags
  and every burst restarted the read again (new store-level test).
- A carried screen's Task resets familyRead when it cancels the family read,
  so a read cancelled there can't leave later requests queued forever.
- A family answer that finds new members relists jobs, so a child's job that
  started before the child was known still shows.
- Drop unused sessionFamily stubs in the reconnect job tests; fix the jobs
  file comment; exhaustive tests now expect the familyRead flags.

Verified: the store-level test fails on the previous commit (2 reads, not 1);
full scripts/check.sh on the Android VM passes.
technicalheist pushed a commit to technicalheist/opencode-android that referenced this pull request Nov 28, 2026
…anomalyco#224)

* fix(drawer): start connections over while reducing resume and reroute

Port of iOS anomalyco#298 (996c6987). Reroute, Try Again and returning to the
foreground now reset the server pools and forget the cached address in
the reducer, before the turn's reads start, instead of inside the new
event stream's effect, where a read could start on the old pool first.
A resync while not streaming no longer resets anything. eventStream
loses its forgettingAddress/resetting parameters.

Verified: scripts/check.sh on the Android VM (BUILD SUCCESSFUL); the new
ServerLinkResetTriggerTests case fails without the change and passes
with it; on the emulator, resuming after 22 s in the background logs the
reset before the session reads, and reconnecting from the banner works.

* test(drawer): reset trigger test reduces directly, covers not streaming

Review follow-up. The test calls withDependencies and reduce directly
instead of building a throwaway TestStore, and checks that Try Again and
returning to the foreground skip the reset while not streaming.

Verified: the test fails on origin/dev's HomeConnectionFeature and passes
with the change; scripts/check.sh on the Android VM.
technicalheist pushed a commit to technicalheist/opencode-android that referenced this pull request Nov 28, 2026
* fix(drawer): stop repeating and offline transcript reads

Port of the drawer part of iOS anomalyco#298 (fd33dc04). Pressing a drawer row now
joins a transcript read the drawer already sent instead of cancelling and
restarting it (a delayed live-event read is still replaced by one now).
While the server isn't connected, drawer reads and prefetch only mark the
session dirty for the reconnect's snapshot to drain; losing the connection
cancels the speculative reads in flight. Invalidated messages and reverts
mark an off-screen cached copy dirty so it's read again before it's shown.

Ported iOS tests pressingARowJoinsTheReadTheDrawerStarted,
pressingARowStillReplacesADelayedRead, anInvalidatedCopyIsMarkedDirty,
speculativeReadsWaitForTheServer and losingTheConnectionCancelsSpeculativeReads,
and updated the existing tests' expected state as iOS did. All five fail
without the fix. Verified with scripts/check.sh on the Android VM.

* fix(drawer): keep fetchingTranscripts in step with refreshingTranscripts

Review fixes. CachedTranscriptRefreshed drops the session from
fetchingTranscripts before its refreshingTranscripts guard, as iOS does,
and deleting a session clears it from both sets. The offline test now also
sends AcceptedTranscriptUpdated and checks no prefetch starts (it fails
without the prefetch connection check). Parity note says offline prefetch
is skipped rather than marked dirty.

Verified with scripts/check.sh on the Android VM.
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.

1 participant