From b372bce63fc2b79fa28a5c63b9250c6e3dbb3223 Mon Sep 17 00:00:00 2001 From: Wang Zichong Date: Fri, 4 Dec 2026 13:43:42 +0800 Subject: [PATCH] fix: list every discovered dev server on the phone, like the web The web client's "running dev servers" list is machine-wide. The phone filtered it to the current project's directory, which hid servers from other checkouts (for example the telegram-antispam-bot server on 8080). The empty state now shows the same set of ports that answered with a web page, regardless of their project, and still hides the non-web ports the web client puts behind "show hidden ports". Version 0.7.2+702. --- PLAN.md | 9 +++++++++ README.md | 2 +- lib/screens/browser_panel.dart | 13 +++++-------- pubspec.yaml | 2 +- 4 files changed, 16 insertions(+), 10 deletions(-) diff --git a/PLAN.md b/PLAN.md index 772f940..6dc979f 100644 --- a/PLAN.md +++ b/PLAN.md @@ -5,6 +5,15 @@ --- +## 0.7.2 开发服务器列表改为全机器范围(分支 `flutter`) + +| 项 | 结果 | +| --- | --- | +| 列表 | 网页端的「正在运行的开发服务器」是整台宿主机的列表,不按当前项目过滤;手机端之前多了一层「当前项目目录」过滤,导致 `telegram-antispam-bot` 的 8080 在手机上不显示。现在同样列出服务端发现的所有「返回了网页」的端口(无页面的 adb/模拟器端口仍隐藏),与网页端一致 | +| 版本 | **0.7.2(code 702)** | + +--- + ## 0.7.1 浏览器通过服务端 dev tunnel 预览(分支 `flutter`) | 项 | 结果 | diff --git a/README.md b/README.md index c55d75c..d58c9dd 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,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.7.1 — servers (passwordless / password login, HTTP/HTTPS and +Status: 0.7.2 — servers (passwordless / password login, HTTP/HTTPS and SOCKS5/socks5h proxy, self-signed certificates and pinning, or a pairing link over the OpenChamber private relay with end-to-end encryption; the pairing link is pasted or scanned with the camera), session list with search and live diff --git a/lib/screens/browser_panel.dart b/lib/screens/browser_panel.dart index 087a8df..348978e 100644 --- a/lib/screens/browser_panel.dart +++ b/lib/screens/browser_panel.dart @@ -181,16 +181,13 @@ class _BrowserPanelState extends State { try { final list = await cl.devServers(directory: widget.directory); if (!mounted) return; - final dir = slashPath(widget.directory); + // The web client's "running dev servers" list is machine-wide, not + // scoped to the open project, so show the same set here. Only ports + // that answered with a page (the web client hides the rest behind + // "show hidden ports") are listed. final filtered = [ for (final server in list) - // A discovered port that answered with a page is a web dev server; - // adb/emulator/native ports with no page would only be noise. - if (server.title.isNotEmpty && - (server.directory.isEmpty || - slashPath(server.directory) == dir || - isUnderDirectory(server.directory, dir))) - server, + if (server.title.isNotEmpty) server, ]..sort((a, b) => a.port.compareTo(b.port)); setState(() { _servers = filtered; diff --git a/pubspec.yaml b/pubspec.yaml index a952213..f4d08b3 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.7.1+701 +version: 0.7.2+702 environment: sdk: ^3.14.0