Skip to content

Commit dfe73f4

Browse files
authored
Beginner UX: lead resilience page with plain-language reassurance (#11215)
Validated on the combined batch board (resilience-connections static test green) + this branch: i18n suites 16/16 with Vietnamese translations of the reassurance/legend strings added here. Plain-language reassurance + three-state legend lead the page; the technical table stays as advanced detail. Thank you @ignamiranda!
1 parent 7e57354 commit dfe73f4

4 files changed

Lines changed: 67 additions & 1 deletion

File tree

src/app/(dashboard)/dashboard/resilience/connections/page.tsx

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,39 @@ export default async function ResilienceConnectionsPage() {
77
const t = await getTranslations("resilienceConnections");
88
return (
99
<div style={{ display: "flex", flexDirection: "column", gap: "24px" }}>
10-
<h1>{t("title")}</h1>
10+
<div>
11+
<h1>{t("title")}</h1>
12+
<p
13+
style={{
14+
margin: "8px 0 0",
15+
maxWidth: "640px",
16+
color: "var(--color-text-muted)",
17+
}}
18+
>
19+
<strong>{t("reassuranceTitle")}</strong> {t("reassuranceDetail")}
20+
</p>
21+
<ul
22+
style={{
23+
display: "flex",
24+
flexWrap: "wrap",
25+
gap: "16px",
26+
listStyle: "none",
27+
margin: "12px 0 0",
28+
padding: 0,
29+
fontSize: "13px",
30+
}}
31+
>
32+
<li>
33+
<strong>{t("table.healthy")}</strong>{t("plainStates.healthy")}
34+
</li>
35+
<li>
36+
<strong>{t("table.coolingDown")}</strong>{t("plainStates.coolingDown")}
37+
</li>
38+
<li>
39+
<strong>{t("table.circuitOpen")}</strong>{t("plainStates.lockedOut")}
40+
</li>
41+
</ul>
42+
</div>
1143
<ResilienceConnectionsClient />
1244
</div>
1345
);

src/i18n/messages/en.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13342,6 +13342,13 @@
1334213342
},
1334313343
"resilienceConnections": {
1334413344
"title": "Connection Resilience",
13345+
"reassuranceTitle": "Your connections recover automatically",
13346+
"reassuranceDetail": "Usually no action is needed. OmniRoute temporarily rests a connection after failures, then safely tries it again.",
13347+
"plainStates": {
13348+
"healthy": "Requests can be sent",
13349+
"coolingDown": "Trying again soon",
13350+
"lockedOut": "Needs your attention"
13351+
},
1334513352
"table": {
1334613353
"status": "Status",
1334713354
"provider": "Provider",

src/i18n/messages/vi.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13436,6 +13436,13 @@
1343613436
"modelLockouts": "Khóa Mô Hình",
1343713437
"count": "Số Lượng Kết Nối"
1343813438
}
13439+
},
13440+
"reassuranceTitle": "Kết nối của bạn tự khôi phục",
13441+
"reassuranceDetail": "Thường không cần hành động. OmniRoute tạm cho kết nối nghỉ sau lỗi, rồi thử lại an toàn.",
13442+
"plainStates": {
13443+
"healthy": "Có thể gửi yêu cầu",
13444+
"coolingDown": "Sắp thử lại",
13445+
"lockedOut": "Cần bạn xử lý"
1343913446
}
1344013447
},
1344113448
"featureFlagCapabilityFilterEnabledDescription": "Từ chối yêu cầu trước khi gửi đi khi mô hình đích thiếu các khả năng bắt buộc (thị giác, công cụ, đầu ra có cấu trúc, cửa sổ ngữ cảnh). Bảo vệ các yêu cầu trực tiếp đến một nhà cung cấp khi chúng bỏ qua bộ lọc tương thích của combo.",

tests/unit/resilience-connections-page-static.test.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,3 +139,23 @@ test("no hardcoded English labels in component files (all via t(...))", () => {
139139
assert.doesNotMatch(src, />\s*No connections\s*</, `${f}: hardcoded empty title`);
140140
}
141141
});
142+
143+
test("page leads with plain-language reassurance before mechanics", () => {
144+
const src = read(componentFiles[0]);
145+
assert.match(src, /reassuranceTitle/, "reassurance heading missing from page.tsx");
146+
assert.match(src, /reassuranceDetail/, "reassurance detail missing from page.tsx");
147+
// Plain-language state legend renders before the client component
148+
const legendPos = src.indexOf("plainStates");
149+
const clientPos = src.indexOf("<ResilienceConnectionsClient");
150+
assert.ok(legendPos > -1 && legendPos < clientPos, "state legend must render before the table");
151+
});
152+
153+
test("en.json carries plain-language state copy", () => {
154+
const messages = JSON.parse(read("src/i18n/messages/en.json"));
155+
const block = messages.resilienceConnections;
156+
assert.equal(block.reassuranceTitle, "Your connections recover automatically");
157+
assert.match(block.reassuranceDetail, /no action is needed/i);
158+
assert.equal(block.plainStates.healthy, "Requests can be sent");
159+
assert.equal(block.plainStates.coolingDown, "Trying again soon");
160+
assert.equal(block.plainStates.lockedOut, "Needs your attention");
161+
});

0 commit comments

Comments
 (0)