W3: the screen wiring -- 17 bindings a transposition currently survives #156
Closed
opened 2026-08-27 11:59:05 +00:00 by JMR-dev
·
1 comment
No Branch/Tag Specified
main
fix/102-picker-back-press-overshoot
fix/268-saf-picker-determinism
feat/ogg-vorbis-libvorbis
feat/expedited-conversion-work
fix/gate-cache-in-worktrees
chore/gate-runs-shellcheck
test/publish-delete-arm-real-provider
docs/e8-instrumented-coverage
docs/api37-carrier-count-drift
docs/e7-second-constraint
test/publish-to-a-real-saf-destination
fix/api37-report-match-line
fix/api37-task-snapshot-crash
test/join-failure-message-on-device
docs/e2e-read-findings-e7
test/cancelling-a-running-export
test/reattach-to-a-running-job
test/content-uri-reaches-ffmpeg
fix/launcher-wiring-waits-for-the-pick
fix/cancel-tests-need-a-slower-encode
test/cancelling-a-running-join
test/cancelling-a-running-session
test/notification-cancel-action
test/ffmpeg-progress-is-observed
test/fallback-asserts-the-path
test/flac-and-opus-assert-their-format
docs/e2e-read-findings
docs/wave4-coverage-numbers
fix/injectable-startup-sweep-scope
test/session-outcome-seam
test/launcher-callback-identity
test/theme-follows-system-dark
test/audio-drop-arm
fix/rotation-waits-for-recreation
fix/convert-guards-on-ready
test/retry-save-mime
test/hardware-progress-reaches-workmanager
test/ffprobe-mapping-seam
test/device-codec-enumeration-seam
test/unknown-container-row
test/null-message-fallbacks
test/cancel-reaches-workmanager
docs/coverage-wave3-recovery
test/concat-engine-seam
docs/coverage-wave3
test/mediaprobe-merge-seam
test/adaptive-shell-wiring
test/aac-audio-args
test/notification-progress-text
test/media3-muxer-guard
test/hardware-fallback-and-cancellation
test/unprobeable-join-clip
test/one-branch-outcomes
test/foreground-type-regimes
fix/bound-wedge-diagnostics
docs/coverage-wave2
test/screen-wiring
test/viewmodel-setters
test/join-state-mapping
test/conversion-state-mapping
test/dedupe-user-messages
fix/restore-stack-merges
test/refused-jobs
test/concatworker-failure-arms
test/container-capabilities-audio
test/readspec-enum-fallbacks
test/outputpublisher-seams
test/mediaprobe-track-seam
test/outputpublisher-partial-branches
test/fake-provider-scaffolding
docs/coverage-read-findings
chore/gitignore-kotlin
test/bound-the-hangs
docs/coverage-remeasure
ci/baseline-counter-precision
fix/invalid-suggestion-chip
ci/wedged-leg-report
fix/reattachment-overwrites-pick
test/theme-live-branches
fix/failed-save-retry
fix/empty-composition-crash
ci/advisory-failure-report
docs/seven-run-counts
test/release-permission-guard
ci/build-workflow-permissions
docs/api37-point-release
docs/benchmark-populate-path
fix/dead-assertion-probe-test
ci/actionlint
test/device-codecs-encode-consequence
fix/sdkmanager-pipefail
docs/readme-restart-claim
fix/saf-picker-root-discovery
fix/probe-dispatcher-seam
test/media3engine-mime-tables
test/mediaprobe-pure-helpers
fix/codec-vocabulary-drift
docs/robolectric-rationale-correction
docs/api37-advisory-counts
test/r38-8-saf-e2e
test/r38-7-join-states
test/r38-6-conversion-states
test/r38-5-state-seam
fix/jacoco-robolectric-coverage
docs/instrumented-tests-correction
test/r38-2-filecard
test/r38-4-advanced-picker
test/r38-3-pickers
tools/file-issue-script
tools/api-37-emulator
fix/review-app-gaps
docs/review-corrections
No results found.
Labels
Clear labels
above-cut
accessibility
backlog
bug
confirmed
documentation
duplicate
enhancement
good first issue
help wanted
invalid
plausible
question
sev:high
sev:low
sev:medium
wontfix
Worked autonomously overnight: local, JVM-verifiable, no product decision
Barrier affecting people with disabilities
Held for manual review: product/UX call, CI/workflow, hardware, or unverifiable here
Something isn't working
Reviewer demonstrated the defect
Improvements or additions to documentation
This issue or pull request already exists
New feature or request
Good for newcomers
Extra attention is needed
This doesn't seem right
Reviewer could not fully demonstrate it; treat as unproven
Further information is requested
High severity
Low severity
Medium severity
This will not be worked on
No labels
Milestone
No items
No Milestone
Projects
Clear projects
No projects
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: JMR-dev/LibreMediaConverter#156
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
ConverterScreen(60–113) andJoinScreen(40–68) are the stateful outer composables. Their stateless inners are tested thoroughly —ConverterScreenContentTest,ConverterStateAffordancesTest,JoinScreenContentTest— and cover 349 and 123 lines respectively. The outers are untested.The failure mode, which is specific
The outer's job is almost entirely wiring: it collects state, remembers two activity-result launchers, and hands
ConverterActions/JoinActionsa set of callbacks. There are 17 bindings across the two files, 11 of them bare method references:Because the content tests construct
ConverterActionsthemselves, they never see this list. TransposeonVideoCodecandonAudioCodecand every test in the repo still passes; the app ships a codec picker that sets the other codec. The types are identical where it matters —setContainer/applySuggestiondiffer, but the six enum setters are mutually swappable in pairs andonCancel/onResetare both() -> Unit.That is the thing to test. Not "does the screen render" —
ConverterScreenContentTestanswers that already.Shape
Robolectric plus
compose-ui-test-junit4is in the JVM source set, so this is a unit test. Drive the realConverterScreenagainst aConversionViewModelwhose method calls are observable, click each affordance by itsTestTagsentry, and assert which method arrived.The activity-result launchers are the awkward part and are not the subject:
pickInput,chooseDestinationandrequestNotificationsneed an activity result to do anything. Cover the nine method-reference bindings, and name the three launcher-backed ones (onPickInput,onConvert,onSave) as out of scope with that reason —SafPickerRoundTripTestalready exercises the pick path end to end on a device.destinationMimeat 80 is worth one test of its own. It readsstate.pendingSave()?.mimeType ?: settings.spec.mimeType, and the comment above it records that the fallback is wrong for a reattached job — a retry after a failed save must reuse the type its first attempt used. TheJoinScreentwin at 52 falls back toConcatWorker.DEFAULT_FORMAT.mimeType.Done when
Each of the nine bindings is pinned by a test that fails when that binding alone is transposed to a neighbour of the same type. Run that mutation — swapping two bindings — rather than trusting a click test to imply it. A test that clicks the video-codec control and asserts "some setter ran" is exactly the vacuous shape
CLAUDE.mdwarns about.PR #165. This ticket's central claim was half wrong, and it is worth correcting here rather than only in the PR.
I filed it saying a transposition of any two of the seventeen bindings would survive the suite. Most of them do not compile. Measured:
onVideoCodec↔onAudioCodecInapplicable candidate(s): fun setAudioCodec(codec: AudioCodec)onCancel↔onResetEvery typed binding takes a distinct parameter type —
Container,VideoCodec,AudioCodec,OutputFormat,OutputSpec,QualityTier,EnginePreference— so the compiler already rejects those swaps. Testing them would have been theatre, and this ticket would have bought it.The real hazard is the
() -> Unitbindings, which are interchangeable to the compiler: two on the converter screen and three on the join screen (onJoin,onCancel,onReset). That is five bindings rather than seventeen — narrower, but sharper, and the join trio is the worse of the two because a Join button bound tocancelreads as a dead button.Two process notes, since #153 has more children than this:
(VideoCodec) -> Unitand(AudioCodec) -> Unitlook interchangeable when you are scanning a list of nineviewModel::lines; they are not. OnecompileDebugKotlinsettled it.onCancel/onResetswap as rejected because it read a stale build. Running it again and looking at the actual output printedBUILD SUCCESSFUL. A check worth doing is worth reading the output of.