Skip to content

fix: snapshot note in a black cell on two short lines (2.24.1) - #278

Merged
compot-dev merged 1 commit into
v2from
fix/snapshot-note
Nov 17, 2026
Merged

compot-dev merged 1 commit into
v2from
fix/snapshot-note

Conversation

@compot-dev

Copy link
Copy Markdown
Collaborator

On the SberBox the note of 2.24.0 (#277) in a black snapshot cell was one line and got cut off in a 2×2 grid ("black in the copy: a dark picture, or video this device does not let…").

Now two lines, centred: "black in the copy:" / "a dark picture, or video this device cannot copy". At the note's size the second line is about 790 px wide in a 952 px cell (2×2 of 1920) and about 530 px in a 632 px cell (3×3), so it fits.

Version 2.24.1 (versionCode 58), CHANGELOG, docs/debug.md.

Checked locally in compot/android:2026.10: testDebugUnitTest 407/407, lintDebug no new findings. Checked on the SberBox with the release (a debug build there would need a reinstall that drops its settings).

@qodo-free-for-open-source-projects

qodo-free-for-open-source-projects Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

PR Summary by Qodo

Prevent snapshot notes from being cut off in grid cells

🐞 Bug fix 📝 Documentation ⚙️ Configuration changes 🕐 10-20 Minutes

Grey Divider

AI Description

• Split the black-copy warning into two centred lines so it fits snapshot grid cells.
• Document the revised warning and release the fix as version 2.24.1.
Merge Risk 🟢 Low

Evidence: Partial. The provider did not establish the exact full-PR diff base and head revisions; the supplied changed-file inventory and patch were used as the complete change set. The provider did not establish the exact full-PR diff revisions. The report lists 14 more gaps.

Blast radius 🟢 Low 💥 1 capability

  • 1 affected end-to-end capability after fault-specific containment; implementation boundaries do not widen its functional scope.
  • The changed behavior is the user-visible diagnostic annotation in the debug snapshot.
  • The caller exposes the resulting JPEG through /snapshot.jpg, while the note is drawn only for black copied cells; these are producer and delivery hops of one bounded debug-snapshot capability, not independent capabilities.
Sources

android/app/src/main/java/com/openipc/decoder/Snapshots.java[207-208]

    static final String[] NOT_COPIED = {
            "black in the copy:", "a dark picture, or video this device cannot copy"};
Behavioral complexity 🟢 Low 🧩 Straightforward

  • Before, one sentence was ellipsized and drawn once.
  • After, a fixed two-element message is iterated, with the existing ellipsize and text-drawing infrastructure reused for each line.
  • The new correctness condition is that the two lines remain centered within the cell and independently fit its width; this is a direct formatting/layout rule with no new state machine, compatibility protocol, concurrency behavior, or coordinated invariant.
Sources

android/app/src/main/java/com/openipc/decoder/Snapshots.java[207-208]

    static final String[] NOT_COPIED = {
            "black in the copy:", "a dark picture, or video this device cannot copy"};
Potential damage 🟢 Low 🩹 Cosmetic

  • A fault can make the explanatory text clipped, poorly centered, or otherwise visually wrong.
  • The camera frame, blank-frame classification, JPEG availability, and other cell contents are preserved by the surrounding flow.
  • Reverting the application code restores the previous rendering; there is no persistent state to repair and no external side effect to compensate.
  • The equal-importance baseline is used because no business-criticality declaration was supplied.
  • Immediately reversible by deploying a corrected APK or reverting the rendering change; no persistent data repair or external compensation is required.
Sources

android/app/src/main/java/com/openipc/decoder/Snapshots.java[207-208]

    static final String[] NOT_COPIED = {
            "black in the copy:", "a dark picture, or video this device cannot copy"};
Assessed commit c4060a8 > Snapshot assessment: the current PR revision could not be verified.
Diagram

graph TD
  A["Snapshot request"] --> B["PixelCopy frames"] --> C{"Black copy?"} -->|yes| D["Two-line note"] --> E["Snapshot JPEG"]
  C -->|no| E
Loading
High-Level Assessment

Keep the explicit two-line message: the warning is fixed text, and a deliberate break makes its layout predictable in the target grids. Automatic wrapping would add complexity without a clear benefit here.

Files changed (4) +22 / -11

Bug fix (1) +13 / -8
Snapshots.javaCentre the black-copy warning on two lines +13/-8

Centre the black-copy warning on two lines

• Replaces the single long warning with two shorter lines. Draws each line centred in the cell, with per-line ellipsizing as a fallback.

android/app/src/main/java/com/openipc/decoder/Snapshots.java

Documentation (2) +7 / -1
CHANGELOG.mdRecord the 2.24.1 snapshot-note fix +6/-0

Record the 2.24.1 snapshot-note fix

• Adds a 2.24.1 entry explaining that the black-copy warning now fits on two lines instead of being cut off in a 2×2 grid.

CHANGELOG.md

debug.mdDocument the revised snapshot warning +1/-1

Document the revised snapshot warning

• Updates the documented black-copy message and notes that it appears on two lines.

docs/debug.md

Other (1) +2 / -2
build.gradleBump the Android release to 2.24.1 +2/-2

Bump the Android release to 2.24.1

• Increments versionCode from 57 to 58 and versionName from 2.24.0 to 2.24.1.

android/app/build.gradle

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Tip of the day
💡 Did you know, you can enable the Remediation agent and Qodo fixes findings in a dedicated fix PR

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@compot-dev
compot-dev merged commit d0460c9 into v2 Nov 17, 2026
7 checks passed
@compot-dev
compot-dev deleted the fix/snapshot-note branch November 17, 2026 16:03
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