create-pmos 0.334.0 → 0.335.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 -13
- 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/briefing-premium-insights-test.js +2 -1
- package/workspace/briefing-premium-test.js +15 -0
- package/workspace/changelog.json +12 -0
- package/workspace/guide/briefing-premium.md +4 -4
- package/workspace/lib/board-premium.js +1 -1
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/premium-report-read-test.js +15 -1
- package/workspace/public/pm/premium-board.js +11 -2
- package/workspace/public/pm/premium-brief.js +4 -2
- package/workspace/public/pm/premium-insights.js +1 -2
- package/workspace/public/pm/premium-report-read.js +38 -4
- package/workspace/public/pm/premium.js +31 -2
- package/workspace/public/premium-insights.html +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-pmos",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.335.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.335.0",
|
|
37
|
+
"at": "2026-10-20T01:35:14.740Z",
|
|
38
|
+
"f": 2,
|
|
39
|
+
"prs": [
|
|
40
|
+
{
|
|
41
|
+
"n": 932,
|
|
42
|
+
"t": "Portfolio drafts, report Issue and board document Open stay in premium",
|
|
43
|
+
"s": "A portfolio drafts row opens the draft in the same document sheet the Board page uses, on the Briefing, with Issue it and Draft it again."
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
},
|
|
35
47
|
{
|
|
36
48
|
"v": "0.334.0",
|
|
37
49
|
"at": "2026-10-20T01:24:31.835Z",
|
|
@@ -299,18 +311,6 @@
|
|
|
299
311
|
"s": "Every premium page reads with the console's type: Space Grotesk and IBM Plex Mono, the console's six sizes (11, 12, 14, 16, 20, 28 px), its three weights (400, 500, 600) and a 14 px / 1.5 body."
|
|
300
312
|
}
|
|
301
313
|
]
|
|
302
|
-
},
|
|
303
|
-
{
|
|
304
|
-
"v": "0.315.0",
|
|
305
|
-
"at": "2026-10-19T13:55:49.728Z",
|
|
306
|
-
"f": 2,
|
|
307
|
-
"prs": [
|
|
308
|
-
{
|
|
309
|
-
"n": 884,
|
|
310
|
-
"t": "One Work queue card replaces On your plate, With agents and the tray",
|
|
311
|
-
"s": "One full-width Work queue card under the add line, styled like the mockup's tray: one pill row of tabs (Today, Inbox, Agents, Upcoming, Someday, Kept, Done) with counts, rows in two columns, and arrow keys between tabs."
|
|
312
|
-
}
|
|
313
|
-
]
|
|
314
314
|
}
|
|
315
315
|
]
|
|
316
316
|
}
|
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-20T01:
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-10-20T01:35:12Z"}
|
|
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-20T01:
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-10-20T01:35:12Z"}
|
|
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-20T01:
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-10-20T01:35:12Z"}
|
|
6
6
|
status: stable
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -133,7 +133,8 @@ const MOCKUP = path.join(__dirname, '..', 'prototype', 'premium-ux-concept', 'br
|
|
|
133
133
|
ok('I8 the Reports filter lists the set-up reports, then the report files: cadence, slot, draft or issued', rp.rows.join() === 'biweekly · 14 Oct / Draft,monthly · 30 Sep / Issued 1 Oct' && rp.setups === 1 && rp.dash === 0 && /Nothing is sent from here/.test(rp.note) && rp.cap === '7', JSON.stringify(rp));
|
|
134
134
|
await p.click('#listSeg [data-f="all"]');
|
|
135
135
|
{ const R = await open(); await R.page.click('#listSeg [data-f="rep"]'); await R.page.locator('#listRows [data-rep]').first().click(); ok('I8 a report opens in the page\'s reader, not the console (premium-report-read R1)', await until(() => R.page.evaluate(() => document.querySelector('#dlg').classList.contains('rdrd') && document.querySelector('#dlg').classList.contains('on')), 5000) && /premium-insights\.html/.test(R.page.url()), R.page.url());
|
|
136
|
-
|
|
136
|
+
ok('I8 a draft report has Issue in the reader, so nothing sends you to the console to issue it', await until(() => R.page.evaluate(() => !!document.querySelector('#oMain [data-rr="issue"]')), 8000) && await R.page.evaluate(() => !document.querySelector('#repOpen') && !document.querySelector('#oMain a[href*="console.html"]')));
|
|
137
|
+
await R.ctx.close(); }
|
|
137
138
|
/* I9 labels */
|
|
138
139
|
ok('I9 no demo label, and the foot says what is left out', !(await p.evaluate(() => /demo/i.test(document.querySelector('main.stage').textContent))) && /Left out: any measure no record holds/.test(await txt('#foot')) && /Board measures card/.test(await txt('#foot')) && /Real data/.test(await txt('#snap')));
|
|
139
140
|
ok('I9 the page makes no write request on its own', A.posts.length === 0, A.posts.join());
|
|
@@ -526,6 +526,21 @@ const MOCKUP = path.join(__dirname, '..', 'prototype', 'premium-ux-concept', 'br
|
|
|
526
526
|
await cp.keyboard.press('Escape');
|
|
527
527
|
ok('C7 no page error on the console path', C.errors.length === 0, C.errors.join(' | '));
|
|
528
528
|
await C.ctx.close();
|
|
529
|
+
/* a portfolio documents drafts row opens the draft in the document sheet, on the Briefing (premium-rows-stay-premium) */
|
|
530
|
+
const PF = await open({ console: { briefing: { cards: [], needs: [] }, page: { ok: true, today: [], mentions: null, needs: [] },
|
|
531
|
+
agent: [{ run_id: 'core-docs-needs:portfolio', kind: 'core-doc-drafts', question: '1 portfolio draft to review', initiative_id: null, board: null, scope: 'portfolio', ws: 'w0', doc: 'pmos/core-docs/portfolio/strategy.draft.md' }] } });
|
|
532
|
+
await PF.page.route('**/api/core-docs?*', (r) => r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, level: 'portfolio', scope: 'portfolio', docs: [
|
|
533
|
+
{ key: 'okrs', title: 'OKRs', for: 'What the quarter commits to', st: 'ok', open: { path: 'planning/okrs/q3.md' } },
|
|
534
|
+
{ key: 'strategy', title: 'Product strategy', for: 'Where the portfolio is going', st: 'draft', open: { path: 'pmos/core-docs/portfolio/strategy.draft.md' }, draft: { slot: 's1', path: 'pmos/core-docs/portfolio/strategy.draft.md' } }] }) }));
|
|
535
|
+
await PF.page.route('**/api/doc-sheet/log?*', (r) => r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, revisions: [{ rev: 1, at: '2026-10-19T09:00:00Z', by: 'agent' }] }) }));
|
|
536
|
+
await PF.page.route('**/api/doc-sheet/at?*', (r) => r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, text: '# Product strategy\n\nWhere the portfolio is going.\n' }) }));
|
|
537
|
+
const pp = PF.page;
|
|
538
|
+
await until(() => pp.evaluate(() => [...document.querySelectorAll('#rank .rr')].some((r) => /portfolio draft/.test(r.textContent))));
|
|
539
|
+
await pp.locator('#rank .rr .rhd').first().click();
|
|
540
|
+
await until(() => pp.evaluate(() => document.querySelector('#dlg').classList.contains('on') && !!document.querySelector('[data-issue-bar="draft"]')));
|
|
541
|
+
const pf = await pp.evaluate(() => ({ path: location.pathname, title: document.querySelector('#dTitle').textContent, issue: !!document.querySelector('[data-issue-bar="draft"] [data-ds="issue"]') }));
|
|
542
|
+
ok('C10 a portfolio documents row opens its draft in the document sheet with Issue it, on the Briefing', pf.path === '/premium.html' && pf.title === 'Product strategy' && pf.issue, JSON.stringify(pf));
|
|
543
|
+
await PF.ctx.close();
|
|
529
544
|
}
|
|
530
545
|
|
|
531
546
|
/* R8, R11 the dock folds in on scroll, and is not reachable before it shows */
|
package/workspace/changelog.json
CHANGED
|
@@ -1,4 +1,16 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"v": "0.335.0",
|
|
4
|
+
"at": "2026-10-20T01:35:14.740Z",
|
|
5
|
+
"f": 2,
|
|
6
|
+
"prs": [
|
|
7
|
+
{
|
|
8
|
+
"n": 932,
|
|
9
|
+
"t": "Portfolio drafts, report Issue and board document Open stay in premium",
|
|
10
|
+
"s": "A portfolio drafts row opens the draft in the same document sheet the Board page uses, on the Briefing, with Issue it and Draft it again."
|
|
11
|
+
}
|
|
12
|
+
]
|
|
13
|
+
},
|
|
2
14
|
{
|
|
3
15
|
"v": "0.334.0",
|
|
4
16
|
"at": "2026-10-20T01:24:31.835Z",
|
|
@@ -63,7 +63,7 @@ The list also shows what the Initiative Driver is waiting on you for, the same t
|
|
|
63
63
|
- **The hero** says how many agent drafts wait on you, counting every one, shown or not. The dock counts them too.
|
|
64
64
|
- **The dialog** shows only what the Driver's row holds: the cause, the draft count, the age, and the confidence, recommendation, reversibility and effort the agent stated when it filed. A fact nobody stated is left out. **Review the drafts** opens Around you's Agent proposals, where Keep, Send back and Drop are.
|
|
65
65
|
- **Pressing a row** opens Around you's Agent proposals on the Briefing, with only that initiative's or Work item's drafts. **Show all proposals** lists every one. A row never opens the console.
|
|
66
|
-
- **Core-document drafts** open the initiative page or the Board page that holds the documents. Portfolio
|
|
66
|
+
- **Core-document drafts** open the initiative page or the Board page that holds the documents. Portfolio drafts open in the document sheet on the Briefing, with **Issue it** and **Draft it again**, the same sheet the Board page uses.
|
|
67
67
|
|
|
68
68
|
## How long it takes to load
|
|
69
69
|
|
|
@@ -97,7 +97,7 @@ A part with no record is left out. With nothing to say, the hero says so.
|
|
|
97
97
|
|
|
98
98
|
## What you need to do
|
|
99
99
|
|
|
100
|
-
The list is the console's **Needs you**: the same rows, in the same order, from the same reads. A decision opens here, with what its record says and a link to its source. Choose its option on the console Briefing. Your own item opens on My work, on that item. An agent row opens
|
|
100
|
+
The list is the console's **Needs you**: the same rows, in the same order, from the same reads. A decision opens here, with what its record says and a link to its source. Choose its option on the console Briefing. Your own item opens on My work, on that item. An agent row opens Agent proposals, with that initiative's or Work item's drafts. These rows have no "If you skip" line and no link to a meeting, because no record holds them. The header, the dock and the bell count the same rows. If the console reads fail, the page shows the records-only rows below instead.
|
|
101
101
|
|
|
102
102
|
Each row is a thing that waits for you. The order is fixed: blocked work first, then decisions only you can make, then what has waited longest. The first row is tagged "Do this first".
|
|
103
103
|
|
|
@@ -282,7 +282,7 @@ Board is the third place on the rail, at `/premium-board.html`. It reads what th
|
|
|
282
282
|
- **Open the backlog** is in the Sprint dialog and on its sprint tab. It opens the board's Jira backlog in a tab beside the dialog: the open sprints (active, then next) and then **Backlog**, the tickets in no sprint and not done. A row shows the key, title, status, points and initiative, and why a blocked ticket is blocked. **All**, **Blocked** and **Bugs** filter it (Bugs appears only when the Jira read holds the issue type). A row opens its ticket. The list holds only the tickets the board's initiatives pushed to Jira or hold under their epics, in key order: the Jira read has no rank, assignee or capacity. You move and rank tickets in Jira. With no Jira read, the tab says so.
|
|
283
283
|
- **Metrics** appears above the Initiatives card on the board of any workspace except the home one (PMOS itself), and counts from that workspace's own repository. It has four tiles. **Corrections per 100 runs** is the corrections logged on the week's runs in `planning/runs/agent-runs.jsonl`; a week with fewer than 10 runs is left blank. **Merged a week** counts the commits on the first-parent line of the trunk. **Blocked** and **Idle for a month** come from the workflow engine, which keeps no history. From the first day the card is read, PMOS keeps their counts once a day in the workspace's state folder (`board-metric-history.jsonl`), so their charts start on that day and their caption says **history starts today** (later, the date). Earlier weeks read **Not kept yet**. Move over a chart, or use the arrow keys, to read a week. A tile that cannot be counted says **Not read** and why; a repository with no run log says **No runs yet**. The line above the tiles starts with how many tiles need a look, and those tiles have a **Needs a look** chip and an orange outline. The line ends with **open Insights**, which opens the same board's Insights page. Press a tile for its definition and values, with the read-only agent beside it. A target is set on Insights, not here. A measure with a target shows it under the value, draws it as a dashed line, and carries **On target** or its gap (for example **2 short**); off target, it also has the orange outline. A measure without a target draws no line. Day and Month are off. It was tested only on made-up repositories, not on a real IDPF or microsite repository.
|
|
284
284
|
- **The top bar** names the page and the board. With more than one board a menu switches between them, and **Chat** opens the board in the dialog with the read-only agent.
|
|
285
|
-
- **Core documents** lists the board's documents with their state, cadence and writer, a summary (drafts to review, not started, up to date), a progress bar, a filter and a search. A document with a file opens in the dialog, read only, with its path and state; a draft there has **Issue it**, which marks it issued through the console's own route and sends nothing, and **Draft it again**, which starts a new draft that replaces this one (a board draft has no Edit tab). **Draft it** starts the existing read-only run that writes a draft and sends nothing; **Draft the N not started** does that for each document that can be drafted. **Set it up**
|
|
285
|
+
- **Core documents** lists the board's documents with their state, cadence and writer, a summary (drafts to review, not started, up to date), a progress bar, a filter and a search. A document with a file opens in the dialog, read only, with its path and state; a draft there has **Issue it**, which marks it issued through the console's own route and sends nothing, and **Draft it again**, which starts a new draft that replaces this one (a board draft has no Edit tab). **Draft it** starts the existing read-only run that writes a draft and sends nothing; **Draft the N not started** does that for each document that can be drafted. **Open** stays on premium pages: the backlog goes to this page's initiatives, new asks to its New asks card, releases to the release dialog, a Horizon scan to the Briefing's Horizon scan, and **Set it up** for a report to Insights. **Add a document** opens a form (title, who writes it, where it lives) and saves a document the core set does not cover on the board's record, in `custom-docs.jsonl`. A document with no link reads "Not started". A document with a link to Confluence or Google Docs reads "Linked" and shows its address. PMOS does not read or sync the linked page, so a linked document is never counted as up to date. Issue and Drop are not on this page.
|
|
286
286
|
- **Opening an initiative.** A click on an initiative opens its page (see "Initiative page"). **Open initiatives** (Page or Popup) in the ⋯ menu changes that: Popup opens the initiative's dialog instead, which shows its record as a grid and the path of its file, with the read-only agent beside it. The choice is kept in this browser. The dialog holds no press.
|
|
287
287
|
- **New asks** sits at the top of the right column on a team board. Each ask shows where it came from and the drafted title, lane and anchor. **Accept** makes it an initiative in the first stage, through the console's accept route; **Decline** asks for a reason first. The card says when nothing is left to triage.
|
|
288
288
|
- **New initiative** (beside the Initiatives heading, team boards only) asks for a title, a lane and an anchor (a KR or a health budget). It writes an ask and accepts it, as the console does. An unanchored initiative is refused on the page.
|
|
@@ -329,7 +329,7 @@ Insights is the fourth place on the rail, at `/premium-insights.html`. It reads
|
|
|
329
329
|
- **Ask PMOS to set up a report.** Type what the report is for and press **Ask**. A background run proposes a report and does nothing else. The request is listed as Working, then Ready to review. A ready request opens with its proposal: **Set it up**, **Change it** (say what to change; the run revises it), or **Cancel**.
|
|
330
330
|
- **Found in your work.** Up to three reports PMOS found in your calendar, mail or documents, each with why and what it saw. **Set it up** records the report and drafts its first cycle as a file. **Not a report** hides it and records it after 5 seconds, unless you press **Undo**. If the finding changed while the window was open, the window says what happened. It was already set up, it was marked not a report, or a new scan replaced it. The list is read again. Close the window and open the report from the list. If PMOS does not hear back, the window says nothing was recorded. Press the button to try again.
|
|
331
331
|
- **Set up.** Your recurring reports, with their schedule and next draft. A report opens with **Draft it now** (for a report drawn from your work) and **Pause** or **Resume**.
|
|
332
|
-
- **Report files.** The report files of the workspace, in the list, with cadence, slot and whether each is a draft or issued. Pressing one opens it on the page at the normal dialog size, with a status line (Draft or Issued, the saved design version, the file). The **slide deck / Document** menu picks the view: a deck is a title slide, then one slide for each section, with the arrow keys and a strip of slides; a document is a page. The **Read** menu holds **Present**, which shows the slide on the whole screen (the arrow keys move and Escape stops), and **Print or save as PDF**, which prints one slide to a page. **Download** gives PowerPoint, Word, Excel, CSV or the Markdown file; the files carry the words, not the look. **
|
|
332
|
+
- **Report files.** The report files of the workspace, in the list, with cadence, slot and whether each is a draft or issued. Pressing one opens it on the page at the normal dialog size, with a status line (Draft or Issued, the saved design version, the file). The **slide deck / Document** menu picks the view: a deck is a title slide, then one slide for each section, with the arrow keys and a strip of slides; a document is a page. The **Read** menu holds **Present**, which shows the slide on the whole screen (the arrow keys move and Escape stops), and **Print or save as PDF**, which prints one slide to a page. **Download** gives PowerPoint, Word, Excel, CSV or the Markdown file; the files carry the words, not the look. **Edit** opens the words as a page. On a draft, **Issue** first says what it does, then **Issue it** freezes the cycle as you read it, through the console's own route; if the file changed since you opened it, nothing is issued and the reader shows the new words. Copies in Confluence or other tools are made in the console. Nothing is sent from this page.
|
|
333
333
|
- **Edit the slides.** In the **Read** menu of a draft, **Edit the slides** opens the same file as a **Slides** tab beside the report. The rail on the left lists the slides. Drag a slide to move it, or use the up and down buttons on it; the buttons also duplicate and delete a slide, and **+ Slide** adds one from a layout. On the slide, click an item to select it, drag it to move it (a line shows when it is centred), and drag a corner to resize it. Double-click text to type. The toolbar adds text, an image, a chart, a table or a shape, and changes the layout of the slide or the theme of the deck. The bar under it changes the selected item: text style, alignment and colour; bars or a line and **Edit data** for a chart; rows and columns for a table. An image is a file that is already in the workspace: type its path, such as `planning/design/screen.png`. Speaker notes go in the box under the slide. **Undo** and **Redo** cover every change. **Present** opens the presenter view: the slide, the next slide, your speaker notes (you can type in them) and a timer. The arrow keys move, and Escape stops. **Slides only** hides the notes. **Audience window** opens a second window with the slide alone, for the screen you share; it follows your slide and closes when you stop. **Save** asks why the slides change, then writes the file; the reason goes in the Edit log. The file stays markdown: each slide is a heading with its text under it, and a hidden comment keeps the layout and the notes. If someone changed the text of a slide in the file, the editor shows the file's text and says so. If the file changed while the slides were open, Save stops and tells you to open the slides again. An issued report opens its slides read-only, with **Open the slides**.
|
|
334
334
|
- **Shape a report's look.** On a draft, **Add a sample** takes a PDF, PowerPoint, Word, PNG or JPG file to follow. Say how it should look in the conversation; PMOS draws the next design version (D1, D2, …) and says what it changed. Press a version to go back to it. **This is it** saves the version shown as the report's design, and PMOS draws the cycle to match. An issued cycle is frozen with its look.
|
|
335
335
|
|
|
@@ -32,7 +32,7 @@ const MAX_LIST = 100, STAGE_ROWS = 5;
|
|
|
32
32
|
const STATUS_LABEL = { 'at risk': 'At risk', late: 'Late', 'on hold': 'On hold', done: 'Done', cancelled: 'Cancelled' };
|
|
33
33
|
const DOC_STATE = { missing: 'Not started', draft: 'Draft', ok: 'Up to date', stale: 'Stale', due: 'Due' };
|
|
34
34
|
const BY = { drafts: 'PMOS drafts it', proposes: 'PMOS proposes', reviews: 'PMOS reviews', you: 'You write it', live: 'Live view' };
|
|
35
|
-
const GO = { reports: 'rep', initiatives: 'init' };
|
|
35
|
+
const GO = { reports: 'rep', initiatives: 'init', triage: 'asks', releases: 'rel', scan: 'scan' }; // where a document's Open goes on the premium pages (premium-board.js GOTAB)
|
|
36
36
|
const LANES = ['feature', 'discovery', 'chore', 'incident', 'content', 'prototype'];
|
|
37
37
|
|
|
38
38
|
let last = null;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pmos-workspace",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.335.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.335.0",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@xterm/addon-fit": "^0.11.0",
|
package/workspace/package.json
CHANGED
|
@@ -205,7 +205,7 @@ fs.writeFileSync(path.join(base, 'q3-deck.png'), PNG);
|
|
|
205
205
|
|
|
206
206
|
/* P: the writes */
|
|
207
207
|
const allowed = new Set(['/api/report-design/describe', '/api/report-design/sample', '/api/report-design/turn', '/api/report-design/accept', '/api/report-design/revert']);
|
|
208
|
-
ok('P1 the only POSTs are the report-design describe, sample, turn, accept and revert routes', posts.length > 0 && posts.every((x) => allowed.has(x)), posts.join());
|
|
208
|
+
ok('P1 before Issue, the only POSTs are the report-design describe, sample, turn, accept and revert routes', posts.length > 0 && posts.every((x) => allowed.has(x)), posts.join());
|
|
209
209
|
ok('P2 the first turn described the look first, and each later press posted once', posts.join() === ['sample', 'describe', 'turn', 'turn', 'revert', 'accept'].map((x) => '/api/report-design/' + x).join(), posts.join());
|
|
210
210
|
ok('P3 the document file is unchanged', fs.readFileSync(path.join(dir, pNew), 'utf8') === DOC);
|
|
211
211
|
|
|
@@ -218,6 +218,20 @@ fs.writeFileSync(path.join(base, 'q3-deck.png'), PNG);
|
|
|
218
218
|
ok('F2 no sideways scroll at 390 px', await p.evaluate(() => document.documentElement.scrollWidth <= innerWidth + 1 && document.querySelector('#oMain').scrollWidth <= document.querySelector('#oMain').clientWidth + 1));
|
|
219
219
|
await shot('reader-deck-390');
|
|
220
220
|
ok('F4 the read-only ask of the dialog is hidden; the reader\'s own form is the one it has', await p.evaluate(() => getComputedStyle(document.querySelector('#askF')).display === 'none' && getComputedStyle(document.querySelector('#rdF')).display !== 'none'));
|
|
221
|
+
/* S: Issue, in the reader (premium-rows-stay-premium): a press says what it does, then issues on the real route; nothing sends you to the console */
|
|
222
|
+
await p.setViewportSize({ width: 1280, height: 900 }); await sleep(300);
|
|
223
|
+
ok('S1 the reader links nowhere in the console', await p.evaluate(() => !document.querySelector('#oMain a[href*="console.html"]')));
|
|
224
|
+
const before = posts.length;
|
|
225
|
+
await p.click('#oMain [data-rr="issue"]');
|
|
226
|
+
ok('S2 Issue first says what it does and posts nothing', await until(() => p.evaluate(() => /Nothing is sent to anyone/.test((document.querySelector('[data-issue-bar="confirm"]') || {}).textContent || ''))) && posts.length === before);
|
|
227
|
+
await shot('reader-issue-confirm-1280');
|
|
228
|
+
const small2 = await p.evaluate(() => [...document.querySelectorAll('[data-issue-bar] button')].filter((b) => b.offsetHeight < 44).length);
|
|
229
|
+
ok('S3 the confirm buttons are at least 44 px tall', small2 === 0);
|
|
230
|
+
await p.click('#oMain [data-rr="issueok"]');
|
|
231
|
+
ok('S4 Issue it issues the cycle on the report route and the reader says it is frozen', await until(() => p.evaluate(() => /issued/.test(document.querySelector('#dEye').textContent) && !document.querySelector('#oMain [data-rr="issue"]') && /Issued/.test(document.querySelector('#oMain .dsm2').textContent)), 15000)
|
|
232
|
+
&& posts.slice(before).join() === '/api/report/issue', posts.slice(before).join());
|
|
233
|
+
await shot('reader-issued-1280');
|
|
234
|
+
ok('S5 the issue is recorded in the issues ledger', issues.isIssued(issues.readIssues(dir), CAD, '2026-10-12'));
|
|
221
235
|
ok('F3 no page error', errs.length === 0, errs.join(' | '));
|
|
222
236
|
return finish();
|
|
223
237
|
})().catch((e) => { console.error(e); finish(1); });
|
|
@@ -155,10 +155,19 @@ $('#docTop').addEventListener('click', async (e) => {
|
|
|
155
155
|
await load();
|
|
156
156
|
});
|
|
157
157
|
$('#docTop').addEventListener('input', (e) => { if (e.target.id === 'dmQ') { docQuery = e.target.value; drawDocList(); } });
|
|
158
|
-
|
|
158
|
+
/* A document's Open stays on the premium pages (premium-rows-stay-premium): the board's own cards, the release dialog, Insights for a report, the Briefing's Horizon scan. */
|
|
159
|
+
const wsQ = (k) => (M.board.ws ? k + 'ws=' + encodeURIComponent(M.board.ws) : '');
|
|
160
|
+
const toCard = (id) => { const c = $(id); if (!c) return false; c.scrollIntoView({ behavior: 'smooth', block: 'start' }); const f = c.querySelector('button, a'); if (f) f.focus({ preventScroll: true }); return true; };
|
|
161
|
+
const GOTAB = {
|
|
162
|
+
rep: () => location.assign('/premium-insights.html' + wsQ('?')),
|
|
163
|
+
init: () => toCard('#cIni'),
|
|
164
|
+
asks: () => toCard('#cAsks') || toCard('#cIni'),
|
|
165
|
+
rel: () => { const r = rowOf('board:release'); if (r) openRow(r); else toCard('#cRel'); },
|
|
166
|
+
scan: () => location.assign('/premium.html?around=scan' + wsQ('&')),
|
|
167
|
+
};
|
|
159
168
|
$('#docBody').addEventListener('click', async (e) => {
|
|
160
169
|
const o = e.target.closest('[data-doc]'); if (o) { docSheet.open(M.docs.rows.find((x) => x.key === o.dataset.doc)); return; }
|
|
161
|
-
const t = e.target.closest('[data-tab]'); if (t) {
|
|
170
|
+
const t = e.target.closest('[data-tab]'); if (t) { (GOTAB[t.dataset.tab] || GOTAB.init)(); return; }
|
|
162
171
|
const b = e.target.closest('[data-draft]'); if (!b || b.disabled) return;
|
|
163
172
|
const key = b.dataset.draft, d = M.docs.rows.find((x) => x.key === key);
|
|
164
173
|
b.disabled = true;
|
|
@@ -51,7 +51,8 @@ const lateWord = (d) => (d === 1 ? '1 day late' : d + ' days late');
|
|
|
51
51
|
const factText = (f) => (f && typeof f === 'object' ? f.text : f);
|
|
52
52
|
/** One row of "What you need to do" from one row of the console's Needs you. A row says only what the console row's own data says:
|
|
53
53
|
* no "If you skip" line (no record holds one). go: where a press goes, the item's own page; null opens the Briefing's dialog.
|
|
54
|
-
* prop: on a driver drafts row, the target whose proposals the Briefing's Agent proposals dialog shows.
|
|
54
|
+
* prop: on a driver drafts row, the target whose proposals the Briefing's Agent proposals dialog shows.
|
|
55
|
+
* docs: on a portfolio documents drafts row, { scope, ws, path }: the Briefing opens that draft in the document sheet. */
|
|
55
56
|
export function needsRowOf(x, ws) {
|
|
56
57
|
const r = x.raw, q = (k, v) => k + '=' + encodeURIComponent(v);
|
|
57
58
|
if (x.src === 'own') {
|
|
@@ -68,7 +69,8 @@ export function needsRowOf(x, ws) {
|
|
|
68
69
|
const wsQ = r.ws || ws;
|
|
69
70
|
row.go = ini ? '/premium-initiative.html?' + [q('id', ini), wsQ ? q('ws', wsQ) : ''].filter(Boolean).join('&')
|
|
70
71
|
: r.board ? '/premium-board.html?' + [wsQ ? q('ws', wsQ) : '', q('board', r.board)].filter(Boolean).join('&')
|
|
71
|
-
:
|
|
72
|
+
: null;
|
|
73
|
+
if (!row.go) row.docs = { scope: r.scope || 'portfolio', ws: wsQ || null, path: r.doc || null }; // portfolio documents: the document sheet, on the Briefing
|
|
72
74
|
return row;
|
|
73
75
|
}
|
|
74
76
|
const v = r.view || null;
|
|
@@ -305,13 +305,12 @@ $('#repBody').addEventListener('click', (e) => {
|
|
|
305
305
|
const d = e.target.closest('[data-d]');
|
|
306
306
|
if (d) { dash = d.dataset.d; drawDash(); drawList(); try { $('#cDash').scrollIntoView({ behavior: 'smooth', block: 'start' }); } catch { /* no scroll */ } return; }
|
|
307
307
|
const rp = e.target.closest('[data-rep]');
|
|
308
|
-
if (rp) { const row = M.reports.rows.find((x) => x.key === rp.dataset.rep), su = row && (M.reports.setups || []).find((x) => x.id === row.cadence); openReport(row, { ws: M.board.ws, name: su ? su.name : null }); return; }
|
|
308
|
+
if (rp) { const row = M.reports.rows.find((x) => x.key === rp.dataset.rep), su = row && (M.reports.setups || []).find((x) => x.id === row.cadence); openReport(row, { ws: M.board.ws, name: su ? su.name : null, onIssue: () => load() }); return; }
|
|
309
309
|
const f = e.target.closest('[data-found]'), a = e.target.closest('[data-ask]'), s = e.target.closest('[data-setup]');
|
|
310
310
|
if (f) openFound((M.reports.found || []).find((x) => x.id === f.dataset.found));
|
|
311
311
|
else if (a) openAsk((M.reports.asks || []).find((x) => x.id === a.dataset.ask));
|
|
312
312
|
else if (s) openSetup((M.reports.setups || []).find((x) => x.id === s.dataset.setup));
|
|
313
313
|
});
|
|
314
|
-
$('#repOpen').addEventListener('click', () => location.assign('/console.html?tab=rep'));
|
|
315
314
|
$('#repAsk').addEventListener('submit', async (e) => {
|
|
316
315
|
e.preventDefault();
|
|
317
316
|
const inp = $('#repAskIn'), text = inp.value.trim(), go = $('#repAskGo');
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* version (the design and its versions), GET /api/report-export (the files). PDF is the browser's print. Every render is HTML the server sanitized,
|
|
11
11
|
* shown in a frame with an empty sandbox: nothing in it runs.
|
|
12
12
|
* WRITES: only the report-design describe, sample, turn, accept and revert routes, each a press on the page (pmPost, behind the launch nonce). An
|
|
13
|
-
* issued cycle is frozen: no design row and no turn.
|
|
13
|
+
* issued cycle is frozen: no design row and no turn. Issue (POST /api/report/issue, after a confirm) freezes a draft cycle; the copies in other tools stay in the console.
|
|
14
14
|
* Edit opens the report's file as a page in the viewer (premium-vw-doc.js, initiative premium-viewer S2): the one document page every markdown file uses,
|
|
15
15
|
* with Present, Print and Download on its bar. Its words are saved there through the /api/doc-sheet routes. */
|
|
16
16
|
import { $, esc, openDlg, toast, turnA, turnU, ptx, setFull } from './premium-shell.js';
|
|
@@ -154,13 +154,44 @@ function barHtml() {
|
|
|
154
154
|
return `<div class="dsvr rdbar">${mnuHtml('rm', 'Read', EYE, item('present', 'Present', PLAY) + item('slides', R.issued ? 'Open the slides' : 'Edit the slides', ICO('<path d="M4 5h16v11H4zM8 20h8M12 16v4"/>')) + item('print', 'Print or save as PDF', PRI))}`
|
|
155
155
|
+ `<span class="rdsp">${mnuHtml('fm', R.view === 'deck' ? 'Slide deck' : 'Document', ICO('<path d="M12 3 3 8l9 5 9-5-9-5zM3 13l9 5 9-5"/>'), item('view|deck', 'Slide deck', '', R.view === 'deck') + item('view|doc', 'Document', '', R.view === 'doc'))}`
|
|
156
156
|
+ `<span class="dsvw"><button type="button" class="dsvb" data-rr="dm" aria-haspopup="menu" aria-expanded="${!!R.dm}">${DLI}Download${CHV}</button>${dm}</span>`
|
|
157
|
-
+ (R.issued ? '' : `<button type="button" class="dsvb" data-rr="page" title="Read and edit the words as a page">${PEN}Edit</button>`) + '</span></div>';
|
|
157
|
+
+ (R.issued ? '' : `<button type="button" class="dsvb" data-rr="page" title="Read and edit the words as a page">${PEN}Edit</button><button type="button" class="dsvb" data-rr="issue" aria-expanded="${!!R.conf}" title="Issue this cycle: it is frozen as it is now">${CHK}Issue</button>`) + '</span></div>';
|
|
158
|
+
}
|
|
159
|
+
/** Issue it (the console's report Issue, POST /api/report/issue): the press says what it does first, then freezes the bytes the PM read. */
|
|
160
|
+
function issueHtml() {
|
|
161
|
+
if (R.issued || !R.conf) return '';
|
|
162
|
+
return `<div class="dsiss" data-issue-bar="confirm" role="group" aria-label="Issue this cycle"><span>Issue freezes this cycle as it is now. The words and the look stop changing. Nothing is sent to anyone; you share it yourself.</span><span class="dsa"><button type="button" class="dmcta dark" data-rr="issueok"${R.busy ? ' disabled' : ''}>${R.busy ? '<span class="spin"></span>' : CHK}Issue it</button><button type="button" class="dmcta alt" data-rr="issueno"${R.busy ? ' disabled' : ''}>Cancel</button></span></div>`
|
|
163
|
+
+ (R.issueErr ? `<p class="nodef err" role="alert">${esc(R.issueErr)}</p>` : '');
|
|
164
|
+
}
|
|
165
|
+
const cycleOf = (row) => {
|
|
166
|
+
const m = /reports\/([a-z][a-z0-9-]{0,39})\/(\d{4}-\d{2}-\d{2})\.md$/.exec(String(row.path || ''));
|
|
167
|
+
return { cadence: row.cadence || (m && m[1]) || '', slot: row.slot || (m && m[2]) || '' };
|
|
168
|
+
};
|
|
169
|
+
async function issueIt() {
|
|
170
|
+
const me = R, c = cycleOf(R.row);
|
|
171
|
+
if (!c.cadence || !c.slot) { R.issueErr = 'This document is not a report cycle, so it cannot be issued.'; draw(); return; }
|
|
172
|
+
R.busy = true; R.issueErr = ''; draw();
|
|
173
|
+
const cur = await Promise.resolve(pmGet('/api/report/draft?' + q({ ws: R.ws, cadence: c.cadence, slot: c.slot }))).catch(() => null);
|
|
174
|
+
if (R !== me) return;
|
|
175
|
+
if (!cur || !cur.ok || !cur.exists || !cur.sha) { R.busy = false; R.issueErr = (cur && cur.error) || 'The report was not issued: the file could not be read.'; draw(); return; }
|
|
176
|
+
if (cur.markdown != null && R.text && cur.markdown !== R.text) {
|
|
177
|
+
R.text = cur.markdown; R.W = wordsOf(R.text, R.name); R.busy = false; R.issueErr = 'The file changed since you opened it. It is shown again now; read it, then press Issue it.'; draw(); return;
|
|
178
|
+
}
|
|
179
|
+
const r = await pmPost('/api/report/issue', { ws: R.ws, cadence: c.cadence, slot: c.slot, sha: cur.sha }).catch(() => null);
|
|
180
|
+
if (R !== me) return;
|
|
181
|
+
R.busy = false;
|
|
182
|
+
if (!r || r.ok !== true) { R.issueErr = (r && r.status === 409) || (r && /changed/i.test(r.error || '')) ? 'The file changed since you opened it. Close and open it again, then issue it.' : (r && r.error) || 'The report was not issued.'; draw(); return; }
|
|
183
|
+
R.issued = true; R.conf = false; R.row = { ...R.row, state: 'issued' };
|
|
184
|
+
const eye = $('#dEye'); if (eye) eye.textContent = 'Report · issued';
|
|
185
|
+
toast('Issued and frozen. Nothing was sent to anyone.');
|
|
186
|
+
sayA('Issued. This cycle is frozen as you read it. PMOS sends nothing; share it yourself.');
|
|
187
|
+
draw();
|
|
188
|
+
if (R.onIssue) R.onIssue(R.row);
|
|
158
189
|
}
|
|
159
190
|
function draw() {
|
|
160
191
|
if (!R) return;
|
|
161
192
|
const m = $('#oMain');
|
|
162
193
|
const keep = document.activeElement && document.activeElement.closest && document.activeElement.closest('#oMain') ? document.activeElement.getAttribute('data-rr') : null;
|
|
163
|
-
m.innerHTML = `<div class="rdr" id="rdR">${statusHtml()}${barHtml()}<p class="note rdsrc" id="rdSrc">${esc(sourceLine())}</p>${designHtml()}${R.view === 'deck' ? deckHtml() : pageHtml()}<p class="note rdcon"
|
|
194
|
+
m.innerHTML = `<div class="rdr" id="rdR">${statusHtml()}${barHtml()}${issueHtml()}<p class="note rdsrc" id="rdSrc">${esc(sourceLine())}</p>${designHtml()}${R.view === 'deck' ? deckHtml() : pageHtml()}<p class="note rdcon">Copies in Confluence or other tools are made in the console. Nothing here sends anything.</p></div>`;
|
|
164
195
|
fit(m);
|
|
165
196
|
if (keep) { const b = m.querySelector(`[data-rr="${keep}"]`); if (b) b.focus(); }
|
|
166
197
|
}
|
|
@@ -237,6 +268,9 @@ async function act(a) {
|
|
|
237
268
|
if (k === 'present') { R.mn = ''; draw(); present(true); return; }
|
|
238
269
|
if (k === 'slides') { R.mn = ''; draw(); openSlidesOf(R); return; }
|
|
239
270
|
if (k === 'page') { openPage(); return; }
|
|
271
|
+
if (k === 'issue') { R.conf = !R.conf; R.issueErr = ''; R.mn = ''; R.dm = false; draw(); return; }
|
|
272
|
+
if (k === 'issueno') { R.conf = false; R.issueErr = ''; draw(); return; }
|
|
273
|
+
if (k === 'issueok') { if (!R.busy) await issueIt(); return; }
|
|
240
274
|
if (k === 'pick') { const f = $('#rdFile'); if (f) f.click(); return; }
|
|
241
275
|
if (k === 'ver') {
|
|
242
276
|
if (v === 'cycle') { R.show = 'cycle'; R.i = 0; draw(); return; }
|
|
@@ -349,7 +383,7 @@ async function readCycle() {
|
|
|
349
383
|
|
|
350
384
|
export async function openReport(row, hand) {
|
|
351
385
|
if (!row || !row.path) return;
|
|
352
|
-
R = { row, ws: hand.ws, id: row.cadence, name: hand.name || row.cadence, issued: row.state === 'issued', text: '', err: '', W: null, view: 'deck', i: 0, cycle: null, cyc: null, show: 'cycle', ver: new Map(), design: null, dErr: '', dm: false, mn: '', busy: false };
|
|
386
|
+
R = { row, ws: hand.ws, id: row.cadence, name: hand.name || row.cadence, issued: row.state === 'issued', text: '', err: '', W: null, view: 'deck', i: 0, cycle: null, cyc: null, show: 'cycle', ver: new Map(), design: null, dErr: '', dm: false, mn: '', busy: false, conf: false, issueErr: '', onIssue: hand.onIssue || null };
|
|
353
387
|
const when = row.date || row.slot;
|
|
354
388
|
const say = R.issued
|
|
355
389
|
? 'This is the ' + when + ' cycle of "' + R.name + '". It is issued, so it is frozen. Read it as a deck or a page, present it, download it or print it. Nothing is sent from here.'
|
|
@@ -10,6 +10,7 @@ import { mountNotes } from './premium-vw-notes.js';
|
|
|
10
10
|
import { mountFirst } from './premium-first.js';
|
|
11
11
|
import { lineItems, behindOf, refreshTargets, whenRead } from './freshness-words.js';
|
|
12
12
|
import { consoleReads, briefOf, needsListOf } from './premium-brief.js';
|
|
13
|
+
import { mountDocSheet } from './premium-doc-sheet.js';
|
|
13
14
|
import { momentOf, inText } from './c3-phone-model.js';
|
|
14
15
|
import { $, $$, esc, store, THEME_KEY, RM, AI, S, theme, toast, kv, H, openDlg, closeDlg, setTab, setMode, CHECK, CHEV, ptx, turnA, turnU, H1, H2, P1, UL, logHtml, loadThread, onScroll, wireRail, pvFeed, setPageGaps, sourcesHook, onPageChat, openPageChat } from './premium-shell.js';
|
|
15
16
|
const ICON = {
|
|
@@ -101,7 +102,8 @@ $('#rank').addEventListener('click', (e) => {
|
|
|
101
102
|
const h = e.target.closest('.rhd');
|
|
102
103
|
if (!h) return;
|
|
103
104
|
const r = LIST().rows.find((x) => x.key === h.closest('.rr').dataset.key);
|
|
104
|
-
if (r && r.prop) { openPropsDlg(r.prop); return; }
|
|
105
|
+
if (r && r.prop) { openPropsDlg(r.prop); return; }
|
|
106
|
+
if (r && r.docs) { openCoreDraft(r.docs); return; } // portfolio documents: the document sheet, with Read and Issue it // the agent's drafts: the Agent proposals dialog, that target's proposals only
|
|
105
107
|
if (r && r.go) { location.assign(r.go); return; } // a console row opens its item on its own page: My work, the initiative or the board
|
|
106
108
|
openRow(r);
|
|
107
109
|
});
|
|
@@ -593,6 +595,26 @@ function propItem(it) {
|
|
|
593
595
|
} else act = bdActs(bdBtn('Keep', 'pkeep', id), bdBtn('Send back', 'pnote', id, true), bdBtn('Drop', 'pdrop', id, true)) + `<p class="bd-why">${esc(pKeep(p))} Drop counts as a correction. None of the three can be undone.</p>` + bdFail(id, PERR);
|
|
594
596
|
return `<div class="bd-it${d ? ' decided' : ''}" data-id="${esc(id)}"><div class="bd-h">${bdChip(pWhat(p))}${it.pname ? bdChip(it.pname, 'mono') : ''}</div><span class="bd-t">${esc(targetOf(it))}</span>${text ? `<p class="bd-q">${esc(text)}</p>` : ''}${p.why ? `<p class="bd-why">Why: ${esc(p.why)}</p>` : ''}${src ? `<p class="bd-why">Sources: ${src}</p>` : ''}${act}</div>`;
|
|
595
597
|
}
|
|
598
|
+
/* ── portfolio documents: the shared document sheet (premium-doc-sheet.js) over GET /api/core-docs?level=portfolio, on the Briefing ── */
|
|
599
|
+
const CDS = { missing: 'Not started', draft: 'Draft', ok: 'Up to date', stale: 'Stale', due: 'Due' };
|
|
600
|
+
const PD = { ws: null, scope: 'portfolio', rows: [] };
|
|
601
|
+
async function readPortfolioDocs() {
|
|
602
|
+
const r = await getj('/api/core-docs?level=portfolio' + (PD.ws ? '&' + wq(PD.ws) : ''));
|
|
603
|
+
if (!r.ok) return r;
|
|
604
|
+
PD.scope = r.scope || 'portfolio';
|
|
605
|
+
PD.rows = (r.docs || []).map((d) => ({ key: d.key, title: d.title, what: d.for || '', state: d.kind === 'live' ? 'Live' : CDS[d.st] || d.st || '', st: d.st, path: d.open && d.open.path ? d.open.path : null, slot: d.st === 'draft' && d.draft && d.draft.slot ? d.draft.slot : '' }));
|
|
606
|
+
return r;
|
|
607
|
+
}
|
|
608
|
+
const pdSheet = mountDocSheet({ ws: () => PD.ws, scope: () => PD.scope, rows: () => PD.rows, reload: async () => { await readPortfolioDocs(); drawConsoleBrief(); }, noteKey: (d) => 'doc:portfolio:' + d.key, sub: () => 'Portfolio documents', again: true });
|
|
609
|
+
async function openCoreDraft(t) {
|
|
610
|
+
PD.ws = t.ws || wsParam() || null;
|
|
611
|
+
const r = await readPortfolioDocs();
|
|
612
|
+
if (!r.ok) { toast('The portfolio documents ' + said(r) + '.'); return; }
|
|
613
|
+
const d = PD.rows.find((x) => t.path && x.path === t.path) || PD.rows.find((x) => x.st === 'draft' && x.path);
|
|
614
|
+
if (!d) { toast('No portfolio draft waits now. It may have been issued since the list was read.'); drawConsoleBrief(); return; }
|
|
615
|
+
pdSheet.open(d);
|
|
616
|
+
}
|
|
617
|
+
|
|
596
618
|
/* PFOCUS: the one target a "What you need to do" row opened the dialog on ({ kind, ws, id }), or null for every proposal. Show all clears it. */
|
|
597
619
|
let PFOCUS = null;
|
|
598
620
|
const inFocus = (it) => !PFOCUS || (it.kind === PFOCUS.kind && it.tid === PFOCUS.id && (!PFOCUS.ws || it.ws === PFOCUS.ws));
|
|
@@ -622,6 +644,13 @@ async function propPress(e, redraw) {
|
|
|
622
644
|
toast(act === 'pkeep' ? 'Kept.' : act === 'pback' ? 'Sent back with your note.' : 'Dropped. It counts as a correction.');
|
|
623
645
|
await readAll(['prop']); redraw(`.bd-it[data-id="${CSS.escape(id)}"] .bd-done`);
|
|
624
646
|
}
|
|
647
|
+
/** ?around=<prop|scan|rep|src|men|pulse> opens that Around you dialog once its read is in: another premium page links here (a board document's Run a scan). */
|
|
648
|
+
function openAroundParam() {
|
|
649
|
+
const k = new URLSearchParams(location.search).get('around'), fn = { prop: openPropsDlg, men: openMen, pulse: openPulse, scan: openScan, rep: openReport, src: openSrc }[k];
|
|
650
|
+
if (!fn) return;
|
|
651
|
+
try { const u = new URL(location.href); u.searchParams.delete('around'); history.replaceState(history.state, '', u); } catch { /* no history */ }
|
|
652
|
+
fn();
|
|
653
|
+
}
|
|
625
654
|
const openPropsDlg = async (focus) => {
|
|
626
655
|
PFOCUS = focus && focus.kind && focus.id ? focus : null;
|
|
627
656
|
if (PFOCUS && !A.prop) await readAll(['prop']); // pressed before Around you has read: read the proposals first
|
|
@@ -953,7 +982,7 @@ async function load() {
|
|
|
953
982
|
return;
|
|
954
983
|
}
|
|
955
984
|
M = r.model; drawHero(); drawRows(); drawChips(); drawTl(); readPrep(); drawDock(); drawPick(); onScroll();
|
|
956
|
-
if (!AROUND) { AROUND = true; readAll(); setInterval(() => { if (!document.hidden && !$('#dlg').classList.contains('on')) readAll(); }, 300000); }
|
|
985
|
+
if (!AROUND) { AROUND = true; readAll().then(openAroundParam); setInterval(() => { if (!document.hidden && !$('#dlg').classList.contains('on')) readAll(); }, 300000); }
|
|
957
986
|
const age = Date.now() - r.as_of;
|
|
958
987
|
if (age > 5 * 60000) $('#snap').textContent += ' · read ' + ago(age) + (r.refreshing ? ', refreshing' : '');
|
|
959
988
|
if (r.error) $('#snap').textContent += ' · the latest read failed: ' + r.error.slice(0, 120);
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
<p class="mhint">A report is a file in the repository. PMOS drafts it, you read it. <b>Nothing is sent from here.</b> The pin puts one dashboard at the top of this page. It shows nowhere else.</p>
|
|
62
62
|
<div id="repBody"></div>
|
|
63
63
|
<div class="lpager" id="listPager"></div>
|
|
64
|
-
<p class="nsch"
|
|
64
|
+
<p class="nsch">Open a report to read it, edit its words or issue a draft.</p>
|
|
65
65
|
</section>
|
|
66
66
|
<section class="card rise" style="--d:7" id="cBm" aria-labelledby="hBm" hidden>
|
|
67
67
|
<div class="ch"><span class="ic"><svg class="i" viewBox="0 0 24 24"><path d="M4 20V10M10 20V4M16 20v-8M22 20H2"/></svg></span><h2 id="hBm">Board measures</h2><small id="bmCap"></small><div class="seg mper" id="bmRange" role="group" aria-label="Range"><i class="pill"></i><button data-w="8" aria-pressed="true">8 weeks</button><button data-w="26" aria-pressed="false">26 weeks</button><button data-w="52" aria-pressed="false">52 weeks</button></div></div>
|