create-pmos 0.367.0 → 0.368.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +13 -18
- package/payload/KIT-VERSION +1 -1
- package/payload/planning/evals/eval-calibration.md +1 -1
- package/payload/planning/okrs/health-budgets.md +1 -1
- package/payload/state/discoveries.md +1 -1
- package/workspace/changelog.json +12 -0
- package/workspace/guide/briefing-premium.md +2 -0
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/premium-phone-room-test.js +102 -0
- package/workspace/public/pm/premium-shell.js +22 -3
- package/workspace/public/pm/premium.css +11 -0
- package/workspace/test-lists/premium-phone-room.json +9 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-pmos",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.368.0",
|
|
4
4
|
"description": "Scaffold the PMOS portable kit — run the PMOS product-management workflow (initiative → lane-fit spec → contract → build → three gates, with work-type lanes for features, research, maintenance, incidents, and content) entirely inside your own repo, with all state as git-versioned files. Includes `workflow-sweep`, which audits the state every board derives from and separates real defects from work you simply have not done. `create-pmos workspace` also installs + launches the local Terminal Workspace GUI. No database, no network, no telemetry.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"bin": {
|
|
@@ -32,6 +32,18 @@
|
|
|
32
32
|
"audit"
|
|
33
33
|
],
|
|
34
34
|
"pmosChanges": [
|
|
35
|
+
{
|
|
36
|
+
"v": "0.368.0",
|
|
37
|
+
"at": "2026-10-21T02:13:10.598Z",
|
|
38
|
+
"f": 2,
|
|
39
|
+
"prs": [
|
|
40
|
+
{
|
|
41
|
+
"n": 976,
|
|
42
|
+
"t": "The phone conversation gets the screen when it scrolls",
|
|
43
|
+
"s": "The phone conversation gets the screen when it scrolls"
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
},
|
|
35
47
|
{
|
|
36
48
|
"v": "0.367.0",
|
|
37
49
|
"at": "2026-10-21T02:01:19.184Z",
|
|
@@ -304,23 +316,6 @@
|
|
|
304
316
|
"s": "It follows the approved simple-UI mockup (#3)."
|
|
305
317
|
}
|
|
306
318
|
]
|
|
307
|
-
},
|
|
308
|
-
{
|
|
309
|
-
"v": "0.348.0",
|
|
310
|
-
"at": "2026-10-20T06:24:40.333Z",
|
|
311
|
-
"f": 2,
|
|
312
|
-
"prs": [
|
|
313
|
-
{
|
|
314
|
-
"n": 948,
|
|
315
|
-
"t": "The Agent proposals dialog shows one card per proposal and one bottom bar",
|
|
316
|
-
"s": "Each proposal is one card with what it is, its target and the draft in two lines, plus Read more for the why and the sources."
|
|
317
|
-
},
|
|
318
|
-
{
|
|
319
|
-
"n": 950,
|
|
320
|
-
"t": "Premium explanations fold behind one info button",
|
|
321
|
-
"s": "Each of those sits behind one ⓘ, with the words unchanged."
|
|
322
|
-
}
|
|
323
|
-
]
|
|
324
319
|
}
|
|
325
320
|
]
|
|
326
321
|
}
|
package/payload/KIT-VERSION
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
type: Reference
|
|
3
3
|
title: "Eval calibration log"
|
|
4
4
|
description: "Append-only record of every PM override of an evaluator verdict."
|
|
5
|
-
generated: {by: process:create-pmos, at: "2026-10-21T02:
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-10-21T02:13:06Z"}
|
|
6
6
|
status: stable
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
type: Reference
|
|
3
3
|
title: "Health budgets"
|
|
4
4
|
description: "Closed registry of health-budget anchors (D59), edited only by the PM."
|
|
5
|
-
generated: {by: process:create-pmos, at: "2026-10-21T02:
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-10-21T02:13:06Z"}
|
|
6
6
|
status: stable
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
type: Reference
|
|
3
3
|
title: "Discoveries and friction log"
|
|
4
4
|
description: "Append-only record of what runs discovered and where the process rubbed."
|
|
5
|
-
generated: {by: process:create-pmos, at: "2026-10-21T02:
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-10-21T02:13:06Z"}
|
|
6
6
|
status: stable
|
|
7
7
|
---
|
|
8
8
|
|
package/workspace/changelog.json
CHANGED
|
@@ -1,4 +1,16 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"v": "0.368.0",
|
|
4
|
+
"at": "2026-10-21T02:13:10.598Z",
|
|
5
|
+
"f": 2,
|
|
6
|
+
"prs": [
|
|
7
|
+
{
|
|
8
|
+
"n": 976,
|
|
9
|
+
"t": "The phone conversation gets the screen when it scrolls",
|
|
10
|
+
"s": "The phone conversation gets the screen when it scrolls"
|
|
11
|
+
}
|
|
12
|
+
]
|
|
13
|
+
},
|
|
2
14
|
{
|
|
3
15
|
"v": "0.367.0",
|
|
4
16
|
"at": "2026-10-21T02:01:19.184Z",
|
|
@@ -380,6 +380,8 @@ The premium Briefing is the default page: `/` and `/index.html` open it. The con
|
|
|
380
380
|
|
|
381
381
|
**The short head.** On a phone or tablet every dialog has a short head: no category line, a title of two lines at most and a sub line of one line. The **Sessions** chip shows only its dot and count. Press the title to see the whole title, the category line and the whole sub line; press it again to make the head short. When you scroll the detail, the head keeps only the title and the tools, so the detail gets most of the screen. Scroll back to the top to see the sub line and the Detail and Conversation switch again.
|
|
382
382
|
|
|
383
|
+
**More room for the conversation.** On a phone or tablet, when you scroll a long conversation down, the head keeps only the title and the tools. On the Chat page the bar at the bottom also moves away, and the conversation takes its place. Scroll up a little, or press the title, to see them again. While you type on the Chat page the bar stays away, and the page fits the space above the keyboard.
|
|
384
|
+
|
|
383
385
|
On a phone or tablet (under 1000 px) every dialog opens on **Detail**. On a touch screen every text field, the reply box included, uses 16 px type, so typing in one does not zoom the page. A card's label and value rows (for example **Blocked at** and **Initiative** in "The way through") stay as two columns, one row per label. A **Detail / Conversation** switch sits under the title, and **Open it** at the foot of Detail brings the conversation when an action waits there. The header holds only **Close**. A document sheet picks its view (**Read**, **Edit**, **Proposals**, **Edit log**, **Health**, **Relations**) from one button with a menu.
|
|
384
386
|
|
|
385
387
|
**ⓘ explanations.** The text that says what a page or card reads and records sits behind one ⓘ button, with the same words. Each premium page (Briefing, My work, Board, Initiative, Insights) ends with **ⓘ About this page**. The Board's **Metrics** card and the Insights **Board measures** card show only their need-a-look count, for example "2 of 4 need a look.", with an ⓘ next to the heading. If the measures cannot be read, the reason stays in view. On Insights, the Ask line and the chart count have their own ⓘ. Press ⓘ again to fold the text away.
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pmos-workspace",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.368.0",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "pmos-workspace",
|
|
9
|
-
"version": "0.
|
|
9
|
+
"version": "0.368.0",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@xterm/addon-fit": "^0.11.0",
|
package/workspace/package.json
CHANGED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict';
|
|
3
|
+
/* premium-phone-room-test.js — more room for the conversation on a phone (Wawan, 2026-10-21: "the scrollable area is still too small because of
|
|
4
|
+
* the persistent menu on the bottom and top"). A real server on a scratch repository (c3-scan-fixture.js); the conversation is filled in the page.
|
|
5
|
+
* P1 the Chat page at rest · P2 a scroll with no hand changes nothing · P3 scrolling down hides the switch and the rail · P4 scrolling up
|
|
6
|
+
* brings them back · P5 a press on the title brings them back · P6 typing moves the rail away · P7 a chat dialog shrinks its head, the rail
|
|
7
|
+
* class stays off · P8 a desktop is unchanged
|
|
8
|
+
* Set PHONE_ROOM_SHOTS=<dir> to save the Chat page at 390 wide, light and dark, scrolled and typing. */
|
|
9
|
+
const { findBrowser } = require('./lib/find-browser');
|
|
10
|
+
require('./test-run').configure({ name: 'premium-phone-room' });
|
|
11
|
+
const Fx = require('./c3-scan-fixture.js');
|
|
12
|
+
|
|
13
|
+
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
|
|
14
|
+
const until = async (fn, ms = 8000, step = 100) => { const t0 = Date.now(); for (;;) { let v; try { v = await fn(); } catch { v = null; } if (v) return v; if (Date.now() - t0 > ms) return v; await sleep(step); } };
|
|
15
|
+
const results = [];
|
|
16
|
+
const ok = (name, cond, extra = '') => { results.push({ name, cond: !!cond }); console.log(`${cond ? '✓' : '✗'} ${name}${!cond && extra !== '' ? ' — ' + String(extra).slice(0, 600) : ''}`); };
|
|
17
|
+
let F = null, browser = null;
|
|
18
|
+
const finish = async (code) => {
|
|
19
|
+
if (browser) await browser.close().catch(() => {});
|
|
20
|
+
if (F) F.stop();
|
|
21
|
+
const bad = results.filter((x) => !x.cond).length;
|
|
22
|
+
console.log(`\n${results.length - bad}/${results.length} premium-phone-room assertions passed`);
|
|
23
|
+
process.exit(code !== undefined ? code : (bad ? 1 : 0));
|
|
24
|
+
};
|
|
25
|
+
process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
|
|
26
|
+
|
|
27
|
+
/* the page's own state: the head, the rail and how much of the screen the conversation gets */
|
|
28
|
+
const look = () => {
|
|
29
|
+
const g = document.querySelector('#dlg'), rail = document.querySelector('.rail').getBoundingClientRect(), body = document.querySelector('#dBody').getBoundingClientRect(), ask = document.querySelector('#askF').getBoundingClientRect();
|
|
30
|
+
return { shrunk: g.classList.contains('shrunk'), railoff: document.body.classList.contains('railoff'), typing: document.body.classList.contains('typing'), tabs: getComputedStyle(document.querySelector('#dTabs')).display !== 'none', railTop: Math.round(rail.top), dlgH: Math.round(g.getBoundingClientRect().height), room: Math.round(ask.top - body.top), vh: innerHeight };
|
|
31
|
+
};
|
|
32
|
+
const fill = () => { const s = document.querySelector('#dBody .stream'); let h = ''; for (let i = 0; i < 14; i++) h += `<div class="turn"><p>${'A line of the conversation about the sign-up drop reasons and the counts. '.repeat(3)}</p></div>`; s.insertAdjacentHTML('beforeend', h); };
|
|
33
|
+
/* a hand scroll: a wheel, then the move; dy > 0 is down */
|
|
34
|
+
const hand = (dy) => { const b = document.querySelector('#dBody'); b.dispatchEvent(new WheelEvent('wheel', { deltaY: dy })); b.scrollTop += dy; };
|
|
35
|
+
const bare = (y) => { document.querySelector('#dBody').scrollTop = y; };
|
|
36
|
+
|
|
37
|
+
(async () => {
|
|
38
|
+
const exe = findBrowser();
|
|
39
|
+
if (!exe) { console.log('✗ no Chrome/Chromium on this machine — the suite cannot run'); return finish(1); }
|
|
40
|
+
let chromium;
|
|
41
|
+
try { ({ chromium } = require('playwright-core')); } catch { console.log('✗ playwright-core is not installed'); return finish(1); }
|
|
42
|
+
F = await Fx.start({ name: 'premium-phone-room' });
|
|
43
|
+
browser = await chromium.launch({ executablePath: exe, headless: true, args: ['--no-sandbox'] });
|
|
44
|
+
const shots = process.env.PHONE_ROOM_SHOTS;
|
|
45
|
+
const chat = `${F.BASE}/premium-chat.html?ws=${encodeURIComponent(F.ws)}`;
|
|
46
|
+
const open = async (width, scheme = 'light', height = 844) => {
|
|
47
|
+
const ctx = await browser.newContext({ viewport: { width, height }, colorScheme: scheme, hasTouch: true });
|
|
48
|
+
const p = await ctx.newPage(); const errs = []; p.on('pageerror', (e) => errs.push(String(e)));
|
|
49
|
+
await p.goto(chat); await until(() => p.evaluate(() => document.querySelector('#dlg').classList.contains('on') && document.querySelector('#dGrid').dataset.tab === 'chat'));
|
|
50
|
+
await p.evaluate(fill); await sleep(200);
|
|
51
|
+
return { p, ctx, errs };
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
{ const { p, ctx, errs } = await open(390);
|
|
55
|
+
const s0 = await p.evaluate(look);
|
|
56
|
+
ok('P1 the Chat page at rest shows the switch and the rail above the screen foot', s0.tabs && !s0.shrunk && !s0.railoff && s0.railTop < s0.vh, JSON.stringify(s0));
|
|
57
|
+
await p.evaluate(bare, 600); await sleep(600);
|
|
58
|
+
const s1 = await p.evaluate(look);
|
|
59
|
+
ok('P2 a scroll no hand made (a new turn scrolling to the end) hides nothing', s1.tabs && !s1.shrunk && !s1.railoff, JSON.stringify(s1));
|
|
60
|
+
await sleep(900); await p.evaluate(hand, 200);
|
|
61
|
+
const s2 = await until(async () => { const v = await p.evaluate(look); return v.shrunk && v.railoff && v.railTop >= v.vh && v.dlgH >= v.vh - 2 ? v : null; }) || await p.evaluate(look);
|
|
62
|
+
ok('P3 scrolling the conversation down hides the switch, moves the rail off the screen and gives the page its place', s2.shrunk && !s2.tabs && s2.railoff && s2.railTop >= s2.vh && s2.dlgH >= s2.vh - 2, JSON.stringify(s2));
|
|
63
|
+
ok('P3b the conversation gets at least 680 px of the 844 px screen (516 px before)', s2.room >= 680, JSON.stringify(s2));
|
|
64
|
+
if (shots) await p.screenshot({ path: `${shots}/chat-scrolled-390-light.png` });
|
|
65
|
+
await sleep(600); await p.evaluate(hand, -80);
|
|
66
|
+
const s3 = await until(async () => { const v = await p.evaluate(look); return !v.shrunk && !v.railoff && v.tabs && v.railTop < v.vh ? v : null; }) || await p.evaluate(look);
|
|
67
|
+
ok('P4 scrolling up a little brings the switch and the rail back', !s3.shrunk && !s3.railoff && s3.tabs && s3.railTop < s3.vh, JSON.stringify(s3));
|
|
68
|
+
await sleep(600); await p.evaluate(hand, 200); await until(() => p.evaluate(() => document.body.classList.contains('railoff')));
|
|
69
|
+
await sleep(500); await p.click('#dTitle');
|
|
70
|
+
const s4 = await until(async () => { const v = await p.evaluate(look); return !v.shrunk && !v.railoff ? v : null; }) || await p.evaluate(look);
|
|
71
|
+
ok('P5 a press on the title brings them back', !s4.shrunk && !s4.railoff && s4.tabs, JSON.stringify(s4));
|
|
72
|
+
await p.focus('#askIn');
|
|
73
|
+
const s5 = await until(async () => { const v = await p.evaluate(look); return v.typing && v.railTop >= v.vh ? v : null; }) || await p.evaluate(look);
|
|
74
|
+
ok('P6 typing in the message box moves the rail away', s5.typing && s5.railTop >= s5.vh, JSON.stringify(s5));
|
|
75
|
+
await p.evaluate(() => document.querySelector('#askIn').blur());
|
|
76
|
+
const s6 = await until(async () => { const v = await p.evaluate(look); return !v.typing && v.railTop < v.vh ? v : null; }) || await p.evaluate(look);
|
|
77
|
+
ok('P6b leaving the box brings the rail back', !s6.typing && s6.railTop < s6.vh, JSON.stringify(s6));
|
|
78
|
+
ok('P6c no page error', errs.length === 0, errs.join(' | '));
|
|
79
|
+
await ctx.close(); }
|
|
80
|
+
|
|
81
|
+
if (shots) for (const scheme of ['light', 'dark']) {
|
|
82
|
+
const { p, ctx } = await open(390, scheme, 844 - 336);
|
|
83
|
+
await p.focus('#askIn'); await sleep(700); await p.screenshot({ path: `${shots}/chat-typing-390-${scheme}.png` });
|
|
84
|
+
await ctx.close();
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
{ const ctx = await browser.newContext({ viewport: { width: 390, height: 844 }, hasTouch: true }); const p = await ctx.newPage();
|
|
88
|
+
await p.goto(`${F.BASE}/premium.html?ws=${encodeURIComponent(F.ws)}`); await until(() => p.evaluate(() => !!document.querySelector('.rail')));
|
|
89
|
+
await p.evaluate(async () => { const m = await import('/pm/premium-shell.js'); m.openDlg({ eye: 'Goal', title: 'Check the sign-up funnel', sub: 'Working · round 1 of 12', html: '<p>detail</p>', say: 'Hello', noteKey: 'work:x' }); m.setTab('chat'); });
|
|
90
|
+
await p.evaluate(fill); await sleep(700); await p.evaluate(hand, 200);
|
|
91
|
+
const d = await until(async () => { const v = await p.evaluate(look); return v.shrunk ? v : null; }) || await p.evaluate(look);
|
|
92
|
+
ok('P7 a chat dialog on another page shrinks its head when the conversation scrolls down, and leaves the page\'s rail alone', d.shrunk && !d.tabs && !d.railoff, JSON.stringify(d));
|
|
93
|
+
await ctx.close(); }
|
|
94
|
+
|
|
95
|
+
{ const { p, ctx } = await open(1280);
|
|
96
|
+
await sleep(700); await p.evaluate(hand, 200); await sleep(600);
|
|
97
|
+
const w = await p.evaluate(look);
|
|
98
|
+
ok('P8 on a desktop scrolling the conversation hides nothing', !w.shrunk && !w.railoff, JSON.stringify(w));
|
|
99
|
+
await ctx.close(); }
|
|
100
|
+
|
|
101
|
+
return finish();
|
|
102
|
+
})();
|
|
@@ -245,7 +245,7 @@ export function openDlg(o) {
|
|
|
245
245
|
$('#oMain').innerHTML = o.pane || `<article class="paper doc">${o.html}</article>`; $('#oLab').textContent = o.label || 'Detail'; vwReset(); // extra viewer tabs belong to the dialog that opened them
|
|
246
246
|
$('#dBody').innerHTML = `<div class="stream" role="log">${o.stream || turnA(ptx(o.say))}</div><form class="askbar" id="askF"><div class="slashm" id="slashM" role="listbox" aria-label="Commands" hidden></div>${padMarkup()}<textarea id="askIn" rows="1" placeholder="Message Claude, or type /" maxlength="8000" autocomplete="off" enterkeyhint="send" aria-label="A message for Claude" aria-controls="slashM"></textarea><button type="submit" data-act="ask" id="askGo" aria-label="Send to Claude" title="Send to Claude"><svg class="i" viewBox="0 0 24 24"><path d="M5 12h14M13 6l6 6-6 6"/></svg></button></form><div class="askfoot"><p class="fine2" id="askNote">${CHAT_NOTE}</p>${padChipMarkup()}</div>`;
|
|
247
247
|
mountPad({ key: S.key, ws: new URLSearchParams(location.search).get('ws'), input: $('#askIn') });
|
|
248
|
-
$('#dlg').classList.toggle('cmp', o.compact !== false); $('#dlg').classList.remove('shrunk', 'tfull'); // compact (every dialog unless it says compact: false): a short head on a phone that shrinks as the detail scrolls
|
|
248
|
+
$('#dlg').classList.toggle('cmp', o.compact !== false); $('#dlg').classList.remove('shrunk', 'tfull'); document.body.classList.remove('railoff'); // compact (every dialog unless it says compact: false): a short head on a phone that shrinks as the detail scrolls
|
|
249
249
|
$('#dlg').classList.remove('full'); setMode('split'); setTab('out'); // on a phone the dialog opens on the Detail tab and the Detail / Conversation switch brings the conversation, as the mockup draws it
|
|
250
250
|
$('#veil').classList.add('on'); $('#dlg').classList.add('on');
|
|
251
251
|
$$('#dGrid .pane').forEach((p) => { p.scrollTop = 0; });
|
|
@@ -253,7 +253,7 @@ export function openDlg(o) {
|
|
|
253
253
|
setTimeout(() => $('#dlg').focus(), 60);
|
|
254
254
|
}
|
|
255
255
|
/* The compact head clamps a long title; a press on it shows the whole title and sub line, a second press clamps them again. */
|
|
256
|
-
$('#dTitle').addEventListener('click', () => { const g = $('#dlg'); if (g.classList.contains('cmp')
|
|
256
|
+
$('#dTitle').addEventListener('click', () => { const g = $('#dlg'); if (!g.classList.contains('cmp') || innerWidth >= 1000) return; if (g.classList.contains('shrunk')) { roomOff(); return; } g.classList.toggle('tfull'); });
|
|
257
257
|
/* A compact dialog on a phone: once the detail scrolls, the head keeps only the title and the tools, so the detail gets the screen.
|
|
258
258
|
* It shrinks only when the detail is much taller than its pane, so the smaller head cannot end the scroll and grow back. */
|
|
259
259
|
$('#dOut').addEventListener('scroll', () => {
|
|
@@ -261,6 +261,25 @@ $('#dOut').addEventListener('scroll', () => {
|
|
|
261
261
|
if (p.scrollTop > 48 && p.scrollHeight - p.clientHeight > 200) g.classList.add('shrunk');
|
|
262
262
|
else if (p.scrollTop < 8) g.classList.remove('shrunk');
|
|
263
263
|
}, { passive: true });
|
|
264
|
+
/* More room on a phone (premium-phone-room): while the PM reads a long conversation, scrolling it down hides the head's sub line and the
|
|
265
|
+
* Detail / Conversation switch, and on the Chat page the rail too. Scrolling it up a little, or a press on the title, brings them back.
|
|
266
|
+
* Only a finger or a wheel counts, so a new turn that scrolls the conversation to its end does not hide them. Nothing is removed. */
|
|
267
|
+
const ROOM = { y: 0, until: 0, hand: 0 };
|
|
268
|
+
function roomOn() { const g = $('#dlg'); g.classList.add('shrunk'); if (chatPage()) document.body.classList.add('railoff'); ROOM.until = Date.now() + 450; }
|
|
269
|
+
function roomOff() { $('#dlg').classList.remove('shrunk'); document.body.classList.remove('railoff'); ROOM.until = Date.now() + 450; }
|
|
270
|
+
['touchmove', 'wheel'].forEach((t) => $('#dBody').addEventListener(t, () => { ROOM.hand = Date.now(); }, { passive: true }));
|
|
271
|
+
$('#dBody').addEventListener('scroll', () => {
|
|
272
|
+
const g = $('#dlg'), b = $('#dBody'), y = b.scrollTop, dy = y - ROOM.y;
|
|
273
|
+
if (!g.classList.contains('cmp') || innerWidth >= 1000 || $('#dGrid').dataset.tab !== 'chat') { ROOM.y = y; return; }
|
|
274
|
+
if (Date.now() < ROOM.until || Date.now() - ROOM.hand > 800) { ROOM.y = y; return; } // the head just changed size, or no hand moved it
|
|
275
|
+
if (dy > 24 && b.scrollHeight - b.clientHeight > 200) { roomOn(); ROOM.y = y; }
|
|
276
|
+
else if (dy < -24 || y < 8) { roomOff(); ROOM.y = y; }
|
|
277
|
+
}, { passive: true });
|
|
278
|
+
/* Typing on the Chat page on a phone: the rail steps aside so the keyboard, the message box and the conversation share the screen. */
|
|
279
|
+
$('#dBody').addEventListener('focusin', (e) => { if (chatPage() && innerWidth < 1000 && e.target.id === 'askIn') document.body.classList.add('typing'); });
|
|
280
|
+
$('#dBody').addEventListener('focusout', (e) => { if (e.target.id === 'askIn') document.body.classList.remove('typing'); });
|
|
281
|
+
/* The on-screen keyboard: the Chat page is as tall as what is left of the screen above it (visualViewport), not the whole screen. */
|
|
282
|
+
if (window.visualViewport) { const vv = window.visualViewport, fit = () => { if (chatPage()) document.documentElement.style.setProperty('--vvh', Math.round(vv.height) + 'px'); }; vv.addEventListener('resize', fit); fit(); }
|
|
264
283
|
export function closeDlg() {
|
|
265
284
|
if (chatPage()) return;
|
|
266
285
|
clearTimeout(threadTimer); S.key = null; flushPad(); railOnClose();
|
|
@@ -271,7 +290,7 @@ export function closeDlg() {
|
|
|
271
290
|
if (lastFocus) { try { lastFocus.focus(); } catch { /* gone */ } }
|
|
272
291
|
}
|
|
273
292
|
export function pillOf(s) { const o = $('button[aria-pressed="true"]', s), p = $('.pill', s); requestAnimationFrame(() => { if (!o || !p) return; p.style.left = o.offsetLeft + 'px'; p.style.width = o.offsetWidth + 'px'; }); }
|
|
274
|
-
export function setTab(t) { $('#dGrid').dataset.tab = t; $$('#dTabs button').forEach((b) => b.setAttribute('aria-pressed', b.dataset.t === t)); pillOf($('#dTabs .seg')); }
|
|
293
|
+
export function setTab(t) { if ($('#dGrid').dataset.tab !== t) roomOff(); $('#dGrid').dataset.tab = t; $$('#dTabs button').forEach((b) => b.setAttribute('aria-pressed', b.dataset.t === t)); pillOf($('#dTabs .seg')); }
|
|
275
294
|
export function setMode(m) {
|
|
276
295
|
$('#dlg').dataset.mode = m;
|
|
277
296
|
const b = $('#dPane'), on = m === 'split';
|
|
@@ -2574,3 +2574,14 @@ button.wl-row[aria-pressed="true"] .wl-tog{background:var(--solid);color:var(--o
|
|
|
2574
2574
|
.chatpg #dClose,.chatpg #dExpand,.chatpg .dlg .grab{display:none}
|
|
2575
2575
|
@media (min-width:1000px){.chatpg .dlg.on{left:128px;top:16px;transform:none;width:calc(100% - 144px);height:calc(100% - 32px);max-height:none!important;border-radius:28px;padding:26px 34px 18px}}
|
|
2576
2576
|
@media (max-width:999px){.chatpg .dlg.on{left:0;top:0;transform:none;width:100%;height:calc(100% - 118px - env(safe-area-inset-bottom,0px));max-height:none!important;border-radius:0 0 28px 28px;padding:16px 18px 14px}}
|
|
2577
|
+
|
|
2578
|
+
/* ── premium-phone-room: on a phone the Chat page gives the conversation the screen. Scrolling the conversation down, or typing, moves the rail
|
|
2579
|
+
off the bottom and the page grows into its place; scrolling up brings the rail back. The page is as tall as what the keyboard leaves (--vvh). ── */
|
|
2580
|
+
@media (max-width:999px){
|
|
2581
|
+
.chatpg .rail{transition:transform .45s var(--spring),opacity .3s}
|
|
2582
|
+
.chatpg.railoff .rail,.chatpg.typing .rail{transform:translate(-50%,calc(100% + 40px));opacity:0;pointer-events:none}
|
|
2583
|
+
.chatpg .dlg.on{height:calc(var(--vvh,100%) - 118px - env(safe-area-inset-bottom,0px))}
|
|
2584
|
+
.chatpg.railoff .dlg.on{height:var(--vvh,100%);padding-bottom:calc(14px + env(safe-area-inset-bottom,0px))}
|
|
2585
|
+
.chatpg.typing .dlg.on{height:var(--vvh,100%)}
|
|
2586
|
+
}
|
|
2587
|
+
@media (max-width:999px) and (prefers-reduced-motion:reduce){.chatpg .rail{transition:none}}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_comment": "More room for the conversation on a phone: on the Chat page scrolling down hides the head's switch and the rail, scrolling up or the title brings them back, typing moves the rail away. Real server, 390 and 1280 wide.",
|
|
3
|
+
"seconds": {
|
|
4
|
+
"premium-phone-room-test.js": 40
|
|
5
|
+
},
|
|
6
|
+
"panels": [
|
|
7
|
+
"premium-phone-room-test.js"
|
|
8
|
+
]
|
|
9
|
+
}
|