GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Consolidate fullscreen image and file viewers by kommander · Pull Request #63 · anomalyco/opencode-android

Conversation

@kommander

@kommander kommander commented Nov 14, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Stacked on #60. One fullscreen reducer, page model and toolbar replace the two viewers without changing paging or video behavior. App code: +480/−865 (385 fewer lines).

Verified with scripts/check.sh on the Mac and an API 35 emulator: single-file playback, Markdown-to-code navigation and Back, and drawing on file and transcript images without sending.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@kommander
kommander temporarily deployed to release November 14, 2026 01:45 — with GitHub Actions Inactive
@kommander kommander mentioned this pull request Nov 14, 2026
Page through and draw on videos in the shared fullscreen viewer #64
Merged
@kommander
kommander marked this pull request as ready for review November 14, 2026 01:52
@kommander
kommander marked this pull request as draft November 14, 2026 02:46
@kommander
kommander force-pushed the android/unified-fullscreen branch from ee31268 to 9e62995 Compare November 14, 2026 02:56
@kommander
kommander temporarily deployed to release November 14, 2026 02:56 — with GitHub Actions Inactive
@kommander kommander changed the title Unify fullscreen media and file viewing Consolidate fullscreen image and file viewers Nov 14, 2026
@kommander
kommander marked this pull request as ready for review November 14, 2026 03:00
This was referenced Nov 14, 2026
chore: trim comments to the AGENTS.md comment rule #77
Merged
chore: remove history from comments #83
Merged
kommander added 2 commits November 15, 2026 16:29
@kommander
Draw on a full-screen image and add the copy to the prompt
da52993
Port of opencode-ios#335 (561854a). The full-screen viewer gets Draw on
Image for transcript images, pending composer photos (not video posters)
and decoded agent image files, shown only while the composer takes
attachments. The editor has six inks (red first), Undo, Cancel (asks
before discarding a changed drawing; Back is Cancel) and Add to Prompt,
which flattens a new JPEG at SharedImageEncoder's limits and appends it to
the prompt that opened the viewer. It never sends, never replaces the
original and leaves the draft's text and other attachments alone.

ImageDrawingFeature owns the editor: strokes, ink, undo, the discard
question and one cancellable export (ImageDrawingClient, ids from
UuidClient). TranscriptImageViewerFeature presents it as optional child
state (ifLet + PresentationAction), gated by allowsDrawing; a page's
isVideo replaces the old allowsDrawing flag. The viewer closes only after
the editor has gone. ComposerPhotoViewerFeature passes addDrawing through
like remove. An agent image file's model owns the same feature's store.
The native canvas samples touches and draws the live stroke; only finished
strokes reach the reducer.

The opener's handler (drawingHandler) sends SessionFeature's DrawingAdded,
which appends only for the same task identity while the composer takes
attachments, and answers whether the copy landed. A failed export and a
prompt that has gone say so separately ("Couldn’t Add Drawing") and keep
the drawing.

The transcript viewer is hosted by MediaFeature, so the opener's prompt
rides PresentImage into MediaFeature.State next to the viewer and is
cleared with it, instead of a mutable field on MediaPresenter.
presentImage keeps dev's guard. PromptImageFormat stays in :feature:media
because the composer's encoder sits above it.

Verified: scripts/check.sh; ImageDrawingTests, ImageDrawingFeatureTests,
SessionFeatureTestsComposer, ComposerPhotoViewerTests; on emulator
emulator-5582 against the session lab fixture (see PR #60).
@kommander
Keep a drawing out of a sent draft and a released file page
50ac0cb
Port of opencode-ios 47cad96, three review findings on Draw on Image:

- A send waiting on uploads (sendAfterUploads) took a drawing added before
  it went, or the drawing landed in the emptied composer after. The Draw
  button stays away while a send waits (drawingHandler is null), and
  DrawingAdded carries the draft's sendGeneration: the reducer drops a copy
  once that draft has sent or is waiting to, and the editor shows its prompt
  failure.
- An agent file's editor put away mid-export could still add its copy. The
  model's closure adds only while its editor is up; release() clears it, so
  a released page adds nothing (iOS: weak self). The editor's store takes
  the dependencies it's made under, as a TCA store does.
- iOS's originalFailed keeps Draw off a thumbnail whose original failed to
  decode. Android opens pages on full-size originals only: a failed decode
  is loadFailed with no image, which already keeps Draw off and DrawTapped a
  no-op. Ported the test against that path rather than adding a flag
  nothing would set; noted in media.md.

Tests: aDrawingWhileItsDraftWaitsToSendAddsNothing,
aDrawingAfterItsDraftWasSentAddsNothing (SessionFeatureTestsComposer),
drawStaysOffOnAThumbnailWhoseOriginalFailedToDecode,
closingAFileEditorMidExportAddsNothing (ImageDrawingFeatureTests, now on
Robolectric for a real decode and the model's main-thread store). The three
covering fixed bugs fail without the fix.

Verified: scripts/check.sh; transcript Draw > Add to Prompt on emulator
emulator-5582 against the session lab adds exactly one copy, sends nothing.
@kommander
kommander force-pushed the android/unified-fullscreen branch from 9e62995 to 74d4937 Compare November 15, 2026 18:22
@kommander
kommander temporarily deployed to release November 15, 2026 18:22 — with GitHub Actions Inactive
@kommander
Move Draw on Image text into string resources
1afa338
The editor's buttons, ink names, canvas label, discard question and
"Couldn’t Add Drawing" errors, and the viewers' Draw on Image button, read
media_drawing_* strings (Cancel and OK are common_*). The failure messages
come from localized() in a getter instead of the enum constructor.

Translated with scripts/translate.py all; scripts/translations.py all passes.
@kommander
kommander force-pushed the android/unified-fullscreen branch from 74d4937 to bc58116 Compare November 15, 2026 21:45
@kommander
kommander temporarily deployed to release November 15, 2026 21:45 — with GitHub Actions Inactive
kommander added 5 commits November 15, 2026 23:17
@kommander
Add a drawn image by the same rules as a pasted one
01aaad6
A drawn image is an attachment for the session the viewer was opened
from, added exactly as a pasted image would be (takesPasteAttachments).
DrawingAdded loses its sendGeneration check and the reducer its
sendAfterUploads refusal, and the Draw button no longer hides while a send
waits on uploads: an image added then joins that message, and one added
after the send lands in the session's new draft. The task identity still
scopes the add to its session; the released file page and failed original
guards stay.

The two tests for the removed refusals are replaced by
aDrawingWhileASendWaitsOnUploadsIsAddedLikeAPaste.
media_drawing_prompt_unavailable now says the session's message can't
take attachments right now, retranslated with scripts/translate.py --redo.
@kommander
Use one presentation owner for transcript, composer and file pages
0042397
@kommander
Consolidate file and gallery presentation in the fullscreen feature
e01099e
Keep linked documents outside the pager and share original file bytes. Move file navigation, source/wrap actions and drawing into the same viewer used for gallery pages; release or cancel work when its page goes. Preserve the existing native player.

Checked the staged diff with git diff --cached --check. The integrated build and tests follow the parent callsite migration.
@kommander
Track the single fullscreen reducer in media tests and parity
a4c1074
@kommander
Read the fullscreen viewer's Draw on Image label from its string reso…
d29e6ed
…urce

The consolidated toolbar's Draw button reads the already translated
media_drawing_draw_on_image_description instead of a literal.
@kommander
kommander force-pushed the android/unified-fullscreen branch from bc58116 to d29e6ed Compare November 15, 2026 22:47
@kommander
kommander temporarily deployed to release November 15, 2026 22:47 — with GitHub Actions Inactive
@kommander
kommander merged commit 285d224 into dev Nov 15, 2026
3 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@Tarquinen Tarquinen mentioned this pull request Nov 15, 2026
Merge dev into main #69
Merged

This branch was previously deployed

1 inactive deployment
release — d29e6ed8 Deployed Nov 15, 2026 by kommander via check #285
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@kommander
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.