Skip to content

Commit fa887d0

Browse files
committed
Rebuild every tab on the adaptive layout
All 51 tabs and their embedded views now group controls on cards, wrap rows instead of widening, and stack side-by-side panes in narrow windows; widgets, signals, menu actions and translation keys are unchanged. Script Builder needed 818 px for its toolbar row and now needs 206, and every page fits the 72-character budget, so the list of wide pages is empty. Pages scrolled even when they fitted: QScrollArea sizes a page holding any height-for-width item from preferred heights. Each tab page now sits in a PageScrollArea that gives it the viewport or its minimum, and FlowLayout keeps its wrapped height as a minimum instead of reporting height-for-width. Flow lines centre their items and give spare width to fields; group-box titles are drawn inside the box like card titles. Also fixes the WebRTC viewer's remote-files section showing a raw key, the English publish button rendering "&" as a mnemonic, and adds the new adaptive modules to the strict typing tier CI asked for.
1 parent a4ebadf commit fa887d0

84 files changed

Lines changed: 1484 additions & 1201 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎CHANGELOG.md‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22

33
## [Unreleased]
44

5+
- GUI: every tab's layout is rebuilt on cards, wrapping rows and side-by-side panes that stack
6+
when narrow; widget objects, attributes, signals, Actions-menu entries and translation keys
7+
are unchanged. Each page's scroll area no longer uses `setWidgetResizable(True)`
8+
(`ScrollableTabs.scroll_area()` returns a `PageScrollArea`, which sizes the page to the
9+
viewport or its minimum), `FlowLayout` no longer reports height-for-width, and group-box
10+
titles are drawn inside the box. The WebRTC viewer's remote-files section showed the raw key
11+
`rd_webrtc_files_group`; it uses `rd_webrtc_remote_files_group`. The English
12+
"Publish & wait for viewer" button read "Publish _wait"; it is "Publish and wait for viewer".
13+
514
- The `gui` extra and the development and CI pins are back on `PySide6==6.11.2`. 6.12.0 crashed
615
the test process at interpreter exit on every CI platform (a double free while
716
`destroyQCoreApplication` tears down Python-held widgets); Dependabot now skips 6.12.0.

‎Progress.md‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -534,10 +534,13 @@ F 還缺:
534534

535535
- **F2 其餘**:Diagnostics 以外面板的執行詳情,以及各面板的空白/錯誤/permission states 尚未全面交付。
536536
- **F2 GUI 重製(`WIP`,維護者 2026-11-14 決定:全面視覺改版;窄視窗時導覽與詳情改為浮層)**:
537-
設計系統(`gui/adaptive/`、主題 token 與字階)、每頁頁首與 fit pass、視窗斷點(圖示欄、導覽與詳情抽屜)已交付(U-20261114-02)。仍缺:
538-
51 個分頁逐頁改用 `Card`/`FlowLayout`/`ResponsiveBox` 重排(目前多數頁只套上群組框的卡片樣式,頁首標題與頁內第一個群組標題重複);
539-
`test_gui_page_widths.py` 的 `WIDE_PAGES`(script_builder、flakiness、audit_log、usb_share)降到 72 字元內後移除;
540-
所有截圖都是 offscreen 平台加 Windows 字型,尚未在真實螢幕、混合 DPI 與 Linux/macOS 字型上目視審閱。
537+
設計系統、視窗斷點(U-20261114-02)與 51 個分頁的版面重排(U-20261114-04)已交付,`WIDE_PAGES` 已清空。仍缺:
538+
- 所有截圖都是 offscreen 平台加 Windows 字型,尚未在真實螢幕、混合 DPI 與 Linux/macOS 字型上目視審閱。
539+
- 重排時看到、但屬邏輯或字串而未改的:Self-Healing 執行表在空表時 `resizeColumnsToContents()` 把欄名擠扁;
540+
Remote Desktop 的走勢圖背景(黑)、統計文字(`#ccaa55`)與大號 ID(`#2070d0`)寫死顏色,淺色主題下不協調;
541+
收合中的區段仍畫出一條空卡片、展開後區段與內層群組標題重複;Diagnostics 閒置時空的進度列仍佔一行;
542+
Assertions 的種類下拉選單項目與 Email Triggers 的密碼提示字在 `__init__` 設定,切換語言不會更新;
543+
下拉選單的箭頭貼齊右緣(`theme.py`);Trace Replay 的畫面/動作改為 `ResponsiveBox` 後不能再拖曳分隔線。
541544
- **F3** 還缺共用 `TaskController` 接入其餘面板、backend timeout/cancel 傳遞與關閉生命週期遷移,
542545
包含 Quick Connect 的同步啟停、已進入傳輸的取消與同頁 session generation 隔離。
543546
- **F3 關閉失敗恢復**:`gui/_slow_op.py` 的 StopQueue/stop_each 目前只記錄停止失敗,

‎architecture_explore.md‎

Lines changed: 69 additions & 69 deletions
Large diffs are not rendered by default.

‎docs/source/Eng/doc/new_features/v224_features_doc.rst‎

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,23 @@ Adaptive GUI: Page Headers, Cards and Controls That Shrink
33

44
The GUI is being redesigned around one set of adaptive building blocks, so
55
every page looks the same and fits a small window. This page describes what
6-
is in place: the building blocks, the window's own breakpoints, and what every
7-
page gets from them. Reworking each page onto the blocks follows in later
8-
releases.
6+
is in place: the building blocks, the window's own breakpoints, and every
7+
page rebuilt on them.
8+
9+
Every page is rebuilt
10+
---------------------
11+
12+
All 51 pages now group their controls on cards, put their main table or result
13+
on a card that takes the remaining height, wrap rows of fields and buttons
14+
instead of widening, and set side-by-side panes (list and details, input and
15+
output) one above the other in a narrow window. Status lines and notes are
16+
muted hints. Nothing a page does changed: its widgets, menu actions and
17+
translations are the same.
18+
19+
A page scrolls only when the window is smaller than the page can shrink: each
20+
page is given the visible area, or its minimum size where that is larger. (Qt's
21+
default sized a page holding a wrapped label from every control's preferred
22+
height, so pages with a table scrolled in windows they fitted.)
923

1024
The window adapts to its width
1125
------------------------------
@@ -83,6 +97,5 @@ The width check
8397
``test/unit_test/headless/test_gui_page_widths.py`` opens every registered tab
8498
the way the window does and reads its minimum width, in average characters of
8599
the window's label font so the same limit holds on Windows and Linux fonts. A
86-
page may need at most 72 characters (about 460 px in 10 pt Segoe UI). Four
87-
pages are still over it and listed with a ceiling each (Script Builder,
88-
Flaky Tests, Audit Log, USB Sharing); the list only shrinks.
100+
page may need at most 72 characters (about 460 px in 10 pt Segoe UI). Every
101+
page fits; before the rework Script Builder alone needed 818 px.

‎docs/source/Zh/doc/new_features/v224_features_doc.rst‎

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,17 @@
22
======================================
33

44
GUI 正以一組共用的自適應元件重新設計,讓每個分頁外觀一致,也放得進小視窗。
5-
本頁說明目前已完成的部分:元件、視窗本身的斷點,以及每個分頁因此得到的改變。
6-
各分頁逐頁改用這些元件,會在之後的版本陸續交付。
5+
本頁說明目前已完成的部分:元件、視窗本身的斷點,以及以它們重建的每個分頁。
6+
7+
每個分頁都已重建
8+
----------------
9+
10+
51 個分頁都把控制項依用途分組在卡片上,主要的表格或結果放在佔滿剩餘高度的卡片;
11+
欄位與按鈕列放不下時換行而不撐寬;並排的面板(清單與詳情、輸入與輸出)在窄視窗改為上下排列。
12+
狀態列與說明改為淡色提示。分頁的行為不變:控制項、Actions 選單與翻譯都相同。
13+
14+
只有視窗小於分頁能縮到的大小時才會捲動:每頁取得可見區域,或在其最小尺寸較大時取最小尺寸。
15+
(Qt 預設會依每個控制項的偏好高度決定含換行標籤的頁面高度,所以含表格的頁面在放得下的視窗裡也會捲動。)
716

817
視窗依寬度調整
918
--------------
@@ -71,5 +80,4 @@ GUI 正以一組共用的自適應元件重新設計,讓每個分頁外觀一
7180

7281
``test/unit_test/headless/test_gui_page_widths.py`` 以視窗的方式開啟每個已註冊分頁並讀取最小寬度,
7382
單位是視窗標籤字型的平均字元寬,使 Windows 與 Linux 字型適用同一個上限。
74-
每頁最多 72 字元(10 pt Segoe UI 約 460 px)。目前仍有四個分頁超過,各自列出上限
75-
(Script Builder、Flaky Tests、Audit Log、USB Sharing);這份清單只減不增。
83+
每頁最多 72 字元(10 pt Segoe UI 約 460 px)。目前每頁都符合;重排前 Script Builder 一頁就需要 818 px。

‎docs/updates/2026-11-b.md‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,3 +299,14 @@
299299
- **Decision (maintainer, 2026-11-14):** pin `PySide6==6.11.2` again in `pyproject.toml`, `dev.toml`, `requirements.txt`, `dev_requirements.txt` and the `dev.yml` / `quality.yml` tool lines; Dependabot ignores 6.12.0 only, so a later 6.12 release is still proposed. The shared local `.venv` stays on 6.12.0 (not replaced); CI is the check for 6.11.2.
300300
- **Files:** the six pinned files, `.github/dependabot.yml`, `CHANGELOG.md`, `Progress.md`.
301301
- **Open items:** retrying 6.12.x (`Progress.md` › PySide6 6.12).
302+
303+
## U-20261114-04 · 2026-11-14 · GUI redesign, stage 2: every tab rebuilt on the adaptive layout · #migration #gui
304+
305+
- **What:** the 51 tabs' layouts (plus their embedded views: RBAC users, healing evaluation, agent observation / transfer, MCP discovery, the Remote Desktop panels and dialogs, Script Builder's step form) rebuilt on `Card`, `FlowLayout` / `field_pair` and `ResponsiveBox`: groups on cards, the main table or result on a stretching card, rows that wrap, side-by-side panes that stack below 720 px, status lines as hints, inline labels registered for live translation. Auto Click's group titled like the page is gone. Widget objects, attributes, signal connections, `menu_actions()`, `retranslate()`, `dispose()` and translation keys are unchanged; a scan of the diff for removed connections, attributes and keys found only that title and the remote-files key below.
306+
- **Widths (average characters, budget 72):** Script Builder 127 → 32 (its 9-button toolbar was one row), Audit Log 78.5 → 44.1, USB Sharing 76.6 → 39.5 (now also gets a page header), Flaky Tests 87 → under budget, Media Checks 71.8 → 37.8, Triggers 71.0 → 43.0, Image Detection 66.8 → 35.8, Recording Editor 62.0 → 25.5, DAG Runner 60.3 → 42.7, Remote Desktop's WebRTC host 120.3 → 52.6 and viewer 107.7 → 52.6 (inside its own scroll areas). `WIDE_PAGES` in `test_gui_page_widths.py` is empty.
307+
- **Shared fixes found while doing it:** `FlowLayout` no longer reports height-for-width (a page with one scrolled even when it fitted), keeps its wrapped height as its minimum, centres items on a line and gives spare width to items that grow (line edits, fitted combos); each tab page sits in a `PageScrollArea` that gives it the viewport or its minimum, because `setWidgetResizable(True)` sized any page with a wrapped label from preferred heights; container widgets take a `bare` role (no painted background inside cards); group-box titles are drawn inside the box like card titles.
308+
- **Defects fixed on the way:** the WebRTC viewer's remote-files section showed the raw key `rd_webrtc_files_group` (now the existing `rd_webrtc_remote_files_group`); the English "Publish & wait for viewer" rendered as "Publish _wait" (the `&` is a mnemonic); Remote Desktop's security warning, status and drag-and-drop notes used fixed colours (`#555` was unreadable on dark) and now use roles.
309+
- **How:** done in seven parallel batches with one brief (layout only, no shared files), then reviewed, the shared fixes above made here, and rendered as contact sheets in both themes at 600 and 1,360 px.
310+
- **Tests:** batches reported 140 + 216 + 160 + 171 + 293 + 170 + 1,463 tab tests passing (Remote Desktop's count equals its baseline). `test_gui_adaptive.py` +2 (a flow row inside a scroll area does not scroll above its minimum and never overlaps what follows; spare width and centring), `test_gui_adaptive_window.py` +1 (a page with wrapped text scrolls only below its minimum).
311+
- **Files:** 70 modules under `gui/`, `gui/adaptive/{flow_layout,responsive}.py`, `gui/theme.py`, `gui/workspace.py`, `english.py`, the three tests, both `v224_features_doc.rst`, `CHANGELOG.md`, `architecture_explore.md` (re-measured), `Progress.md`.
312+
- **Open items:** review on a real screen and other fonts; the pre-existing defects listed in `Progress.md` › F2 GUI 重製.

‎docs/updates/README.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ In the same commit: delete the item from `Progress.md`, add a `#done` entry here
5858

5959
| ID | Date | Title | Tags | Batch |
6060
|---|---|---|---|---|
61+
| U-20261114-04 | 2026-11-14 | GUI redesign, stage 2: every tab rebuilt on the adaptive layout | #migration #gui | [2026-11-b](2026-11-b.md) |
6162
| U-20261114-03 | 2026-11-14 | PySide6 back to 6.11.2: 6.12.0 crashes every CI platform at exit | #decision #ci #gui | [2026-11-b](2026-11-b.md) |
6263
| U-20261114-02 | 2026-11-14 | GUI redesign, stage 1: adaptive building blocks, page headers, cards, window breakpoints and the width gate | #migration #gui | [2026-11-b](2026-11-b.md) |
6364
| U-20261114-01 | 2026-11-14 | PR #552: CI tested PySide6 6.11.2, the container crashes on 6.12.0, two test regressions | #incident #ci #gui | [2026-11-b](2026-11-b.md) |

0 commit comments

Comments
 (0)