feat: show codex app server summaries on android

This commit is contained in:
AI Bot
2026-06-04 15:08:27 +08:00
parent 3080f57dbc
commit a5d44b0cac
6 changed files with 212 additions and 9 deletions

View File

@@ -97,6 +97,20 @@ public class DeviceDetailActivityTest {
View content = activity.findViewById(R.id.screen_content);
assertTrue(viewTreeContainsText(content, "Codex App Server"));
assertTrue(viewTreeContainsText(content, "已连接"));
assertTrue(viewTreeContainsText(content, "模型"));
assertTrue(viewTreeContainsText(content, "2 个 · 默认 gpt-5.4 · 快速 gpt-5.4-mini · 深度 gpt-5.4"));
assertTrue(viewTreeContainsText(content, "扩展"));
assertTrue(viewTreeContainsText(content, "Skill 1 个 · Plugin 1 个 · App 1 个"));
assertTrue(viewTreeContainsText(content, "治理"));
assertTrue(viewTreeContainsText(content, "实验特性 2 个 · 协作模式 2 个 · MCP 2 个 · 权限 1 个"));
assertTrue(viewTreeContainsText(content, "账号"));
assertTrue(viewTreeContainsText(content, "chatgpt · 套餐 pro · 额度 42%"));
assertTrue(viewTreeContainsText(content, "线程"));
assertTrue(viewTreeContainsText(content, "3 个 · 已加载 2 个 · 活跃 1 个"));
assertTrue(viewTreeContainsText(content, "轮次"));
assertTrue(viewTreeContainsText(content, "3 个 · 运行中 1 个 · 完成 2 个"));
assertTrue(viewTreeContainsText(content, "线程操作"));
assertTrue(viewTreeContainsText(content, "11 项 · 生命周期 5 项 · 活跃干预 2 项 · Shell 可用"));
assertTrue(viewTreeContainsText(content, "线程协作"));
assertTrue(viewTreeContainsText(content, "Boss Broker 可用 · 协作事件可处理 · 2 种模式 · 非原生私聊"));
assertTrue(viewTreeContainsText(content, "协议漂移"));
@@ -372,6 +386,42 @@ public class DeviceDetailActivityTest {
.put("connected", true)
.put("lastSeenAt", "2026-06-04T10:00:00+08:00")
.put("metadata", new JSONObject()
.put("models", new JSONArray()
.put(new JSONObject().put("id", "gpt-5.4"))
.put(new JSONObject().put("id", "gpt-5.4-mini")))
.put("defaultModelId", "gpt-5.4")
.put("fastModelId", "gpt-5.4-mini")
.put("deepModelId", "gpt-5.4")
.put("skills", new JSONArray().put(new JSONObject().put("name", "image2-ui-prototype")))
.put("plugins", new JSONArray().put(new JSONObject().put("id", "github")))
.put("apps", new JSONArray().put(new JSONObject().put("id", "canva")))
.put("experimentalFeatures", new JSONArray()
.put(new JSONObject().put("name", "multi_agent"))
.put(new JSONObject().put("name", "apps")))
.put("collaborationModes", new JSONArray()
.put(new JSONObject().put("id", "solo"))
.put(new JSONObject().put("id", "plan")))
.put("mcpServers", new JSONArray()
.put(new JSONObject().put("name", "github"))
.put(new JSONObject().put("name", "figma")))
.put("permissionProfiles", new JSONArray().put(new JSONObject().put("id", ":workspace")))
.put("accountSummary", new JSONObject()
.put("authMode", "chatgpt")
.put("planType", "pro"))
.put("rateLimitSummary", new JSONObject().put("maxUsedPercent", 42))
.put("threadSummary", new JSONObject()
.put("threadCount", 3)
.put("loadedThreadCount", 2)
.put("activeThreadCount", 1))
.put("threadTurnSummary", new JSONObject()
.put("totalTurnCount", 3)
.put("runningTurnCount", 1)
.put("completedTurnCount", 2))
.put("threadActionSummary", new JSONObject()
.put("actionCount", 11)
.put("lifecycleActionCount", 5)
.put("liveTurnActionCount", 2)
.put("shellActionAvailable", true))
.put("threadCollaborationSummary", new JSONObject()
.put("bossBrokerAvailable", true)
.put("collabToolCallHandlerAvailable", true)