Skip to content

Fix compact RX preset sizing on Linux. Principle XI. - #6643

Merged
ten9876 merged 3 commits into
aethersdr:mainfrom
rfoust:codex/fix-6641-rx-layout
Oct 21, 2026
Merged

ten9876 merged 3 commits into
aethersdr:mainfrom
rfoust:codex/fix-6641-rx-layout

Conversation

@rfoust

@rfoust rfoust commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Fixes #6641. Related to #6508, #6564 and #6637.

With DejaVu Sans on Linux, the three RX preset columns need 103 px. The 136 px AGC row, 4 px column gap and 8 px margins bring the applet minimum to 251 px inside a 248 px dock. The existing GUI test correctly catches the clipped right edge.

Reduce only the presets' horizontal padding from 2 px to 1 px. The dock width, AGC selector, Auto button and slider minimum retain their sizes. Add system/DejaVu Sans/Liberation Sans cases that check width, control containment, label fit and a slider at least 60 px wide. Refresh the RX guide's HiDPI screenshot.

Constitution principle honored

Principle XI — the new font cases fail against the original layout and pass with the fix, using the real production widgets and agent automation dispatcher.

Validation

  • Linux, Debian 13 ARM64 / Qt 6.12: unchanged main reproduces 251 actual / 248 expected (13 QtTest cases pass, 1 fails). New cases on unchanged production code fail for system/DejaVu Sans and pass for Liberation Sans. With the fix, Auto AGC-T GUI and RX squelch reconciliation CTests both pass at DPR 1.6667 (7.18 s). The entire GUI test also passes at normal DPR: 17 passed, 0 failed.
  • Linux bridge capture: 251 → 248 px applet; 60 → 63 px slider. The fixed font cases verify that preset text and all visible children fit. Runtime/test source hashes match the signed fix.
  • Linux configuration: RADE enabled; C++ -O0 -g1 -DNDEBUG. Object debug sections were stripped and static archives placed in temporary RAM storage because of VM resource limits. Tests ran in a separate checkout; the managed checkout and its CWX edits were preserved.
  • macOS: full RADE app build; host/system processors and executable verified ARM64, with no RNNoise x86 sources. Both focused CTests pass (15 GUI and 55 squelch cases), including an additional HiDPI GUI pass.
  • npm ci and production docs build pass, including current main's new docs configuration. Registration, frozen CI gate, generated references and 707 Log Analyzer checks pass. Accessibility warnings remain 5 on base/head. The RX screenshot embed is in sync; 14 unrelated existing pages remain out of step.
  • Signed integration of main 4ef2c18b5 changes only documentation/release infrastructure; tested runtime/GUI sources are unchanged. Windows and the complete suite were not run locally; hosted checks are pending.

The socket-free fixture uses injected normalized status and the agent automation bridge's production dumpTree, grab, get and invoke dispatcher. It starts no radio, audio device or listener. Bridge sufficient — no gaps; this is fixture evidence without a live-radio or RF claim.

Proof

Linux DejaVu Sans, DPR 1.6667. Standalone production widget before → after: the minimum fits the dock, preserving the AGC slider.

Before: 251 px RX applet
After: 248 px RX applet

Machine-readable layout measurements

Generated with OpenAI Codex.

Keep the 248 px dock and minimum 60 px AGC-T slider by reducing only the preset buttons horizontal padding. Add font-specific geometry and label-fit checks, and refresh the RX controls guide and screenshot.

Fixes aethersdr#6641.
@rfoust
rfoust marked this pull request as ready for review October 21, 2026 02:01
@rfoust
rfoust requested a review from a team as a code owner October 21, 2026 02:01
Copilot AI balanced review requested due to automatic review settings October 21, 2026 02:01

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-21T02:05:08.721988Z e6d541b Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@ten9876 ten9876 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Review of #6643 at e6d541b6, against #6641

Issue fit. Yes. #6641's acceptance criteria are all met:

  • the dock stays 248 px;
  • the AGC-T slider keeps at least 60 px (63 px after the fix);
  • every control stays visible;
  • the focused GUI test passes under DejaVu Sans;
  • the width assertion stays.

The fix is the smallest one available. It cuts only the preset buttons' horizontal padding from 2 px to 1 px. Vertical padding stays 1 px, because kButtonBase() at src/gui/RxApplet.cpp:196 is padding: 1px 2px. Nothing else in the applet changes.

Scope

File Claimed? Verdict
src/gui/RxApplet.cpp:3551-3554 Yes, the fix In scope
tests/auto_agc_threshold_gui_test.cpp (compactLayoutFitsDock, three font rows) Yes In scope
docs/user/static/img/screens/rx-applet.png Yes, refreshed screenshot (same 413×325) In scope
docs/user/docs/rx-controls.md:60-61 Yes In scope, see nit 3
Merge commit e6d541b69 Disclosed Folded away by the squash

Everything in the diff is explained by the issue. There's no new public surface, no removed guard and no CHANGELOG.md entry. This is a layout fix for a reproduced defect, not a preference change.

Blockers

None.

Nits (non-blocking)

  1. tests/auto_agc_threshold_gui_test.cpp:337-346: the test only pins the fix on hosts that have DejaVu Sans.
    • On this box DejaVu isn't installed system-wide. The rows are then system and Liberation Sans, and with the padding change reverted both still pass.
    • Only a fontconfig that supplies DejaVu turns the test red without the fix. CI's image does have it, which is how #6641 was found, so CI coverage is real.
    • Consider a one-line comment saying the DejaVu row is the one that pins the fix, so a later font-image change that drops it is noticed.
  2. tests/auto_agc_threshold_gui_test.cpp:370: the failure message can be empty. QVERIFY2(..., qPrintable(widget->accessibleName())) names the widget by its accessible name, which many children don't have. A fallback makes a containment failure readable:
                    QVERIFY2(fixture.rx.rect().contains(bounds),
                        qPrintable(widget->accessibleName().isEmpty()
                            ? QString::fromLatin1(widget->metaObject()->className())
                            : widget->accessibleName()));
  3. docs/user/docs/rx-controls.md:60-61: the new sentence describes the layout, not what the user does with it. "The compact preset buttons keep the AGC-T slider and A button visible…" reads as an implementation note. I'd drop it; the refreshed screenshot already shows the result. This is your call.

What I verified, and what held up

  • The fix. I built auto_agc_threshold_gui_test and the app at the head. This used a lean shared-core build with Qt 6.12, run offscreen.
    • With a DejaVu-only fontconfig: 16 passed, 0 failed.
    • With system fonts: 16 passed.
  • The test pins it. With the padding: 1px override removed, the DejaVu run fails 3 cases: compactLayoutFitsDock(system), compactLayoutFitsDock(DejaVu Sans) and bridgeClickWaitsForConfirmedStatus, each at its width QCOMPARE. With the override restored, 16/16 pass again.
  • The merge base. On main I reproduced 251 vs 248 earlier today with the same DejaVu fontconfig (while working on #6637).
  • Other modes. The test only exercises USB presets. I drove the head build against the demo radio (DEMO-0001, isolated settings, offscreen, TX disabled) under DejaVu Sans. I set each mode with slice mode and read the RX applet's widget tree with dumpTree.
    • USB, LSB, CW, CWR, AM, SAM, FM, NFM, DIGU, DIGL, RTTY and DFM all keep the applet at 248 px, with no visible child past its right edge.
    • The widest labels are AM's 5.6K/10K/12K/14K, at 30-31 px buttons.
    • FM, NFM and DFM show no width presets, and nothing overflows.
  • Restyling. kButtonBase() is resolved once, so a theme change can't restyle the presets back to the old padding. rebuildFilterButtons() is the only place their stylesheet is set.
  • Not verified. Radio-declared preset labels (stablePresets, networked Icom) can be longer than Flex's, and the demo can't produce them. Windows and macOS rendering I only read.
  • CI freshness. CI ran at 01:58Z, before main moved to 6bac6a089 (#6645). That commit touches CTR2 code only, not RxApplet or this test.

@ten9876 ten9876 self-assigned this Oct 21, 2026
…ote. Principle XI.

compactLayoutFitsDock reported a widget past the applet edge by its
accessible name, which most children don't have, so the failure could be
an empty message. It now falls back to the class name. A comment marks
DejaVu Sans as the row that needs the compact preset padding, so a host
without that font is known to run only rows that already fit.

The rx-controls.md sentence described the layout rather than anything an
operator does. The refreshed screenshot shows the result, so the sentence
is removed.

auto_agc_threshold_gui_test: 16 passed under a DejaVu-only fontconfig and
under the system fonts.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012U8wmr3AQGVrmQLp2zNBwa

@ten9876 ten9876 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Approving at c3dbfe090.

The fix. With a DejaVu-only fontconfig, auto_agc_threshold_gui_test passes 16/16, and the compactLayoutFitsDock(DejaVu Sans) row ran. Removing the padding: 1px override (src/gui/RxApplet.cpp:3551-3554) fails 3 cases, both new layout rows among them, each at its 248 px width check. In the demo radio under DejaVu Sans, all 12 modes (USB, LSB, CW, CWR, AM, SAM, FM, NFM, DIGU, DIGL, RTTY, DFM) keep the RX applet at 248 px with no child past its right edge. Details are in review 5600481695.

Review nits, folded in as c3dbfe090:

  • A containment failure in compactLayoutFitsDock now names the widget's class when it has no accessible name (tests/auto_agc_threshold_gui_test.cpp). This one is checked by compiling and by the green run only; I didn't force a containment failure.
  • A comment marks DejaVu Sans as the row that needs the compact padding.
  • The rx-controls.md sentence describing the layout is removed. That was the maintainer's call; the refreshed screenshot stays.

After the push, the test passes 16/16 under both DejaVu and the system fonts, and every required check is green on c3dbfe090.

Not verified: radio-declared preset labels (networked Icom) and Windows/macOS rendering, which I only read. Main has since gained #6637, which touches three unrelated tests and none of this PR's files.

@ten9876
ten9876 merged commit b9abd49 into aethersdr:main Oct 21, 2026
11 checks passed
@ten9876 ten9876 removed their assignment Oct 21, 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.

RX applet exceeds dock width with DejaVu Sans

3 participants