Skip to content

feat: the brass look — menu, dialogs, status line, Settings and the web page (2.26.0) - #287

Merged
compot-dev merged 3 commits into
v2from
feat/brass-286
Nov 19, 2026
Merged

compot-dev merged 3 commits into
v2from
feat/brass-286

Conversation

@compot-dev

Copy link
Copy Markdown
Collaborator

Closes #286. The interface review of 2026-11-18 (brand brass 1.3.0); the app icon and the TV banner stay blue and white.

Android (Brass.java, colors.xml with the colours Decoder uses from the brand's master copy, focus_ring.xml, theme BrassDialog):

  • Menu over the video: a brass panel with a frame, brass keys with serif labels; an item that is on is pressed brass with an amber glow (was an orange fill), the remote's focus an amber frame (was light blue), a slot without a camera dim; the latency colours of the active slot in dark tones that read on brass; the version stays on Exit.
  • Status line over the video: amber monospace capitals on a dark plate (status_plate.xml).
  • Dialogs (camera, Start on boot, Reset, Settings): brass panel, serif title in brass, dark display fields (amber frame when focused), amber radio buttons and check boxes with the amber focus ring, brass buttons. The window is framed before show(): a window changed after it shows lost the keyboard a phone opens the camera URL with.
  • Network → one Settings dialog: section Decoder — Allow remote access (new; off, the debug page is closed and the app opens no port; on by default, as before), Port, Web page password; section Camex — Join a camex server (was "On: connect now and at every start"), the tunnel's state, then the fields of the camex 4.2.0 library (CamexTunnel.fields(context, "decoder"): Proto, hints, the default client name decoder-<last 4 of ANDROID_ID>, the key hidden with Show the key).
  • bundles/camex → 0c3e7cb (4.2.0, Android library settings: short labels, hints, a default client name, Show the key (4.2.0) camex#191).

Web page: the brass header Decoder with the version and "Elegant video player", a panel with rivets and the plate Video wall, a board of rows with lamps (Decoder, Cameras, Screen, Camex), brass JSON / Log / Report and Info / Snapshot switches (a label wraps with its switch), the wall in a frame, the camera on screen in amber; the tab's title and icon show the worst lamp. /stats.json has camex (on, state, address, error).

Qodo on #285 (all five): a deferred tunnel start only while Network is on, cleared when saved off; rebind() bumps a generation (a socket opened for an older setting is closed again), always wakes the loop, and clears settled so the start after Save waits for the real port; the address on screen refreshes when the port settles.

2.26.0 (versionCode 62), CHANGELOG, README (three languages: the Settings dialog, camex 4.2.0), docs/debug.md (the page, the board, camex in /stats.json), docs/usage.md (the menu). tests/e2e.sh finds texts case-insensitively (allCaps buttons read as SAVE on API 34).

Tests (local, Docker):

  • testDebugUnitTest lintDebug assembleDebug in compot/android:2026.10: pass, lint 13 warnings as before.
  • TRANSPORT=TCP tests/e2e.sh 34: 18 passed; TRANSPORT=TCP tests/e2e.sh 21: 18 passed; tests/e2e.sh 34 (UDP): 17 passed; SHOTS=1 TRANSPORT=TCP tests/e2e.sh 34: 11 passed, screenshots of the menu and Settings checked.
  • The web page rendered headless with demo /stats.json (wide and 420 px): matches the mock; its script passes node --check.

…e web page (2.26.0)

Decoder takes the brass look of our apps (brand brass 1.3.0; #286): the menu
over the video is a brass panel of brass keys (engaged: pressed brass with an
amber glow; focus: an amber frame; a slot without a camera dim; the version
stays on Exit), the status line amber monospace on a dark plate, the dialogs
brass panels with dark fields, amber controls with focus_ring.xml and brass
buttons. Network opens one Settings dialog: Decoder (Allow remote access, new;
Port; Web page password) and Camex (Join a camex server, the state, the
library's fields). The web page gets the brass header, panel, plate, board of
lamps (Decoder, Cameras, Screen, Camex), brass links and switches; the tab
shows the worst lamp; /stats.json has camex.

The window of a dialog is framed before show(): changed once shown, it lost the
keyboard a phone opens with. e2e finds texts case-insensitively (allCaps
buttons read as SAVE on API 34).

Qodo on #285: a deferred tunnel start only while Network is on; rebind() bumps
a generation, wakes the loop and clears settled; the address on screen follows
a move.
bundles/camex -> 0c3e7cb (4.2.0, OpenIPC/camex#191): CamexTunnel.fields(context,
"decoder") gives the labels (Proto for the transport), the hints of empty
fields and the default client name decoder-<the last four of ANDROID_ID>, also
for an empty saved name. The key is hidden with Show the key under it (the
dots only: the field's input type is TvKeyboard's).
@qodo-free-for-open-source-projects

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

Copy link
Copy Markdown

PR Summary by Qodo

Apply brass styling to Decoder and add unified Settings

✨ Enhancement 🐞 Bug fix 📝 Documentation 🧪 Tests 🕐 40+ Minutes

Grey Divider

AI Description

• Give Android menus, dialogs, the status line, and the web page a consistent brass appearance.
• Consolidate network controls in Settings, including a switch that closes the debug server.
• Upgrade Camex and make port changes, tunnel starts, and displayed addresses follow saved settings.
Merge Risk 🟡 Medium

Blast radius 🔴 High 💥 4 capabilities

  • 4 affected capabilities span independent functional scopes: decoder_debug_dashboard, decoder_network_diagnostics, decoder_presentation.
  • The changed server, port preference, address display, and request handler form one bounded diagnostics integration.
  • The propagation path ends at the externally reachable debug page rather than treating the server and address label as separate capabilities.
  • Camex configuration, tunnel startup, and the debug-page port announcement are one bounded Network integration even though the tunnel implementation is in a submodule.
  • The camera-viewing outcome is distinct from merely serving local diagnostics, so it is represented as a separate capability in the same scope.
  • This is the same end-to-end camex camera-access behavior as the port contract path: configuration fields, persistence, tunnel startup, and remote camera reachability are hops of one bounded integration, not separate technical capabilities.
  • Menu navigation, settings dialogs, and the on-video status overlay are distinct presentation surfaces with the same bounded decoder UI outcome; their propagation path is through styling and layout resources, not separate deployment components.
  • The page HTML/CSS/JavaScript and the stats payload consumer produce one browser dashboard outcome.
  • It is independent of Android TV control rendering because it is a separate user-facing browser surface with its own DOM and state aggregation.
Sources

bundles/camex[1-1]

Subproject commit 0c3e7cb43f815f70a2106f758dd849947c1b6c8c
Behavioral complexity 🔴 High 🧩 Coordinated invariants, Concurrent ordering

  • Before: the server used a delayed close/retry loop and the tunnel waited for the initial settled port.
  • After: access changes and port saves invalidate a generation, wake a sleeping accept loop, close an active socket, and coordinate pending or running tunnel startup with the newly settled port.
  • New correctness conditions: an opening socket must not survive a concurrent Save; an accepted request must honor a later access-off transition; pending startup must agree with the current Join setting; and the tunnel must not be given a stale or zero port.
  • These are newly interacting lifecycle and ordering conditions, not complexity inherited merely from using a socket or retry loop.
Potential damage 🟡 Medium 🩹 Recoverable

  • The plausible failure is loss of the read-only debug page or a stale/missing displayed address.
  • Reverting the app code restores the old lifecycle, but a user may need to reopen Settings or restart the app to recreate the socket; no persistent decoder state or external data is corrupted.
  • Code rollback restores the previous server behavior.
  • Runtime recovery requires a successful rebind or app restart; no automatic repair of a failed socket is established beyond the retry loop.
Assessed commit 1b5ec8a
Diagram

graph TD
  Brass["Brass theme"] --> Menu["Video menu"] --> Settings["Settings dialog"] --> Access["Access settings"] --> Server["Debug server"] --> Page["Brass web page"]
  Brass --> Settings
  Settings --> Camex["Camex tunnel"] --> Decoder["Decoder status"] --> Server
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Bundle the web page as an asset
  • ➕ Separates substantial HTML, CSS, and JavaScript from the HTTP server.
  • ➕ Makes browser-side changes and testing easier to review.
  • ➖ Requires asset loading and a way to retain the page's Java-derived values.
  • ➖ Broadens a PR that already changes several subsystems.

Recommendation: The shared Android styling helper and Camex-provided field metadata fit the existing architecture. Keep the current integration for this release, but consider extracting the growing inline web page into an asset in a focused follow-up.

Files changed (22) +695 / -121

Enhancement (12) +640 / -100
Brass.javaAdd shared brass styling for Android views +234/-0

Add shared brass styling for Android views

• Defines panels, keys, section bands, focus treatments, and dialog view styling. Frames dialog windows before they appear to preserve keyboard behavior.

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

DebugServer.javaRebind the debug listener reliably and redesign its page +170/-30

Rebind the debug listener reliably and redesign its page

• Honors the remote-access setting and uses a wake signal and generation check so saved port changes are not lost during binding or retry waits. Replaces the page presentation with a brass status board and worst-status tab indicator.

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

Decoder.javaExpose Camex state and refresh the displayed web address +15/-1

Expose Camex state and refresh the displayed web address

• Adds Camex status to debug statistics, shows when remote access is off, and refreshes on-screen page URLs after the listener settles.

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

MenuManager.javaRestyle the video menu and dialogs +31/-28

Restyle the video menu and dialogs

• Applies brass panels and keys, distinct active and focus cues, and darker slot-quality colors. Uses the shared dialog treatment for camera, boot-permission, and Reset dialogs.

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

NetworkPanel.javaCombine Decoder and Camex controls in Settings +88/-37

Combine Decoder and Camex controls in Settings

• Adds remote-access controls and library-defined Camex fields, hints, defaults, and key visibility. Coordinates saves with listener rebinds and prevents a deferred tunnel start after Camex is turned off.

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

WebPort.javaPersist whether the debug page is allowed +15/-0

Persist whether the debug page is allowed

• Adds a default-on remote-access preference and a setter that reports whether its value changed.

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

focus_ring.xmlAdd an amber D-pad focus ring +23/-0

Add an amber D-pad focus ring

• Defines the focused background used by brass check boxes and radio buttons.

android/app/src/main/res/drawable/focus_ring.xml

status_plate.xmlAdd a dark status-line plate +7/-0

Add a dark status-line plate

• Defines the translucent, framed background for status text over video.

android/app/src/main/res/drawable/status_plate.xml

decoder.xmlStyle the over-video status line +10/-4

Style the over-video status line

• Changes the status overlay to amber, uppercase monospace text on the new dark plate.

android/app/src/main/res/layout/decoder.xml

colors.xmlAdd the brass Android palette +22/-0

Add the brass Android palette

• Introduces the panel, brass, amber, ink, and dim color tokens used by the new UI.

android/app/src/main/res/values/colors.xml

ids.xmlAdd a dialog text-color preservation tag +5/-0

Add a dialog text-color preservation tag

• Defines the resource ID used to keep explicitly colored text unchanged during brass dialog styling.

android/app/src/main/res/values/ids.xml

styles.xmlDefine the brass dialog theme +20/-0

Define the brass dialog theme

• Adds amber-accented dialog, checkbox, and radio-button styles with the shared focus ring.

android/app/src/main/res/values/styles.xml

Refactor (1) +0 / -1
strings.xmlRemove the unused Network title string +0/-1

Remove the unused Network title string

• Drops the old dialog title resource after the dialog becomes Settings.

android/app/src/main/res/values/strings.xml

Tests (1) +1 / -1
e2e.shMatch UI text regardless of capitalization +1/-1

Match UI text regardless of capitalization

• Makes text-bound lookup case-insensitive so tests find all-caps dialog buttons on newer Android versions.

tests/e2e.sh

Documentation (6) +51 / -16
CHANGELOG.mdDocument the 2.26.0 release +25/-0

Document the 2.26.0 release

• Records the brass redesign, unified Settings, Camex upgrade, web status board, and port-rebind fixes.

CHANGELOG.md

README.mdExplain the new network settings in English +1/-1

Explain the new network settings in English

• Describes the Decoder and Camex sections, remote-access switch, library fields, and Camex 4.2.0 defaults.

README.md

README.ru.mdExplain the new network settings in Russian +1/-1

Explain the new network settings in Russian

• Updates the Russian network guide for unified Settings, remote access, and Camex 4.2.0 fields.

README.ru.md

README.zh-CN.mdExplain the new network settings in Chinese +1/-1

Explain the new network settings in Chinese

• Updates the Chinese network guide for unified Settings, remote access, and Camex 4.2.0 fields.

README.zh-CN.md

debug.mdDocument the web status board and Camex statistics +22/-12

Document the web status board and Camex statistics

• Explains the brass page, lamp meanings, tab status, Settings port location, and the new camex object in /stats.json.

docs/debug.md

usage.mdDocument brass menu states +1/-1

Document brass menu states

• Describes the pressed-brass active state, amber remote-focus frame, and dim unconfigured slots.

docs/usage.md

Other (2) +3 / -3
build.gradleSet the Android release to 2.26.0 +2/-2

Set the Android release to 2.26.0

• Increments versionCode to 62 and versionName to 2.26.0.

android/app/build.gradle

camexUpgrade the Camex submodule to 4.2.0 +1/-1

Upgrade the Camex submodule to 4.2.0

• Moves the pinned submodule from 53c3dd8 to 0c3e7cb for context-aware field metadata.

bundles/camex

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

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

Copy link
Copy Markdown

Code Review by Qodo

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

Grey Divider


Remediation recommended

1. Disabled access still serves open sockets ✓ Resolved
Description
The new off path in acceptLoop() closes the listening socket, but rebind() does not close
sockets already accepted by worker threads, and handle() never rechecks WebPort.allowed(). A LAN
client whose connection was accepted before Settings was saved off can send or complete a request
afterward, including requests for the log and report.

2. Unchecked cameras show as unanswered ✓ Resolved
Description
board() counts every configured slot but treats it as live only when it has video or a successful
probe, even when its probe state is not checked. While a UDP push is playing, Decoder deliberately
suspends checks of the other cameras, so the new Cameras row reports them as having no answer and
turns amber without evidence of a failure.

3. Menu keys clip on narrow screens ✓ Resolved
Description
menuPopup() adds 14dp of padding to each side of the content without reducing the width budget
used for the four menu columns. When cell reaches its screen-width cap, the wrap-content popup
becomes wider than the available space at its 12dp left margin, clipping the rightmost keys.

View review recommended (2)
4. Video wall spills below short windows ✓ Resolved
Description
The new fit() sets h to w*9/16+1, making its w*9/16>h height-limit condition impossible. On
a short landscape browser window, the wall therefore stays at full panel width instead of shrinking
to fit the available height as it did before this change.

5. Camex never connects after a port change while remote access is off ✓ Resolved
Description
rebind() sets settled = false, but when Allow remote access is off, acceptLoop stays in its
inner while (!WebPort.allowed(...)) sleep(...) loop, and only the code before that loop sets
settled back to true. So if a user saves Settings with remote access off, a different Port and
Join a camex server on, connect() → start() sees settled() false and parks the start in
pendingStart; no webPortSettled call ever runs it, and the tunnel does not start until remote
access is turned on again or the app restarts.


Informational

6. The debug docs still say the page is always on ✓ Resolved
Description
The edited line in docs/debug.md still says the debug server "is always on", but this PR adds
Allow remote access, which closes the page and its port. Readers of the debug docs are not told that
the page can be turned off in Settings, or that it is then unreachable.

Grey Divider

Tip of the day
💡 Did you know, you can describe a rule in plain language on the Rules page and Qodo drafts it for you

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

…h, wall height

A request accepted just before Allow remote access went off is not served; the
off loop settles on every wake, so a tunnel start waiting after a port change
goes on. The board counts cameras not checked now apart from no answer. The
menu's cells leave room for the panel's padding and frame. The page's wall fits
the window's height below the board. docs/debug.md: the page is on unless
Allow remote access is off.
@compot-dev

Copy link
Copy Markdown
Collaborator Author

Qodo review on 3e587ed — all six were real, fixed in the next commit:

  1. Disabled access still serves open sockets — handle() drops a request when Allow remote access is off, so one accepted just before the switch is not served.
  2. Unchecked cameras show as unanswered — "no answer" is a failed check (error) or a grid cell without video; cameras not checked now (not checked, waiting, checking) are counted apart: … · K not checked, and do not turn the lamp amber.
  3. Menu keys clip on narrow screens — the cap on the cell width leaves room for the panel's padding and frame too.
  4. Video wall spills below short windows — fit() caps the wall by the window's height below the board (checked headless at 1280×700).
  5. Camex never connects after a port change while remote access is off — the off branch settles on every wake instead of waiting in an inner loop, so a start parked by rebind() goes on.
  6. Debug docs say "always on" — now: on unless Settings → Decoder → Allow remote access is off.

Local: build, unit tests and lint (13 warnings, as before); e2e TCP API 34 18/18, TCP API 21 18/18, UDP API 34 17/17.

@compot-dev
compot-dev merged commit 31156c9 into v2 Nov 19, 2026
7 checks passed
@compot-dev
compot-dev deleted the feat/brass-286 branch November 19, 2026 02:14
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.

Brass look: the menu, the dialogs, the status line and the web page

1 participant