Repository navigation
feat: debug page — sharper snapshots and a header that works on phones (#103) - #104
Conversation
|
/review |
Code Review by Qodo
1.
|
| int cw = width / side; | ||
| int ch = height(width) / side; |
There was a problem hiding this comment.
1. Three-by-three snapshots lose width 📎 Requirement gap ≡ Correctness
Snapshots.render truncates cell dimensions using integer division by the grid side, then sizes the output bitmap from those truncated dimensions. When a 3×3 layout uses a screen width not divisible by three, a 1280×720 target becomes 1278×720 (or 640×360 becomes 639×360), so the snapshot no longer matches the screen width or exact 16:9 dimensions.
Agent Prompt
## Issue description
Three-by-three layouts truncate cell dimensions through integer division, so widths not divisible by three produce JPEGs narrower than the bounded screen width and break the exact 16:9 dimensions.
## Fix Focus Areas
- android/app/src/main/java/com/openipc/decoder/Snapshots.java[89-102]
## Recommended Fix
Allocate the output bitmap at the full target width and height, then distribute remainder pixels across cell rectangles and their PixelCopy dimensions so the grid fills the exact bounded screen dimensions.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
| ? statusText.getText().toString() : c.live ? "Playing" : "No new frames"; | ||
| if (c.live) { | ||
| c.frame = mSurface.getBitmap(Snapshots.CELL_W * 2, Snapshots.CELL_H * 2); | ||
| c.frame = mSurface.getBitmap(width, Snapshots.height(width)); |
There was a problem hiding this comment.
2. Timed-out captures still burden the screen 🐞 Bug ☼ Reliability
debugSnapshotJpeg() returns after a one-second wait without cancelling its posted UI task, which now calls getBitmap() at up to 1920×1080. When the UI task runs slowly or starts after the request times out, the client gets a 503 while the main thread still performs the full capture; a bitmap produced after that timeout also bypasses render()'s recycle path.
Agent Prompt
## Issue description
A timed-out JPEG request can still perform the newly enlarged single-view capture on the main thread and leave its bitmap for garbage collection.
## Fix Focus Areas
- android/app/src/main/java/com/openipc/decoder/Decoder.java[954-972]
- android/app/src/main/java/com/openipc/decoder/Decoder.java[990-999]
## Recommended Fix
Make request expiry visible to the posted task so it skips captures that have not started, and explicitly recycle any bitmap produced for a request that has already expired. Keep the expensive capture work from repeatedly blocking the UI thread.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
… on narrow screens (#103)
|
/review |
|
Code review by qodo was updated up to the latest commit 847e37a |
…vity state, abandoned captures
|
Qodo review — decisions:
|
|
/review |
Understood. The decisions are:
No review, dismissal, or implementation action was requested, so I have not changed any findings. |
|
Code review by qodo was updated up to the latest commit e150ebd |
…vity state, abandoned captures
feat: debug page — sharper snapshots and a header that works on phones (#103)
Closes #103.
Snapshots
/snapshot.jpg) scales its text with the cell.Page
READMEs (EN/RU/ZH) updated.