Skip to content

Commit 514f46a

Browse files
author
code4bones
committed
Compact PWA diagnostic control rows
1 parent 96c44c1 commit 514f46a

5 files changed

Lines changed: 22 additions & 18 deletions

File tree

‎pwa/package-lock.json‎

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎pwa/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@code4bones/branch-pwa",
3-
"version": "0.1.0-beta.145",
3+
"version": "0.1.0-beta.146",
44
"private": true,
55
"type": "module",
66
"scripts": {

‎pwa/public/pwa.css‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1176,8 +1176,8 @@ button.pwa-chat-reply-preview { cursor: pointer; }
11761176

11771177
.pwa-poc-debug-status div {
11781178
display: grid;
1179-
grid-template-columns: minmax(0, 1fr);
1180-
gap: 1px;
1179+
grid-template-columns: 48px minmax(0, 1fr);
1180+
gap: 5px;
11811181
}
11821182

11831183
.pwa-poc-debug-status dt,
@@ -1187,20 +1187,20 @@ button.pwa-chat-reply-preview { cursor: pointer; }
11871187

11881188
.pwa-poc-debug-actions {
11891189
display: flex;
1190-
flex-direction: column;
1191-
align-items: stretch;
1190+
align-items: center;
11921191
gap: 5px;
11931192
margin-top: 6px;
11941193
}
11951194

1196-
.pwa-poc-debug-actions .ant-select,
1197-
.pwa-poc-debug-actions .ant-btn { width: 100%; }
1198-
.pwa-poc-debug-progress { color: var(--pwa-muted); text-align: center; }
1195+
.pwa-poc-debug-actions .ant-select { flex: 0 1 100px; min-width: 0; }
1196+
.pwa-poc-debug-actions .ant-btn { flex: 1 1 0; min-width: 0; }
1197+
.pwa-poc-debug-actions [aria-label="Stop PoC burst"] { flex: 0 0 32px; }
1198+
.pwa-poc-debug-progress { flex: 1 1 0; min-width: 0; color: var(--pwa-muted); text-align: center; }
11991199
.pwa-poc-debug-note { margin: 9px 0; color: var(--pwa-muted); font-size: 0.7rem; line-height: 1.35; }
12001200

12011201
.pwa-poc-debug .ant-checkbox-group {
1202-
display: grid;
1203-
grid-template-columns: minmax(0, 1fr);
1202+
display: flex;
1203+
flex-wrap: wrap;
12041204
gap: 4px;
12051205
}
12061206

‎pwa/src/app/PocDebugPanel.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ export function PocDebugPanel({ contactId, contactName, enabled, attachedRelayEn
8686
<div><dt>Chat</dt><dd>{contactName}</dd></div>
8787
<div><dt>Relay</dt><dd><Tag color={attachStatus === "attached" ? "cyan" : "default"}>{attachStatus}</Tag></dd></div>
8888
<div><dt>Attached</dt><dd title={attachedRelayEndpoint ?? undefined}>{attachedRelayEndpoint ?? "none"}</dd></div>
89-
<div><dt>Outbox</dt><dd>{String(queuedCount)} total · {String(awaitingDeliveryCount)} await delivery · {String(deliveredAwaitingReadCount)} await read</dd></div>
89+
<div><dt>Outbox</dt><dd>{String(queuedCount)} total · {String(awaitingDeliveryCount)} deliv · {String(deliveredAwaitingReadCount)} read</dd></div>
9090
</dl>
9191
<div className="pwa-poc-debug-actions">
9292
<Select

‎pwa/tests/app-shell.test.ts‎

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -874,13 +874,17 @@ void test("desktop PoC diagnostics extend their scrollable trace to the composer
874874
assert.match(styles, /@media \(max-width: 767px\) \{\s*\.pwa-poc-debug \{ display: none; \}/);
875875
});
876876

877-
void test("desktop PoC controls stack without constraining the flexible trace", async () => {
877+
void test("desktop PoC controls keep compact rows without constraining the flexible trace", async () => {
878878
const styles = await readFile(resolve(process.cwd(), "public/pwa.css"), "utf8");
879+
const panel = await readFile(resolve(process.cwd(), "src/app/PocDebugPanel.tsx"), "utf8");
879880

880-
assert.match(styles, /\.pwa-poc-debug-status div\s*\{[\s\S]*grid-template-columns: minmax\(0, 1fr\);/);
881-
assert.match(styles, /\.pwa-poc-debug-actions\s*\{[\s\S]*flex-direction: column;[\s\S]*align-items: stretch;/);
882-
assert.match(styles, /\.pwa-poc-debug-actions \.ant-select,[\s\S]*\.pwa-poc-debug-actions \.ant-btn \{ width: 100%; \}/);
883-
assert.match(styles, /\.pwa-poc-debug \.ant-checkbox-group\s*\{[\s\S]*grid-template-columns: minmax\(0, 1fr\);/);
881+
assert.match(panel, /Outbox<\/dt><dd>\{String\(queuedCount\)\} total · \{String\(awaitingDeliveryCount\)\} deliv · \{String\(deliveredAwaitingReadCount\)\} read/);
882+
assert.doesNotMatch(panel, /await delivery|await read/);
883+
assert.match(styles, /\.pwa-poc-debug-status div\s*\{[\s\S]*grid-template-columns: 48px minmax\(0, 1fr\);/);
884+
assert.match(styles, /\.pwa-poc-debug-actions\s*\{[\s\S]*align-items: center;/);
885+
assert.match(styles, /\.pwa-poc-debug-actions \.ant-select \{ flex: 0 1 100px; min-width: 0; \}/);
886+
assert.match(styles, /\[aria-label="Stop PoC burst"\] \{ flex: 0 0 32px; \}/);
887+
assert.match(styles, /\.pwa-poc-debug \.ant-checkbox-group\s*\{[\s\S]*display: flex;[\s\S]*flex-wrap: wrap;/);
884888
assert.match(styles, /\.pwa-poc-debug-trace\s*\{[\s\S]*flex: 1 1 auto;[\s\S]*overflow-y: auto;/);
885889
});
886890

0 commit comments

Comments
 (0)