diff --git a/PLAN.md b/PLAN.md index 09a9687..a1fa5f0 100644 --- a/PLAN.md +++ b/PLAN.md @@ -5,6 +5,15 @@ --- +## 0.3.21 侧栏行更紧凑(分支 `flutter`) + +| 项 | 结果 | +| --- | --- | +| 行高 | 项目条和会话行都改为 `dense: true` + `minTileHeight: 56`,实测都是 54(此前是 72);标题 14 / 项目名 14.5,路径与副标题保持较小字号 | +| 对齐 | 仍然等高等宽;`+` 与会话 `⋮` 的 x 中心保持对齐(测试断言) | +| 版本 | **0.3.21(code 321)** | +--- + ## 0.3.20 侧栏项目/会话行等高与右对齐、活动条改为 dsh-Go 胶囊(分支 `flutter`) | 项 | 结果 | diff --git a/README.md b/README.md index 30ea6ac..365284a 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Android first. This branch (`flutter`) is a framework evaluation: the same feature set as the earlier Asuka/Go and MyGo attempts, reimplemented in Flutter to compare mobile UI maturity. -Status: 0.3.20 — servers (passwordless / password login, HTTP/HTTPS and +Status: 0.3.21 — servers (passwordless / password login, HTTP/HTTPS and SOCKS5/socks5h proxy, self-signed certificates and pinning), session list with search and live events, chat with streaming Markdown and full history paging, tool steps grouped per turn (icon, one-line summary, foldable run) with image previews, a diff --git a/lib/screens/sessions_screen.dart b/lib/screens/sessions_screen.dart index 8c4f02b..2109cc3 100644 --- a/lib/screens/sessions_screen.dart +++ b/lib/screens/sessions_screen.dart @@ -307,6 +307,9 @@ class _SessionListPaneState extends State { borderRadius: BorderRadius.circular(10), clipBehavior: Clip.antiAlias, child: ListTile( + // Compact like a session row: two dense lines in a 56px band. + dense: true, + minTileHeight: 56, // The band already insets by 8. A Material 3 list tile ends at 24 // (start 16), so 16 here makes the + line up with the session // rows' ⋮. @@ -325,7 +328,7 @@ class _SessionListPaneState extends State { maxLines: 1, overflow: TextOverflow.ellipsis, style: TextStyle( - fontSize: 15, + fontSize: 14.5, fontWeight: FontWeight.w700, color: scheme.onSurface, ), @@ -514,6 +517,9 @@ class _SessionListPaneState extends State { ], ), child: ListTile( + // Compact: both the project band and a session row are 56 high. + dense: true, + minTileHeight: 56, selected: selected, selectedTileColor: scheme.primary.withValues(alpha: 0.10), title: Text( @@ -521,6 +527,7 @@ class _SessionListPaneState extends State { maxLines: 1, overflow: TextOverflow.ellipsis, style: TextStyle( + fontSize: 14, fontWeight: selected ? FontWeight.w600 : FontWeight.w400, ), ), diff --git a/pubspec.yaml b/pubspec.yaml index f637ebd..336d54d 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -2,7 +2,7 @@ name: openchamber description: "A lightweight OpenChamber client for phones." publish_to: 'none' -version: 0.3.20+320 +version: 0.3.21+321 environment: sdk: ^3.14.0 diff --git a/test/sidebar_rows_test.dart b/test/sidebar_rows_test.dart index 0f2a0b0..7beb6ca 100644 --- a/test/sidebar_rows_test.dart +++ b/test/sidebar_rows_test.dart @@ -37,7 +37,10 @@ void main() { of: find.text('标签页拖拽与分屏'), matching: find.byType(ListTile), ); - expect(tester.getSize(header).height, tester.getSize(row).height); + final headerHeight = tester.getSize(header).height; + expect(tester.getSize(row).height, headerHeight); + // Compact, close to the old 56px project band. + expect(headerHeight, lessThanOrEqualTo(58)); // The project's + and the session's ⋮ share one vertical line. final add = tester.getCenter(find.byTooltip('在此项目新会话'));