Skip to content

fix: menu dividers aligned with slots 6|7, labels centred; debug page Info Off by default (#174, #176) - #175

Closed
compot-dev wants to merge 4 commits into
v2from
fix/menu-align-debug-defaults
Closed

compot-dev wants to merge 4 commits into
v2from
fix/menu-align-debug-defaults

Conversation

@compot-dev

@compot-dev compot-dev commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

Version 2.06.

Closes #174
Closes #176

@compot-dev

Copy link
Copy Markdown
Collaborator Author

/review

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

qodo-free-for-open-source-projects Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (1) 🎨 UX issues (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)

Grey Divider


Action required

1. Dividers drift from scrolled slots 📎 Requirement gap ≡ Correctness
Description
alignPairs() sets the pair-row divider positions from slot coordinates inside camRow without
accounting for the slot row’s horizontal scroll offset. When focus scrolls the slot row on a narrow
screen, the gap between slots 6 and 7 moves across the popup while both dividers remain fixed in the
separate pair rows.
Code

android/app/src/main/java/com/openipc/decoder/MenuManager.java[R439-442]

+    private void alignPairs(LinearLayout camRow) {
+        if (camButtons == null || camButtons.length < 7 || camButtons[6] == null) return;
+        int gap = (camButtons[5].getRight() + camButtons[6].getLeft()) / 2;
+        int width = gap - dp(1) / 2;
Evidence
The slot row is horizontally scrollable and follows focus, while alignPairs() reads child
coordinates within that row and applies the resulting divider widths to separate pair rows outside
the scroll view. Its layout-change listener does not track scrolling, so the dividers do not follow
the visible gap between slots 6 and 7 when the scroll offset changes.

Align menu dividers with the gap between slots 6 and 7
android/app/src/main/java/com/openipc/decoder/MenuManager.java[188-199]
android/app/src/main/java/com/openipc/decoder/MenuManager.java[439-449]
android/app/src/main/java/com/openipc/decoder/MenuManager.java[188-207]
android/app/src/main/java/com/openipc/decoder/MenuManager.java[417-450]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The pair-row dividers use positions calculated in slot-row coordinates, but the slot row scrolls independently of the pair rows. After scrolling, the dividers no longer align with the gap between slots 6 and 7.
## Fix Focus Areas
- android/app/src/main/java/com/openipc/decoder/MenuManager.java[188-200]
- android/app/src/main/java/com/openipc/decoder/MenuManager.java[439-450]
## Recommended Fix
Calculate the visible gap position using the horizontal scroll offset and update both divider positions whenever that offset changes, or keep the slot row and pair rows in a shared coordinate system. Keep both pair rows usable when the gap moves outside the viewport.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended

2. Right menu buttons are clipped on narrow screens ✓ Resolved
Description
alignPairs() replaces each left button's weighted width with a fixed width based on six slot
buttons, even though the pair rows are limited to the popup's visible width. On a narrow screen or
with enlarged text, the scrollable slot row can be wider than that popup, leaving too little space
for the single-line WebUI and Reset buttons.
Code

android/app/src/main/java/com/openipc/decoder/MenuManager.java[R447-449]

+            lp.width = width;
+            lp.weight = 0;
+            left.setLayoutParams(lp);
Evidence
The slot row sits inside a horizontal scroll view, while both pair rows are MATCH_PARENT within a
WRAP_CONTENT popup. The new fixed left width is derived from the wider slot row; the right buttons
remain weighted but are single-line, so they cannot wrap when the remaining space shrinks.

android/app/src/main/java/com/openipc/decoder/MenuManager.java[176-207]
android/app/src/main/java/com/openipc/decoder/MenuManager.java[209-213]
android/app/src/main/java/com/openipc/decoder/MenuManager.java[317-319]
android/app/src/main/java/com/openipc/decoder/MenuManager.java[417-450]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The slot-gap width can consume the visible pair row and clip its right-hand button on narrow screens or with large fonts.
## Fix Focus Areas
- android/app/src/main/java/com/openipc/decoder/MenuManager.java[439-450]
- android/app/src/main/java/com/openipc/decoder/MenuManager.java[417-430]
## Recommended Fix
Limit the aligned left width to the measured pair-row width minus the divider and enough space for the right button; retain usable right-hand controls when exact alignment cannot fit.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Tip of the day
💡 Did you know, you can switch off images and animations for a plain-text comment

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

Comment on lines +439 to +442
private void alignPairs(LinearLayout camRow) {
if (camButtons == null || camButtons.length < 7 || camButtons[6] == null) return;
int gap = (camButtons[5].getRight() + camButtons[6].getLeft()) / 2;
int width = gap - dp(1) / 2;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

1. Dividers drift from scrolled slots 📎 Requirement gap ≡ Correctness

alignPairs() sets the pair-row divider positions from slot coordinates inside camRow without
accounting for the slot row’s horizontal scroll offset. When focus scrolls the slot row on a narrow
screen, the gap between slots 6 and 7 moves across the popup while both dividers remain fixed in the
separate pair rows.
Agent Prompt
## Issue description
The pair-row dividers use positions calculated in slot-row coordinates, but the slot row scrolls independently of the pair rows. After scrolling, the dividers no longer align with the gap between slots 6 and 7.

## Fix Focus Areas
- android/app/src/main/java/com/openipc/decoder/MenuManager.java[188-200]
- android/app/src/main/java/com/openipc/decoder/MenuManager.java[439-450]

## Recommended Fix
Calculate the visible gap position using the horizontal scroll offset and update both divider positions whenever that offset changes, or keep the slot row and pair rows in a shared coordinate system. Keep both pair rows usable when the gap moves outside the viewport.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Comment thread android/app/src/main/java/com/openipc/decoder/MenuManager.java Outdated
@compot-dev

Copy link
Copy Markdown
Collaborator Author

Qodo: both findings were about a slot row too wide for the menu, which then scrolls. Fixed: the dividers follow the gap between slots 6 and 7 only while the slot row fits the menu. A scrolling row keeps equal halves, so both items stay whole and nothing drifts.

@compot-dev
compot-dev force-pushed the fix/menu-align-debug-defaults branch from c5ae7c9 to de8444f Compare October 14, 2026 20:07
@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Qodo: both findings were about a slot row too wide for the menu, which then scrolls. Fixed: the dividers follow the gap between slots 6 and 7 only while the slot row fits the menu. A scrolling row keeps equal halves, so both items stay whole and nothing drifts.

That addresses both findings:

  • finding 1: when the slot row scrolls, the pair rows retain equal halves, so their dividers no longer claim to track an off-screen slot gap and cannot drift relative to the visible menu.
  • finding 2: fixed slot-gap widths are used only when the slot row fits; otherwise both controls retain equal, usable widths and the right buttons are not clipped.

The remaining trade-off is that exact slot 6/7 alignment is intentionally unavailable while the slot row is scrollable.

@compot-dev compot-dev changed the title fix: menu dividers aligned with slots 6|7; debug page Info Off by default (#174) fix: menu dividers aligned with slots 6|7, labels centred; debug page Info Off by default (#174, #176) Oct 14, 2026
@compot-dev
compot-dev force-pushed the fix/menu-align-debug-defaults branch from de8444f to 4b59b6b Compare October 14, 2026 20:33
@compot-dev

Copy link
Copy Markdown
Collaborator Author

Superseded by 178, which includes these commits and replaces the two-item rows with the 8 / 4 / 4 menu grid (#177).

@compot-dev compot-dev closed this Oct 14, 2026
@compot-dev
compot-dev deleted the fix/menu-align-debug-defaults branch October 14, 2026 20:47
compot-dev added a commit that referenced this pull request Oct 15, 2026
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.

Menu: Settings, WebUI, Exit and Reset centred in their halves Menu dividers under the slot 6|7 gap; debug page opens with Info Off, 5 s

1 participant