@bigmistqke/workpad 0.19.0 → 0.20.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/README.md +18 -9
- package/bin/workpad.ts +187 -37
- package/dist/bin/workpad.js +156 -32
- package/dist/client/runtime.js +141 -18
- package/dist/plugins/chat/README.md +7 -3
- package/dist/plugins/chat/index.js +1 -0
- package/dist/plugins/chat/public/client.js +2 -2
- package/dist/plugins/chat/public/style.css +10 -0
- package/dist/plugins/claude/channel.js +22 -4
- package/dist/plugins/comments/README.md +2 -1
- package/dist/plugins/comments/index.js +2 -0
- package/dist/plugins/comments/public/client.js +6 -5
- package/dist/plugins/comments/public/style.css +9 -0
- package/dist/plugins/form/README.md +1 -1
- package/dist/plugins/index.js +3 -1
- package/dist/plugins/opencode/channel.js +1 -0
- package/dist/plugins/progress/README.md +41 -0
- package/dist/plugins/progress/index.js +117 -0
- package/dist/plugins/progress/public/client.js +1 -0
- package/dist/plugins/progress/public/style.css +85 -0
- package/dist/plugins/progress/state.js +210 -0
- package/dist/solid/index.js +3 -1
- package/dist/src/agents.js +7 -3
- package/dist/src/anchors.js +25 -1
- package/dist/src/build.js +1 -1
- package/dist/src/client/page/base.css +48 -2
- package/dist/src/client/page/main.js +58 -30
- package/dist/src/document.js +6 -4
- package/dist/src/events.js +19 -9
- package/dist/src/help.js +43 -8
- package/dist/src/hub.js +14 -1
- package/dist/src/loader.js +7 -2
- package/dist/src/migrate.js +1 -1
- package/dist/src/pages/board.js +1 -1
- package/dist/src/pages/markdown.js +3 -3
- package/dist/src/pages/render.js +16 -0
- package/dist/src/server.js +25 -12
- package/dist/src/set.js +99 -0
- package/dist/src/status.js +47 -8
- package/package.json +6 -1
- package/plugins/README.md +3 -1
- package/plugins/chat/README.md +7 -3
- package/plugins/chat/client.tsx +20 -3
- package/plugins/chat/index.ts +1 -0
- package/plugins/chat/public/style.css +10 -0
- package/plugins/claude/channel.ts +19 -5
- package/plugins/comments/README.md +2 -1
- package/plugins/comments/client.ts +19 -0
- package/plugins/comments/index.ts +7 -1
- package/plugins/comments/public/style.css +9 -0
- package/plugins/form/README.md +1 -1
- package/plugins/index.ts +2 -0
- package/plugins/opencode/channel.ts +2 -1
- package/plugins/progress/README.md +41 -0
- package/plugins/progress/client.ts +172 -0
- package/plugins/progress/index.ts +166 -0
- package/plugins/progress/public/style.css +85 -0
- package/plugins/progress/state.ts +278 -0
- package/skills/workpad/SKILL.md +126 -15
- package/solid/index.tsx +6 -2
- package/src/agents.ts +17 -2
- package/src/anchors.ts +32 -0
- package/src/build.ts +1 -1
- package/src/client/delivery.ts +49 -0
- package/src/client/forms.ts +18 -11
- package/src/client/page/base.css +48 -2
- package/src/client/page/waiting.ts +45 -25
- package/src/client/read.ts +9 -5
- package/src/client/runtime.ts +7 -3
- package/src/client/toast.ts +27 -3
- package/src/define.ts +92 -8
- package/src/document.ts +19 -5
- package/src/events.ts +26 -6
- package/src/help.ts +42 -7
- package/src/hub.ts +9 -0
- package/src/loader.ts +14 -4
- package/src/migrate.ts +1 -1
- package/src/pages/board.ts +3 -1
- package/src/pages/markdown.ts +4 -4
- package/src/pages/render.ts +19 -1
- package/src/server.ts +43 -13
- package/src/set.ts +118 -0
- package/src/status.ts +100 -13
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { builtinPublic } from "../../src/package.js";
|
|
2
|
+
import { NUDGER, STALE, UPDATE, isProgressId, keyOf, line, nudgesDue, openNudges, parseArgs, progressOf } from "./state.js";
|
|
3
|
+
import fs from "node:fs";
|
|
4
|
+
import path from "node:path";
|
|
5
|
+
import { anchorTaken, definePlugin, html } from "@bigmistqke/workpad";
|
|
6
|
+
import { appendEvent, handle, handledIds, read } from "@bigmistqke/workpad/log";
|
|
7
|
+
// plugins/progress/index.ts
|
|
8
|
+
/** `:progress{id=probe}`: the marker, drawn by the page's client from the log; "waiting to start" until then. */
|
|
9
|
+
function render(ctx) {
|
|
10
|
+
const id = ctx.attrs.id ?? "";
|
|
11
|
+
if (!id) {
|
|
12
|
+
ctx.problem("`:progress` needs an id, which `workpad progress` moves it by: `:progress{id=probe}`");
|
|
13
|
+
return html``;
|
|
14
|
+
}
|
|
15
|
+
if (!isProgressId(id)) ctx.problem(`\`:progress{id=${id}}\`: an id is letters, digits, - and _`);
|
|
16
|
+
const anchor = ctx.anchor("progress", id);
|
|
17
|
+
return html`<span class="wp-progress" data-progress="${id}" ${anchor ? html` id="${anchor}"` : ""}
|
|
18
|
+
>${!anchor ? anchorTaken("progress", id) : ""}<span class="wp-progress-body" data-wp-quiet
|
|
19
|
+
><span class="wp-progress-note">waiting to start</span></span
|
|
20
|
+
></span
|
|
21
|
+
>`;
|
|
22
|
+
}
|
|
23
|
+
const watches = /* @__PURE__ */ new Map();
|
|
24
|
+
/** Append the nudges due at `now` to the log in `file`; returns them. */
|
|
25
|
+
function nudgeStale(file, now, options = {}) {
|
|
26
|
+
return nudgesDue(read(file).events, now, {
|
|
27
|
+
staleAfter: options.staleAfter ?? 9e5,
|
|
28
|
+
every: options.nudgeEvery ?? 9e5
|
|
29
|
+
}).map((n) => appendEvent(file, n, "cli", NUDGER));
|
|
30
|
+
}
|
|
31
|
+
/** Whether page `page` is there to show a progress: a page of `.workpad/pages/`, or a file of the repository. */
|
|
32
|
+
function pageExists(wp, dir, page) {
|
|
33
|
+
if (page.startsWith("-/")) return fs.existsSync(path.join(dir, page.slice(2)));
|
|
34
|
+
const pages = path.join(wp, "pages");
|
|
35
|
+
return fs.existsSync(path.join(pages, `${page}.md`)) || fs.existsSync(path.join(pages, page, "index.md"));
|
|
36
|
+
}
|
|
37
|
+
/** The page's source, when it has one to look in for its marker. */
|
|
38
|
+
function sourceOf(wp, page) {
|
|
39
|
+
const pages = path.join(wp, "pages");
|
|
40
|
+
for (const file of [path.join(pages, `${page}.md`), path.join(pages, page, "index.md")]) try {
|
|
41
|
+
return fs.readFileSync(file, "utf8");
|
|
42
|
+
} catch {}
|
|
43
|
+
return null;
|
|
44
|
+
}
|
|
45
|
+
function progress(options = {}) {
|
|
46
|
+
const now = options.now ?? Date.now;
|
|
47
|
+
return definePlugin({
|
|
48
|
+
name: "progress",
|
|
49
|
+
public: builtinPublic("progress"),
|
|
50
|
+
blocks: { progress: {
|
|
51
|
+
menu: {
|
|
52
|
+
group: "mark",
|
|
53
|
+
summary: "how far a long piece of work is, moved live by `workpad progress`"
|
|
54
|
+
},
|
|
55
|
+
attrs: ["id"],
|
|
56
|
+
style: "style.css",
|
|
57
|
+
html: (ctx) => render(ctx)
|
|
58
|
+
} },
|
|
59
|
+
events: {
|
|
60
|
+
[UPDATE]: { description: "a progress moved (`workpad progress`): `{ id, n, total, note, eta, state }`, `n` and `total` null without a count, `eta` seconds from it, `state` running, done or failed" },
|
|
61
|
+
[STALE]: {
|
|
62
|
+
handOut: true,
|
|
63
|
+
description: "the server nudges the agent that last moved a progress gone stale: `{ id, to, nudge, since, at }`, `to` that agent, `nudge` what to run. Moving the progress handles it"
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
setup(ctx) {
|
|
67
|
+
const file = path.join(ctx.project.wp, "events.ndjson");
|
|
68
|
+
clearInterval(watches.get(file));
|
|
69
|
+
const timer = setInterval(() => {
|
|
70
|
+
try {
|
|
71
|
+
nudgeStale(file, now(), options);
|
|
72
|
+
} catch (err) {
|
|
73
|
+
console.error("progress: looking for stale progress failed:", err);
|
|
74
|
+
}
|
|
75
|
+
}, options.checkEvery ?? 6e4);
|
|
76
|
+
timer.unref();
|
|
77
|
+
watches.set(file, timer);
|
|
78
|
+
return {
|
|
79
|
+
client: "client.js",
|
|
80
|
+
slots: () => options.staleAfter != null ? { head: html`<meta name="wp-progress" data-stale-after="${String(options.staleAfter)}" />` } : null
|
|
81
|
+
};
|
|
82
|
+
},
|
|
83
|
+
commands: { "": {
|
|
84
|
+
description: "move a `:progress{id=…}` on a page: how far (`287/1413`), a note, and `--eta`; or `done`, `failed`. Appends an event; the page is left as it is",
|
|
85
|
+
args: "<page|file> <id> [<n>/<total> | done | failed] \"<note>\"",
|
|
86
|
+
options: { eta: {
|
|
87
|
+
type: "string?",
|
|
88
|
+
value: "time",
|
|
89
|
+
description: "the time left: 20m, 90s, 1h30m"
|
|
90
|
+
} },
|
|
91
|
+
run(ctx) {
|
|
92
|
+
const [target, id, ...rest] = ctx.positionals;
|
|
93
|
+
if (!target || !id || !rest.length) throw new Error("usage: workpad progress <page> <id> <n>/<total> \"<note>\" [--eta 20m], or <page> <id> \"<note>\", <page> <id> done|failed \"<note>\"");
|
|
94
|
+
if (!isProgressId(id)) throw new Error(`progress id ${JSON.stringify(id)}: letters, digits, - and _`);
|
|
95
|
+
const page = ctx.page(target);
|
|
96
|
+
if (!pageExists(ctx.project.wp, ctx.project.dir, page)) throw new Error(`no page ${page}`);
|
|
97
|
+
const data = parseArgs(rest, ctx.options.eta ?? null);
|
|
98
|
+
const before = read(ctx.eventsFile).events;
|
|
99
|
+
const event = appendEvent(ctx.eventsFile, {
|
|
100
|
+
page,
|
|
101
|
+
type: UPDATE,
|
|
102
|
+
data: {
|
|
103
|
+
id,
|
|
104
|
+
...data
|
|
105
|
+
}
|
|
106
|
+
}, "cli", ctx.agent);
|
|
107
|
+
for (const e of openNudges(before, page, id, handledIds(before))) handle(ctx.eventsFile, e, ctx.agent);
|
|
108
|
+
const p = progressOf([...before, event]).get(keyOf(page, id));
|
|
109
|
+
console.log(`${page}: ${line(p, Date.parse(event.ts))}`);
|
|
110
|
+
const source = sourceOf(ctx.project.wp, page);
|
|
111
|
+
if (source != null && !new RegExp(`:progress\\{[^}]*\\bid=["']?${id}(?![\\w-])`).test(source)) console.error(`workpad: ${page} has no :progress{id=${id}}: put one where it should show (the corner shows it all the same)`);
|
|
112
|
+
}
|
|
113
|
+
} },
|
|
114
|
+
docs: () => fs.readFileSync(new URL("./README.md", import.meta.url), "utf8")
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
export { progress as default, nudgeStale };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=(e,t)=>`${e}\n${t}`,t=e=>typeof e==`number`&&Number.isFinite(e)?e:null;function n(n){let r=/* @__PURE__ */ new Map;for(let i of n){if(i.type!==`progress:update`||i.from!==`cli`)continue;let n=i.data??{},a=typeof n.id==`string`?n.id:``;if(!a)continue;let o=e(i.page,a),s=r.get(o),c=n.state===`done`||n.state===`failed`?n.state:`running`,l=t(n.n),u=t(n.total),d=!s||s.state!==`running`,f=d?i.ts:s.started,p=d?null:s.first;r.set(o,{page:i.page,id:a,n:l,total:u,note:typeof n.note==`string`?n.note:``,state:c,eta:t(n.eta),ts:i.ts,started:f,first:p??(l==null?null:{n:l,ts:i.ts}),by:i.by??null,event:i.id})}return r}const r=(e,t)=>[...n(e.filter(e=>e.page===t)).values()];function i(e,t){if(e.state!==`running`)return null;let n=Date.parse(e.ts);if(e.eta!=null)return n+e.eta*1e3-t;if(e.n==null||e.total==null||!e.first||e.n<=e.first.n)return null;let r=(e.n-e.first.n)/(n-Date.parse(e.first.ts));return r>0?n+(e.total-e.n)/r-t:null}function a(e,t,n=9e5){return e.state===`running`?t-Date.parse(e.ts)>=n||e.eta!=null&&Date.parse(e.ts)+e.eta*1e3<t:!1}const o=e=>e.toLocaleString(`en-US`),s=e=>e.n!=null&&e.total!=null?`${o(e.n)} / ${o(e.total)}`:``;function c(e){let t=Math.max(0,Math.round(e/1e3));if(t<60)return`${t} s`;let n=Math.round(t/60);if(n<60)return`${n} min`;let r=Math.floor(n/60),i=n%60;return i?`${r} h ${i} min`:`${r} h`}const l=e=>e<1e4?`just now`:`${c(e)} ago`;function u(e,t){let n=i(e,t);return n==null||n<=0?``:`~${c(n)} left`}function d(e,t,n){let r=document.createElement(e);return r.className=t,n!=null&&(r.textContent=n),r}const f=e=>new Date(e).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`,hourCycle:`h23`}),p=e=>e.n!=null&&e.total?e.n/e.total:null,m={running:`running`,done:`done`,failed:`failed`};function h(e,t,n,r){let i=e.querySelector(`:scope > .wp-progress-body`);if(!i)return;if(!t){e.dataset.wpProgress=`waiting`,e.removeAttribute(`data-wp-stale`),i.replaceChildren(d(`span`,`wp-progress-note`,`waiting to start`));return}let o=a(t,n,r);e.dataset.wpProgress=t.state,e.toggleAttribute(`data-wp-stale`,o);let h=[],g=p(t);if(t.state===`running`&&g!=null){let e=d(`span`,`wp-progress-bar`),n=d(`span`,``);n.style.width=`${Math.round(g*1e3)/10}%`,e.append(n),e.setAttribute(`role`,`progressbar`),e.setAttribute(`aria-valuemin`,`0`),e.setAttribute(`aria-valuemax`,String(t.total)),e.setAttribute(`aria-valuenow`,String(t.n)),h.push(e,d(`span`,`wp-progress-count`,s(t)))}else h.push(d(`span`,`wp-progress-state`,m[t.state]));t.note&&h.push(d(`span`,`wp-progress-note`,t.note));let _=[];if(t.state!==`running`)_.push(f(t.ts));else if(o)_.push(`no update for ${c(n-Date.parse(t.ts))}`);else{let e=u(t,n);e&&_.push(e),_.push(l(n-Date.parse(t.ts)))}h.push(d(`span`,`wp-progress-when`,_.join(` · `))),i.replaceChildren(...h),e.title=`${t.id}: ${t.state}${t.by?`, moved by ${t.by}`:``}`}function g(e,t,n){let r=e.state===`running`?s(e)||e.note:e.note||m[e.state],i=`${e.state===`done`?`✓ `:e.state===`failed`?`✗ `:``}${e.id}${r?` · ${r}`:``}`;return e.state===`running`?{text:i,meta:a(e,t,n)?`no update ${c(t-Date.parse(e.ts))}`:u(e,t)||l(t-Date.parse(e.ts)),bar:{value:p(e),tone:`accent`}}:{text:i,meta:l(t-Date.parse(e.ts)),bar:{value:1,tone:e.state===`done`?`good`:`bad`}}}const _=(e,t,n)=>{if(!t.live)return;let i=Number(document.querySelector(`meta[name=wp-progress]`)?.dataset.staleAfter)||9e5,a=`wp-progress-seen:${location.pathname}`,o=/* @__PURE__ */ new Set;try{o=new Set(JSON.parse(localStorage.getItem(a)??`[]`))}catch{}let s=e=>{o.add(e);try{localStorage.setItem(a,JSON.stringify([...o].slice(-200)))}catch{}},c=/* @__PURE__ */ new Map,l=/* @__PURE__ */ new Map,u=/* @__PURE__ */ new Map,d=t=>[...e.querySelectorAll(`.wp-progress[data-progress]`)].filter(e=>e.dataset.progress===t);function f(e){let t=l.get(e);t&&t.state!==`running`&&(s(t.event),c.get(e)?.close(),c.delete(e));let n=d(e);if(!n.length)return;let r=((u.get(e)??-1)+1)%n.length;u.set(e,r);let i=n[r];i.scrollIntoView({block:`center`,behavior:`smooth`}),i.classList.remove(`wp-flash`),i.offsetWidth,i.classList.add(`wp-flash`)}function p(){let t=Date.now(),a=r(n.events(),n.page),s=new Map(a.map(e=>[e.id,e]));for(let n of e.querySelectorAll(`.wp-progress[data-progress]`))h(n,s.get(n.dataset.progress),t,i);for(let e of a){let r=e.state===`running`||!o.has(e.event),a=c.get(e.id);if(!r){a?.close(),c.delete(e.id);continue}l.set(e.id,e);let{text:s,meta:u,bar:d}=g(e,t,i);a?a.update(s,{meta:u??null,bar:d??null}):(a=n.toast(s,{kind:`quiet`,ms:0,name:`progress-${e.id}`,order:-3,meta:u,bar:d,onClick:()=>f(e.id)}),c.set(e.id,a))}for(let[e,t]of c)s.has(e)||(t.close(),c.delete(e))}p(),n.events.on(p),n.onRendered(p),setInterval(p,1e4)};export{_ as default};
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/* A progress, inline where it is written (client.ts draws it): a small bar and the count while it
|
|
2
|
+
runs, or a word with a dot (running without a count, done, failed); the note; and its time, muted.
|
|
3
|
+
Its state is data-wp-progress (waiting, running, done, failed); data-wp-stale greys it. */
|
|
4
|
+
.wp-progress {
|
|
5
|
+
font-size: 0.9em;
|
|
6
|
+
}
|
|
7
|
+
.wp-progress-body {
|
|
8
|
+
display: inline-flex;
|
|
9
|
+
flex-wrap: wrap;
|
|
10
|
+
align-items: center;
|
|
11
|
+
gap: 2px var(--space-md, 8px);
|
|
12
|
+
vertical-align: baseline;
|
|
13
|
+
font-family: var(--sans);
|
|
14
|
+
}
|
|
15
|
+
.wp-progress[data-wp-progress='waiting'] .wp-progress-note {
|
|
16
|
+
color: var(--muted);
|
|
17
|
+
font-style: italic;
|
|
18
|
+
}
|
|
19
|
+
.wp-progress-bar {
|
|
20
|
+
position: relative;
|
|
21
|
+
display: inline-block;
|
|
22
|
+
width: 64px;
|
|
23
|
+
height: 5px;
|
|
24
|
+
border-radius: 3px;
|
|
25
|
+
overflow: hidden;
|
|
26
|
+
background: color-mix(in srgb, var(--muted) 28%, transparent);
|
|
27
|
+
}
|
|
28
|
+
.wp-progress-bar > span {
|
|
29
|
+
position: absolute;
|
|
30
|
+
inset: 0 auto 0 0;
|
|
31
|
+
border-radius: inherit;
|
|
32
|
+
background: var(--accent);
|
|
33
|
+
}
|
|
34
|
+
.wp-progress-count {
|
|
35
|
+
font-variant-numeric: tabular-nums;
|
|
36
|
+
font-weight: var(--weight-strong, 600);
|
|
37
|
+
}
|
|
38
|
+
.wp-progress-when {
|
|
39
|
+
color: var(--muted);
|
|
40
|
+
font-size: 0.92em;
|
|
41
|
+
}
|
|
42
|
+
/* the word, with its dot: blue and pulsing while it runs, green done, red failed */
|
|
43
|
+
.wp-progress-state {
|
|
44
|
+
display: inline-flex;
|
|
45
|
+
align-items: center;
|
|
46
|
+
gap: var(--space-sm, 6px);
|
|
47
|
+
color: var(--muted);
|
|
48
|
+
font: 500 var(--ui-tiny, 0.7rem) / 1 var(--sans);
|
|
49
|
+
}
|
|
50
|
+
.wp-progress-state::before {
|
|
51
|
+
content: '';
|
|
52
|
+
width: 7px;
|
|
53
|
+
height: 7px;
|
|
54
|
+
border-radius: 50%;
|
|
55
|
+
background: var(--wp-progress-dot, var(--muted));
|
|
56
|
+
}
|
|
57
|
+
.wp-progress[data-wp-progress='running'] {
|
|
58
|
+
--wp-progress-dot: var(--accent);
|
|
59
|
+
}
|
|
60
|
+
.wp-progress[data-wp-progress='done'] {
|
|
61
|
+
--wp-progress-dot: var(--ok);
|
|
62
|
+
}
|
|
63
|
+
.wp-progress[data-wp-progress='failed'] {
|
|
64
|
+
--wp-progress-dot: var(--bad);
|
|
65
|
+
}
|
|
66
|
+
@keyframes wp-progress-pulse {
|
|
67
|
+
50% {
|
|
68
|
+
opacity: 0.35;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
.wp-progress[data-wp-progress='running']:not([data-wp-stale]) .wp-progress-state::before {
|
|
72
|
+
animation: wp-progress-pulse 1.6s ease-in-out infinite;
|
|
73
|
+
}
|
|
74
|
+
@media (prefers-reduced-motion: reduce) {
|
|
75
|
+
.wp-progress-state::before {
|
|
76
|
+
animation: none !important;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
/* stale: greyed, its time saying how long without an update */
|
|
80
|
+
.wp-progress[data-wp-stale] .wp-progress-body {
|
|
81
|
+
opacity: 0.55;
|
|
82
|
+
}
|
|
83
|
+
.wp-progress[data-wp-stale] .wp-progress-bar > span {
|
|
84
|
+
background: var(--muted);
|
|
85
|
+
}
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
// plugins/progress/state.ts
|
|
2
|
+
/** The event `workpad progress` appends: `{ id, n, total, note, eta, state }`. */
|
|
3
|
+
const UPDATE = "progress:update";
|
|
4
|
+
/**
|
|
5
|
+
* The server's nudge to the agent that last moved a stale progress: `{ id, to, nudge, since, at }`,
|
|
6
|
+
* `at` when it was due (the clock the server goes by, which a test sets).
|
|
7
|
+
*/
|
|
8
|
+
const STALE = "progress:stale";
|
|
9
|
+
/** Who the server's nudges say they are by (their `by`): no agent, so every agent is handed them. */
|
|
10
|
+
const NUDGER = "workpad";
|
|
11
|
+
const MINUTE = 6e4;
|
|
12
|
+
/** A running progress with no update this long is stale. */
|
|
13
|
+
const STALE_AFTER = 15 * MINUTE;
|
|
14
|
+
/** A stale progress is nudged again at most this often. */
|
|
15
|
+
const NUDGE_EVERY = 15 * MINUTE;
|
|
16
|
+
/** A key for a progress across pages: its page and id. */
|
|
17
|
+
const keyOf = (page, id) => `${page}\n${id}`;
|
|
18
|
+
/** An id as written in `:progress{id=…}` and on the command line: letters, digits, `-` and `_`. */
|
|
19
|
+
const isProgressId = (id) => /^[A-Za-z0-9_-]+$/.test(id);
|
|
20
|
+
/** `287/1413` (spaces and thousands separators allowed): the count and the total, or null. */
|
|
21
|
+
function parseCount(s) {
|
|
22
|
+
const m = /^\s*([\d,_]+)\s*\/\s*([\d,_]+)\s*$/.exec(s);
|
|
23
|
+
if (!m) return null;
|
|
24
|
+
const n = Number(m[1].replace(/[,_]/g, ""));
|
|
25
|
+
const total = Number(m[2].replace(/[,_]/g, ""));
|
|
26
|
+
if (!Number.isFinite(n) || !Number.isFinite(total) || total <= 0 || n < 0) return null;
|
|
27
|
+
return {
|
|
28
|
+
n,
|
|
29
|
+
total
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
/** `20m`, `90s`, `1h30m`, `2h`; a bare number is minutes. Seconds, or null when it isn't one. */
|
|
33
|
+
function parseDuration(s) {
|
|
34
|
+
const t = s.trim().toLowerCase();
|
|
35
|
+
if (/^\d+(\.\d+)?$/.test(t)) return Math.round(Number(t) * 60);
|
|
36
|
+
const re = /(\d+(?:\.\d+)?)\s*(h|hr|hours?|m|min|mins|minutes?|s|sec|secs|seconds?)/gy;
|
|
37
|
+
let total = 0;
|
|
38
|
+
let at = 0;
|
|
39
|
+
let m;
|
|
40
|
+
while (m = re.exec(t)) {
|
|
41
|
+
const unit = m[2][0];
|
|
42
|
+
total += Number(m[1]) * (unit === "h" ? 3600 : unit === "m" ? 60 : 1);
|
|
43
|
+
at = re.lastIndex;
|
|
44
|
+
while (t[at] === " ") at++;
|
|
45
|
+
re.lastIndex = at;
|
|
46
|
+
}
|
|
47
|
+
return at === t.length && at > 0 ? Math.round(total) : null;
|
|
48
|
+
}
|
|
49
|
+
/** What `workpad progress <page> <id> …` says, after the page and id: the update's data, or why not. */
|
|
50
|
+
function parseArgs(args, eta) {
|
|
51
|
+
const [first, ...rest] = args;
|
|
52
|
+
if (first === void 0) throw new Error("say how far: `<n>/<total> \"<note>\"`, `\"<note>\"`, `done \"<note>\"` or `failed \"<note>\"`");
|
|
53
|
+
let n = null;
|
|
54
|
+
let total = null;
|
|
55
|
+
let state = "running";
|
|
56
|
+
let words = args;
|
|
57
|
+
const count = parseCount(first);
|
|
58
|
+
if (count) {
|
|
59
|
+
({n, total} = count);
|
|
60
|
+
if (n > total) throw new Error(`${first}: the count is past its total`);
|
|
61
|
+
words = rest;
|
|
62
|
+
if (n === total) state = "done";
|
|
63
|
+
} else if (first === "done" || first === "failed") {
|
|
64
|
+
state = first;
|
|
65
|
+
words = rest;
|
|
66
|
+
}
|
|
67
|
+
let seconds = null;
|
|
68
|
+
if (eta != null && eta !== "") {
|
|
69
|
+
seconds = parseDuration(eta);
|
|
70
|
+
if (seconds == null) throw new Error(`--eta ${eta}: a time such as 20m, 90s or 1h30m`);
|
|
71
|
+
}
|
|
72
|
+
return {
|
|
73
|
+
n,
|
|
74
|
+
total,
|
|
75
|
+
note: words.join(" ").trim(),
|
|
76
|
+
state,
|
|
77
|
+
eta: state === "running" ? seconds : null
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
const num = (v) => typeof v === "number" && Number.isFinite(v) ? v : null;
|
|
81
|
+
/**
|
|
82
|
+
* Every progress in the log, by page and id (keyOf), each as its latest update says, with its run's
|
|
83
|
+
* start. `events` in the log's order.
|
|
84
|
+
*/
|
|
85
|
+
function progressOf(events) {
|
|
86
|
+
const out = /* @__PURE__ */ new Map();
|
|
87
|
+
for (const e of events) {
|
|
88
|
+
if (e.type !== "progress:update" || e.from !== "cli") continue;
|
|
89
|
+
const d = e.data ?? {};
|
|
90
|
+
const id = typeof d.id === "string" ? d.id : "";
|
|
91
|
+
if (!id) continue;
|
|
92
|
+
const key = keyOf(e.page, id);
|
|
93
|
+
const before = out.get(key);
|
|
94
|
+
const state = d.state === "done" || d.state === "failed" ? d.state : "running";
|
|
95
|
+
const n = num(d.n);
|
|
96
|
+
const total = num(d.total);
|
|
97
|
+
const fresh = !before || before.state !== "running";
|
|
98
|
+
const started = fresh ? e.ts : before.started;
|
|
99
|
+
const first = fresh ? null : before.first;
|
|
100
|
+
out.set(key, {
|
|
101
|
+
page: e.page,
|
|
102
|
+
id,
|
|
103
|
+
n,
|
|
104
|
+
total,
|
|
105
|
+
note: typeof d.note === "string" ? d.note : "",
|
|
106
|
+
state,
|
|
107
|
+
eta: num(d.eta),
|
|
108
|
+
ts: e.ts,
|
|
109
|
+
started,
|
|
110
|
+
first: first ?? (n != null ? {
|
|
111
|
+
n,
|
|
112
|
+
ts: e.ts
|
|
113
|
+
} : null),
|
|
114
|
+
by: e.by ?? null,
|
|
115
|
+
event: e.id
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
return out;
|
|
119
|
+
}
|
|
120
|
+
/** The running ones of every page, the latest moved first. */
|
|
121
|
+
const running = (events) => [...progressOf(events).values()].filter((p) => p.state === "running").sort((a, b) => b.ts.localeCompare(a.ts));
|
|
122
|
+
/**
|
|
123
|
+
* Milliseconds left, as the agent said (`--eta`), else as the rate since the run's first count
|
|
124
|
+
* says; null when neither can tell. Below zero: past it.
|
|
125
|
+
*/
|
|
126
|
+
function timeLeft(p, now) {
|
|
127
|
+
if (p.state !== "running") return null;
|
|
128
|
+
const at = Date.parse(p.ts);
|
|
129
|
+
if (p.eta != null) return at + p.eta * 1e3 - now;
|
|
130
|
+
if (p.n == null || p.total == null || !p.first || p.n <= p.first.n) return null;
|
|
131
|
+
const rate = (p.n - p.first.n) / (at - Date.parse(p.first.ts));
|
|
132
|
+
if (!(rate > 0)) return null;
|
|
133
|
+
return at + (p.total - p.n) / rate - now;
|
|
134
|
+
}
|
|
135
|
+
/** Is it stale at `now`: running, and past the ETA it was given, or without an update for `after`? */
|
|
136
|
+
function isStale(p, now, after = STALE_AFTER) {
|
|
137
|
+
if (p.state !== "running") return false;
|
|
138
|
+
if (now - Date.parse(p.ts) >= after) return true;
|
|
139
|
+
return p.eta != null && Date.parse(p.ts) + p.eta * 1e3 < now;
|
|
140
|
+
}
|
|
141
|
+
/** `1,413` */
|
|
142
|
+
const thousands = (n) => n.toLocaleString("en-US");
|
|
143
|
+
/** `287 / 1,413`, or '' without a count. */
|
|
144
|
+
const countText = (p) => p.n != null && p.total != null ? `${thousands(p.n)} / ${thousands(p.total)}` : "";
|
|
145
|
+
/** A span of time in a few words: `40 s`, `2 min`, `1 h 20 min`. */
|
|
146
|
+
function span(ms) {
|
|
147
|
+
const s = Math.max(0, Math.round(ms / 1e3));
|
|
148
|
+
if (s < 60) return `${s} s`;
|
|
149
|
+
const min = Math.round(s / 60);
|
|
150
|
+
if (min < 60) return `${min} min`;
|
|
151
|
+
const h = Math.floor(min / 60);
|
|
152
|
+
const rest = min % 60;
|
|
153
|
+
return rest ? `${h} h ${rest} min` : `${h} h`;
|
|
154
|
+
}
|
|
155
|
+
/** `just now`, `40 s ago`, `2 min ago`. */
|
|
156
|
+
const ago = (ms) => ms < 1e4 ? "just now" : `${span(ms)} ago`;
|
|
157
|
+
/** `~20 min left`, or '' when it can't tell or is past it. */
|
|
158
|
+
function leftText(p, now) {
|
|
159
|
+
const left = timeLeft(p, now);
|
|
160
|
+
return left == null || left <= 0 ? "" : `~${span(left)} left`;
|
|
161
|
+
}
|
|
162
|
+
/** The line a progress is in words: `probe 287 / 1,413 · captures 3 and 4 · ~20 min left · 2 min ago`. */
|
|
163
|
+
function line(p, now) {
|
|
164
|
+
const parts = [[p.id, countText(p)].filter(Boolean).join(" ")];
|
|
165
|
+
if (p.state !== "running") parts.push(p.state);
|
|
166
|
+
if (p.note) parts.push(p.note);
|
|
167
|
+
if (isStale(p, now)) parts.push(`no update for ${span(now - Date.parse(p.ts))}`);
|
|
168
|
+
else {
|
|
169
|
+
const left = leftText(p, now);
|
|
170
|
+
if (left) parts.push(left);
|
|
171
|
+
parts.push(ago(now - Date.parse(p.ts)));
|
|
172
|
+
}
|
|
173
|
+
return parts.join(" · ");
|
|
174
|
+
}
|
|
175
|
+
/** The nudge for a stale progress, in words: what is stale, and what to run. */
|
|
176
|
+
function nudgeText(p, now) {
|
|
177
|
+
const how = [countText(p), p.note].filter(Boolean).join(", ");
|
|
178
|
+
return `${p.id} has had no update for ${span(now - Date.parse(p.ts))}${how ? ` (${how})` : ""}${isStale(p, now) && p.eta != null && now - Date.parse(p.ts) < 9e5 ? ", past its ETA" : ""} → workpad progress ${p.page} ${p.id} …, or done/failed`;
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* The nudges due at `now`: one for each stale progress that has had none since it last moved, or
|
|
182
|
+
* whose latest is `every` old. The log is the only record, so a server that restarts keeps count.
|
|
183
|
+
*/
|
|
184
|
+
function nudgesDue(events, now, { staleAfter = STALE_AFTER, every = NUDGE_EVERY } = {}) {
|
|
185
|
+
const last = /* @__PURE__ */ new Map();
|
|
186
|
+
for (const e of events) if (e.type === "progress:stale" && e.by === "workpad" && typeof e.data?.id === "string") last.set(keyOf(e.page, e.data.id), Date.parse(typeof e.data.at === "string" ? e.data.at : e.ts));
|
|
187
|
+
const out = [];
|
|
188
|
+
for (const p of progressOf(events).values()) {
|
|
189
|
+
if (!isStale(p, now, staleAfter)) continue;
|
|
190
|
+
const before = last.get(keyOf(p.page, p.id));
|
|
191
|
+
if (before != null && before >= Date.parse(p.ts) && now - before < every) continue;
|
|
192
|
+
out.push({
|
|
193
|
+
page: p.page,
|
|
194
|
+
type: STALE,
|
|
195
|
+
data: {
|
|
196
|
+
id: p.id,
|
|
197
|
+
to: p.by,
|
|
198
|
+
nudge: nudgeText(p, now),
|
|
199
|
+
since: p.ts,
|
|
200
|
+
at: new Date(now).toISOString()
|
|
201
|
+
}
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
return out;
|
|
205
|
+
}
|
|
206
|
+
/** The nudges for `page` and `id` no agent marked handled: `workpad progress` handles them by moving it. */
|
|
207
|
+
function openNudges(events, page, id, handled) {
|
|
208
|
+
return events.filter((e) => e.type === "progress:stale" && e.page === page && e.data?.id === id && !handled.has(e.id));
|
|
209
|
+
}
|
|
210
|
+
export { MINUTE, NUDGER, NUDGE_EVERY, STALE, STALE_AFTER, UPDATE, ago, countText, isProgressId, isStale, keyOf, leftText, line, nudgeText, nudgesDue, openNudges, parseArgs, parseCount, parseDuration, progressOf, running, span, thousands, timeLeft };
|
package/dist/solid/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { createComponent, render } from "@solidjs/web";
|
|
|
2
2
|
import { createContext, createSignal, onSettled, useContext } from "solid-js";
|
|
3
3
|
// solid/index.tsx
|
|
4
4
|
const WorkpadContext = createContext();
|
|
5
|
-
/** The page's events, theme, listeners, forms
|
|
5
|
+
/** The page's events, theme, listeners, forms, unread messages and deliveries, as signals. Use inside a component passed to solid(). */
|
|
6
6
|
const useWorkpad = () => useContext(WorkpadContext);
|
|
7
7
|
/** Turn a Solid component into a template client: `export default solid(MyComponent)`. */
|
|
8
8
|
function solid(Component) {
|
|
@@ -17,6 +17,7 @@ function solid(Component) {
|
|
|
17
17
|
const listeners = signal(api.listeners);
|
|
18
18
|
const forms = signal(api.forms);
|
|
19
19
|
const unread = signal(api.unread);
|
|
20
|
+
const delivery = signal(api.delivery);
|
|
20
21
|
const value = {
|
|
21
22
|
page: api.page,
|
|
22
23
|
events,
|
|
@@ -26,6 +27,7 @@ function solid(Component) {
|
|
|
26
27
|
listeners,
|
|
27
28
|
forms,
|
|
28
29
|
unread,
|
|
30
|
+
delivery,
|
|
29
31
|
markdown: api.markdown,
|
|
30
32
|
message: api.message,
|
|
31
33
|
toast: api.toast
|
package/dist/src/agents.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { fromReader, statusLines } from "./status.js";
|
|
2
2
|
import { read } from "./events.js";
|
|
3
|
+
import { isStale, line, running } from "../plugins/progress/state.js";
|
|
3
4
|
import fs from "node:fs";
|
|
4
5
|
import path from "node:path";
|
|
5
6
|
import { spawnSync } from "node:child_process";
|
|
@@ -33,9 +34,11 @@ async function stopReminder(ctx, session, inFlight = /* @__PURE__ */ new Set())
|
|
|
33
34
|
awaitingReply: p.awaitingReply.filter((chat) => !inFlight.has(lastFromReader.get(chat) ?? ""))
|
|
34
35
|
};
|
|
35
36
|
}).filter((p) => p.unheard.length || p.unreceived.length || p.unhandled.length || p.awaitingReply.length);
|
|
36
|
-
|
|
37
|
+
const now = Date.now();
|
|
38
|
+
const stale = running(read(ctx.eventsFile).events).filter((p) => p.by === session && isStale(p, now));
|
|
39
|
+
if (!loose.length && !stale.length) return null;
|
|
37
40
|
const said = (p) => openOn(p, { waiting: false }).filter((l) => !l.startsWith("→")).join("; ");
|
|
38
|
-
const shown = `workpad: ${loose.map((p) => `${p.page}: ${said(p)}`).join(" · ")}`;
|
|
41
|
+
const shown = `workpad: ${[...loose.map((p) => `${p.page}: ${said(p)}`), ...stale.map((p) => `${p.page}: ${line(p, now)}`)].join(" · ")}`;
|
|
39
42
|
const toWait = loose.filter((p) => p.unheard.length || p.unreceived.length);
|
|
40
43
|
return {
|
|
41
44
|
reason: loose.map((p) => {
|
|
@@ -44,7 +47,7 @@ async function stopReminder(ctx, session, inFlight = /* @__PURE__ */ new Set())
|
|
|
44
47
|
if (p.unhandled.length) todo.push(`act on the answers you were given and reply in their chat, or \`workpad handled ${p.unhandled.map((e) => e.id).join(" ")}\``);
|
|
45
48
|
if (p.awaitingReply.length) todo.push(`reply in the chat${p.awaitingReply.length > 1 ? "s" : ""} ${p.awaitingReply.join(", ")}`);
|
|
46
49
|
return `On your workpad page ${p.page}: ${said(p)}.${todo.length ? ` Before ending your turn: ${todo.join("; ")}.` : ""}`;
|
|
47
|
-
}).concat(toWait.length > 1 ? [`Before ending your turn, ${PING} run one listen for these pages in the background: \`${waitOn(toWait)}\`.`] : []).join("\n"),
|
|
50
|
+
}).concat(toWait.length > 1 ? [`Before ending your turn, ${PING} run one listen for these pages in the background: \`${waitOn(toWait)}\`.`] : []).concat(stale.map((p) => `Your progress ${p.id} on workpad page ${p.page} is stale (${line(p, now)}): move it (\`workpad progress ${p.page} ${p.id} <n>/<total> "<note>"\`), or end it with \`done\` or \`failed\`.`)).join("\n"),
|
|
48
51
|
shown
|
|
49
52
|
};
|
|
50
53
|
}
|
|
@@ -52,6 +55,7 @@ async function stopReminder(ctx, session, inFlight = /* @__PURE__ */ new Set())
|
|
|
52
55
|
function describe(e) {
|
|
53
56
|
const d = e.data ?? {};
|
|
54
57
|
if (e.type === "chat:message") return `chat ${d.chat}: "${d.text}"`;
|
|
58
|
+
if (typeof d.nudge === "string") return d.nudge;
|
|
55
59
|
if (e.type === "comments:new") return `comment on "${d.quote ?? d.at ?? ""}": "${d.text}"`;
|
|
56
60
|
const fields = Object.entries(d).filter(([, v]) => v !== "" && v != null && !(Array.isArray(v) && !v.length));
|
|
57
61
|
const said = fields.map(([k, v]) => fields.length === 1 ? JSON.stringify(v) : `${k}: ${JSON.stringify(v)}`);
|
package/dist/src/anchors.js
CHANGED
|
@@ -49,4 +49,28 @@ function anchorsOf(html) {
|
|
|
49
49
|
}
|
|
50
50
|
/** A hash as a link writes it: escaped where it must be, the colon and slash of an id left readable. */
|
|
51
51
|
const hashOf = (id) => "#" + encodeURIComponent(id).replace(/%3A/gi, ":").replace(/%2F/gi, "/");
|
|
52
|
-
|
|
52
|
+
/** How many single-character edits turn `a` into `b`. */
|
|
53
|
+
function distance(a, b) {
|
|
54
|
+
let row = Array.from({ length: b.length + 1 }, (_, j) => j);
|
|
55
|
+
for (let i = 1; i <= a.length; i++) {
|
|
56
|
+
const next = [i];
|
|
57
|
+
for (let j = 1; j <= b.length; j++) next[j] = Math.min(row[j] + 1, next[j - 1] + 1, row[j - 1] + (a[i - 1] === b[j - 1] ? 0 : 1));
|
|
58
|
+
row = next;
|
|
59
|
+
}
|
|
60
|
+
return row[b.length];
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Of a page's anchors, the `n` whose ids are nearest `id` by name, nearest first: what a link to a
|
|
64
|
+
* missing anchor most likely meant. One of its own kind (`form:` for `form:…`) comes before one of
|
|
65
|
+
* another at the same distance.
|
|
66
|
+
*/
|
|
67
|
+
function closest(id, ids, n = 3) {
|
|
68
|
+
const kind = id.includes(":") ? id.slice(0, id.indexOf(":") + 1) : "";
|
|
69
|
+
return ids.map((other) => ({
|
|
70
|
+
other,
|
|
71
|
+
d: distance(id, other) - (kind && other.startsWith(kind) ? .5 : 0)
|
|
72
|
+
})).sort((a, b) => a.d - b.d).slice(0, n).map((c) => c.other);
|
|
73
|
+
}
|
|
74
|
+
/** For a message about a missing anchor: `; nearest: #a, #b` of those a page has, or how to list them. */
|
|
75
|
+
const nearest = (id, ids) => ids.length ? `; nearest: ${closest(id, ids).map(hashOf).join(", ")} (\`workpad anchors\` lists all)` : "; it has no anchors";
|
|
76
|
+
export { anchorTaken, anchorsOf, closest, hashOf, nearest, slugText };
|
package/dist/src/build.js
CHANGED
|
@@ -131,7 +131,7 @@ async function build({ project, config, hooks: setUp, files: served }, options =
|
|
|
131
131
|
};
|
|
132
132
|
const parts = await pluginParts(hooks, null, {
|
|
133
133
|
asset: assetHere,
|
|
134
|
-
messages:
|
|
134
|
+
messages: {},
|
|
135
135
|
leaveOut: skip,
|
|
136
136
|
failed: (message) => warnings.push(`${path.relative(project.dir, file)}: ${message}`)
|
|
137
137
|
});
|
|
@@ -949,8 +949,8 @@ form button[data-wp-send='failed'] {
|
|
|
949
949
|
form[data-wp-just-sent] {
|
|
950
950
|
animation: wp-sent 1.4s ease-out;
|
|
951
951
|
}
|
|
952
|
-
/* what a sent answer came to, beside the form's last send button (forms.ts):
|
|
953
|
-
(
|
|
952
|
+
/* what a sent answer came to, beside the form's last send button (forms.ts): where it went (muted),
|
|
953
|
+
not received for long (the warning colour), couldn't send (red) */
|
|
954
954
|
.wp-form-status {
|
|
955
955
|
margin-left: var(--space-md);
|
|
956
956
|
color: var(--muted);
|
|
@@ -960,6 +960,10 @@ form[data-wp-just-sent] {
|
|
|
960
960
|
color: var(--bad);
|
|
961
961
|
font-weight: var(--weight-strong);
|
|
962
962
|
}
|
|
963
|
+
.wp-form-status[data-kind='warn'] {
|
|
964
|
+
color: var(--warn);
|
|
965
|
+
font-weight: var(--weight-strong);
|
|
966
|
+
}
|
|
963
967
|
|
|
964
968
|
/* a question the reader hasn't answered, or one the agent asks again: ringed, without a label of
|
|
965
969
|
its own (one laid into the form landed on its content in some layouts; the corner counts them).
|
|
@@ -1329,6 +1333,48 @@ input.wp-board-search::placeholder {
|
|
|
1329
1333
|
font: var(--ui-small)/var(--ui-line-height) var(--sans);
|
|
1330
1334
|
color: color-mix(in srgb, var(--text) 72%, var(--muted));
|
|
1331
1335
|
}
|
|
1336
|
+
/* a running progress on the page (plugins/progress): a small bar and its line */
|
|
1337
|
+
.wp-board-card > .wp-board-progress {
|
|
1338
|
+
flex: 1 1 100%;
|
|
1339
|
+
display: flex;
|
|
1340
|
+
align-items: center;
|
|
1341
|
+
gap: var(--space-sm);
|
|
1342
|
+
min-width: 0;
|
|
1343
|
+
font: var(--ui-small)/var(--ui-line-height) var(--sans);
|
|
1344
|
+
}
|
|
1345
|
+
.wp-board-progress[data-stale] {
|
|
1346
|
+
opacity: 0.55;
|
|
1347
|
+
}
|
|
1348
|
+
.wp-board-progress-text {
|
|
1349
|
+
min-width: 0;
|
|
1350
|
+
overflow: hidden;
|
|
1351
|
+
text-overflow: ellipsis;
|
|
1352
|
+
white-space: nowrap;
|
|
1353
|
+
}
|
|
1354
|
+
.wp-board-progress-bar {
|
|
1355
|
+
position: relative;
|
|
1356
|
+
flex: none;
|
|
1357
|
+
width: 48px;
|
|
1358
|
+
height: 4px;
|
|
1359
|
+
border-radius: 2px;
|
|
1360
|
+
overflow: hidden;
|
|
1361
|
+
background: color-mix(in srgb, var(--muted) 28%, transparent);
|
|
1362
|
+
}
|
|
1363
|
+
.wp-board-progress-bar > span {
|
|
1364
|
+
position: absolute;
|
|
1365
|
+
inset: 0 auto 0 0;
|
|
1366
|
+
background: var(--accent);
|
|
1367
|
+
}
|
|
1368
|
+
.wp-board-progress[data-stale] .wp-board-progress-bar > span {
|
|
1369
|
+
background: var(--muted);
|
|
1370
|
+
}
|
|
1371
|
+
.wp-board-progress-dot {
|
|
1372
|
+
flex: none;
|
|
1373
|
+
width: 7px;
|
|
1374
|
+
height: 7px;
|
|
1375
|
+
border-radius: 50%;
|
|
1376
|
+
background: var(--accent);
|
|
1377
|
+
}
|
|
1332
1378
|
.wp-board-card > .wp-board-when {
|
|
1333
1379
|
color: color-mix(in srgb, var(--muted) 72%, var(--surface));
|
|
1334
1380
|
margin-top: calc(var(--space-xs) * -1);
|