Render the container row for a video nothing could name #209

Merged
JMR-dev merged 3 commits from test/unknown-container-row into main 2026-09-06 00:59:37 +00:00
JMR-dev commented 2026-09-02 23:07:45 +00:00 (Migrated from github.com)

Closes #199.

The gap

ConverterScreen.kt:668's null arm had never rendered:

DetailRow("Container", probe.container?.label ?: "Unknown")

Every video case in FileCardTest uses VIDEO_PROBE, which carries container = Container.MP4.

The argument is the asymmetry, not the coverage

FileCard renders that exact expression twice — once in the AUDIO_ONLY branch (:660) and once in VIDEO (:668) — and FileCardTest's "an audio-only file nothing else could describe degrades one row at a time" drives only the first. Same expression, same fallback, one kind covered and one not. That is the same argument CLAUDE.md records for including ContainerCapabilities:94.

Null is not an edge case here

InputProbe.container's own KDoc (model/OutputFormat.kt:183-186) says MediaExtractor cannot report a container at all — it comes from FFprobe. So any run where FFprobe did not answer produces exactly this shape: real codec, real dimensions, real duration, container = null. An empty value in its place would read as a rendering bug rather than as a probe that got half its sources.

Not a copy of the audio-only case

The other three rows are asserted alongside. In the audio-only test everything is unknown at once; here one field is missing from a probe that is otherwise complete, and the rest have to be unaffected by it.

Acceptance: mutation run and restored

?: "Unknown" → ?: "" at :668 only → red.

The AUDIO_ONLY twin at :660 is a separate expression; mutating that one reddens the existing test instead, which would prove nothing about this one.

Verification

testDebugUnitTest (full suite) + ktlintCheck + detekt + lintDebug — green, production tree clean.

🤖 Generated with Claude Code

Closes #199. ## The gap `ConverterScreen.kt:668`'s null arm had never rendered: ```kotlin DetailRow("Container", probe.container?.label ?: "Unknown") ``` Every video case in `FileCardTest` uses `VIDEO_PROBE`, which carries `container = Container.MP4`. ## The argument is the asymmetry, not the coverage `FileCard` renders that **exact expression twice** — once in the `AUDIO_ONLY` branch (`:660`) and once in `VIDEO` (`:668`) — and `FileCardTest`'s *"an audio-only file nothing else could describe degrades one row at a time"* drives only the first. Same expression, same fallback, one kind covered and one not. That is the same argument `CLAUDE.md` records for including `ContainerCapabilities:94`. ## Null is not an edge case here `InputProbe.container`'s own KDoc (`model/OutputFormat.kt:183-186`) says `MediaExtractor` cannot report a container at all — it comes from FFprobe. So any run where FFprobe did not answer produces exactly this shape: real codec, real dimensions, real duration, `container = null`. An empty value in its place would read as a rendering bug rather than as a probe that got half its sources. ## Not a copy of the audio-only case The other three rows are asserted alongside. In the audio-only test everything is unknown at once; here **one** field is missing from a probe that is otherwise complete, and the rest have to be unaffected by it. ## Acceptance: mutation run and restored `?: "Unknown"` → `?: ""` **at `:668` only** → red. The `AUDIO_ONLY` twin at `:660` is a separate expression; mutating that one reddens the *existing* test instead, which would prove nothing about this one. ## Verification `testDebugUnitTest` (full suite) + `ktlintCheck` + `detekt` + `lintDebug` — green, production tree clean. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.