feat: refine mobile-native discovery and sheets

This commit is contained in:
kris
2026-03-30 01:52:01 +08:00
parent 566e412a3a
commit 31ebe0431e
2 changed files with 31 additions and 3 deletions

View File

@@ -5486,6 +5486,26 @@ function renderDiscoveryScreen() {
</div>
</div>
</div>
<div class="mobile-only mobile-discovery-priority">
<div class="mobile-flow-focus-card">
<div class="mobile-flow-focus-head">
<strong>下一步先做</strong>
<span class="tag blue">${escapeHtml(getAccountName(selected) || "未选中")}</span>
</div>
<p>${escapeHtml(selected ? `先围绕 ${getAccountName(selected)} 做导入、分析和相似扩展。` : "先从账号池里选一个对象,再继续导入和分析。")}</p>
<div class="task-meta">
${actionTag("导入当前对标", "open-import-selected-account")}
${actionTag("账号分析", "analyze-selected-account")}
${actionTag("查相似", "open-similar-search")}
</div>
</div>
<div class="compact-summary-row mobile-discovery-selected-summary" style="margin-bottom:14px;">
<span class="tag blue">当前对标 ${escapeHtml(getAccountName(selected) || "未选中")}</span>
<span class="tag">${escapeHtml(importedSources.length ? `已接入 ${importedSources.length}` : "未接入项目")}</span>
<span class="tag ${tracked ? "green" : "blue"}">${escapeHtml(tracked ? "已加入跟踪" : "未加入跟踪")}</span>
<span class="tag ${reports.length ? "green" : "blue"}">${escapeHtml(reports.length ? `报告 ${reports.length}` : "暂无报告")}</span>
</div>
</div>
<div class="mobile-only mobile-account-list">
${accounts.map((account) => {
const active = account.id === appState.selectedAccountId;
@@ -5553,7 +5573,7 @@ function renderDiscoveryScreen() {
</div>
<span class="tag blue">${escapeHtml(getAccountName(selected) || "未选中")}</span>
</div>
<div class="mobile-only mobile-flow-focus-card">
<div class="mobile-only mobile-flow-focus-card mobile-secondary-card">
<div class="mobile-flow-focus-head">
<strong>下一步先做</strong>
<span class="tag blue">${escapeHtml(detailTabs.find((tab) => tab.value === activeTab)?.label || "账号概览")}</span>
@@ -5565,7 +5585,7 @@ function renderDiscoveryScreen() {
${actionTag("查相似", "open-similar-search")}
</div>
</div>
<div class="mobile-only compact-summary-row" style="margin-bottom:14px;">
<div class="mobile-only compact-summary-row mobile-secondary-card" style="margin-bottom:14px;">
<span class="tag blue">当前对标 ${escapeHtml(getAccountName(selected) || "未选中")}</span>
<span class="tag">${escapeHtml(importedSources.length ? `已接入 ${importedSources.length}` : "未接入项目")}</span>
<span class="tag ${tracked ? "green" : "blue"}">${escapeHtml(tracked ? "已加入跟踪" : "未加入跟踪")}</span>

View File

@@ -224,6 +224,14 @@ test("discovery and production screens expose mobile focus cards with next-step
assert.match(cssMobile, /\.production-mobile-task-deck/);
});
test("mobile discovery prioritizes the selected-account task flow before the scrollable account list", () => {
const discovery = extractBetween(APP, "function renderDiscoveryScreen()", "function renderTrackingScreen()");
assert.match(discovery, /mobile-discovery-priority/);
assert.match(discovery, /mobile-discovery-selected-summary/);
assert.match(discovery, /mobile-account-list/);
assert.match(discovery, /mobile-discovery-priority[\s\S]*mobile-account-list/);
});
test("mobile heavy screens mark redundant desktop metric blocks for compact hiding", () => {
const discovery = extractBetween(APP, "function renderDiscoveryScreen()", "function renderTrackingScreen()");
const tracking = extractBetween(APP, "function renderTrackingScreen()", "function renderAutomationScreen()");