Skip to content

Autonomous development for real products. Governed agents build from specs you approve, follow the rules you set, and nothing merges until another agent proves it. Your decisions, judgement and taste are the bar that work must clear. Declare your vision and let agents build it.

docs(view): show the demo Shouts conversation [I11,I13]

Corey Olson359c08ed56e8
diff --git a/README.md b/README.md
index 6e0ae4b2..4e2a49a6 100644
--- a/README.md
+++ b/README.md
@@ -122,7 +122,16 @@ Your agents work in terminals. You watch them here: every project on this machin
pullboard view
```
-![The Pullboard board shows open, claimed, submitted and accepted work, with a pending decision and the accepted item's review history.](docs/shots/desktop.png)
+![The desktop board shows open, claimed, submitted and accepted work, a Needs you row for a held lane, search in the top bar, the status bar and an accepted item's review history.](docs/shots/desktop.png)
+
+![The Shouts tab shows the builder, reviewer and coordinator discussing a reviewed fix, the person's answered decision marked Heard, an evidence receipt and a code reference.](docs/shots/shouts.png)
+
+<details>
+<summary>The board on a phone</summary>
+
+![The phone board in dark mode shows active work, a Needs you row for a held lane and search in the top bar.](docs/shots/phone.png)
+
+</details>
<sub>What's being built, what's in review, and the calls only you can make, in one place.</sub>
diff --git a/docs/demo/api/v1/boards.json b/docs/demo/api/v1/boards.json
index d7da4e5f..93ff0d91 100644
--- a/docs/demo/api/v1/boards.json
+++ b/docs/demo/api/v1/boards.json
@@ -1 +1 @@
-{"version":1,"boards":[{"root":"demo-board","name":"Demo board","project":"Pullboard demo","added":"2026-10-06T12:00:00.000Z","id":"demo-board"}],"warnings":[]}
+{"version":1,"boards":[{"root":"demo-board","name":"Demo board","project":"Demo project","added":"2026-10-06T12:00:00.000Z","id":"demo-board"}],"warnings":[]}
diff --git a/docs/demo/api/v1/boards/demo-board/events.json b/docs/demo/api/v1/boards/demo-board/events.json
index b8e1e50e..2e20559a 100644
--- a/docs/demo/api/v1/boards/demo-board/events.json
+++ b/docs/demo/api/v1/boards/demo-board/events.json
@@ -1 +1 @@
-{"version":1,"events":[{"event_id":1,"event_at":"2026-10-06T12:00:00.000Z","event_by":"coordinator","event_kind":"join","item_id":null,"event_detail":"{\"lane\":\"coordinator\"}"},{"event_id":2,"event_at":"2026-10-06T12:00:00.000Z","event_by":"coordinator","event_kind":"add","item_id":1,"event_detail":"{\"lane\":\"app\",\"specIds\":[\"G1\"],\"after\":[],\"route\":\"strong\"}"},{"event_id":3,"event_at":"2026-10-06T12:00:00.000Z","event_by":"coordinator","event_kind":"add","item_id":2,"event_detail":"{\"lane\":\"app\",\"specIds\":[\"G1\"],\"after\":[],\"route\":\"strong\"}"},{"event_id":4,"event_at":"2026-10-06T12:00:00.000Z","event_by":"coordinator","event_kind":"add","item_id":3,"event_detail":"{\"lane\":\"app\",\"specIds\":[\"G1\"],\"after\":[],\"route\":\"strong\"}"},{"event_id":5,"event_at":"2026-10-06T12:00:00.000Z","event_by":"coordinator","event_kind":"add","item_id":4,"event_detail":"{\"lane\":\"app\",\"specIds\":[\"G1\"],\"after\":[],\"route\":\"strong\"}"},{"event_id":6,"event_at":"2026-10-06T12:00:00.000Z","event_by":"coordinator","event_kind":"add","item_id":5,"event_detail":"{\"lane\":\"app\",\"specIds\":[\"G1\"],\"after\":[],\"route\":\"strong\"}"},{"event_id":7,"event_at":"2026-10-06T12:00:00.000Z","event_by":"coordinator","event_kind":"add","item_id":6,"event_detail":"{\"lane\":\"app\",\"specIds\":[\"G1\"],\"after\":[],\"route\":\"strong\"}"},{"event_id":8,"event_at":"2026-10-06T12:00:00.000Z","event_by":"coordinator","event_kind":"withdraw","item_id":6,"event_detail":"{\"reason\":\"this example was dropped\"}"},{"event_id":9,"event_at":"2026-10-06T12:00:00.000Z","event_by":"app-1","event_kind":"join","item_id":null,"event_detail":"{\"lane\":\"app\"}"},{"event_id":10,"event_at":"2026-10-06T12:00:00.000Z","event_by":"app-1","event_kind":"family","item_id":null,"event_detail":"{\"family\":\"codex\"}"},{"event_id":11,"event_at":"2026-10-06T12:00:00.000Z","event_by":"review-1","event_kind":"join","item_id":null,"event_detail":"{\"lane\":\"review\"}"},{"event_id":12,"event_at":"2026-10-06T12:00:00.000Z","event_by":"review-1","event_kind":"family","item_id":null,"event_detail":"{\"family\":\"claude\"}"},{"event_id":13,"event_at":"2026-10-06T12:00:00.000Z","event_by":"app-1","event_kind":"claim","item_id":1,"event_detail":"{\"leaseUntil\":\"2026-10-06T14:00:00.000Z\",\"digest\":\"168c836c14eac1f5173109ad4a534c294cd7cc6f9139c0e658558a72d37cd184\"}"},{"event_id":14,"event_at":"2026-10-06T12:00:00.000Z","event_by":"app-1","event_kind":"submit","item_id":1,"event_detail":"{\"commit\":\"039dd1957ae44348cf1333b6a041b9a47d0b126d\",\"tree\":\"529da464ab862967df96a3dbb968986e02be9c09\",\"policyCommit\":\"b6d6ff7d82bf236004871545f8cb40c56a4c6f80\"}"},{"event_id":15,"event_at":"2026-10-06T12:00:00.000Z","event_by":"review-1","event_kind":"reject","item_id":1,"event_detail":"{\"reason\":\"BEHAVIOR_MISMATCH\",\"commit\":\"039dd1957ae44348cf1333b6a041b9a47d0b126d\"}"},{"event_id":16,"event_at":"2026-10-06T12:00:00.000Z","event_by":"app-1","event_kind":"claim","item_id":1,"event_detail":"{\"leaseUntil\":\"2026-10-06T14:00:00.000Z\",\"digest\":\"168c836c14eac1f5173109ad4a534c294cd7cc6f9139c0e658558a72d37cd184\"}"},{"event_id":17,"event_at":"2026-10-06T12:00:00.000Z","event_by":"app-1","event_kind":"submit","item_id":1,"event_detail":"{\"commit\":\"4447106d92456853f0219945b0420f899aad4fb3\",\"tree\":\"a4151ea69dda49bf35349795630361ee271d5670\",\"policyCommit\":\"b6d6ff7d82bf236004871545f8cb40c56a4c6f80\"}"},{"event_id":18,"event_at":"2026-10-06T12:00:00.000Z","event_by":"review-1","event_kind":"accept","item_id":1,"event_detail":"{\"reason\":\"CRITERION_MET\",\"commit\":\"4447106d92456853f0219945b0420f899aad4fb3\"}"},{"event_id":19,"event_at":"2026-10-06T12:00:00.000Z","event_by":"coordinator","event_kind":"merged","item_id":1,"event_detail":"{\"commit\":\"4447106d92456853f0219945b0420f899aad4fb3\"}"},{"event_id":20,"event_at":"2026-10-06T12:00:00.000Z","event_by":"app-2","event_kind":"join","item_id":null,"event_detail":"{\"lane\":\"app\"}"},{"event_id":21,"event_at":"2026-10-06T12:00:00.000Z","event_by":"app-2","event_kind":"family","item_id":null,"event_detail":"{\"family\":\"codex\"}"},{"event_id":22,"event_at":"2026-10-06T12:00:00.000Z","event_by":"app-2","event_kind":"claim","item_id":3,"event_detail":"{\"leaseUntil\":\"2026-10-06T14:00:00.000Z\",\"digest\":\"1555d7ef34549cdae361f0747895c9ef76927d8c2c46ed0ca40805230a045df7\"}"},{"event_id":23,"event_at":"2026-10-06T12:00:00.000Z","event_by":"app-2","event_kind":"submit","item_id":3,"event_detail":"{\"commit\":\"744575cf2fb85f3c3f0096ef8bdd4ee0fe1efd03\",\"tree\":\"8dcdda1969040b065338d3bb3aab24c851fa7ddf\",\"policyCommit\":\"4447106d92456853f0219945b0420f899aad4fb3\"}"},{"event_id":24,"event_at":"2026-10-06T12:00:00.000Z","event_by":"app-3","event_kind":"join","item_id":null,"event_detail":"{\"lane\":\"app\"}"},{"event_id":25,"event_at":"2026-10-06T12:00:00.000Z","event_by":"app-3","event_kind":"family","item_id":null,"event_detail":"{\"family\":\"codex\"}"},{"event_id":26,"event_at":"2026-10-06T12:00:00.000Z","event_by":"app-3","event_kind":"claim","item_id":4,"event_detail":"{\"leaseUntil\":\"2026-10-06T14:00:00.000Z\",\"digest\":\"ff072367ffd2eb26690f12e51541d28bec354a229ca4e53c8353ab155739da4e\"}"},{"event_id":27,"event_at":"2026-10-06T12:00:00.000Z","event_by":"app-3","event_kind":"shout","item_id":null,"event_detail":"{\"shout\":1,\"to\":\"coordinator\",\"decision\":true,\"request\":false,\"answers\":null}"},{"event_id":28,"event_at":"2026-10-06T12:00:00.000Z","event_by":"coordinator","event_kind":"pass","item_id":null,"event_detail":"{\"shout\":2,\"to\":\"person\",\"decision\":true,\"request\":false,\"answers\":1}"},{"event_id":29,"event_at":"2026-10-06T12:00:00.000Z","event_by":"person","event_kind":"answer","item_id":null,"event_detail":"{\"shout\":3,\"to\":\"coordinator\",\"decision\":false,\"request\":false,\"answers\":2,\"channel\":\"terminal\"}"},{"event_id":30,"event_at":"2026-10-06T12:00:00.000Z","event_by":"person","event_kind":"answer","item_id":null,"event_detail":"{\"shout\":4,\"to\":\"app-3\",\"decision\":false,\"request\":false,\"answers\":1,\"channel\":\"terminal\"}"},{"event_id":31,"event_at":"2026-10-06T12:00:00.000Z","event_by":"coordinator","event_kind":"hold","item_id":null,"event_detail":"{\"lane\":\"review\",\"reason\":\"Waiting for the next demo item.\"}"}],"eventLogVersion":1}
+{"version":1,"events":[{"event_id":1,"event_at":"2026-10-06T12:00:00.000Z","event_by":"coordinator","event_kind":"join","item_id":null,"event_detail":"{\"lane\":\"coordinator\",\"model\":\"unknown\"}"},{"event_id":2,"event_at":"2026-10-06T12:00:00.000Z","event_by":"coordinator","event_kind":"add","item_id":1,"event_detail":"{\"lane\":\"app\",\"specIds\":[\"G1\"],\"after\":[],\"route\":\"strong\",\"model\":\"unknown\"}"},{"event_id":3,"event_at":"2026-10-06T12:00:00.000Z","event_by":"coordinator","event_kind":"add","item_id":2,"event_detail":"{\"lane\":\"app\",\"specIds\":[\"G1\"],\"after\":[],\"route\":\"strong\",\"model\":\"unknown\"}"},{"event_id":4,"event_at":"2026-10-06T12:00:00.000Z","event_by":"coordinator","event_kind":"add","item_id":3,"event_detail":"{\"lane\":\"app\",\"specIds\":[\"G1\"],\"after\":[],\"route\":\"strong\",\"model\":\"unknown\"}"},{"event_id":5,"event_at":"2026-10-06T12:00:00.000Z","event_by":"coordinator","event_kind":"add","item_id":4,"event_detail":"{\"lane\":\"app\",\"specIds\":[\"G1\"],\"after\":[],\"route\":\"strong\",\"model\":\"unknown\"}"},{"event_id":6,"event_at":"2026-10-06T12:00:00.000Z","event_by":"coordinator","event_kind":"add","item_id":5,"event_detail":"{\"lane\":\"app\",\"specIds\":[\"G1\"],\"after\":[],\"route\":\"strong\",\"model\":\"unknown\"}"},{"event_id":7,"event_at":"2026-10-06T12:00:00.000Z","event_by":"coordinator","event_kind":"add","item_id":6,"event_detail":"{\"lane\":\"app\",\"specIds\":[\"G1\"],\"after\":[],\"route\":\"strong\",\"model\":\"unknown\"}"},{"event_id":8,"event_at":"2026-10-06T12:00:00.000Z","event_by":"coordinator","event_kind":"withdraw","item_id":6,"event_detail":"{\"reason\":\"this example was dropped\",\"model\":\"unknown\"}"},{"event_id":9,"event_at":"2026-10-06T12:00:00.000Z","event_by":"app-1","event_kind":"join","item_id":null,"event_detail":"{\"lane\":\"app\",\"model\":\"Demo builder\"}"},{"event_id":10,"event_at":"2026-10-06T12:00:00.000Z","event_by":"app-1","event_kind":"family","item_id":null,"event_detail":"{\"family\":\"codex\",\"model\":\"Demo builder\"}"},{"event_id":11,"event_at":"2026-10-06T12:00:00.000Z","event_by":"review-1","event_kind":"join","item_id":null,"event_detail":"{\"lane\":\"review\",\"model\":\"Demo reviewer\"}"},{"event_id":12,"event_at":"2026-10-06T12:00:00.000Z","event_by":"review-1","event_kind":"family","item_id":null,"event_detail":"{\"family\":\"claude\",\"model\":\"Demo reviewer\"}"},{"event_id":13,"event_at":"2026-10-06T12:00:00.000Z","event_by":"app-1","event_kind":"claim","item_id":1,"event_detail":"{\"leaseUntil\":\"2026-10-06T14:00:00.000Z\",\"digest\":\"8b60e493995b7966a529dd9b70fcb2724d8de18802faa26252b0dfbea4ded72d\",\"model\":\"Demo builder\"}"},{"event_id":14,"event_at":"2026-10-06T12:00:00.000Z","event_by":"app-1","event_kind":"submit","item_id":1,"event_detail":"{\"commit\":\"e555696eb67bd417e6fe38b177c46b9ca0855598\",\"tree\":\"00375991105c170844ccec1e908833d30dea44b2\",\"policyCommit\":\"ba1ece80351bbea14e9882f3ee928fa3fab9f7ae\",\"model\":\"Demo builder\"}"},{"event_id":15,"event_at":"2026-10-06T12:00:00.000Z","event_by":"review-1","event_kind":"reject","item_id":1,"event_detail":"{\"reason\":\"BEHAVIOR_MISMATCH\",\"commit\":\"e555696eb67bd417e6fe38b177c46b9ca0855598\",\"model\":\"Demo reviewer\"}"},{"event_id":16,"event_at":"2026-10-06T12:00:00.000Z","event_by":"app-1","event_kind":"claim","item_id":1,"event_detail":"{\"leaseUntil\":\"2026-10-06T14:00:00.000Z\",\"digest\":\"8b60e493995b7966a529dd9b70fcb2724d8de18802faa26252b0dfbea4ded72d\",\"model\":\"Demo builder\"}"},{"event_id":17,"event_at":"2026-10-06T12:00:00.000Z","event_by":"app-1","event_kind":"submit","item_id":1,"event_detail":"{\"commit\":\"8ddbacd4346ede1acbf801eede5de814799d3738\",\"tree\":\"2bfec03780ab37641c641dea5d4dda497215cd30\",\"policyCommit\":\"ba1ece80351bbea14e9882f3ee928fa3fab9f7ae\",\"model\":\"Demo builder\"}"},{"event_id":18,"event_at":"2026-10-06T12:00:00.000Z","event_by":"review-1","event_kind":"accept","item_id":1,"event_detail":"{\"reason\":\"CRITERION_MET\",\"commit\":\"8ddbacd4346ede1acbf801eede5de814799d3738\",\"check\":\"none\",\"model\":\"Demo reviewer\"}"},{"event_id":19,"event_at":"2026-10-06T12:00:00.000Z","event_by":"coordinator","event_kind":"merged","item_id":1,"event_detail":"{\"commit\":\"8ddbacd4346ede1acbf801eede5de814799d3738\",\"model\":\"unknown\"}"},{"event_id":20,"event_at":"2026-10-06T12:00:00.000Z","event_by":"app-1","event_kind":"claim","item_id":3,"event_detail":"{\"leaseUntil\":\"2026-10-06T14:00:00.000Z\",\"digest\":\"1c3f00403511133a16740979665d935519bc3fb4112bfe555456326fa7d3c3f8\",\"model\":\"Demo builder\"}"},{"event_id":21,"event_at":"2026-10-06T12:00:00.000Z","event_by":"app-1","event_kind":"submit","item_id":3,"event_detail":"{\"commit\":\"4c04a8bd69ae9a7b63754bd010ed85908d8f3472\",\"tree\":\"2f67d5e38c1618b2c5a744b7099ccbc24e26d9ec\",\"policyCommit\":\"8ddbacd4346ede1acbf801eede5de814799d3738\",\"model\":\"Demo builder\"}"},{"event_id":22,"event_at":"2026-10-06T12:00:00.000Z","event_by":"app-1","event_kind":"claim","item_id":4,"event_detail":"{\"leaseUntil\":\"2026-10-06T14:00:00.000Z\",\"digest\":\"c8d8817a23dda32335dac8ea89bca6759cac5340946822f87d40cfa9a2f58425\",\"model\":\"Demo builder\"}"},{"event_id":23,"event_at":"2026-10-06T12:00:00.000Z","event_by":"review-1","event_kind":"shout","item_id":null,"event_detail":"{\"shout\":1,\"to\":\"coordinator\",\"decision\":false,\"request\":false,\"answers\":null,\"model\":\"Demo reviewer\"}"},{"event_id":24,"event_at":"2026-10-06T12:00:00.000Z","event_by":"app-1","event_kind":"shout","item_id":null,"event_detail":"{\"shout\":2,\"to\":\"coordinator\",\"decision\":true,\"request\":false,\"answers\":null,\"model\":\"Demo builder\"}"},{"event_id":25,"event_at":"2026-10-06T12:00:00.000Z","event_by":"coordinator","event_kind":"pass","item_id":null,"event_detail":"{\"shout\":3,\"to\":\"person\",\"decision\":true,\"request\":false,\"answers\":2,\"model\":\"unknown\"}"},{"event_id":26,"event_at":"2026-10-06T12:00:00.000Z","event_by":"person","event_kind":"answer","item_id":null,"event_detail":"{\"shout\":4,\"to\":\"coordinator\",\"decision\":false,\"request\":false,\"answers\":3,\"channel\":\"terminal\"}"},{"event_id":27,"event_at":"2026-10-06T12:00:00.000Z","event_by":"person","event_kind":"answer","item_id":null,"event_detail":"{\"shout\":5,\"to\":\"app-1\",\"decision\":false,\"request\":false,\"answers\":2,\"channel\":\"terminal\"}"},{"event_id":28,"event_at":"2026-10-06T12:00:00.000Z","event_by":"coordinator","event_kind":"shout","item_id":null,"event_detail":"{\"shout\":6,\"to\":\"app-1\",\"decision\":false,\"request\":false,\"answers\":null,\"model\":\"unknown\"}"},{"event_id":29,"event_at":"2026-10-06T12:00:00.000Z","event_by":"coordinator","event_kind":"hold","item_id":null,"event_detail":"{\"lane\":\"review\",\"reason\":\"Waiting for the next demo item.\",\"model\":\"unknown\"}"}],"eventLogVersion":1}
diff --git a/docs/demo/api/v1/boards/demo-board/state.json b/docs/demo/api/v1/boards/demo-board/state.json
index 3667ce42..cd06f141 100644
--- a/docs/demo/api/v1/boards/demo-board/state.json
+++ b/docs/demo/api/v1/boards/demo-board/state.json
@@ -1 +1 @@
-{"version":1,"state":{"root":"demo-board","lanes":["coordinator","app","review"],"owning":["app"],"items":[{"id":6,"title":"Withdrawn example","lane":"app","status":"withdrawn","route":"strong","owner":null,"reviewer":null,"reviewUntil":null,"builtBy":null,"verifiedBy":null,"specs":["G1"],"criterion":"The demo includes withdrawn work.","brief":"","commit":null,"merged":null,"blockedBy":[],"updatedAt":"2026-10-06T12:00:00.000Z","verdict":null,"verdicts":[],"history":[{"kind":"add","by":"coordinator","at":"2026-10-06T12:00:00.000Z"},{"kind":"withdraw","by":"coordinator","at":"2026-10-06T12:00:00.000Z"}],"thread":[{"type":"move","eventId":7,"kind":"add","by":"coordinator","at":"2026-10-06T12:00:00.000Z","detail":{"lane":"app","specIds":["G1"],"after":[],"route":"strong"}},{"type":"move","eventId":8,"kind":"withdraw","by":"coordinator","at":"2026-10-06T12:00:00.000Z","detail":{"reason":"this example was dropped"}}]},{"id":5,"title":"Decision follow-up","lane":"app","status":"open","route":"strong","owner":null,"reviewer":null,"reviewUntil":null,"builtBy":null,"verifiedBy":null,"specs":["G1"],"criterion":"The board keeps a follow-up visible after the person answers.","brief":"","commit":null,"merged":null,"blockedBy":[],"updatedAt":"2026-10-06T12:00:00.000Z","verdict":null,"verdicts":[],"history":[{"kind":"add","by":"coordinator","at":"2026-10-06T12:00:00.000Z"}],"thread":[{"type":"move","eventId":6,"kind":"add","by":"coordinator","at":"2026-10-06T12:00:00.000Z","detail":{"lane":"app","specIds":["G1"],"after":[],"route":"strong"}}]},{"id":4,"title":"Claimed for work","lane":"app","status":"claimed","route":"strong","owner":"app-3","reviewer":null,"reviewUntil":null,"builtBy":null,"verifiedBy":null,"specs":["G1"],"criterion":"The demo item is being worked on.","brief":"","commit":null,"merged":null,"blockedBy":[],"updatedAt":"2026-10-06T12:00:00.000Z","verdict":null,"verdicts":[],"history":[{"kind":"add","by":"coordinator","at":"2026-10-06T12:00:00.000Z"},{"kind":"claim","by":"app-3","at":"2026-10-06T12:00:00.000Z"}],"thread":[{"type":"move","eventId":5,"kind":"add","by":"coordinator","at":"2026-10-06T12:00:00.000Z","detail":{"lane":"app","specIds":["G1"],"after":[],"route":"strong"}},{"type":"move","eventId":26,"kind":"claim","by":"app-3","at":"2026-10-06T12:00:00.000Z","detail":{"leaseUntil":"2026-10-06T14:00:00.000Z","digest":"ff072367ffd2eb26690f12e51541d28bec354a229ca4e53c8353ab155739da4e"}}]},{"id":3,"title":"Ready for review","lane":"app","status":"submitted","route":"strong","owner":"app-2","reviewer":null,"reviewUntil":null,"builtBy":"app-2","verifiedBy":null,"specs":["G1"],"criterion":"The demo item is submitted for review.","brief":"","commit":"744575cf2fb85f3c3f0096ef8bdd4ee0fe1efd03","merged":null,"blockedBy":[],"updatedAt":"2026-10-06T12:00:00.000Z","verdict":null,"verdicts":[],"history":[{"kind":"add","by":"coordinator","at":"2026-10-06T12:00:00.000Z"},{"kind":"claim","by":"app-2","at":"2026-10-06T12:00:00.000Z"},{"kind":"submit","by":"app-2","at":"2026-10-06T12:00:00.000Z"}],"thread":[{"type":"move","eventId":4,"kind":"add","by":"coordinator","at":"2026-10-06T12:00:00.000Z","detail":{"lane":"app","specIds":["G1"],"after":[],"route":"strong"}},{"type":"move","eventId":22,"kind":"claim","by":"app-2","at":"2026-10-06T12:00:00.000Z","detail":{"leaseUntil":"2026-10-06T14:00:00.000Z","digest":"1555d7ef34549cdae361f0747895c9ef76927d8c2c46ed0ca40805230a045df7"}},{"type":"move","eventId":23,"kind":"submit","by":"app-2","at":"2026-10-06T12:00:00.000Z","detail":{"commit":"744575cf2fb85f3c3f0096ef8bdd4ee0fe1efd03","tree":"8dcdda1969040b065338d3bb3aab24c851fa7ddf","policyCommit":"4447106d92456853f0219945b0420f899aad4fb3"}}]},{"id":2,"title":"Future work","lane":"app","status":"open","route":"strong","owner":null,"reviewer":null,"reviewUntil":null,"builtBy":null,"verifiedBy":null,"specs":["G1"],"criterion":"The board keeps another item open for later work.","brief":"","commit":null,"merged":null,"blockedBy":[],"updatedAt":"2026-10-06T12:00:00.000Z","verdict":null,"verdicts":[],"history":[{"kind":"add","by":"coordinator","at":"2026-10-06T12:00:00.000Z"}],"thread":[{"type":"move","eventId":3,"kind":"add","by":"coordinator","at":"2026-10-06T12:00:00.000Z","detail":{"lane":"app","specIds":["G1"],"after":[],"route":"strong"}}]},{"id":1,"title":"Reviewed and accepted","lane":"app","status":"verified","route":"strong","owner":"app-1","reviewer":null,"reviewUntil":null,"builtBy":"app-1","verifiedBy":"review-1","specs":["G1"],"criterion":"The demo item is accepted after review.","brief":"","commit":"4447106d92456853f0219945b0420f899aad4fb3","merged":"4447106d92456853f0219945b0420f899aad4fb3","blockedBy":[],"updatedAt":"2026-10-06T12:00:00.000Z","verdict":{"decision":"ACCEPT","reason":"CRITERION_MET","note":"Tried the edge that failed before; the revised demo passes.","by":"review-1","at":"2026-10-06T12:00:00.000Z","commit":"4447106d92456853f0219945b0420f899aad4fb3"},"verdicts":[{"decision":"REJECT","reason":"BEHAVIOR_MISMATCH","note":"The example skipped an edge; revise it before merging.","by":"review-1","at":"2026-10-06T12:00:00.000Z","commit":"039dd1957ae44348cf1333b6a041b9a47d0b126d"},{"decision":"ACCEPT","reason":"CRITERION_MET","note":"Tried the edge that failed before; the revised demo passes.","by":"review-1","at":"2026-10-06T12:00:00.000Z","commit":"4447106d92456853f0219945b0420f899aad4fb3"}],"history":[{"kind":"add","by":"coordinator","at":"2026-10-06T12:00:00.000Z"},{"kind":"claim","by":"app-1","at":"2026-10-06T12:00:00.000Z"},{"kind":"submit","by":"app-1","at":"2026-10-06T12:00:00.000Z"},{"kind":"reject","by":"review-1","at":"2026-10-06T12:00:00.000Z"},{"kind":"claim","by":"app-1","at":"2026-10-06T12:00:00.000Z"},{"kind":"submit","by":"app-1","at":"2026-10-06T12:00:00.000Z"},{"kind":"accept","by":"review-1","at":"2026-10-06T12:00:00.000Z"},{"kind":"merged","by":"coordinator","at":"2026-10-06T12:00:00.000Z"}],"thread":[{"type":"move","eventId":2,"kind":"add","by":"coordinator","at":"2026-10-06T12:00:00.000Z","detail":{"lane":"app","specIds":["G1"],"after":[],"route":"strong"}},{"type":"move","eventId":13,"kind":"claim","by":"app-1","at":"2026-10-06T12:00:00.000Z","detail":{"leaseUntil":"2026-10-06T14:00:00.000Z","digest":"168c836c14eac1f5173109ad4a534c294cd7cc6f9139c0e658558a72d37cd184"}},{"type":"move","eventId":14,"kind":"submit","by":"app-1","at":"2026-10-06T12:00:00.000Z","detail":{"commit":"039dd1957ae44348cf1333b6a041b9a47d0b126d","tree":"529da464ab862967df96a3dbb968986e02be9c09","policyCommit":"b6d6ff7d82bf236004871545f8cb40c56a4c6f80"}},{"type":"move","eventId":15,"kind":"reject","by":"review-1","at":"2026-10-06T12:00:00.000Z","detail":{"reason":"BEHAVIOR_MISMATCH","commit":"039dd1957ae44348cf1333b6a041b9a47d0b126d"}},{"type":"move","eventId":16,"kind":"claim","by":"app-1","at":"2026-10-06T12:00:00.000Z","detail":{"leaseUntil":"2026-10-06T14:00:00.000Z","digest":"168c836c14eac1f5173109ad4a534c294cd7cc6f9139c0e658558a72d37cd184"}},{"type":"move","eventId":17,"kind":"submit","by":"app-1","at":"2026-10-06T12:00:00.000Z","detail":{"commit":"4447106d92456853f0219945b0420f899aad4fb3","tree":"a4151ea69dda49bf35349795630361ee271d5670","policyCommit":"b6d6ff7d82bf236004871545f8cb40c56a4c6f80"}},{"type":"move","eventId":18,"kind":"accept","by":"review-1","at":"2026-10-06T12:00:00.000Z","detail":{"reason":"CRITERION_MET","commit":"4447106d92456853f0219945b0420f899aad4fb3"}},{"type":"move","eventId":19,"kind":"merged","by":"coordinator","at":"2026-10-06T12:00:00.000Z","detail":{"commit":"4447106d92456853f0219945b0420f899aad4fb3"}}]}],"shouts":[{"shout_id":4,"shout_from":"person","shout_to":"app-3","shout_text":"Person answered #2: Proceed with the verified change.","shout_at":"2026-10-06T12:00:00.000Z","shout_decision":0,"shout_answers":1,"shout_evidence_kind":null,"shout_evidence_outcome":null,"shout_evidence_item":null,"shout_evidence_commit":null,"shout_request":0,"shout_request_outcome":""},{"shout_id":3,"shout_from":"person","shout_to":"coordinator","shout_text":"Proceed with the verified change.","shout_at":"2026-10-06T12:00:00.000Z","shout_decision":0,"shout_answers":2,"shout_evidence_kind":null,"shout_evidence_outcome":null,"shout_evidence_item":null,"shout_evidence_commit":null,"shout_request":0,"shout_request_outcome":""},{"shout_id":2,"shout_from":"coordinator","shout_to":"person","shout_text":"Passed up from app-3: The review is complete. May the verified change proceed?\nCoordinator note: The review passed; ask the person before proceeding.","shout_at":"2026-10-06T12:00:00.000Z","shout_decision":1,"shout_answers":1,"shout_evidence_kind":null,"shout_evidence_outcome":null,"shout_evidence_item":null,"shout_evidence_commit":null,"shout_request":0,"shout_request_outcome":""},{"shout_id":1,"shout_from":"app-3","shout_to":"coordinator","shout_text":"The review is complete. May the verified change proceed?","shout_at":"2026-10-06T12:00:00.000Z","shout_decision":1,"shout_answers":null,"shout_evidence_kind":null,"shout_evidence_outcome":null,"shout_evidence_item":null,"shout_evidence_commit":null,"shout_request":0,"shout_request_outcome":""}],"decisions":[],"asked":[],"events":[{"event_id":31,"event_at":"2026-10-06T12:00:00.000Z","event_by":"coordinator","event_kind":"hold","item_id":null,"event_detail":"{\"lane\":\"review\",\"reason\":\"Waiting for the next demo item.\"}"},{"event_id":30,"event_at":"2026-10-06T12:00:00.000Z","event_by":"person","event_kind":"answer","item_id":null,"event_detail":"{\"shout\":4,\"to\":\"app-3\",\"decision\":false,\"request\":false,\"answers\":1,\"channel\":\"terminal\"}"},{"event_id":29,"event_at":"2026-10-06T12:00:00.000Z","event_by":"person","event_kind":"answer","item_id":null,"event_detail":"{\"shout\":3,\"to\":\"coordinator\",\"decision\":false,\"request\":false,\"answers\":2,\"channel\":\"terminal\"}"},{"event_id":28,"event_at":"2026-10-06T12:00:00.000Z","event_by":"coordinator","event_kind":"pass","item_id":null,"event_detail":"{\"shout\":2,\"to\":\"person\",\"decision\":true,\"request\":false,\"answers\":1}"},{"event_id":27,"event_at":"2026-10-06T12:00:00.000Z","event_by":"app-3","event_kind":"shout","item_id":null,"event_detail":"{\"shout\":1,\"to\":\"coordinator\",\"decision\":true,\"request\":false,\"answers\":null}"},{"event_id":26,"event_at":"2026-10-06T12:00:00.000Z","event_by":"app-3","event_kind":"claim","item_id":4,"event_detail":"{\"leaseUntil\":\"2026-10-06T14:00:00.000Z\",\"digest\":\"ff072367ffd2eb26690f12e51541d28bec354a229ca4e53c8353ab155739da4e\"}"},{"event_id":25,"event_at":"2026-10-06T12:00:00.000Z","event_by":"app-3","event_kind":"family","item_id":null,"event_detail":"{\"family\":\"codex\"}"},{"event_id":24,"event_at":"2026-10-06T12:00:00.000Z","event_by":"app-3","event_kind":"join","item_id":null,"event_detail":"{\"lane\":\"app\"}"},{"event_id":23,"event_at":"2026-10-06T12:00:00.000Z","event_by":"app-2","event_kind":"submit","item_id":3,"event_detail":"{\"commit\":\"744575cf2fb85f3c3f0096ef8bdd4ee0fe1efd03\",\"tree\":\"8dcdda1969040b065338d3bb3aab24c851fa7ddf\",\"policyCommit\":\"4447106d92456853f0219945b0420f899aad4fb3\"}"},{"event_id":22,"event_at":"2026-10-06T12:00:00.000Z","event_by":"app-2","event_kind":"claim","item_id":3,"event_detail":"{\"leaseUntil\":\"2026-10-06T14:00:00.000Z\",\"digest\":\"1555d7ef34549cdae361f0747895c9ef76927d8c2c46ed0ca40805230a045df7\"}"},{"event_id":21,"event_at":"2026-10-06T12:00:00.000Z","event_by":"app-2","event_kind":"family","item_id":null,"event_detail":"{\"family\":\"codex\"}"},{"event_id":20,"event_at":"2026-10-06T12:00:00.000Z","event_by":"app-2","event_kind":"join","item_id":null,"event_detail":"{\"lane\":\"app\"}"},{"event_id":19,"event_at":"2026-10-06T12:00:00.000Z","event_by":"coordinator","event_kind":"merged","item_id":1,"event_detail":"{\"commit\":\"4447106d92456853f0219945b0420f899aad4fb3\"}"},{"event_id":18,"event_at":"2026-10-06T12:00:00.000Z","event_by":"review-1","event_kind":"accept","item_id":1,"event_detail":"{\"reason\":\"CRITERION_MET\",\"commit\":\"4447106d92456853f0219945b0420f899aad4fb3\"}"},{"event_id":17,"event_at":"2026-10-06T12:00:00.000Z","event_by":"app-1","event_kind":"submit","item_id":1,"event_detail":"{\"commit\":\"4447106d92456853f0219945b0420f899aad4fb3\",\"tree\":\"a4151ea69dda49bf35349795630361ee271d5670\",\"policyCommit\":\"b6d6ff7d82bf236004871545f8cb40c56a4c6f80\"}"},{"event_id":16,"event_at":"2026-10-06T12:00:00.000Z","event_by":"app-1","event_kind":"claim","item_id":1,"event_detail":"{\"leaseUntil\":\"2026-10-06T14:00:00.000Z\",\"digest\":\"168c836c14eac1f5173109ad4a534c294cd7cc6f9139c0e658558a72d37cd184\"}"},{"event_id":15,"event_at":"2026-10-06T12:00:00.000Z","event_by":"review-1","event_kind":"reject","item_id":1,"event_detail":"{\"reason\":\"BEHAVIOR_MISMATCH\",\"commit\":\"039dd1957ae44348cf1333b6a041b9a47d0b126d\"}"},{"event_id":14,"event_at":"2026-10-06T12:00:00.000Z","event_by":"app-1","event_kind":"submit","item_id":1,"event_detail":"{\"commit\":\"039dd1957ae44348cf1333b6a041b9a47d0b126d\",\"tree\":\"529da464ab862967df96a3dbb968986e02be9c09\",\"policyCommit\":\"b6d6ff7d82bf236004871545f8cb40c56a4c6f80\"}"},{"event_id":13,"event_at":"2026-10-06T12:00:00.000Z","event_by":"app-1","event_kind":"claim","item_id":1,"event_detail":"{\"leaseUntil\":\"2026-10-06T14:00:00.000Z\",\"digest\":\"168c836c14eac1f5173109ad4a534c294cd7cc6f9139c0e658558a72d37cd184\"}"},{"event_id":12,"event_at":"2026-10-06T12:00:00.000Z","event_by":"review-1","event_kind":"family","item_id":null,"event_detail":"{\"family\":\"claude\"}"},{"event_id":11,"event_at":"2026-10-06T12:00:00.000Z","event_by":"review-1","event_kind":"join","item_id":null,"event_detail":"{\"lane\":\"review\"}"},{"event_id":10,"event_at":"2026-10-06T12:00:00.000Z","event_by":"app-1","event_kind":"family","item_id":null,"event_detail":"{\"family\":\"codex\"}"},{"event_id":9,"event_at":"2026-10-06T12:00:00.000Z","event_by":"app-1","event_kind":"join","item_id":null,"event_detail":"{\"lane\":\"app\"}"},{"event_id":8,"event_at":"2026-10-06T12:00:00.000Z","event_by":"coordinator","event_kind":"withdraw","item_id":6,"event_detail":"{\"reason\":\"this example was dropped\"}"},{"event_id":7,"event_at":"2026-10-06T12:00:00.000Z","event_by":"coordinator","event_kind":"add","item_id":6,"event_detail":"{\"lane\":\"app\",\"specIds\":[\"G1\"],\"after\":[],\"route\":\"strong\"}"},{"event_id":6,"event_at":"2026-10-06T12:00:00.000Z","event_by":"coordinator","event_kind":"add","item_id":5,"event_detail":"{\"lane\":\"app\",\"specIds\":[\"G1\"],\"after\":[],\"route\":\"strong\"}"},{"event_id":5,"event_at":"2026-10-06T12:00:00.000Z","event_by":"coordinator","event_kind":"add","item_id":4,"event_detail":"{\"lane\":\"app\",\"specIds\":[\"G1\"],\"after\":[],\"route\":\"strong\"}"},{"event_id":4,"event_at":"2026-10-06T12:00:00.000Z","event_by":"coordinator","event_kind":"add","item_id":3,"event_detail":"{\"lane\":\"app\",\"specIds\":[\"G1\"],\"after\":[],\"route\":\"strong\"}"},{"event_id":3,"event_at":"2026-10-06T12:00:00.000Z","event_by":"coordinator","event_kind":"add","item_id":2,"event_detail":"{\"lane\":\"app\",\"specIds\":[\"G1\"],\"after\":[],\"route\":\"strong\"}"},{"event_id":2,"event_at":"2026-10-06T12:00:00.000Z","event_by":"coordinator","event_kind":"add","item_id":1,"event_detail":"{\"lane\":\"app\",\"specIds\":[\"G1\"],\"after\":[],\"route\":\"strong\"}"},{"event_id":1,"event_at":"2026-10-06T12:00:00.000Z","event_by":"coordinator","event_kind":"join","item_id":null,"event_detail":"{\"lane\":\"coordinator\"}"}],"agents":[{"agent_id":"coordinator","agent_lane":"coordinator","agent_path":"demo-board","agent_last_shout_id":0,"agent_route":"strong","agent_family":null,"agent_created_at":"2026-10-06T12:00:00.000Z","lastMoveAt":"2026-10-06T12:00:00.000Z"},{"agent_id":"app-1","agent_lane":"app","agent_path":"../demo-board-app-1","agent_last_shout_id":0,"agent_route":"strong","agent_family":"codex","agent_created_at":"2026-10-06T12:00:00.000Z","lastMoveAt":"2026-10-06T12:00:00.000Z"},{"agent_id":"review-1","agent_lane":"review","agent_path":"../demo-board-review-1","agent_last_shout_id":0,"agent_route":"strong","agent_family":"claude","agent_created_at":"2026-10-06T12:00:00.000Z","lastMoveAt":"2026-10-06T12:00:00.000Z"},{"agent_id":"app-2","agent_lane":"app","agent_path":"../demo-board-app-2","agent_last_shout_id":0,"agent_route":"strong","agent_family":"codex","agent_created_at":"2026-10-06T12:00:00.000Z","lastMoveAt":"2026-10-06T12:00:00.000Z"},{"agent_id":"app-3","agent_lane":"app","agent_path":"../demo-board-app-3","agent_last_shout_id":0,"agent_route":"strong","agent_family":"codex","agent_created_at":"2026-10-06T12:00:00.000Z","lastMoveAt":"2026-10-06T12:00:00.000Z"}],"holds":[{"hold_lane":"review","hold_reason":"Waiting for the next demo item.","hold_by":"coordinator","hold_at":"2026-10-06T12:00:00.000Z"}],"spec":[{"id":"G1","status":"approved","tier":"must","text":"A demo item exists to show the board.","gate":"none","serves":[],"section":"G · Goals"},{"id":"G2","status":"approved","tier":"must","text":"The verified item shows its review history.","gate":"none","serves":[],"section":"G · Goals"}],"practice":[{"id":"PB1","status":"approved","tier":"must","text":"Ask, don't guess: a decision only the person can make waits for them.","gate":"review","serves":[],"section":"Rules","origin":"standard","version":1,"reason":""},{"id":"PB2","status":"approved","tier":"must","text":"Destructive or irreversible actions wait for the person's OK.","gate":"review","serves":[],"section":"Rules","origin":"standard","version":1,"reason":""},{"id":"PB3","status":"approved","tier":"must","text":"Claims come with evidence: say what ran and what it showed, never \"should work\".","gate":"review","serves":[],"section":"Rules","origin":"standard","version":1,"reason":""},{"id":"PB4","status":"approved","tier":"must","text":"A test must be able to fail: see it fail on broken code before trusting it.","gate":"review","serves":[],"section":"Rules","origin":"standard","version":1,"reason":""},{"id":"PB5","status":"approved","tier":"must","text":"Never weaken a test or a check to make it pass; fix the code.","gate":"review","serves":[],"section":"Rules","origin":"standard","version":1,"reason":""},{"id":"PB6","status":"approved","tier":"must","text":"Tests pass before a change merges.","gate":"the project's gate","serves":[],"section":"Rules","origin":"standard","version":1,"reason":""},{"id":"PB7","status":"pending","tier":"aim","text":"Tests touch nothing outside a temporary sandbox.","gate":"review","serves":[],"section":"Rules","origin":"standard","version":1,"reason":""},{"id":"PB8","status":"approved","tier":"must","text":"No secrets or sensitive info in the repo; test data is synthetic.","gate":"review","serves":[],"section":"Rules","origin":"standard","version":1,"reason":""},{"id":"PB9","status":"approved","tier":"must","text":"Headers: type(scope): subject [ids], 72 characters at most. A body only for a non-obvious why, three sentences at most.","gate":"commit-msg hook, review","serves":[],"section":"Rules","origin":"standard","version":1,"reason":""},{"id":"PB10","status":"approved","tier":"must","text":"Comments explain why, not what; no commented-out code.","gate":"review","serves":[],"section":"Rules","origin":"standard","version":1,"reason":""},{"id":"PB11","status":"approved","tier":"must","text":"A new dependency states why it is needed and what it pulls in.","gate":"review","serves":[],"section":"Rules","origin":"standard","version":1,"reason":""},{"id":"PB12","status":"approved","tier":"must","text":"Questions go on the board, one step up the chain, and the asker keeps working on what it can meanwhile.","gate":"review","serves":[],"section":"Rules","origin":"standard","version":1,"reason":""}],"unseen":null,"products":[],"board":"demo-board","requests":[],"milestones":[]},"eventLogVersion":1}
+{"version":1,"state":{"root":"demo-board","lanes":["coordinator","app","review"],"owning":["app"],"items":[{"id":6,"title":"Withdrawn example","lane":"app","status":"withdrawn","route":"strong","owner":null,"reviewer":null,"reviewUntil":null,"builtBy":null,"verifiedBy":null,"specs":["G1"],"criterion":"The demo includes withdrawn work.","brief":"","commit":null,"merged":null,"blockedBy":[],"updatedAt":"2026-10-06T12:00:00.000Z","verdict":null,"verdicts":[],"history":[{"kind":"add","by":"coordinator","at":"2026-10-06T12:00:00.000Z"},{"kind":"withdraw","by":"coordinator","at":"2026-10-06T12:00:00.000Z"}],"check":"","thread":[{"type":"move","eventId":7,"kind":"add","by":"coordinator","at":"2026-10-06T12:00:00.000Z","detail":{"lane":"app","specIds":["G1"],"after":[],"route":"strong","model":"unknown"}},{"type":"move","eventId":8,"kind":"withdraw","by":"coordinator","at":"2026-10-06T12:00:00.000Z","detail":{"reason":"this example was dropped","model":"unknown"}}]},{"id":5,"title":"Decision follow-up","lane":"app","status":"open","route":"strong","owner":null,"reviewer":null,"reviewUntil":null,"builtBy":null,"verifiedBy":null,"specs":["G1"],"criterion":"The board keeps a follow-up visible after the person answers.","brief":"","commit":null,"merged":null,"blockedBy":[],"updatedAt":"2026-10-06T12:00:00.000Z","verdict":null,"verdicts":[],"history":[{"kind":"add","by":"coordinator","at":"2026-10-06T12:00:00.000Z"}],"check":"","thread":[{"type":"move","eventId":6,"kind":"add","by":"coordinator","at":"2026-10-06T12:00:00.000Z","detail":{"lane":"app","specIds":["G1"],"after":[],"route":"strong","model":"unknown"}}]},{"id":4,"title":"Claimed for work","lane":"app","status":"claimed","route":"strong","owner":"app-1","reviewer":null,"reviewUntil":null,"builtBy":null,"verifiedBy":null,"specs":["G1"],"criterion":"The demo item is being worked on.","brief":"","commit":null,"merged":null,"blockedBy":[],"updatedAt":"2026-10-06T12:00:00.000Z","verdict":null,"verdicts":[],"history":[{"kind":"add","by":"coordinator","at":"2026-10-06T12:00:00.000Z"},{"kind":"claim","by":"app-1","at":"2026-10-06T12:00:00.000Z"}],"check":"","thread":[{"type":"move","eventId":5,"kind":"add","by":"coordinator","at":"2026-10-06T12:00:00.000Z","detail":{"lane":"app","specIds":["G1"],"after":[],"route":"strong","model":"unknown"}},{"type":"move","eventId":22,"kind":"claim","by":"app-1","at":"2026-10-06T12:00:00.000Z","detail":{"leaseUntil":"2026-10-06T14:00:00.000Z","digest":"c8d8817a23dda32335dac8ea89bca6759cac5340946822f87d40cfa9a2f58425","model":"Demo builder"}}]},{"id":3,"title":"Ready for review","lane":"app","status":"submitted","route":"strong","owner":"app-1","reviewer":null,"reviewUntil":null,"builtBy":"app-1","verifiedBy":null,"specs":["G1"],"criterion":"The demo item is submitted for review.","brief":"","commit":"4c04a8bd69ae9a7b63754bd010ed85908d8f3472","merged":null,"blockedBy":[],"updatedAt":"2026-10-06T12:00:00.000Z","verdict":null,"verdicts":[],"history":[{"kind":"add","by":"coordinator","at":"2026-10-06T12:00:00.000Z"},{"kind":"claim","by":"app-1","at":"2026-10-06T12:00:00.000Z"},{"kind":"submit","by":"app-1","at":"2026-10-06T12:00:00.000Z"}],"check":"","thread":[{"type":"move","eventId":4,"kind":"add","by":"coordinator","at":"2026-10-06T12:00:00.000Z","detail":{"lane":"app","specIds":["G1"],"after":[],"route":"strong","model":"unknown"}},{"type":"move","eventId":20,"kind":"claim","by":"app-1","at":"2026-10-06T12:00:00.000Z","detail":{"leaseUntil":"2026-10-06T14:00:00.000Z","digest":"1c3f00403511133a16740979665d935519bc3fb4112bfe555456326fa7d3c3f8","model":"Demo builder"}},{"type":"move","eventId":21,"kind":"submit","by":"app-1","at":"2026-10-06T12:00:00.000Z","detail":{"commit":"4c04a8bd69ae9a7b63754bd010ed85908d8f3472","tree":"2f67d5e38c1618b2c5a744b7099ccbc24e26d9ec","policyCommit":"8ddbacd4346ede1acbf801eede5de814799d3738","model":"Demo builder"}}]},{"id":2,"title":"Future work","lane":"app","status":"open","route":"strong","owner":null,"reviewer":null,"reviewUntil":null,"builtBy":null,"verifiedBy":null,"specs":["G1"],"criterion":"The board keeps another item open for later work.","brief":"","commit":null,"merged":null,"blockedBy":[],"updatedAt":"2026-10-06T12:00:00.000Z","verdict":null,"verdicts":[],"history":[{"kind":"add","by":"coordinator","at":"2026-10-06T12:00:00.000Z"}],"check":"","thread":[{"type":"move","eventId":3,"kind":"add","by":"coordinator","at":"2026-10-06T12:00:00.000Z","detail":{"lane":"app","specIds":["G1"],"after":[],"route":"strong","model":"unknown"}}]},{"id":1,"title":"Reviewed and accepted","lane":"app","status":"verified","route":"strong","owner":"app-1","reviewer":null,"reviewUntil":null,"builtBy":"app-1","verifiedBy":"review-1","specs":["G1"],"criterion":"The demo item is accepted after review.","brief":"","commit":"8ddbacd4346ede1acbf801eede5de814799d3738","merged":"8ddbacd4346ede1acbf801eede5de814799d3738","blockedBy":[],"updatedAt":"2026-10-06T12:00:00.000Z","verdict":{"decision":"ACCEPT","reason":"CRITERION_MET","note":"Tried the edge that failed before; the revised demo passes.","by":"review-1","at":"2026-10-06T12:00:00.000Z","commit":"8ddbacd4346ede1acbf801eede5de814799d3738"},"verdicts":[{"decision":"REJECT","reason":"BEHAVIOR_MISMATCH","note":"The example skipped an edge; revise it before merging.","by":"review-1","at":"2026-10-06T12:00:00.000Z","commit":"e555696eb67bd417e6fe38b177c46b9ca0855598"},{"decision":"ACCEPT","reason":"CRITERION_MET","note":"Tried the edge that failed before; the revised demo passes.","by":"review-1","at":"2026-10-06T12:00:00.000Z","commit":"8ddbacd4346ede1acbf801eede5de814799d3738"}],"history":[{"kind":"add","by":"coordinator","at":"2026-10-06T12:00:00.000Z"},{"kind":"claim","by":"app-1","at":"2026-10-06T12:00:00.000Z"},{"kind":"submit","by":"app-1","at":"2026-10-06T12:00:00.000Z"},{"kind":"reject","by":"review-1","at":"2026-10-06T12:00:00.000Z"},{"kind":"claim","by":"app-1","at":"2026-10-06T12:00:00.000Z"},{"kind":"submit","by":"app-1","at":"2026-10-06T12:00:00.000Z"},{"kind":"accept","by":"review-1","at":"2026-10-06T12:00:00.000Z"},{"kind":"merged","by":"coordinator","at":"2026-10-06T12:00:00.000Z"}],"check":"","thread":[{"type":"move","eventId":2,"kind":"add","by":"coordinator","at":"2026-10-06T12:00:00.000Z","detail":{"lane":"app","specIds":["G1"],"after":[],"route":"strong","model":"unknown"}},{"type":"move","eventId":13,"kind":"claim","by":"app-1","at":"2026-10-06T12:00:00.000Z","detail":{"leaseUntil":"2026-10-06T14:00:00.000Z","digest":"8b60e493995b7966a529dd9b70fcb2724d8de18802faa26252b0dfbea4ded72d","model":"Demo builder"}},{"type":"move","eventId":14,"kind":"submit","by":"app-1","at":"2026-10-06T12:00:00.000Z","detail":{"commit":"e555696eb67bd417e6fe38b177c46b9ca0855598","tree":"00375991105c170844ccec1e908833d30dea44b2","policyCommit":"ba1ece80351bbea14e9882f3ee928fa3fab9f7ae","model":"Demo builder"}},{"type":"move","eventId":15,"kind":"reject","by":"review-1","at":"2026-10-06T12:00:00.000Z","detail":{"reason":"BEHAVIOR_MISMATCH","commit":"e555696eb67bd417e6fe38b177c46b9ca0855598","model":"Demo reviewer"}},{"type":"move","eventId":16,"kind":"claim","by":"app-1","at":"2026-10-06T12:00:00.000Z","detail":{"leaseUntil":"2026-10-06T14:00:00.000Z","digest":"8b60e493995b7966a529dd9b70fcb2724d8de18802faa26252b0dfbea4ded72d","model":"Demo builder"}},{"type":"move","eventId":17,"kind":"submit","by":"app-1","at":"2026-10-06T12:00:00.000Z","detail":{"commit":"8ddbacd4346ede1acbf801eede5de814799d3738","tree":"2bfec03780ab37641c641dea5d4dda497215cd30","policyCommit":"ba1ece80351bbea14e9882f3ee928fa3fab9f7ae","model":"Demo builder"}},{"type":"move","eventId":18,"kind":"accept","by":"review-1","at":"2026-10-06T12:00:00.000Z","detail":{"reason":"CRITERION_MET","commit":"8ddbacd4346ede1acbf801eede5de814799d3738","check":"none","model":"Demo reviewer"}},{"type":"move","eventId":19,"kind":"merged","by":"coordinator","at":"2026-10-06T12:00:00.000Z","detail":{"commit":"8ddbacd4346ede1acbf801eede5de814799d3738","model":"unknown"}}]}],"shouts":[{"shout_id":6,"shout_from":"coordinator","shout_to":"app-1","shout_text":"#4 can continue while #3 waits for review.","shout_at":"2026-10-06T12:00:00.000Z","shout_decision":0,"shout_answers":null,"shout_evidence_kind":null,"shout_evidence_outcome":null,"shout_evidence_item":null,"shout_evidence_commit":null,"shout_request":0,"shout_request_outcome":""},{"shout_id":5,"shout_from":"person","shout_to":"app-1","shout_text":"Person answered #3: Proceed with the verified change.","shout_at":"2026-10-06T12:00:00.000Z","shout_decision":0,"shout_answers":2,"shout_evidence_kind":null,"shout_evidence_outcome":null,"shout_evidence_item":null,"shout_evidence_commit":null,"shout_request":0,"shout_request_outcome":""},{"shout_id":4,"shout_from":"person","shout_to":"coordinator","shout_text":"Proceed with the verified change.","shout_at":"2026-10-06T12:00:00.000Z","shout_decision":0,"shout_answers":3,"shout_evidence_kind":null,"shout_evidence_outcome":null,"shout_evidence_item":null,"shout_evidence_commit":null,"shout_request":0,"shout_request_outcome":""},{"shout_id":3,"shout_from":"coordinator","shout_to":"person","shout_text":"Passed up from app-1: The review is complete. May the verified change proceed?\nCoordinator note: The review passed; ask the person before proceeding.","shout_at":"2026-10-06T12:00:00.000Z","shout_decision":1,"shout_answers":2,"shout_evidence_kind":null,"shout_evidence_outcome":null,"shout_evidence_item":null,"shout_evidence_commit":null,"shout_request":0,"shout_request_outcome":""},{"shout_id":2,"shout_from":"app-1","shout_to":"coordinator","shout_text":"The review is complete. May the verified change proceed?","shout_at":"2026-10-06T12:00:00.000Z","shout_decision":1,"shout_answers":null,"shout_evidence_kind":null,"shout_evidence_outcome":null,"shout_evidence_item":null,"shout_evidence_commit":null,"shout_request":0,"shout_request_outcome":""},{"shout_id":1,"shout_from":"review-1","shout_to":"coordinator","shout_text":"#1 passes the edge that failed before. The fix is in src/demo.js:1@8ddbacd4346ede1acbf801eede5de814799d3738.","shout_at":"2026-10-06T12:00:00.000Z","shout_decision":0,"shout_answers":null,"shout_evidence_kind":"receipt","shout_evidence_outcome":"edge passes","shout_evidence_item":1,"shout_evidence_commit":"8ddbacd4346ede1acbf801eede5de814799d3738","shout_request":0,"shout_request_outcome":""}],"decisions":[],"asked":[],"events":[{"event_id":29,"event_at":"2026-10-06T12:00:00.000Z","event_by":"coordinator","event_kind":"hold","item_id":null,"event_detail":"{\"lane\":\"review\",\"reason\":\"Waiting for the next demo item.\",\"model\":\"unknown\"}"},{"event_id":28,"event_at":"2026-10-06T12:00:00.000Z","event_by":"coordinator","event_kind":"shout","item_id":null,"event_detail":"{\"shout\":6,\"to\":\"app-1\",\"decision\":false,\"request\":false,\"answers\":null,\"model\":\"unknown\"}"},{"event_id":27,"event_at":"2026-10-06T12:00:00.000Z","event_by":"person","event_kind":"answer","item_id":null,"event_detail":"{\"shout\":5,\"to\":\"app-1\",\"decision\":false,\"request\":false,\"answers\":2,\"channel\":\"terminal\"}"},{"event_id":26,"event_at":"2026-10-06T12:00:00.000Z","event_by":"person","event_kind":"answer","item_id":null,"event_detail":"{\"shout\":4,\"to\":\"coordinator\",\"decision\":false,\"request\":false,\"answers\":3,\"channel\":\"terminal\"}"},{"event_id":25,"event_at":"2026-10-06T12:00:00.000Z","event_by":"coordinator","event_kind":"pass","item_id":null,"event_detail":"{\"shout\":3,\"to\":\"person\",\"decision\":true,\"request\":false,\"answers\":2,\"model\":\"unknown\"}"},{"event_id":24,"event_at":"2026-10-06T12:00:00.000Z","event_by":"app-1","event_kind":"shout","item_id":null,"event_detail":"{\"shout\":2,\"to\":\"coordinator\",\"decision\":true,\"request\":false,\"answers\":null,\"model\":\"Demo builder\"}"},{"event_id":23,"event_at":"2026-10-06T12:00:00.000Z","event_by":"review-1","event_kind":"shout","item_id":null,"event_detail":"{\"shout\":1,\"to\":\"coordinator\",\"decision\":false,\"request\":false,\"answers\":null,\"model\":\"Demo reviewer\"}"},{"event_id":22,"event_at":"2026-10-06T12:00:00.000Z","event_by":"app-1","event_kind":"claim","item_id":4,"event_detail":"{\"leaseUntil\":\"2026-10-06T14:00:00.000Z\",\"digest\":\"c8d8817a23dda32335dac8ea89bca6759cac5340946822f87d40cfa9a2f58425\",\"model\":\"Demo builder\"}"},{"event_id":21,"event_at":"2026-10-06T12:00:00.000Z","event_by":"app-1","event_kind":"submit","item_id":3,"event_detail":"{\"commit\":\"4c04a8bd69ae9a7b63754bd010ed85908d8f3472\",\"tree\":\"2f67d5e38c1618b2c5a744b7099ccbc24e26d9ec\",\"policyCommit\":\"8ddbacd4346ede1acbf801eede5de814799d3738\",\"model\":\"Demo builder\"}"},{"event_id":20,"event_at":"2026-10-06T12:00:00.000Z","event_by":"app-1","event_kind":"claim","item_id":3,"event_detail":"{\"leaseUntil\":\"2026-10-06T14:00:00.000Z\",\"digest\":\"1c3f00403511133a16740979665d935519bc3fb4112bfe555456326fa7d3c3f8\",\"model\":\"Demo builder\"}"},{"event_id":19,"event_at":"2026-10-06T12:00:00.000Z","event_by":"coordinator","event_kind":"merged","item_id":1,"event_detail":"{\"commit\":\"8ddbacd4346ede1acbf801eede5de814799d3738\",\"model\":\"unknown\"}"},{"event_id":18,"event_at":"2026-10-06T12:00:00.000Z","event_by":"review-1","event_kind":"accept","item_id":1,"event_detail":"{\"reason\":\"CRITERION_MET\",\"commit\":\"8ddbacd4346ede1acbf801eede5de814799d3738\",\"check\":\"none\",\"model\":\"Demo reviewer\"}"},{"event_id":17,"event_at":"2026-10-06T12:00:00.000Z","event_by":"app-1","event_kind":"submit","item_id":1,"event_detail":"{\"commit\":\"8ddbacd4346ede1acbf801eede5de814799d3738\",\"tree\":\"2bfec03780ab37641c641dea5d4dda497215cd30\",\"policyCommit\":\"ba1ece80351bbea14e9882f3ee928fa3fab9f7ae\",\"model\":\"Demo builder\"}"},{"event_id":16,"event_at":"2026-10-06T12:00:00.000Z","event_by":"app-1","event_kind":"claim","item_id":1,"event_detail":"{\"leaseUntil\":\"2026-10-06T14:00:00.000Z\",\"digest\":\"8b60e493995b7966a529dd9b70fcb2724d8de18802faa26252b0dfbea4ded72d\",\"model\":\"Demo builder\"}"},{"event_id":15,"event_at":"2026-10-06T12:00:00.000Z","event_by":"review-1","event_kind":"reject","item_id":1,"event_detail":"{\"reason\":\"BEHAVIOR_MISMATCH\",\"commit\":\"e555696eb67bd417e6fe38b177c46b9ca0855598\",\"model\":\"Demo reviewer\"}"},{"event_id":14,"event_at":"2026-10-06T12:00:00.000Z","event_by":"app-1","event_kind":"submit","item_id":1,"event_detail":"{\"commit\":\"e555696eb67bd417e6fe38b177c46b9ca0855598\",\"tree\":\"00375991105c170844ccec1e908833d30dea44b2\",\"policyCommit\":\"ba1ece80351bbea14e9882f3ee928fa3fab9f7ae\",\"model\":\"Demo builder\"}"},{"event_id":13,"event_at":"2026-10-06T12:00:00.000Z","event_by":"app-1","event_kind":"claim","item_id":1,"event_detail":"{\"leaseUntil\":\"2026-10-06T14:00:00.000Z\",\"digest\":\"8b60e493995b7966a529dd9b70fcb2724d8de18802faa26252b0dfbea4ded72d\",\"model\":\"Demo builder\"}"},{"event_id":12,"event_at":"2026-10-06T12:00:00.000Z","event_by":"review-1","event_kind":"family","item_id":null,"event_detail":"{\"family\":\"claude\",\"model\":\"Demo reviewer\"}"},{"event_id":11,"event_at":"2026-10-06T12:00:00.000Z","event_by":"review-1","event_kind":"join","item_id":null,"event_detail":"{\"lane\":\"review\",\"model\":\"Demo reviewer\"}"},{"event_id":10,"event_at":"2026-10-06T12:00:00.000Z","event_by":"app-1","event_kind":"family","item_id":null,"event_detail":"{\"family\":\"codex\",\"model\":\"Demo builder\"}"},{"event_id":9,"event_at":"2026-10-06T12:00:00.000Z","event_by":"app-1","event_kind":"join","item_id":null,"event_detail":"{\"lane\":\"app\",\"model\":\"Demo builder\"}"},{"event_id":8,"event_at":"2026-10-06T12:00:00.000Z","event_by":"coordinator","event_kind":"withdraw","item_id":6,"event_detail":"{\"reason\":\"this example was dropped\",\"model\":\"unknown\"}"},{"event_id":7,"event_at":"2026-10-06T12:00:00.000Z","event_by":"coordinator","event_kind":"add","item_id":6,"event_detail":"{\"lane\":\"app\",\"specIds\":[\"G1\"],\"after\":[],\"route\":\"strong\",\"model\":\"unknown\"}"},{"event_id":6,"event_at":"2026-10-06T12:00:00.000Z","event_by":"coordinator","event_kind":"add","item_id":5,"event_detail":"{\"lane\":\"app\",\"specIds\":[\"G1\"],\"after\":[],\"route\":\"strong\",\"model\":\"unknown\"}"},{"event_id":5,"event_at":"2026-10-06T12:00:00.000Z","event_by":"coordinator","event_kind":"add","item_id":4,"event_detail":"{\"lane\":\"app\",\"specIds\":[\"G1\"],\"after\":[],\"route\":\"strong\",\"model\":\"unknown\"}"},{"event_id":4,"event_at":"2026-10-06T12:00:00.000Z","event_by":"coordinator","event_kind":"add","item_id":3,"event_detail":"{\"lane\":\"app\",\"specIds\":[\"G1\"],\"after\":[],\"route\":\"strong\",\"model\":\"unknown\"}"},{"event_id":3,"event_at":"2026-10-06T12:00:00.000Z","event_by":"coordinator","event_kind":"add","item_id":2,"event_detail":"{\"lane\":\"app\",\"specIds\":[\"G1\"],\"after\":[],\"route\":\"strong\",\"model\":\"unknown\"}"},{"event_id":2,"event_at":"2026-10-06T12:00:00.000Z","event_by":"coordinator","event_kind":"add","item_id":1,"event_detail":"{\"lane\":\"app\",\"specIds\":[\"G1\"],\"after\":[],\"route\":\"strong\",\"model\":\"unknown\"}"},{"event_id":1,"event_at":"2026-10-06T12:00:00.000Z","event_by":"coordinator","event_kind":"join","item_id":null,"event_detail":"{\"lane\":\"coordinator\",\"model\":\"unknown\"}"}],"agents":[{"agent_id":"coordinator","agent_lane":"coordinator","agent_path":"demo-board","agent_last_shout_id":4,"agent_route":"strong","agent_family":null,"agent_created_at":"2026-10-06T12:00:00.000Z","agent_model":null,"model":"unknown","displayName":"coordinator (unknown)","lastMoveAt":"2026-10-06T12:00:00.000Z"},{"agent_id":"app-1","agent_lane":"app","agent_path":"../demo-board-app-1","agent_last_shout_id":5,"agent_route":"strong","agent_family":"codex","agent_created_at":"2026-10-06T12:00:00.000Z","agent_model":"Demo builder","model":"Demo builder","displayName":"app-1 (Demo builder)","lastMoveAt":"2026-10-06T12:00:00.000Z"},{"agent_id":"review-1","agent_lane":"review","agent_path":"../demo-board-review-1","agent_last_shout_id":0,"agent_route":"strong","agent_family":"claude","agent_created_at":"2026-10-06T12:00:00.000Z","agent_model":"Demo reviewer","model":"Demo reviewer","displayName":"review-1 (Demo reviewer)","lastMoveAt":"2026-10-06T12:00:00.000Z"}],"holds":[{"hold_lane":"review","hold_reason":"Waiting for the next demo item.","hold_by":"coordinator","hold_at":"2026-10-06T12:00:00.000Z"}],"spec":[{"id":"G1","status":"approved","tier":"must","text":"A demo item exists to show the board.","gate":"none","serves":[],"section":"G · Goals","added":1},{"id":"G2","status":"approved","tier":"must","text":"The verified item shows its review history.","gate":"none","serves":[],"section":"G · Goals","added":1}],"practice":[{"id":"PB1","status":"approved","tier":"must","text":"Ask, don't guess: a decision only the person can make waits for them.","gate":"review","serves":[],"section":"Rules","origin":"standard","version":1,"reason":"","added":null},{"id":"PB2","status":"approved","tier":"must","text":"Destructive or irreversible actions wait for the person's OK.","gate":"review","serves":[],"section":"Rules","origin":"standard","version":1,"reason":"","added":null},{"id":"PB3","status":"approved","tier":"must","text":"Claims come with evidence: say what ran and what it showed, never \"should work\".","gate":"review","serves":[],"section":"Rules","origin":"standard","version":1,"reason":"","added":null},{"id":"PB4","status":"approved","tier":"must","text":"A test must be able to fail: see it fail on broken code before trusting it.","gate":"review","serves":[],"section":"Rules","origin":"standard","version":1,"reason":"","added":null},{"id":"PB5","status":"approved","tier":"must","text":"Never weaken a test or a check to make it pass; fix the code.","gate":"review","serves":[],"section":"Rules","origin":"standard","version":1,"reason":"","added":null},{"id":"PB6","status":"approved","tier":"must","text":"Tests pass before a change merges.","gate":"the project's gate","serves":[],"section":"Rules","origin":"standard","version":1,"reason":"","added":null},{"id":"PB7","status":"pending","tier":"aim","text":"Tests touch nothing outside a temporary sandbox.","gate":"review","serves":[],"section":"Rules","origin":"standard","version":1,"reason":"","added":null},{"id":"PB8","status":"approved","tier":"must","text":"No secrets or sensitive info in the repo; test data is synthetic.","gate":"review","serves":[],"section":"Rules","origin":"standard","version":1,"reason":"","added":null},{"id":"PB9","status":"approved","tier":"must","text":"Headers: type(scope): subject [ids], 72 characters at most. A body only for a non-obvious why, three sentences at most.","gate":"commit-msg hook, review","serves":[],"section":"Rules","origin":"standard","version":1,"reason":"","added":null},{"id":"PB10","status":"approved","tier":"must","text":"Comments explain why, not what; no commented-out code.","gate":"review","serves":[],"section":"Rules","origin":"standard","version":1,"reason":"","added":null},{"id":"PB11","status":"approved","tier":"must","text":"A new dependency states why it is needed and what it pulls in.","gate":"review","serves":[],"section":"Rules","origin":"standard","version":1,"reason":"","added":null},{"id":"PB12","status":"approved","tier":"must","text":"Questions go on the board, one step up the chain, and the asker keeps working on what it can meanwhile.","gate":"review","serves":[],"section":"Rules","origin":"standard","version":1,"reason":"","added":null}],"unseen":null,"products":[],"board":"demo-board","proofStats":{"since":null,"submissions":3,"rejections":1,"rejectionShare":0.3333333333333333,"merged":1,"mergedWithoutAccept":0,"firstEventAt":"2026-10-06T12:00:00.000Z","lastEventAt":"2026-10-06T12:00:00.000Z","agentCount":3,"familyCount":3,"agents":[{"id":"app-1","moves":10,"families":["codex","unknown"]},{"id":"coordinator","moves":12,"families":["unknown"]},{"id":"review-1","moves":5,"families":["claude","unknown"]}],"families":[{"name":"claude","agents":1,"moves":4},{"name":"codex","agents":1,"moves":9},{"name":"unknown","agents":3,"moves":14}],"flow":{"asOf":"2026-10-06T12:00:00.000Z","stages":{"build":{"count":2,"totalMinutes":0,"averageMinutes":0,"medianMinutes":0,"unmeasuredCompleted":0},"reviewWait":{"count":0,"totalMinutes":0,"averageMinutes":null,"medianMinutes":null,"unmeasuredCompleted":1},"review":{"count":0,"totalMinutes":0,"averageMinutes":null,"medianMinutes":null,"unmeasuredCompleted":1},"mergeWait":{"count":1,"totalMinutes":0,"averageMinutes":0,"medianMinutes":0,"unmeasuredCompleted":0}},"queues":{"open":{"size":2,"oldest":{"id":2,"since":"2026-10-06T12:00:00.000Z","ageMinutes":0}},"claimed":{"size":1,"oldest":{"id":4,"since":"2026-10-06T12:00:00.000Z","ageMinutes":0}},"submitted":{"size":1,"oldest":{"id":3,"since":"2026-10-06T12:00:00.000Z","ageMinutes":0}},"accepted":{"size":0,"oldest":null}},"unreviewed":{"size":1,"oldest":{"id":3,"since":"2026-10-06T12:00:00.000Z","ageMinutes":0}},"daily":[{"date":"2026-10-06","added":6,"merged":1}],"submitsPerMerged":3,"activeAgents":{"total":3,"agents":[{"id":"app-1","lane":"app","role":"builder"},{"id":"coordinator","lane":"coordinator","role":"coordinator"},{"id":"review-1","lane":"review","role":"verifier"}],"roles":{"builder":1,"verifier":1,"coordinator":1,"unknown":0},"lanes":{"app":1,"coordinator":1,"review":1}},"bottleneck":{"stage":null,"share":null,"completedItems":1,"fullyMeasuredCycles":0,"totalCycleMinutes":0,"lowConfidence":true,"message":"not enough measured flow to name a bottleneck (1 items completed since the beginning, none with every stage measured)","recommendation":null}}},"requests":[],"personRequests":[],"milestones":[]},"eventLogVersion":1}
diff --git a/docs/demo/index.html b/docs/demo/index.html
index 7bf159f7..12d78000 100644
--- a/docs/demo/index.html
+++ b/docs/demo/index.html
@@ -11,8 +11,8 @@
<div class="shell">
<aside class="side" id="side" aria-label="Projects">
<div class="side-top">
- <div class="brand"><svg viewBox="0 0 64 64" aria-hidden="true"><path fill="currentColor" d="M8 7h35a6 6 0 0 1 6 6v7H8a5 5 0 0 1-5-5v-3a5 5 0 0 1 5-5Z"/><rect width="56" height="14" x="3" y="25" fill="var(--accent)" rx="5"/><path fill="currentColor" d="M8 43h35a6 6 0 0 1 6 6v8H8a5 5 0 0 1-5-5v-4a5 5 0 0 1 5-5Z"/></svg><span>Pullboard</span></div>
- <button class="switch-btn" id="proj-switch" type="button" aria-expanded="false" aria-controls="side-body"><span id="proj-name">Projects</span><b class="need" id="proj-elsewhere" title="Needs you in other projects" hidden></b><small>▾</small></button>
+ <button class="brand" id="side-toggle" type="button" aria-pressed="false" aria-controls="side-body" aria-label="Collapse the project list" title="Collapse the project list"><svg viewBox="0 0 64 64" aria-hidden="true"><path fill="currentColor" d="M8 7h35a6 6 0 0 1 6 6v7H8a5 5 0 0 1-5-5v-3a5 5 0 0 1 5-5Z"/><rect width="56" height="14" x="3" y="25" fill="var(--accent)" rx="5"/><path fill="currentColor" d="M8 43h35a6 6 0 0 1 6 6v8H8a5 5 0 0 1-5-5v-4a5 5 0 0 1 5-5Z"/></svg><span>Pullboard</span></button>
+ <button class="switch-btn" id="proj-switch" type="button" aria-expanded="false" aria-controls="side-body"><span id="proj-name">Projects</span><small aria-hidden="true"><svg viewBox="0 0 16 16"><path d="M4 6l4 4 4-4" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/></svg></small></button>
<button class="theme-btn" id="theme" type="button" title="Theme: system"><svg class="sys" viewBox="0 0 16 16" aria-hidden="true"><circle cx="8" cy="8" r="6" fill="none" stroke="currentColor" stroke-width="1.5"/><path fill="currentColor" d="M8 2a6 6 0 0 1 0 12Z"/></svg><svg class="sun" viewBox="0 0 16 16" aria-hidden="true"><circle cx="8" cy="8" r="3" fill="none" stroke="currentColor" stroke-width="1.5"/><path fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" d="M8 1.5v1.2M8 13.3v1.2M1.5 8h1.2M13.3 8h1.2M3.4 3.4l.85.85M11.75 11.75l.85.85M3.4 12.6l.85-.85M11.75 4.25l.85-.85"/></svg><svg class="moon" viewBox="0 0 16 16" aria-hidden="true"><path fill="none" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round" d="M13.6 9.6A6 6 0 1 1 6.4 2.4a5.2 5.2 0 0 0 7.2 7.2Z"/></svg></button>
</div>
<div class="side-body" id="side-body">
@@ -24,14 +24,14 @@
<div class="body">
<header class="top">
<nav class="tabs" id="tabs" aria-label="Board">
- <button class="tab" data-tab="items" type="button">Items<b id="count-items"></b></button>
- <button class="tab" data-tab="shouts" type="button">Shouts<b id="count-shouts"></b></button>
- <button class="tab" data-tab="spec" type="button">Spec<b id="count-spec"></b></button>
- <button class="tab" data-tab="doctrine" type="button">Doctrine<b id="count-doctrine"></b></button>
+ <button class="tab" data-tab="items" type="button">Items</button>
+ <button class="tab" data-tab="shouts" type="button">Shouts</button>
+ <button class="tab" data-tab="spec" type="button">Spec</button>
+ <button class="tab" data-tab="doctrine" type="button">Doctrine</button>
<button class="tab" data-tab="activity" type="button">Activity</button>
<button class="tab" data-tab="roadmap" type="button">Roadmap</button>
</nav>
- <span class="live" id="live"></span>
+ <div class="top-find"><input id="q" type="search" placeholder="Search" aria-label="Search items, Spec, Doctrine and shouts" autocomplete="off"><div class="find-results" id="find-results" role="listbox" aria-label="Search results" hidden></div></div>
</header>
<main>
<section class="card-panel first">
@@ -49,11 +49,12 @@
<section class="card-panel group-panel"><h2>Needs you</h2><div id="group-needs"></div></section>
<section class="card-panel group-panel"><h2>Activity</h2><div class="feed" id="group-activity"></div></section>
</section>
+ <section class="card-panel person-requests" id="person-requests" aria-label="Your requests" aria-live="polite" hidden></section>
<section data-pane="items" class="two">
<div class="primary">
- <div class="card-panel toolbar"><div class="seg" id="state-chips" role="group" aria-label="Show"></div><input id="q" type="search" placeholder="Search" aria-label="Search titles, lanes or ids"><button class="go" id="new-item" type="button">New item</button></div>
- <section class="needs-you" id="needs" aria-label="What needs you" hidden></section>
- <ol class="card-panel chain" id="chain" aria-label="Items"></ol>
+ <section class="card-panel proof-stats" id="proof-stats" aria-label="Board proof stats" hidden></section>
+ <div class="card-panel toolbar"><div class="seg" id="state-chips" role="group" aria-label="Show"></div><select class="lane-pick" id="lane-pick" aria-label="Lane"></select><button class="go" id="new-item" type="button">New item</button></div>
+ <div class="card-panel list-card"><ol class="needs" id="needs" aria-label="What needs you" hidden></ol><ol class="chain" id="chain" aria-label="Items"></ol></div>
</div>
<aside class="card-panel detail" aria-label="Item detail">
<div id="detail"></div>
@@ -68,24 +69,22 @@
</form>
</aside>
</section>
- <section data-pane="shouts" class="two narrow">
+ <section data-pane="shouts" class="two narrow" id="shouts-pane">
<div class="primary">
- <section class="needs-you" id="decisions" aria-label="Decisions needed" hidden></section>
- <form id="shout-form" class="card-panel inline"><p class="answering" id="answering" hidden><span>Answering <b id="answering-who"></b>: <span id="answering-q"></span></span><button class="ghost" id="answer-cancel" type="button">Cancel</button></p><label>To<input id="shout-to" list="shout-targets" required placeholder="all, a lane or an agent"></label><datalist id="shout-targets"></datalist><label class="wide">Message<input id="shout-text" required></label><button class="go" id="shout-send" type="submit">Shout</button></form>
- <div class="card-panel feed" id="feed"></div>
+ <div class="card-panel shouts-card"><form id="shout-form" class="shout-form"><p class="answering" id="answering" hidden><span>Answering <b id="answering-who"></b>: <span id="answering-q"></span></span><button class="ghost" id="answer-cancel" type="button">Cancel</button></p><div class="composer"><input id="shout-to" type="hidden" value="coordinator"><span class="to-chip" id="shout-to-chip" hidden></span><textarea id="shout-text" required rows="1" placeholder="Shout to the coordinator" aria-label="Message"></textarea><button class="send" id="shout-send" type="submit" aria-label="Shout" title="Shout (Enter; Shift+Enter for a new line)"><svg viewBox="0 0 16 16" aria-hidden="true"><path fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" d="M8 13V3M3.5 7.5 8 3l4.5 4.5"/></svg></button></div><span class="asks-slot" id="asks-slot"></span></form><section class="needs-you" id="decisions" aria-label="Decisions needed" hidden></section><div class="feed" id="feed"></div></div>
</div>
<aside class="card-panel detail" aria-label="Agents and lanes">
- <div><h3>Agents</h3><div id="agents"></div></div>
+ <div><h3 class="panel-head">Agents<button class="link" data-agents-toggle type="button">hide</button></h3><div id="agents"></div><section id="credentials" aria-label="Agent credentials"></section></div>
<div><h3>Lanes</h3><div id="lanes"></div></div>
<form id="hold-form" class="panel-form"><label>Hold a lane<select id="hold-lane"></select></label><label>Why<input id="hold-reason" required placeholder="What its agents should wait for"></label><button class="go" type="submit">Hold lane</button></form>
</aside>
</section>
<section data-pane="spec" class="two">
- <div class="primary"><div class="chips" id="spec-chips"></div><div class="card-panel rows" id="spec-list"></div></div>
+ <div class="primary"><div class="card-panel rows-card"><div class="rows-filter"><div class="seg" id="spec-chips" role="group" aria-label="Show"></div></div><div class="rows" id="spec-list" tabindex="0" aria-label="Spec rows"></div></div></div>
<aside class="card-panel detail" aria-label="Spec row"><div id="spec-detail"></div></aside>
</section>
<section data-pane="doctrine" class="two">
- <div class="primary"><div class="chips" id="doctrine-chips"></div><div class="card-panel rows" id="doctrine-list"></div></div>
+ <div class="primary"><div class="card-panel rows-card"><div class="rows-filter"><div class="seg" id="doctrine-chips" role="group" aria-label="Show"></div></div><div class="rows" id="doctrine-list" tabindex="0" aria-label="Doctrine rows"></div></div></div>
<aside class="card-panel detail" aria-label="Practice row"><div id="doctrine-detail"></div></aside>
</section>
<section data-pane="activity">
@@ -97,10 +96,19 @@
</main>
</div>
</div>
+<footer class="status snap" aria-label="Board status"><span class="live" id="live"></span><span class="status-board" id="status-board"></span></footer>
+<div class="spec-reason-backdrop" id="spec-decline-dialog" hidden>
+ <form class="spec-reason-dialog" id="spec-decline-form" aria-labelledby="spec-decline-title">
+ <h2 id="spec-decline-title">Decline spec row</h2>
+ <label>Reason<input id="spec-decline-reason" required maxlength="240" placeholder="Why this row needs changes"></label>
+ <div class="actions"><button class="go" id="spec-decline-submit" type="submit">Decline row</button><button class="ghost" id="spec-decline-cancel" type="button">Cancel</button></div>
+ </form>
+</div>
<div class="console" id="console" title="Click to close" hidden></div>
<script>
const snapshot = true;
const readOnly = false;
+const requests = false;
const transportModule = null;
const connection = {"base":"","headers":{"x-pullboard-key":""}};
let transport = null;
@@ -120,22 +128,45 @@ function homeTab() {
const kept = keep('pb.tab');
return kept && kept !== 'roadmap' ? kept : 'items';
}
-const view = { root: keep('pb.project'), tab: addressTab() || homeTab(), seen: {}, code: {}, item: null, adding: false, state: 'active', rows: { spec: 'decide', doctrine: 'all' }, row: { spec: null, doctrine: null } };
+const view = { root: keep('pb.project'), tab: addressTab() || homeTab(), seen: {}, code: {}, item: null, adding: false, declining: null, state: 'active', rows: { spec: 'decide', doctrine: 'all' }, row: { spec: null, doctrine: null }, agent: null, allAgents: false, agentsHidden: keep('pb.agents') === 'hidden', open: {} };
if (snapshot) view.state = 'all';
let data = null;
let seen = '';
const $ = (id) => document.getElementById(id);
/**
- * Draw the page in the theme the person picked: light or dark, or anything else to follow the system.
- * The tokens hold both values, so only the scheme they answer to changes.
+ * Draw the page in the theme the person picked, light or dark; with none picked it follows the system, live. The button
+ * only ever offers the other of the two: it shows the scheme on screen, and a press picks the opposite. Following the
+ * system again waits for a settings page. The tokens hold both values, so only the scheme they answer to changes.
*/
function theme(pick) {
if (pick === 'light' || pick === 'dark') document.documentElement.dataset.theme = pick;
else delete document.documentElement.dataset.theme;
- $('theme').title = 'Theme: ' + (document.documentElement.dataset.theme || 'system');
+ const now = document.documentElement.dataset.theme || (matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light');
+ document.documentElement.dataset.scheme = now;
+ $('theme').title = now === 'dark' ? 'Dark theme: switch to light' : 'Light theme: switch to dark';
+ $('theme').setAttribute('aria-label', $('theme').title);
}
theme(keep('pb.theme'));
+matchMedia('(prefers-color-scheme: dark)').addEventListener?.('change', () => theme(keep('pb.theme')));
+/** Collapse the sidebar into the tab bar on a wide screen, or bring it back, as the person last chose. */
+function collapseSide(collapsed) {
+ if (collapsed) document.documentElement.dataset.side = 'collapsed';
+ else delete document.documentElement.dataset.side;
+ $('side-toggle').setAttribute('aria-pressed', String(collapsed));
+ $('side-toggle').title = collapsed ? 'Show the project list' : 'Collapse the project list';
+ $('side-toggle').setAttribute('aria-label', $('side-toggle').title);
+}
+collapseSide(keep('pb.side') === 'collapsed');
const esc = (text) => String(text ?? '').replace(/[&<>"']/g, (c) => ({ '&': '&amp;', '<': '&lt;', '>': '&gt;', '"': '&quot;', "'": '&#39;' })[c]);
+// Inline code: a short chip stays whole on its line; one wider than a phone line's worth may wrap. Width
+// is in columns, as a terminal counts them: CJK, full-width and emoji characters take two.
+const wideChar = (c) => { const p = c.codePointAt(0); return (p >= 0x1100 && p <= 0x115f) || (p >= 0x2e80 && p <= 0xa4cf) || (p >= 0xac00 && p <= 0xd7a3) || (p >= 0xf900 && p <= 0xfaff) || (p >= 0xfe30 && p <= 0xfe4f) || (p >= 0xff00 && p <= 0xff60) || (p >= 0xffe0 && p <= 0xffe6) || (p >= 0x1f300 && p <= 0x1faff) || (p >= 0x20000 && p <= 0x3fffd); };
+const columns = (text) => [...String(text)].reduce((n, c) => n + (wideChar(c) ? 2 : 1), 0);
+const codeChip = (text, kind = '') => kind === 'sha' && String(text).length > 10
+ ? '<code class="inline sha" title="' + esc(text) + '">' + esc(String(text).slice(0, 10)) + '</code>'
+ : '<code class="inline' + (kind ? ' ' + kind : '') + (columns(text) > 24 ? ' long" title="' + esc(text) : '') + '">' + esc(text) + '</code>';
+// An age said in words, as a shout's card shows it: now, 2m ago, 1h ago.
+const agoLong = (iso) => { const short = ago(iso); return short === 'now' ? 'now' : short + ' ago'; };
const ago = (iso) => { const m = Math.round((Date.now() - Date.parse(iso)) / 60000); return m < 1 ? 'now' : m < 60 ? m + 'm' : m < 2880 ? Math.round(m / 60) + 'h' : Math.round(m / 1440) + 'd'; };
// An age as the page shows it: the moment it counts from stays on it, so tickAges can move it on.
const age = (iso) => '<time data-ago="' + esc(iso) + '">' + ago(iso) + '</time>';
@@ -150,28 +181,146 @@ const dayName = (iso) => {
};
// A feed's rows, newest first, with the day named above each run of rows from the same day.
const byDay = (rows, at, row) => rows.map((x, i) => (i && new Date(at(x)).toDateString() === new Date(at(rows[i - 1])).toDateString() ? '' : '<h4 class="day">' + dayName(at(x)) + '</h4>') + row(x)).join('');
+// Where the shouts cross into an earlier day, a rule names it in the middle; today needs no label at the top.
+const dayRules = (rows, at, row) => rows.map((x, i) => {
+ const day = new Date(at(x)).toDateString(), before = i ? new Date(at(rows[i - 1])).toDateString() : new Date().toDateString();
+ return (day === before ? '' : '<div class="day-rule" role="separator"><span>' + dayName(at(x)) + '</span></div>') + row(x);
+}).join('');
const firstLine = (text) => String(text ?? '').split('\n').map((line) => line.trim()).find(Boolean) || '';
// The latest verdict is a reject and no accept followed: open again, being reworked, resubmitted, or
// withdrawn after it.
const rejected = (i) => i.status !== 'verified' && !!i.verdict && i.verdict.decision === 'REJECT';
+/** Resolve visible agent text from this board's API without changing action identities. */
+function agentName(id, project = data?.project) {
+ const agent = project?.agents?.find((entry) => entry.agent_id === id);
+ return agent?.displayName || (agent ? id + ' (' + (agent.model || agent.agent_model || 'unknown') + ')' : id);
+}
+/** Keep a shout address whole while its model can shorten, retaining the API name for assistive readers. */
+function shoutAgentName(id) {
+ const name = agentName(id);
+ if (name === id) return esc(id);
+ const prefix = name.endsWith('-' + id);
+ const model = prefix ? name.slice(0, -id.length) : name.slice(id.length);
+ const address = '<span class="agent-id">' + esc(id) + '</span>';
+ const label = '<span class="agent-model">' + esc(model) + '</span>';
+ return '<span class="agent-label' + (prefix ? ' prefix' : '') + '" title="' + esc(name) + '" role="group" aria-label="' + esc(name) + '">' + (prefix ? label + address : address + label) + '</span>';
+}
/** Render a review note with escaped text and references bound to the selected board. */
-const verdictHtml = (v, titles) => '<div class="verdict ' + (v.decision === 'ACCEPT' ? 'yes' : 'no') + '"><b>' + esc(v.decision) + ' ' + esc(v.reason) + '</b><span class="by">' + esc(v.by) + ' · ' + when(v.at) + ' · at ' + esc(String(v.commit || '').slice(0, 12)) + '</span><div class="note">' + linked(v.note, titles) + '</div></div>';
+const verdictHtml = (v, titles) => '<div class="verdict ' + (v.decision === 'ACCEPT' ? 'yes' : 'no') + '"><b>' + esc(v.decision) + ' ' + esc(v.reason) + '</b><span class="by">' + esc(agentName(v.by)) + ' · ' + when(v.at) + ' · at ' + esc(String(v.commit || '').slice(0, 12)) + '</span><div class="note">' + linked(v.note, titles) + '</div></div>';
const stateOf = (i) => i.status === 'claimed' ? 'building' : i.status === 'submitted' ? 'verify' : i.status === 'verified' ? 'verified' : i.status === 'withdrawn' ? 'withdrawn' : i.verdict && i.verdict.decision === 'REJECT' ? 'back' : 'open';
-const STATES = { building: ['building', 'busy'], verify: ['to verify', 'warn'], back: ['sent back', 'no'], verified: ['verified', 'ok'], open: ['open', ''], withdrawn: ['withdrawn', ''] };
+const STATES = { building: ['building', 'busy'], verify: ['to verify', 'warn'], back: ['sent back', 'no'], verified: ['verified', 'ok'], open: ['unclaimed', 'free'], withdrawn: ['withdrawn', ''] };
const chip = (s) => '<span class="chip ' + STATES[s][1] + '">' + STATES[s][0] + '</span>';
-// A shout's path:lines@commit reference (B23): a button, and under it, once opened, that code as it
-// was at that commit, with its line numbers. The text before it on its line goes with it, so the view
-// can refuse a reference that text may make part of a longer path.
-const codeRef = (ref, before) => {
+/** Parse the bounded reference syntax before requesting additional committed line windows. */
+function codeReferenceParts(ref) {
+ const match = /^(.+):(\d+)(?:-(\d+))?@([0-9a-f]{7,40})$/.exec(String(ref));
+ if (!match) return null;
+ const from = Number(match[2]);
+ const to = Number(match[3] ?? match[2]);
+ return Number.isSafeInteger(from) && Number.isSafeInteger(to) && from > 0 && to >= from
+ ? { path: match[1], from, to, commit: match[4] } : null;
+}
+/**
+ * Escape and color a source line using a small language-neutral set of common code tokens. A block comment or a
+ * template string still open at the line's end is left in state.open, and the next line given the same state goes on
+ * inside it, so a comment or a string spanning lines is colored on every one of them.
+ */
+function highlightCodeLine(line, path, state = {}) {
+ const source = String(line);
+ const extension = String(path).split('.').at(-1).toLowerCase();
+ let output = '', i = 0;
+ if (state.open) {
+ let end = -1;
+ if (state.open === 'comment') { const at = source.indexOf('*/'); end = at < 0 ? -1 : at + 2; }
+ else for (let k = 0; k < source.length; k++) { if (source.charCodeAt(k) === 92) { k++; continue; } if (source.charCodeAt(k) === 96) { end = k + 1; break; } }
+ const kind = state.open === 'comment' ? 'tok-comment' : 'tok-string';
+ if (end < 0) return '<span class="' + kind + '">' + esc(source) + '</span>';
+ output = '<span class="' + kind + '">' + esc(source.slice(0, end)) + '</span>';
+ i = end;
+ state.open = null;
+ } else {
+ // A preview may start inside a block comment, so a line that reads as one is all comment, and so is a whole-line
+ // hash comment where the language has them: their apostrophes are words, not strings.
+ const lead = source.trimStart();
+ if (/^(?:\*\/|\*(?:\s|$))/.test(lead) || (['py', 'sh', 'yml', 'yaml', 'rb', 'toml'].includes(extension) && lead.startsWith('#'))) return '<span class="tok-comment">' + esc(source) + '</span>';
+ }
+ const keywords = new Set(['const', 'let', 'var', 'function', 'return', 'if', 'else', 'new', 'class', 'export', 'import', 'from', 'async', 'await', 'throw', 'try', 'catch', 'true', 'false', 'null', 'undefined']);
+ while (i < source.length) {
+ if (source.startsWith('//', i) || (extension === 'py' && source[i] === '#')) {
+ output += '<span class="tok-comment">' + esc(source.slice(i)) + '</span>';
+ break;
+ }
+ if (source.startsWith('/*', i)) {
+ const at = source.indexOf('*/', i + 2), end = at < 0 ? source.length : at + 2;
+ output += '<span class="tok-comment">' + esc(source.slice(i, end)) + '</span>';
+ if (at < 0) state.open = 'comment';
+ i = end;
+ continue;
+ }
+ const char = source[i];
+ if (char === '"' || char === "'" || char.charCodeAt(0) === 96) {
+ let end = i + 1, closed = false;
+ while (end < source.length) {
+ if (source.charCodeAt(end) === 92) { end += 2; continue; }
+ if (source[end++] === char) { closed = true; break; }
+ }
+ if (!closed && char.charCodeAt(0) === 96) state.open = 'template';
+ output += '<span class="tok-string">' + esc(source.slice(i, end)) + '</span>';
+ i = end;
+ continue;
+ }
+ const wordStart = (char >= 'A' && char <= 'Z') || (char >= 'a' && char <= 'z') || char === '_' || char === '$';
+ if (wordStart) {
+ let end = i + 1;
+ while (end < source.length && ((source[end] >= 'A' && source[end] <= 'Z') || (source[end] >= 'a' && source[end] <= 'z') || (source[end] >= '0' && source[end] <= '9') || source[end] === '_' || source[end] === '$')) end++;
+ const word = source.slice(i, end);
+ output += keywords.has(word) ? '<span class="tok-keyword">' + esc(word) + '</span>' : esc(word);
+ i = end;
+ continue;
+ }
+ if (char >= '0' && char <= '9') {
+ let end = i + 1;
+ while (end < source.length && ((source[end] >= '0' && source[end] <= '9') || source[end] === '.')) end++;
+ output += '<span class="tok-number">' + esc(source.slice(i, end)) + '</span>';
+ i = end;
+ continue;
+ }
+ output += esc(char);
+ i++;
+ }
+ return output;
+}
+// A shout or thread fact's path:lines@commit reference: keep only the reference in this button until
+// the person opens it. The text before a shout ref is retained so ambiguous paths can be refused.
+const codeRef = (ref, before, block = false) => {
const c = view.code[view.root + '\n' + before + '\n' + ref];
const open = Boolean(c && c.open);
- const shown = !open ? '' : c.error ? '<span class="code no">' + esc(c.error) + '</span>' : !c.lines ? '<span class="code more">loading…</span>'
- : '<span class="code">' + c.lines.map((line, n) => '<span><i>' + (c.from + n) + '</i>' + esc(line) + '</span>').join('') + (c.more ? '<span class="more">the first ' + c.lines.length + ' lines</span>' : '') + '</span>';
- return '<button class="ref" data-code="' + esc(ref) + '"' + (before ? ' data-before="' + esc(before) + '"' : '') + ' type="button" aria-expanded="' + open + '">' + esc(ref) + '</button>' + shown;
+ const shownLines = c?.all ? c.allLines : c?.lines, carry = {};
+ const shown = !open ? '' : c.error ? '<span class="code no" role="status">' + esc(c.error) + '</span>' : !shownLines ? '<span class="code more">loading…</span>'
+ : '<div class="code-wrap"><pre class="code">' + shownLines.map((line, n) => '<span><i>' + (c.from + n) + '</i>' + highlightCodeLine(line, c.path, carry) + '</span>').join('') + '</pre>'
+ + (c.more && !c.all ? '<button class="code-control" data-code-all="' + esc(ref) + '"' + (before ? ' data-before="' + esc(before) + '"' : '') + ' type="button"' + (c.allLoading ? ' disabled' : '') + '>' + (c.allLoading ? 'loading all lines…' : 'show all lines') + '</button>' : '')
+ + (c.all ? '<button class="code-control" data-code-less="' + esc(ref) + '"' + (before ? ' data-before="' + esc(before) + '"' : '') + ' type="button">show less</button>' : '')
+ + '</div>';
+ // Its label is one piece: the path, cut short first where the line is narrow, then the lines and the commit's first
+ // ten characters; the whole reference is on hover.
+ const colon = ref.indexOf(':'), at = ref.lastIndexOf('@');
+ const label = '<span class="ref-path">' + esc(ref.slice(0, colon)) + '</span><span class="ref-at">' + esc(ref.slice(colon, at)) + '<span class="ref-sha">' + esc(ref.slice(at, at + 11)) + '</span></span>';
+ const button = (asBlock) => '<button class="ref' + (asBlock ? ' block' : '') + '" data-code="' + esc(ref) + '"' + (before ? ' data-before="' + esc(before) + '"' : '') + ' title="' + esc(ref) + '" aria-label="Open code reference ' + esc(ref) + '" type="button" aria-expanded="' + open + '">' + label + '</button>';
+ // A reference on a line of its own is a block, collapsed until asked: a caret, the path and lines, the short commit.
+ // One inside a sentence keeps its label, so the prose reads on, and opens that same block below it.
+ return block ? '<div class="code-ref' + (open ? ' open' : '') + '">' + button(true) + shown + '</div>'
+ : button(false) + (open ? '<div class="code-ref open">' + button(true) + shown + '</div>' : '');
};
+/** Format the API's structured fact binding as the live reference the code preview accepts. */
+function factCodeRef(ref) {
+ if (!ref || typeof ref !== 'object') return String(ref ?? '');
+ const lines = ref.start === ref.end ? String(ref.start) : ref.start + '-' + ref.end;
+ return ref.path + ':' + lines + '@' + ref.commit;
+}
const tone = (s) => s === 'approved' ? 'ok' : s === 'pending' ? 'no' : s === 'draft' ? 'warn' : '';
/** A doctrine rule's source, with a version only when it comes from the shipped standard. */
-const ruleSource = (row) => row.origin === 'standard' ? 'standard ' + row.version : 'repo';
+// Where a rule comes from, in words: Pullboard's standard rules, or this repo's own; the standard's version is on hover.
+const ruleSource = (row) => row.origin === 'standard' ? 'From Pullboard' : 'This repo';
+const ruleSourceTitle = (row) => row.origin === 'standard' ? 'Pullboard standard rules, version ' + row.version : 'Written in this repo';
const count = (n, one, many = one) => n + ' ' + (n === 1 ? one : many);
// What needs the person in a project, as its Needs-you list counts it: only the person's calls (B26),
// the decisions passed up to them, spec rows waiting for them, and held lanes, which only the main
@@ -182,14 +331,14 @@ const doing = (x) => [x.decisions && count(x.decisions, 'decision', 'decisions')
/** The person's calls in one repo, as its Needs-you panel shows them, reused by a combined project view. */
function projectNeeds(p) {
return [
- ...p.decisions.map((d) => ({ ref: d.shout_from, text: d.shout_text, what: 'decision', at: d.shout_at })),
- ...p.spec.filter((row) => row.status === 'pending').map((row) => ({ ref: row.id, text: row.text, what: 'answer in SPEC.md' })),
- ...p.holds.map((hold) => ({ ref: hold.hold_lane, text: hold.hold_reason, what: 'lane held by ' + hold.hold_by })),
- ...(p.spec.some((row) => row.status === 'draft') ? [{ ref: String(p.spec.filter((row) => row.status === 'draft').length), text: 'draft spec rows to approve or drop', what: 'review in SPEC.md', target: 'tab:spec' }] : []),
+ ...p.decisions.map((d) => ({ ref: agentName(d.shout_from, p), text: d.shout_text, what: 'decision', at: d.shout_at })),
+ ...p.spec.filter((row) => row.status === 'pending' && !row.decision).map((row) => ({ ref: row.id, text: row.text, what: 'answer in SPEC.md' })),
+ ...p.holds.map((hold) => ({ ref: hold.hold_lane, text: hold.hold_reason, what: 'lane held by ' + agentName(hold.hold_by, p) })),
+ ...(p.spec.some((row) => row.status === 'draft' && !row.decision) ? [{ ref: String(p.spec.filter((row) => row.status === 'draft' && !row.decision).length), text: 'draft spec rows to approve or drop', what: 'review in SPEC.md', target: 'tab:spec' }] : []),
];
}
// The item lifecycle as pullboard declares it in src/machine.js, embedded when the page is served.
-const FLOW = {"initial":"open","states":[{"id":"open","means":"waiting for a builder; claimable once what it waits on is verified","final":false,"entry":[]},{"id":"claimed","means":"an agent holds it under a lease, its criterion frozen","final":false,"entry":[]},{"id":"submitted","means":"built and gated green at a pinned commit, waiting for another agent","final":false,"entry":[]},{"id":"verified","means":"another agent accepted it at the submitted commit","final":true,"entry":["the caller's checkout contains the submitted commit","the caller did not build it","the criterion and the rows it cites read as they did at claim","an accept notes how it was proved"]},{"id":"withdrawn","means":"nobody should build it; the reason stays on it","final":true,"entry":["the caller is the coordinator","the move carries a note: what failed, what was tried, or why"]}],"moves":[{"verb":"claim","from":["open","claimed"],"to":"claimed","by":["agent","coordinator"],"how":"pullboard claim \u003cid>","checks":["the caller is the main checkout, or a worktree that joined a lane (NOT_JOINED)","the item exists (NO_ITEM)","the item is open or claimed (NOT_CLAIMABLE)","the item is in the caller's lane; the main checkout builds coordinator-lane items only (WRONG_LANE)","the caller's route covers the item's: light, then mid, then strong (ROUTE)","every item it waits on is verified (BLOCKED)","no other agent holds it under a live lease (HELD)","nobody holds its lane (LANE_HELD)","the caller holds no other live top-level claim, reworks of its own rejected items aside (ONE_CLAIM)","every row the item cites exists and is in force (UNKNOWN_SPEC)"]},{"verb":"release","from":["claimed"],"to":"open","by":["agent","coordinator"],"how":"pullboard release \u003cid>","checks":["the caller is the main checkout, or a worktree that joined a lane (NOT_JOINED)","the item exists (NO_ITEM)","the item is claimed (NOT_YOURS)","the caller holds the claim (NOT_YOURS)"]},{"verb":"lapse","from":["claimed"],"to":"open","by":["clock"],"how":"when its lease runs out","checks":[]},{"verb":"submit","from":["claimed"],"to":"submitted","by":["agent","coordinator"],"how":"pullboard submit \u003cid>","checks":["the caller is the main checkout, or a worktree that joined a lane (NOT_JOINED)","the item exists (NO_ITEM)","the item is claimed (NOT_YOURS)","the caller holds the claim (NOT_YOURS)","the criterion and the rows it cites read as they did at claim (CRITERIA_CHANGED)","the worktree has no uncommitted changes (DIRTY)","the worktree has no untracked files (UNTRACKED)","there is a commit to submit (NO_COMMIT)","the full claimed diff respects committed coordinator ownership (OUTSIDE_LANE)","the repo names a gate command (NO_GATE)","the gate, which submit runs itself every time, is green at HEAD (GATE_RED)","when the gate ends, HEAD and every tracked file are as they were when it started (MOVED_DURING_GATE)","every child item is verified or withdrawn (CHILDREN_OPEN)","a verifier has not already rejected this commit (HEAD_NOT_NEW)"]},{"verb":"reserve","from":["submitted"],"to":"submitted","by":["agent","coordinator"],"how":"pullboard next --verify","checks":["in the main checkout, the caller says it is the coordinator (MAIN_IS_COORDINATOR)","the caller is the main checkout, or a worktree that joined a lane (NOT_JOINED)","the item exists (NO_ITEM)","the item is submitted (NOT_SUBMITTED)","the caller did not build it (SELF_VERIFY)","the caller's route covers the item's: light, then mid, then strong (ROUTE)","the repo's verify policy lets the caller verify this lane's work (COORDINATOR_VERIFIES)","the builder and verifier have different declared families; an undeclared family counts as a match (O2_FAMILY_MATCH)","no other agent holds its review under a live lease (REVIEW_HELD)"]},{"verb":"accept","from":["submitted"],"to":"verified","by":["agent","coordinator"],"how":"pullboard verify \u003cid> accept --note \"...\"","checks":["in the main checkout, the caller says it is the coordinator (MAIN_IS_COORDINATOR)","the caller is the main checkout, or a worktree that joined a lane (NOT_JOINED)","the item exists (NO_ITEM)","the item is submitted (NOT_SUBMITTED)","the caller's checkout contains the submitted commit (NOT_AT_COMMIT)","the caller did not build it (SELF_VERIFY)","the caller's route covers the item's: light, then mid, then strong (ROUTE)","the repo's verify policy lets the caller verify this lane's work (COORDINATOR_VERIFIES)","the builder and verifier have different declared families; an undeclared family counts as a match (O2_FAMILY_MATCH)","no other agent holds its review under a live lease (REVIEW_HELD)","the criterion and the rows it cites read as they did at claim (CRITERIA_CHANGED)","an accept gives CRITERION_MET as its reason (BAD_REASON)","the frozen item check passes at the exact submitted commit (CHECK_RED)","an accept notes how it was proved (PROOF_REQUIRED)"]},{"verb":"reject","from":["submitted"],"to":"open","by":["agent","coordinator"],"how":"pullboard verify \u003cid> reject --reason CODE --note \"...\"","checks":["in the main checkout, the caller says it is the coordinator (MAIN_IS_COORDINATOR)","the caller is the main checkout, or a worktree that joined a lane (NOT_JOINED)","the item exists (NO_ITEM)","the item is submitted (NOT_SUBMITTED)","the caller's checkout contains the submitted commit (NOT_AT_COMMIT)","the caller did not build it (SELF_VERIFY)","the caller's route covers the item's: light, then mid, then strong (ROUTE)","the repo's verify policy lets the caller verify this lane's work (COORDINATOR_VERIFIES)","the builder and verifier have different declared families; an undeclared family counts as a match (O2_FAMILY_MATCH)","no other agent holds its review under a live lease (REVIEW_HELD)","the criterion and the rows it cites read as they did at claim (CRITERIA_CHANGED)","a reject names one of the reject reasons (BAD_REASON)","the move carries a note: what failed, what was tried, or why (NOTE_REQUIRED)"]},{"verb":"escalate","from":["open","claimed"],"to":"open","by":["agent","coordinator"],"how":"pullboard escalate \u003cid> --note \"...\"","checks":["the caller is the main checkout, or a worktree that joined a lane (NOT_JOINED)","the move carries a note: what failed, what was tried, or why (NOTE_REQUIRED)","the item exists (NO_ITEM)","the caller holds the item, or is the coordinator (NOT_YOURS)","the item is open or claimed (CLOSED)"]},{"verb":"refreeze","from":["open","claimed","submitted"],"to":"open","by":["coordinator"],"how":"pullboard refreeze \u003cid>","checks":["the caller is the main checkout, or a worktree that joined a lane (NOT_JOINED)","the caller is the coordinator (COORDINATOR_ONLY)","the item exists (NO_ITEM)","the item is open or claimed or submitted (CLOSED)","every row the item cites exists and is in force (UNKNOWN_SPEC)"]},{"verb":"withdraw","from":["open","claimed","submitted"],"to":"withdrawn","by":["coordinator"],"how":"pullboard withdraw \u003cid> \u003creason>","checks":["the caller is the main checkout, or a worktree that joined a lane (NOT_JOINED)","the caller is the coordinator (COORDINATOR_ONLY)","the move carries a note: what failed, what was tried, or why (NOTE_REQUIRED)","the item exists (NO_ITEM)","the item is open or claimed or submitted (CLOSED)"]}]};
+const FLOW = {"initial":"open","states":[{"id":"open","means":"waiting for a builder; claimable once what it waits on is verified","final":false,"entry":[]},{"id":"claimed","means":"an agent holds it under a lease, its criterion frozen","final":false,"entry":[]},{"id":"submitted","means":"built and gated green at a pinned commit, waiting for another agent","final":false,"entry":[]},{"id":"verified","means":"another agent accepted it at the submitted commit","final":true,"entry":["the caller's checkout contains the submitted commit","the caller did not build it","the criterion and the rows it cites read as they did at claim","an accept notes how it was proved"]},{"id":"withdrawn","means":"nobody should build it; the reason stays on it","final":true,"entry":["the caller is the coordinator","the move carries a note: what failed, what was tried, or why"]}],"moves":[{"verb":"claim","from":["open","claimed"],"to":"claimed","by":["agent","coordinator"],"how":"pullboard claim \u003cid>","checks":["the caller is the main checkout, or a worktree that joined a lane (NOT_JOINED)","the item exists (NO_ITEM)","the item is open or claimed (NOT_CLAIMABLE)","the coordinator has not put this item on hold (ITEM_HELD)","the item is in the caller's lane; the main checkout builds coordinator-lane items only (WRONG_LANE)","the caller's route covers the item's: light, then mid, then strong (ROUTE)","every item it waits on is verified (BLOCKED)","no other agent holds it under a live lease (HELD)","no coordinator correction to a claimed criterion or check is waiting to be frozen (PENDING_REFREEZE)","nobody holds its lane (LANE_HELD)","the caller holds no other live top-level claim, reworks of its own rejected items aside (ONE_CLAIM)","every row the item cites exists and is in force (UNKNOWN_SPEC)"]},{"verb":"release","from":["claimed"],"to":"open","by":["agent","coordinator"],"how":"pullboard release \u003cid>","checks":["the caller is the main checkout, or a worktree that joined a lane (NOT_JOINED)","the item exists (NO_ITEM)","the item is claimed (NOT_YOURS)","the caller holds the claim (NOT_YOURS)","a review release gives a nonempty one-line reason (NOTE_REQUIRED)"]},{"verb":"lapse","from":["claimed"],"to":"open","by":["clock"],"how":"when its lease runs out","checks":[]},{"verb":"submit","from":["claimed"],"to":"submitted","by":["agent","coordinator"],"how":"pullboard submit \u003cid>","checks":["the caller is the main checkout, or a worktree that joined a lane (NOT_JOINED)","the item exists (NO_ITEM)","the item is claimed (NOT_YOURS)","the caller holds the claim (NOT_YOURS)","no coordinator correction to a claimed criterion or check is waiting to be frozen (PENDING_REFREEZE)","the criterion and the rows it cites read as they did at claim (CRITERIA_CHANGED)","the worktree has no uncommitted changes (DIRTY)","the worktree has no untracked files (UNTRACKED)","there is a commit to submit (NO_COMMIT)","the full claimed diff respects committed coordinator ownership (OUTSIDE_LANE)","the candidate merges cleanly into the current primary branch without changing an index or worktree (MERGE_CONFLICT)","the candidate range contains no other item's unverified submitted commit (STACKED_ON_UNVERIFIED)","the repo names a gate command (NO_GATE)","the gate, which submit runs itself every time, is green at HEAD (GATE_RED)","when the gate ends, HEAD and every tracked file are as they were when it started (MOVED_DURING_GATE)","every child item is verified or withdrawn (CHILDREN_OPEN)","a verifier has not already rejected this commit (HEAD_NOT_NEW)"]},{"verb":"reserve","from":["submitted"],"to":"submitted","by":["agent","coordinator"],"how":"pullboard next --verify","checks":["in the main checkout, the caller says it is the coordinator (MAIN_IS_COORDINATOR)","the caller is the main checkout, or a worktree that joined a lane (NOT_JOINED)","the roadmap is readable when selecting the next review (MILESTONES_CORRUPT)","the item exists (NO_ITEM)","the item is submitted (NOT_SUBMITTED)","the reviewer has not released this submission within the past hour (REVIEW_COOLDOWN)","the caller did not build it (SELF_VERIFY)","the caller's route covers the item's: light, then mid, then strong (ROUTE)","the repo's verify policy lets the caller verify this lane's work (COORDINATOR_VERIFIES)","the builder and verifier have different declared families; an undeclared family counts as a match (O2_FAMILY_MATCH)","no other agent holds its review under a live lease (REVIEW_HELD)"]},{"verb":"accept","from":["submitted"],"to":"verified","by":["agent","coordinator"],"how":"pullboard verify \u003cid> accept --note \"...\"","checks":["in the main checkout, the caller says it is the coordinator (MAIN_IS_COORDINATOR)","the caller is the main checkout, or a worktree that joined a lane (NOT_JOINED)","the item exists (NO_ITEM)","the item is submitted (NOT_SUBMITTED)","the caller's checkout contains the submitted commit (NOT_AT_COMMIT)","the caller did not build it (SELF_VERIFY)","the caller's route covers the item's: light, then mid, then strong (ROUTE)","the repo's verify policy lets the caller verify this lane's work (COORDINATOR_VERIFIES)","the builder and verifier have different declared families; an undeclared family counts as a match (O2_FAMILY_MATCH)","no other agent holds its review under a live lease (REVIEW_HELD)","the criterion and the rows it cites read as they did at claim (CRITERIA_CHANGED)","an accept gives CRITERION_MET as its reason (BAD_REASON)","the candidate merges cleanly into the current primary branch without changing an index or worktree (MERGE_CONFLICT)","the candidate range contains no other item's unverified submitted commit (STACKED_ON_UNVERIFIED)","the frozen item check passes at the exact submitted commit (CHECK_RED)","an accept notes how it was proved (PROOF_REQUIRED)"]},{"verb":"reject","from":["submitted"],"to":"open","by":["agent","coordinator"],"how":"pullboard verify \u003cid> reject --reason CODE --note \"...\"","checks":["in the main checkout, the caller says it is the coordinator (MAIN_IS_COORDINATOR)","the caller is the main checkout, or a worktree that joined a lane (NOT_JOINED)","the item exists (NO_ITEM)","the item is submitted (NOT_SUBMITTED)","the caller's checkout contains the submitted commit (NOT_AT_COMMIT)","the caller did not build it (SELF_VERIFY)","the caller's route covers the item's: light, then mid, then strong (ROUTE)","the repo's verify policy lets the caller verify this lane's work (COORDINATOR_VERIFIES)","the builder and verifier have different declared families; an undeclared family counts as a match (O2_FAMILY_MATCH)","no other agent holds its review under a live lease (REVIEW_HELD)","the criterion and the rows it cites read as they did at claim (CRITERIA_CHANGED)","a reject names one of the reject reasons (BAD_REASON)","the move carries a note: what failed, what was tried, or why (NOTE_REQUIRED)"]},{"verb":"reopen","from":["submitted"],"to":"open","by":["coordinator"],"how":"pullboard reopen \u003cid> --note \"why\"","checks":["the caller is the main checkout, or a worktree that joined a lane (NOT_JOINED)","the item exists (NO_ITEM)","the item is submitted (NOT_SUBMITTED)","the caller is the coordinator (COORDINATOR_ONLY)","the move carries a note: what failed, what was tried, or why (NOTE_REQUIRED)"]},{"verb":"escalate","from":["open","claimed"],"to":"open","by":["agent","coordinator"],"how":"pullboard escalate \u003cid> --note \"...\"","checks":["the caller is the main checkout, or a worktree that joined a lane (NOT_JOINED)","the move carries a note: what failed, what was tried, or why (NOTE_REQUIRED)","the item exists (NO_ITEM)","the caller holds the item, or is the coordinator (NOT_YOURS)","the item is open or claimed (CLOSED)"]},{"verb":"refreeze","from":["open","claimed","submitted"],"to":"open","by":["coordinator"],"how":"pullboard refreeze \u003cid>","checks":["the caller is the main checkout, or a worktree that joined a lane (NOT_JOINED)","the caller is the coordinator (COORDINATOR_ONLY)","the item exists (NO_ITEM)","the item is open or claimed or submitted (CLOSED)","every row the item cites exists and is in force (UNKNOWN_SPEC)"]},{"verb":"refreeze","from":["claimed"],"to":"claimed","by":["agent","coordinator"],"how":"pullboard refreeze \u003cid>","checks":["the caller is the main checkout, or a worktree that joined a lane (NOT_JOINED)","the item exists (NO_ITEM)","the caller holds the item, or is the coordinator (NOT_YOURS)","the item is claimed (CLOSED)","every row the item cites exists and is in force (UNKNOWN_SPEC)"]},{"verb":"withdraw","from":["open","claimed","submitted"],"to":"withdrawn","by":["coordinator"],"how":"pullboard withdraw \u003cid> \u003creason>","checks":["the caller is the main checkout, or a worktree that joined a lane (NOT_JOINED)","the caller is the coordinator (COORDINATOR_ONLY)","the move carries a note: what failed, what was tried, or why (NOTE_REQUIRED)","the item exists (NO_ITEM)","the item is open or claimed or submitted (CLOSED)"]}]};
/**
* An item's history replayed through the lifecycle: each event with the state it found the item in
@@ -245,20 +394,50 @@ const span = (ms) => {
* ends or begins at one says its length was not logged rather than guess it.
*/
function timeline(item) {
- const steps = replay(item);
- return '<ol class="tl">' + steps.map((s, i) => {
+ const entries = Array.isArray(item.thread) && item.thread.length
+ ? item.thread
+ : item.history.filter((entry) => entry.kind !== 'fact').map((entry, eventId) => ({ type: 'move', eventId: eventId + 1, ...entry }));
+ const steps = replay({ ...item, history: entries.filter((entry) => entry.type === 'move').map(({ kind, by, at }) => ({ kind, by, at })) });
+ const facts = entries.filter((entry) => entry.type === 'fact');
+ const replacements = new Map(facts.filter((fact) => fact.supersedes).map((fact) => [fact.supersedes, fact]));
+ const rows = [];
+ let stepIndex = 0;
+ /** Render a lifecycle step, keeping inferred clock lapses between recorded moves. */
+ const moveRow = (s, event, index) => {
const enters = s.move ? s.move.to : s.kind === 'add' ? FLOW.initial : null;
const state = enters || s.from;
const final = FLOW.states.some((f) => f.id === state && f.final);
- const next = steps.slice(i + 1).find((n) => n.move);
+ const next = steps.slice(index + 1).find((n) => n.move);
const named = s.kind === 'reject' ? 'sent back' : state;
const stay = !enters || final ? ''
: !s.at ? esc(named + (next ? ' after the ' : ' so far since the ') + s.kind + ', length not logged')
: !next ? esc(named) + ' for ' + age(s.at) + ' so far'
: !next.at ? esc(named + ' until the ' + next.kind + ', length not logged')
: esc(named + ' for ' + span(Date.parse(next.at) - Date.parse(s.at)));
- return '<li class="tl-' + esc(state) + (s.kind === 'reject' ? ' tl-back' : '') + (enters ? '' : ' tl-quiet') + '"><time>' + (s.at ? when(s.at) : '') + '</time><span><b>' + esc(s.kind) + '</b> ' + esc(s.by) + '</span>' + (stay ? '<small>' + stay + '</small>' : '') + '</li>';
- }).join('') + '</ol>';
+ rows.push('<li class="tl-' + esc(state) + (s.kind === 'reject' ? ' tl-back' : '') + (enters ? '' : ' tl-quiet') + '"' + (event ? ' data-event-id="' + event.eventId + '"' : '') + '><time>' + (s.at ? when(s.at) : '') + '</time><span><b>' + esc(s.kind) + '</b> ' + esc(agentName(s.by)) + '</span>' + (stay ? '<small>' + stay + '</small>' : '') + '</li>');
+ };
+ /** Render one API fact with its identity, replacement and committed code binding. */
+ const factRow = (fact) => {
+ const replacement = replacements.get(fact.id);
+ const judgement = ['decision', 'rejection', 'supersession', 'root-cause'].includes(fact.kind);
+ rows.push('<li id="fact-' + esc(fact.id) + '" class="tl-fact' + (judgement ? ' tl-judgement' : '') + (replacement ? ' tl-superseded' : '') + '" data-event-id="' + fact.eventId + '"><time>' + when(fact.at) + '</time><span class="tl-fact-head"><span class="chip">' + esc(fact.kind) + '</span> <b>' + esc(agentName(fact.by)) + '</b></span><span class="tl-body">' + esc(fact.text) + '</span><small>' + age(fact.at) + (replacement ? ' · <a class="thread-replacement" href="#fact-' + esc(replacement.id) + '">replaced by ' + esc(replacement.kind) + '</a>' : '') + '</small>' + (fact.ref ? '<div class="tl-code">' + codeRef(factCodeRef(fact.ref), '') + '</div>' : '') + '</li>');
+ };
+ for (const entry of entries) {
+ if (entry.type === 'fact') { factRow(entry); continue; }
+ while (stepIndex < steps.length && !(steps[stepIndex].kind === entry.kind && steps[stepIndex].by === entry.by && steps[stepIndex].at === entry.at)) {
+ moveRow(steps[stepIndex], null, stepIndex);
+ stepIndex += 1;
+ }
+ if (stepIndex < steps.length) {
+ moveRow(steps[stepIndex], entry, stepIndex);
+ stepIndex += 1;
+ }
+ }
+ while (stepIndex < steps.length) {
+ moveRow(steps[stepIndex], null, stepIndex);
+ stepIndex += 1;
+ }
+ return '<ol class="tl">' + rows.join('') + '</ol>';
}
/**
@@ -423,6 +602,60 @@ async function api(path, body) {
return json;
}
+/** Send only literal person intent; the transport seals it and generic API writes stay refused. */
+async function sendPersonRequest(root, move) {
+ if (!requests || snapshot || !readOnly) throw new Error('This view cannot send person requests.');
+ if (!['add', 'shout', 'answer', 'hold', 'spec-approve', 'spec-decline'].includes(move.verb)) throw new Error('Choose a person action from the view controls.');
+ if (!transport) throw transportLoadError || new Error('The browser transport is still loading.');
+ return transport.request(boardPath(root) + '/moves', move);
+}
+
+/** Name a person request using its public literal intent, without exposing its sealed document. */
+function requestLabel(request) {
+ const move = request.move;
+ const args = move?.args || {};
+ if (move?.verb === 'add') return 'New item: ' + (args.title || 'Untitled');
+ if (move?.verb === 'shout') return 'Shout to ' + (args.to || 'coordinator') + ': ' + (args.text || '');
+ if (move?.verb === 'answer') return 'Answer #' + move.item + ': ' + (args.text || '');
+ if (move?.verb === 'hold') return (args.off ? 'Release ' : 'Hold ') + (args.lane || '') + ' lane' + (!args.off && args.reason ? ': ' + args.reason : '');
+ if (move?.verb === 'spec-approve') return 'Approve row ' + (args.ids || '');
+ if (move?.verb === 'spec-decline') return 'Decline row ' + (args.ids || '');
+ return 'Person request';
+}
+
+/** Retain the native request status and the CLI's complete refusal guidance beside an action. */
+function requestNotice(request) {
+ const label = { waiting: 'Waiting', done: 'Done', refused: 'Refused' }[request.status] || 'Unknown status';
+ const error = request.status === 'refused' && request.error;
+ return label + ' · ' + requestLabel(request) + (error ? '\n' + (error.code ? '[' + error.code + '] ' : '') + (error.message || '') + (error.next ? '\n' + error.next : '') : '');
+}
+
+/** Show the public request receipts on every board tab and update the latest action's status. */
+function renderPersonRequests(project) {
+ const entries = project?.personRequests || [];
+ const panel = $('person-requests');
+ panel.hidden = !entries.length;
+ panel.innerHTML = entries.length ? '<h2>Your requests</h2><ul class="request-list">' + [...entries].sort((a, b) => b.sequence - a.sequence).map((request) => {
+ const status = { waiting: 'Waiting', done: 'Done', refused: 'Refused' }[request.status] || 'Unknown status';
+ const error = request.status === 'refused' && request.error;
+ const reason = error ? '<p class="request-error">' + (error.code ? '<b>' + esc(error.code) + '</b> ' : '') + esc(error.message || '') + '</p>' + (error.next ? '<p class="request-next">' + esc(error.next) + '</p>' : '') : '';
+ return '<li data-person-request="' + esc(request.id) + '"><span class="request-label">' + esc(requestLabel(request)) + '</span><span class="chip request-status ' + (request.status === 'done' ? 'ok' : request.status === 'refused' ? 'no' : 'warn') + '">' + status + '</span>' + reason + '</li>';
+ }).join('') + '</ul>' : '';
+ const active = view.request;
+ const current = active && active.root === view.root && active.run === view.acting && entries.find((request) => request.id === active.id);
+ if (current && !$('console').hidden) {
+ $('console').className = 'console' + (current.status === 'done' ? ' ok' : current.status === 'refused' ? ' no' : '');
+ $('console').textContent = requestNotice(current);
+ }
+ const feedback = view.specFeedback;
+ const rowRequest = feedback?.root === view.root && feedback.requestId && entries.find((request) => request.id === feedback.requestId);
+ if (rowRequest) {
+ feedback.status = rowRequest.status;
+ feedback.tone = rowRequest.status === 'done' ? 'ok' : rowRequest.status === 'refused' ? 'no' : '';
+ feedback.text = requestNotice(rowRequest);
+ }
+}
+
/** A board's sidebar counts, derived from the same API state the page displays. */
function boardSummary(board, state) {
/** Count one item state for the sidebar. */
@@ -434,8 +667,8 @@ function boardSummary(board, state) {
sentBack: count((item) => item.status === 'open' && item.verdict && item.verdict.decision === 'REJECT'),
open: count((item) => item.status === 'open'),
verified: count((item) => item.status === 'verified'),
- pending: state.spec.filter((row) => row.status === 'pending').length,
- drafts: state.spec.filter((row) => row.status === 'draft').length,
+ pending: state.spec.filter((row) => row.status === 'pending' && !row.decision).length,
+ drafts: state.spec.filter((row) => row.status === 'draft' && !row.decision).length,
holds: state.holds.length,
decisions: state.decisions.length,
// What each item's state reads from, so another repo's roadmap can show it as this board's
@@ -444,6 +677,35 @@ function boardSummary(board, state) {
};
}
+/** Render the event-log totals already supplied by the shared stats API [V2]. */
+function proofStatsCard(stats) {
+ if (!stats) return '<span class="muted">Stats unavailable</span>';
+ const families = stats.families || [];
+ const agents = stats.agents || [];
+ const percentage = (Number(stats.rejectionShare) * 100).toFixed(1) + '%';
+ const familyDetail = families.map((family) => family.name + ' (' + family.agents + ' agents, ' + family.moves + ' moves)').join(' · ') || 'none';
+ const agentDetail = agents.map((agent) => agent.id + ' (' + agent.families.join('/') + '; ' + agent.moves + ' moves)').join(' · ') || 'none';
+ /** Format an API timestamp for the card without recalculating event statistics.
+ * @param {string|number|null} value
+ * @returns {string}
+ */
+ const dateText = (value) => value ? new Date(value).toLocaleDateString([], { year: 'numeric', month: 'short', day: 'numeric' }) : 'none';
+ const firstAt = stats.firstEventAt ?? '';
+ const lastAt = stats.lastEventAt ?? '';
+ return '<div class="proof-stats-head"><b>Proof stats</b><span>from recorded moves</span></div>'
+ + '<div class="proof-stats-grid">'
+ + '<div><span>Submissions</span><b data-stat="submissions" data-value="' + esc(stats.submissions) + '">' + esc(stats.submissions) + '</b></div>'
+ + '<div><span>Rejections</span><b data-stat="rejections" data-value="' + esc(stats.rejections) + '">' + esc(stats.rejections) + '</b></div>'
+ + '<div><span>Sent back</span><b data-stat="rejectionShare" data-value="' + esc(percentage) + '">' + esc(percentage) + '</b></div>'
+ + '<div><span>Merged</span><b data-stat="merged" data-value="' + esc(stats.merged) + '">' + esc(stats.merged) + '</b></div>'
+ + '<div><span>Without accept</span><b data-stat="mergedWithoutAccept" data-value="' + esc(stats.mergedWithoutAccept) + '">' + esc(stats.mergedWithoutAccept) + '</b></div>'
+ + '<div><span>Agents</span><b data-stat="agentCount" data-value="' + esc(stats.agentCount) + '">' + esc(stats.agentCount) + '</b></div>'
+ + '<div><span>Families</span><b data-stat="familyCount" data-value="' + esc(stats.familyCount) + '">' + esc(stats.familyCount) + '</b></div>'
+ + '<div><span>First · latest</span><small><time data-stat="firstEventAt" data-value="' + esc(firstAt) + '" datetime="' + esc(firstAt) + '">' + esc(dateText(firstAt)) + '</time> · <time data-stat="lastEventAt" data-value="' + esc(lastAt) + '" datetime="' + esc(lastAt) + '">' + esc(dateText(lastAt)) + '</time></small></div>'
+ + '</div><div class="proof-stats-detail">'
+ + '<p><b>Families:</b> ' + esc(familyDetail) + '</p><p><b>Agents:</b> ' + esc(agentDetail) + '</p></div>';
+}
+
/** Resolve a displayed repo to the persistent board identity supplied by API v1. */
function boardPath(root) {
const board = data && data.projects.find((entry) => entry.root === root && entry.ok);
@@ -473,7 +735,9 @@ async function boardState(root, mark) {
if (!grouped.has(project.project)) grouped.set(project.project, []);
grouped.get(project.project).push(project);
}
- const groups = [...grouped].map(([name, repos]) => ({ name, key: 'group:' + name, repos }));
+ // A project groups repos only when two or more share its name. One repo alone, as every board the relay
+ // lists is, shows as itself: a heading above the same board would only say it twice.
+ const groups = [...grouped].filter(([, repos]) => repos.length > 1).map(([name, repos]) => ({ name, key: 'group:' + name, repos }));
const group = groups.find((entry) => entry.key === root);
return {
projects, groups, project: states.get(root) || null,
@@ -481,6 +745,58 @@ async function boardState(root, mark) {
};
}
+// Keep credential metadata apart from board snapshots and scoped to the selected project (H2,H9).
+const credentials = new Map();
+
+/** Draw only allowlisted credential metadata; bearer values never enter page state or markup. */
+function renderCredentials() {
+ const region = $('credentials');
+ region.hidden = snapshot || readOnly || Boolean(transportModule);
+ if (region.hidden) { region.innerHTML = ''; return; }
+ const state = credentials.get(view.root);
+ /** Render an inventory timestamp without shortening its date or timezone. */
+ const stamp = (value) => value === null ? 'Unknown' : new Date(value).toISOString();
+ region.innerHTML = '<button class="link" data-credentials type="button" aria-expanded="' + Boolean(state) + '"' + (state?.busy ? ' disabled' : '') + '>Agent credentials</button>'
+ + (state ? '<p role="status">' + esc(state.message || '') + '</p>'
+ + state.tokens.map((row) => '<article class="credential" data-token-id="' + esc(row.id) + '"><b>' + esc(agentName(row.agent)) + '</b><code>' + esc(row.id) + '</code>'
+ + '<dl><dt>Created</dt><dd>' + esc(stamp(row.created)) + '</dd><dt>Expires</dt><dd>' + esc(stamp(row.expires)) + '</dd></dl>'
+ + (row.revoked ? '<span class="chip">Revoked</span>' : '<button class="ghost" type="button" data-revoke-token="' + esc(row.id) + '"' + (state.busy ? ' disabled' : '') + '>Revoke</button>') + '</article>').join('') : '');
+}
+
+/** Load this board's public metadata on demand, without granting any person authority. */
+async function loadCredentials(root = view.root) {
+ if (snapshot || readOnly || transportModule) return;
+ const state = credentials.get(root) || { tokens: [], message: '', busy: false };
+ credentials.set(root, state);
+ state.message = 'Loading agent credentials…';
+ if (root === view.root) renderCredentials();
+ try {
+ const reply = await api(boardPath(root) + '/tokens');
+ state.tokens = reply.tokens.map(({ id, agent, created, expires, revoked }) => ({ id, agent, created, expires, revoked }));
+ state.message = state.tokens.length ? '' : 'No agent credentials.';
+ } catch (error) { state.message = String(error.message || error); }
+ if (root === view.root) renderCredentials();
+}
+
+/** Revoke a listed id through the existing one-tap phone grant, then reread its public metadata. */
+async function revokeCredential(id) {
+ if (snapshot || readOnly || transportModule) return;
+ const root = view.root, state = credentials.get(root);
+ if (!state || state.busy || !state.tokens.some((row) => row.id === id && !row.revoked)) return;
+ state.busy = true;
+ state.message = 'Approve revocation on your phone…';
+ renderCredentials();
+ try {
+ const result = await api(boardPath(root) + '/tokens', { id });
+ if (result.id !== id || result.revoked !== true) throw new Error('Revocation was not acknowledged; refresh the credential list.');
+ state.tokens = state.tokens.map((row) => row.id === id ? { ...row, revoked: true } : row);
+ await loadCredentials(root);
+ state.message = 'Credential revoked.';
+ } catch (error) { state.message = String(error.message || error); }
+ state.busy = false;
+ if (root === view.root) renderCredentials();
+}
+
/** Refresh from API v1 and discard a response for a project the person already left. */
async function refresh() {
const root = view.root;
@@ -508,7 +824,7 @@ async function refresh() {
snapshotReplay.index = snapshotReplay.events.length;
replayControls();
}
- $('live').textContent = snapshot ? 'read-only snapshot' : 'live · ' + new Date().toLocaleTimeString([], { hour: '2-digit', minute: '2-digit', second: '2-digit', hourCycle: 'h23' });
+ $('live').textContent = snapshot ? 'read-only snapshot' : '';
}
/** Display the current event and make the replay's play, pause and end states explicit. */
@@ -634,22 +950,19 @@ function renderSide() {
const repoButton = (x) => {
if (!x.ok) return '<p class="repo-error" role="status"><b>' + esc(x.name) + ':</b> ' + esc(x.error) + '</p>';
const on = x.root === view.root;
- return '<button class="proj repo' + (on ? ' on' : '') + '"' + (on ? ' aria-current="true"' : '') + ' data-root="' + esc(x.root) + '" title="' + esc(x.root) + '" type="button"><span class="pname">' + esc(x.name) + '</span>' + (needCount(x) ? '<b class="need" title="needs you">' + needCount(x) + '</b>' : '') + '<small>' + esc(doing(x)) + '</small></button>';
+ const parts = doing(x).split(' · '), asks = [x.decisions, x.pending, x.drafts, x.holds].filter(Boolean).length;
+ const line = (asks ? '<span class="asks">' + esc(parts.slice(0, asks).join(' · ')) + '</span>' + (parts.length > asks ? ' · ' : '') : '') + esc(parts.slice(asks).join(' · '));
+ return '<button class="proj repo' + (on ? ' on' : '') + '"' + (on ? ' aria-current="true"' : '') + ' data-root="' + esc(x.root) + '" title="' + esc(x.root) + '" type="button"><span class="pname">' + esc(x.name) + '</span><small>' + line + '</small></button>';
};
const groupedRoots = new Set(data.groups.flatMap((group) => group.repos.map((repo) => repo.root)));
const grouped = data.groups.map((group) => {
const on = group.key === view.root;
const needs = group.repos.reduce((total, repo) => total + needCount(repo), 0);
const count = group.repos.length;
- return '<section class="repo-group"><button class="proj project-pick' + (on ? ' on' : '') + '"' + (on ? ' aria-current="true"' : '') + ' data-root="' + esc(group.key) + '" type="button"><span class="pname">' + esc(group.name) + '</span>' + (needs ? '<b class="need" title="needs you">' + needs + '</b>' : '') + '<small>' + count + ' ' + (count === 1 ? 'repo' : 'repos') + '</small></button><div class="repos">' + group.repos.map(repoButton).join('') + '</div></section>';
+ return '<section class="repo-group"><button class="proj project-pick' + (on ? ' on' : '') + '"' + (on ? ' aria-current="true"' : '') + ' data-root="' + esc(group.key) + '" type="button"><span class="pname">' + esc(group.name) + '</span><small>' + (needs ? '<span class="asks">' + needs + ' need you</span> · ' : '') + count + ' ' + (count === 1 ? 'repo' : 'repos') + '</small></button><div class="repos">' + group.repos.map(repoButton).join('') + '</div></section>';
}).join('');
- const loose = data.projects.filter((repo) => !repo.project && !groupedRoots.has(repo.root)).map(repoButton).join('');
+ const loose = data.projects.filter((repo) => !groupedRoots.has(repo.root)).map(repoButton).join('');
$('proj-list').innerHTML = grouped || loose ? grouped + loose : '<div class="empty">None yet.</div>';
- const currentGroup = data.groups.find((group) => group.key === view.root);
- const currentRoots = new Set(currentGroup ? currentGroup.repos.map((repo) => repo.root) : [view.root]);
- const elsewhere = data.projects.filter((x) => !currentRoots.has(x.root)).reduce((n, x) => n + needCount(x), 0);
- $('proj-elsewhere').textContent = elsewhere ? elsewhere + ' elsewhere' : '';
- $('proj-elsewhere').hidden = !elsewhere;
const p = data.project;
const selectedGroup = data.groups.find((group) => group.key === view.root);
$('proj-name').textContent = selectedGroup?.name || (p ? (data.projects.find((x) => x.root === view.root) || { name: p.root.split('/').pop() }).name : 'No project');
@@ -665,7 +978,7 @@ function renderSide() {
* @returns {string}
*/
function linked(text, titles, allowLinks = true) { return String(text ?? '').split(/(#\d+|(?<![^\s([{"'`])[^\s:@()[\]{}"'`]+:\d+(?:-\d+)?@[0-9a-f]{7,40}(?![^\s)\]}"'`.,;:!?]))/).map((part, n, parts) => {
- if (n % 2 && part[0] !== '#') return allowLinks ? codeRef(part, parts.slice(0, n).join('').split('\n').pop().slice(-2000)) : '<code class="inline">' + esc(part) + '</code>';
+ if (n % 2 && part[0] !== '#') return allowLinks ? codeRef(part, parts.slice(0, n).join('').split('\n').pop().slice(-2000)) : codeChip(part);
const id = /^#\d+$/.test(part) ? String(Number(part.slice(1))) : '';
return titles.has(id) && allowLinks ? '<button class="ref" data-go="item:' + id + '" title="' + esc(titles.get(id)) + '" type="button">' + esc(part) + '</button>' : esc(part);
}).join(''); }
@@ -675,8 +988,8 @@ function renderSide() {
* @param {boolean} allowLinks
* @returns {string}
*/
- function inline(text, titles, allowLinks = true) { return String(text ?? '').split(/(`[^`]*`|[^\s:@()[\]{}"'`]+:\d+(?:-\d+)?@[0-9a-f]{7,40}|pullboard(?:\s+\w+)+|--[\w-]+|(?:\/|\.\.?\/|[\w.-]+\/)\w[\w./-]*\.[A-Za-z0-9]+|\b[0-9a-fA-F]{7,40}\b|#\d+)/g).map((part, n, parts) => {
- if (part.startsWith('`') && part.endsWith('`')) return '<code class="inline">' + esc(part.slice(1, -1)) + '</code>';
+ function inline(text, titles, allowLinks = true) { return String(text ?? '').split(/(`[^`]*`|(?:[^\s:@()[\]{}"'`]+)?:\d+(?:-\d+)?@[0-9a-f]{0,40}|pullboard (?:hook pre-merge-commit|milestone remove|prompt decompose|spec signers add|hook commit-msg|hook pre-commit|milestone items|milestone edit|milestone move|prompt signoff|hook pre-push|milestone add|prompt review|prompt verify|relay devices|relay recover|relay revoke|relay tokens|spec approve|spec decline|spec signers|spec signoff|prompt plan|view export|relay join|relay pair|spec apply|spec check|spec unmet|decisions|lifecycle|milestone|relay off|resources|spec show|spec view|escalate|refreeze|relay on|settings|takeover|withdraw|worktree|release|roadmap|version|answer|doctor|export|forget|import|ledger|merged|prompt|reopen|resume|skills|status|submit|verify|whoami|check|claim|hooks|inbox|lanes|relay|serve|shout|stats|sweep|done|edit|fact|gate|help|hold|hook|init|join|land|list|next|pass|show|spec|tour|view|add|log|run)(?![\w-])(?: (?:--?[\w-]+|\d+|#\d+|"[^"\n]*"|[A-Z][A-Z0-9_]*|[\w-]*[\/.:@][^\s"]*|[a-z]+-\d+)(?![\w-]))*|--[\w-]+|(?:\/|\.\.?\/|[\w.-]+\/)\w[\w./-]*\.[A-Za-z0-9]+|\b[0-9a-fA-F]{7,40}\b|#\d+)/g).map((part, n, parts) => {
+ if (part.startsWith('`') && part.endsWith('`')) return codeChip(part.slice(1, -1));
if (part.includes('@') && part.includes(':')) {
const textBefore = parts.slice(0, n).join('');
const fullText = parts.join('');
@@ -684,10 +997,17 @@ function renderSide() {
const leftBoundary = !textBefore || [9, 10, 32, 40, 91, 123, 34, 39, 96].includes(textBefore.at(-1).charCodeAt(0));
const rightBoundary = !after || [9, 10, 32, 41, 93, 125, 34, 39, 96, 46, 44, 59, 58, 33, 63].includes(after.charCodeAt(0));
const validRef = leftBoundary && rightBoundary;
+ const partial = /^(?:([^:@()[\]{}"'`]+))?:(\d+)(?:-(\d+))?@([0-9a-f]*)$/.exec(part);
+ if (validRef && partial && (!partial[1] || partial[4].length < 7)) {
+ const reason = !partial[1] ? 'missing the repository path' : 'missing a usable commit SHA';
+ return '<span class="code no ref-missing" role="status">Code reference unavailable: ' + reason + '.</span>';
+ }
if (allowLinks && validRef) return codeRef(part, textBefore.slice(-2000));
- return '<code class="inline">' + esc(part) + '</code>';
+ return codeChip(part);
}
- if (/^(?:pullboard(?:\s+\w+)+|--[\w-]+|(?:\/|\.\.?\/|[\w.-]+\/)\w[\w./-]*\.[A-Za-z0-9]+|\b[0-9a-fA-F]{7,40}\b)$/.test(part)) return '<code class="inline">' + esc(part) + '</code>';
+ if (/^(?:pullboard (?:hook pre-merge-commit|milestone remove|prompt decompose|spec signers add|hook commit-msg|hook pre-commit|milestone items|milestone edit|milestone move|prompt signoff|hook pre-push|milestone add|prompt review|prompt verify|relay devices|relay recover|relay revoke|relay tokens|spec approve|spec decline|spec signers|spec signoff|prompt plan|view export|relay join|relay pair|spec apply|spec check|spec unmet|decisions|lifecycle|milestone|relay off|resources|spec show|spec view|escalate|refreeze|relay on|settings|takeover|withdraw|worktree|release|roadmap|version|answer|doctor|export|forget|import|ledger|merged|prompt|reopen|resume|skills|status|submit|verify|whoami|check|claim|hooks|inbox|lanes|relay|serve|shout|stats|sweep|done|edit|fact|gate|help|hold|hook|init|join|land|list|next|pass|show|spec|tour|view|add|log|run)(?![\w-])(?: (?:--?[\w-]+|\d+|#\d+|"[^"\n]*"|[A-Z][A-Z0-9_]*|[\w-]*[\/.:@][^\s"]*|[a-z]+-\d+)(?![\w-]))*|--[\w-]+)$/.test(part)) return codeChip(part, 'cmd');
+ if (/^(?:\/|\.\.?\/|[\w.-]+\/)\w[\w./-]*\.[A-Za-z0-9]+$/.test(part)) return codeChip(part, 'path');
+ if (/^[0-9a-fA-F]{7,40}$/.test(part)) return codeChip(part, 'sha');
return linked(part, titles, allowLinks);
}).join(''); }
/** Render inline text and fenced or shell command blocks with escaped contents.
@@ -696,6 +1016,37 @@ function renderSide() {
* @param {boolean} allowLinks
* @returns {string}
*/
+ /**
+ * A run of '- ' lines as one bulleted list, indented lines nested under the bullet above them. A bullet
+ * that is a whole command (npm, npx, pnpm, yarn, bun, git, node, python, pytest, pullboard) is one code
+ * chip; any other bullet is prose, with its paths, flags and backticks as chips. A whole command is the
+ * command alone: no sentence end, no comma outside quotes, and at most two plain words after it (spec
+ * check, merge main); everything else in it is a path, flag, number or quoted string. A bullet that only
+ * starts with a command is a sentence (#232: all nine such bullets on the board were).
+ */
+ function wholeCommand(text) {
+ if (!/^(?:npm|npx|pnpm|yarn|bun|git|node|python(?:\d+(?:\.\d+)?)?|pytest|pullboard)\s+\S/.test(text) || /[.!?:;,]$/.test(text.trim())) return false;
+ const bare = text.replace(/"[^"]*"|'[^']*'|`[^`]*`/g, ' ');
+ return !/[,;]\s/.test(bare) && bare.trim().split(/\s+/).slice(1).filter((word) => /^[A-Za-z]+$/.test(word)).length <= 2;
+ }
+
+ function bullets(lines, titles, allowLinks) {
+ const roots = [], open = [];
+ for (const line of lines) {
+ const [, indent, text] = /^(\s*)- (.*)$/.exec(line);
+ const node = { text, children: [] };
+ while (open.length && indent.length <= open.at(-1).indent) open.pop();
+ (open.length ? open.at(-1).node.children : roots).push(node);
+ open.push({ indent: indent.length, node });
+ }
+ const list = (nodes) => '<ul class="text-list">' + nodes.map((node) => '<li>'
+ + (wholeCommand(node.text) ? codeChip(node.text, 'cmd') : inline(node.text, titles, allowLinks))
+ + (node.children.length ? list(node.children) : '') + '</li>').join('') + '</ul>';
+ return list(roots);
+ }
+
+ // A line that is nothing but one path:lines@commit reference.
+ const WHOLE_REF = /^\s*[^\s:@()[\]{}"'`]+:\d+(?:-\d+)?@[0-9a-f]{7,40}\s*$/;
function rich(text, titles, allowLinks = true) {
const lines = String(text ?? '').split('\n');
const output = [];
@@ -710,13 +1061,20 @@ function renderSide() {
const block = [];
while (i < lines.length && lines[i].startsWith('$ ')) block.push(lines[i++]);
output.push('<code class="code block">' + esc(block.join('\n')) + '</code>');
+ } else if (allowLinks && WHOLE_REF.test(lines[i])) {
+ output.push({ block: codeRef(lines[i++].trim(), '', true) });
+ } else if (/^\s*- /.test(lines[i])) {
+ const run = [];
+ while (i < lines.length && /^\s*- /.test(lines[i])) run.push(lines[i++]);
+ output.push({ list: bullets(run, titles, allowLinks) });
} else {
const block = [];
- while (i < lines.length && !lines[i].startsWith('```') && !lines[i].startsWith('$ ')) block.push(inline(lines[i++], titles, allowLinks));
+ while (i < lines.length && !lines[i].startsWith('```') && !lines[i].startsWith('$ ') && !/^\s*- /.test(lines[i]) && !(allowLinks && WHOLE_REF.test(lines[i]))) block.push(inline(lines[i++], titles, allowLinks));
output.push(block.join('<br>'));
}
}
- return output.join('<br>');
+ // A list ends its own line, so no break goes beside one: a blank line in the text stays one blank line.
+ return output.map((part, n) => (n && typeof part === 'string' && typeof output[n - 1] === 'string' ? '<br>' : '') + (typeof part === 'string' ? part : part.list ?? part.block)).join('');
}
/** Draw a project's cross-repo Needs-you list and one activity feed. */
@@ -731,7 +1089,7 @@ function renderGroup(group) {
const titles = new Map(repo.board.items.map((item) => [String(item.id), item.title]));
return repo.board.events.map((event) => ({ ...event, repo, titles, title: event.item_id ? titles.get(String(event.item_id)) : null }));
}).sort((a, b) => b.event_at.localeCompare(a.event_at)).slice(0, 80);
- $('group-activity').innerHTML = events.length ? byDay(events, (event) => event.event_at, (event) => '<div><time>' + clock(event.event_at) + '</time><div class="act"><b class="repo-label">' + esc(event.repo.name) + '</b> <span>' + esc(event.event_by) + ' ' + esc(event.event_kind) + (event.item_id ? ' #' + event.item_id + (event.title ? ' ' + rich(event.title, event.titles).replaceAll('<button class="ref" data-go=', '<button class="ref" data-root="' + esc(event.repo.root) + '" data-go=') : '') : '') + '</span></div></div>') : '<div class="empty">No activity yet.</div>';
+ $('group-activity').innerHTML = events.length ? byDay(events, (event) => event.event_at, (event) => '<div><time>' + clock(event.event_at) + '</time><div class="act"><b class="repo-label">' + esc(event.repo.name) + '</b> <span>' + esc(agentName(event.event_by, event.repo.board)) + ' ' + esc(event.event_kind) + (event.item_id ? ' #' + event.item_id + (event.title ? ' ' + rich(event.title, event.titles).replaceAll('<button class="ref" data-go=', '<button class="ref" data-root="' + esc(event.repo.root) + '" data-go=') : '') : '') + '</span></div></div>') : '<div class="empty">No activity yet.</div>';
}
/**
@@ -785,9 +1143,12 @@ function milestoneRow(row, titles) {
* highlighted line. A milestone with no items says so, rather than draw an empty bar.
*/
function roadmapCards(p, titles) {
- const milestones = p.milestones || [];
+ // Opened from the status bar's release, the Roadmap is that release alone, with a way back to all of them.
+ const only = view.roadmapOnly && (p.milestones || []).some((m) => m.name === view.roadmapOnly) ? view.roadmapOnly : null;
+ const milestones = (p.milestones || []).filter((m) => !only || m.name === only);
+ const lead = only ? '<div class="roadmap-only"><span>' + esc(only) + '</span><button class="link" data-roadmap-all type="button">show all</button></div>' : '';
if (!milestones.length) return '<div class="card-panel empty">No milestones yet. The coordinator adds one with <code class="inline">pullboard milestone add</code>.</div>';
- return milestones.map((milestone) => {
+ return lead + milestones.map((milestone) => {
const rows = milestone.items.map((entry) => milestoneItem(entry, p));
const done = rows.filter((row) => row.state === 'verified').length;
const name = esc(milestone.name);
@@ -799,11 +1160,46 @@ function roadmapCards(p, titles) {
}).join('');
}
+/** Tags that flow inside a line of text, so a reference's line belongs to the nearest block around it. */
+const INLINE_TAGS = new Set(['SPAN', 'B', 'I', 'EM', 'STRONG', 'CODE', 'S', 'SMALL', 'TIME', 'MARK', 'U', 'SUB', 'SUP', 'ABBR', 'KBD', 'Q', 'LABEL']);
+const CONTROLS = 'button, a[href], select, input, textarea, [role=button]';
+
+/**
+ * Whether a reference sits in running text: words that are not another control's share its line, between line breaks,
+ * in the nearest block around it. A reference standing alone is a target like any button.
+ */
+function inText(ref) {
+ let block = ref.parentElement;
+ while (block.parentElement && INLINE_TAGS.has(block.tagName)) block = block.parentElement;
+ const worded = [];
+ let line = 0, at = 0;
+ const walk = document.createTreeWalker(block, NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_TEXT);
+ for (let n = walk.nextNode(); n; n = walk.nextNode()) {
+ if (n === ref) at = line;
+ else if (n.nodeName === 'BR') line += 1;
+ else if (n.nodeType === 3 && n.data.trim()) {
+ const owner = n.parentElement.closest(CONTROLS);
+ if (!owner || owner === block || !block.contains(owner)) worded[line] = true;
+ }
+ }
+ return Boolean(worded[at]);
+}
+
+// Wherever the page draws a reference, one standing alone is marked, and takes a 44px target where a finger taps. The
+// tests' stand-in document, which is not a browser, has no observer, and there nothing is marked.
+if (typeof MutationObserver === 'function') new MutationObserver((changes) => {
+ for (const root of new Set(changes.map((change) => change.target))) {
+ if (root.nodeType === 1) for (const ref of root.querySelectorAll('button.ref')) ref.classList.toggle('alone', !inText(ref));
+ }
+}).observe(document.body, { childList: true, subtree: true });
+
/** Draw the board shown: the sidebar, then every tab's panes from the project's board. */
function render() {
const p = data.project;
const group = data.group;
renderSide();
+ $('proof-stats').hidden = true;
+ $('proof-stats').innerHTML = '';
if (view.answering && view.answering.root !== view.root) answer(null);
// Until the first board arrives the page shows no tabs or panes, so a machine with none never
// flashes them; with no board to show, one message says how a board starts, in their place.
@@ -813,8 +1209,12 @@ function render() {
$('tabs').hidden = Boolean(group);
document.querySelectorAll('[data-pane]').forEach((pane) => { pane.hidden = Boolean(group) || pane.dataset.pane !== view.tab; });
$('products').hidden = !p || !p.products.length;
+ renderPersonRequests(p);
+ renderCredentials();
if (group) { renderGroup(group); return; }
if (!p) return;
+ $('proof-stats').hidden = false;
+ $('proof-stats').innerHTML = proofStatsCard(p.proofStats);
// Each product's progress (N28): the rows an accepted item cites, and its items by state.
$('prod-list').innerHTML = p.products.map((x) => {
const states = [['open', '', x.items.open], ['building', 'building', x.items.claimed], ['to verify', 'verify', x.items.submitted], ['verified', 'verified', x.items.verified]].filter(([, , n]) => n);
@@ -823,9 +1223,6 @@ function render() {
}).join('');
const items = p.items.filter((i) => i.status !== 'withdrawn');
const active = items.filter((i) => stateOf(i) !== 'verified');
- $('count-items').textContent = active.length || '';
- $('count-spec').textContent = p.spec.filter((r) => ['pending', 'draft'].includes(r.status)).length || '';
- $('count-doctrine').textContent = p.practice.filter((r) => ['pending', 'draft'].includes(r.status)).length || '';
const titles = new Map(p.items.map((i) => [String(i.id), i.title]));
$('roadmap').innerHTML = roadmapCards(p, titles);
@@ -833,13 +1230,21 @@ function render() {
// questions in the spec, held lanes, then draft rows. Work waiting for a verdict or sent back shows
// on the board with who holds it; it is the agents' to move.
const needs = [
- ...p.decisions.map((d) => ['decide:' + d.shout_id, d.shout_from, d.shout_text, 'decide', d.shout_at]),
- ...p.spec.filter((r) => r.status === 'pending').map((r) => ['spec:' + r.id, r.id, r.text, 'answer in SPEC.md']),
- ...p.holds.map((h) => ['tab:shouts', h.hold_lane, h.hold_reason, 'lane held by ' + h.hold_by]),
+ ...p.decisions.map((d) => ['decide:' + d.shout_id, agentName(d.shout_from, p), d.shout_text, 'decide', d.shout_at]),
+ ...p.spec.filter((r) => r.status === 'pending' && !r.decision).map((r) => ['spec:' + r.id, r.id, r.text, 'answer in SPEC.md']),
+ ...p.holds.map((h) => ['tab:shouts', h.hold_lane, h.hold_reason, 'lane held by ' + agentName(h.hold_by), h.hold_at]),
];
- const drafts = p.spec.filter((r) => r.status === 'draft').length;
- $('needs').hidden = !needs.length && !drafts;
- $('needs').innerHTML = '<div class="head"><i></i>Needs you</div>' + needs.slice(0, 6).map(([target, ref, text, what, at]) => '<div class="ny"><code>' + esc(ref) + '</code><span class="ny-text">' + rich(text, titles) + '</span><button class="ny-open" data-go="' + esc(target) + '" type="button"><em>' + esc(what) + (at ? ', ' + age(at) : '') + ' →</em></button></div>').join('') + (needs.length > 6 ? '<div class="muted more">and ' + (needs.length - 6) + ' more</div>' : '') + (drafts ? '<div class="ny"><code>' + drafts + '</code><span class="ny-text">draft spec rows to approve or drop</span><button class="ny-open" data-go="tab:spec" type="button"><em>review →</em></button></div>' : '');
+ const drafts = p.spec.filter((r) => r.status === 'draft' && !r.decision).length;
+ // Each of the person's calls is a row at the head of Active, shaped like an item: what it is first, then NEEDS YOU and
+ // its kind where an item has its lane, and what to do at the right. Every call is a row; the draft rows are one row
+ // with their count. Read-only, a row is its words, opening nothing.
+ $('needs').hidden = (!needs.length && !drafts) || view.state !== 'active' || Boolean(view.lane);
+ const needRow = ([target, ref, text, what, at], kind, action) => '<li class="row ask"' + (readOnly ? '' : ' data-go="' + esc(target) + '"') + '><span class="dot ask"></span><div><div class="t">' + (ref ? '<span>' + esc(ref) + '</span>' : '') + rich(text, titles, !readOnly) + '</div>'
+ + (at ? '<span class="row-age">' + age(at) + '</span>' : '') + '<div class="meta"><span class="why"><b>NEEDS YOU</b> ' + esc(kind) + '</span></div></div><span class="chip warn">' + esc(action) + '</span></li>';
+ const needKind = (entry) => entry[3] === 'decide' ? needRow([entry[0], '', entry[2], entry[3], entry[4]], 'a decision, asked by ' + entry[1], 'decide')
+ : entry[0].startsWith('spec:') ? needRow(entry, 'an open question in SPEC.md', 'answer') : needRow(entry, entry[3], 'release');
+ $('needs').innerHTML = needs.map(needKind).join('')
+ + (drafts ? needRow(['tab:spec', String(drafts), 'draft spec rows to approve or drop'], 'Spec rows waiting on you', 'review') : '');
const lanes = p.lanes;
const working = lanes.filter((l) => l !== 'coordinator');
@@ -858,26 +1263,47 @@ function render() {
// state, withdrawn items included; browsing leaves those out.
const matching = (q ? p.items : items)
.filter((i) => !q || ('#' + i.id + ' ' + i.title + ' ' + i.lane + ' ' + i.specs.join(' ') + ' ' + (i.criterion || '')).toLowerCase().includes(q));
- const inState = (s) => (i) => s === 'all' || (s === 'active' ? !['verified', 'withdrawn'].includes(stateOf(i)) : stateOf(i) === s);
+ // Gated is one test, shared by the rows, the Gated filter and the status bar: open and waiting on an item or a held lane.
+ const heldLanes = new Map(p.holds.map((h) => [h.hold_lane, h]));
+ const gatedOf = (i) => stateOf(i) === 'open' && (i.blockedBy.length > 0 || heldLanes.has(i.lane));
+ const inState = (s) => (i) => s === 'all' || (s === 'active' ? !['verified', 'withdrawn'].includes(stateOf(i)) : s === 'gated' ? gatedOf(i) : stateOf(i) === s);
const names = { active: 'Active', verified: 'Verified', all: 'All' };
- $('state-chips').innerHTML = Object.keys(names).map((s) => '<button data-state="' + s + '" class="' + (view.state === s ? 'on' : '') + '" type="button">' + names[s] + '<b>' + matching.filter(inState(s)).length + '</b></button>').join('');
- const shown = matching.filter(inState(view.state)).sort((a, b) => b.updatedAt.localeCompare(a.updatedAt));
+ // The status bar can open a narrower list; it shows as a fourth choice until another is picked.
+ if (view.state === 'verify') names.verify = 'To verify';
+ if (view.state === 'gated') names.gated = 'Gated';
+ // A lane narrows the list as a state does, and each counts within the other's choice.
+ const inLane = (lane) => (i) => !lane || i.lane === lane;
+ if (view.lane && !matching.some(inLane(view.lane))) view.lane = null;
+ $('state-chips').innerHTML = Object.keys(names).map((s) => '<button data-state="' + s + '" class="' + (view.state === s ? 'on' : '') + '" type="button">' + names[s] + '<b>' + matching.filter(inLane(view.lane)).filter(inState(s)).length + '</b></button>').join('');
+ const inView = matching.filter(inState(view.state));
+ const laneCounts = [...inView.reduce((m, i) => m.set(i.lane, (m.get(i.lane) || 0) + 1), new Map())].sort((a, b) => b[1] - a[1] || a[0].localeCompare(b[0]));
+ if (view.lane && !laneCounts.some(([lane]) => lane === view.lane)) laneCounts.push([view.lane, 0]);
+ const pick = $('lane-pick'), options = [['', 'All lanes'], ...laneCounts.map(([lane, n]) => [lane, lane + ' · ' + n])].map(([lane, label]) => '<option value="' + esc(lane) + '">' + esc(label) + '</option>').join('');
+ // Rewriting an open picker closes it, so it is rewritten only when the lanes or their counts change.
+ if (pick.dataset.options !== options) { pick.innerHTML = options; pick.dataset.options = options; }
+ pick.value = view.lane || '';
+ pick.hidden = laneCounts.length < 2 && !view.lane;
+ const shown = inView.filter(inLane(view.lane)).sort((a, b) => b.updatedAt.localeCompare(a.updatedAt));
// With nothing picked, the detail shows the first row, and keeps it when a refresh reorders the list.
// While another project loads, the item picked there waits for its own board.
if (data.root === view.root && !view.adding && !p.items.some((i) => i.id === view.item)) view.item = shown.length ? shown[0].id : null;
- const heldLanes = new Map(p.holds.map((h) => [h.hold_lane, h]));
+ // An open item's chip, the same in its row and its detail: gated, its lane held, or unclaimed.
+ const openChip = (i) => i.blockedBy.length || heldLanes.has(i.lane) ? '<span class="chip gate">' + (i.blockedBy.length ? 'gated' : 'lane held') + '</span>' : chip('open');
$('chain').innerHTML = shown.length ? shown.map((i) => {
const s = stateOf(i);
- const who = s === 'building' ? i.owner : [i.builtBy, i.verifiedBy].filter(Boolean).join(' → ');
// What an open item waits on, if anything: items not yet verified, or a hold on its lane.
const hold = s === 'open' ? heldLanes.get(i.lane) : null;
const waits = s === 'open' && i.blockedBy.length ? i.blockedBy : [];
- const gated = waits.length > 0 || !!hold;
+ const gated = gatedOf(i);
const pills = (waits.length ? '<span class="gate">' + waits.map((id, index) => '<span class="wait-unit">' + (index ? '' : 'waits on ') + '<button class="ref" data-go="item:' + id + '" type="button">#' + id + '</button></span>').join(', ') + '</span>' : '') + (hold ? '<span class="gate">lane held: ' + linked(hold.hold_reason, titles) + '</span>' : '');
- const tag = s === 'building' && i.owner ? '<span class="chip busy" title="building, held by ' + esc(i.owner) + '">' + esc(i.owner) + '</span>'
- : s === 'verify' && i.reviewer ? '<span class="chip warn" title="reviewing until ' + esc(when(i.reviewUntil)) + '">' + esc(i.reviewer) + ' reviewing</span>'
- : s === 'open' ? (gated ? '<span class="chip gate">' + (waits.length ? 'gated' : 'lane held') + '</span>' : '<span class="chip free">unclaimed</span>') : chip(s);
- return '<li class="row' + (view.item === i.id ? ' on' : '') + (gated ? ' gated' : '') + '" data-item="' + i.id + '"><span class="dot ' + s + '"></span><div><div class="t"><span>#' + i.id + '</span>' + rich(i.title, titles) + '</div><div class="meta"><span>' + esc(i.lane) + '</span>' + (i.specs.length ? '<span>' + esc(i.specs.join(', ')) + '</span>' : '') + (who ? '<span>' + esc(who) + '</span>' : '') + pills + '<span>' + age(i.updatedAt) + '</span>' + (rejected(i) ? '<span class="why">' + linked(i.verdict.reason + ': ' + firstLine(i.verdict.note), titles) + '</span>' : '') + '</div></div>' + tag + '</li>';
+ const tag = s === 'building' && i.owner ? '<span class="chip busy" title="building, held by ' + esc(agentName(i.owner)) + '">' + esc(agentName(i.owner)) + '</span>'
+ : s === 'verify' && i.reviewer ? '<span class="chip warn" title="reviewing until ' + esc(when(i.reviewUntil)) + '">' + esc(agentName(i.reviewer)) + ' reviewing</span>'
+ : s === 'open' ? openChip(i) : chip(s);
+ return '<li class="row s-' + s + (view.item === i.id ? ' on' : '') + (gated ? ' gated' : '') + '" data-item="' + i.id + '" title="' + esc(i.title) + '"><span class="dot ' + s + '"></span><div><div class="t"><span>#' + i.id + '</span>' + rich(i.title, titles) + '</div><span class="row-age">' + age(i.updatedAt) + '</span><div class="meta">'
+ // A rejected row's second line is its verdict; any other row's is its lane and the spec ids it serves.
+ + (rejected(i) ? '<span class="why"><b>' + esc(i.verdict.reason) + '</b> ' + linked(firstLine(i.verdict.note), titles) + '</span>'
+ : '<span>' + esc(i.lane) + '</span>' + (i.specs.length ? '<span class="specs" title="' + esc(i.specs.join(', ')) + '">' + esc(i.specs.slice(0, 3).join(', ') + (i.specs.length > 3 ? ' +' + (i.specs.length - 3) : '')) + '</span>' : ''))
+ + pills + '</div></div>' + tag + '</li>';
}).join('') : '<li class="empty">' + (items.length ? 'No items match.' : snapshot ? 'No items at this event.' : 'No items yet. Add the first one with New item.') + '</li>';
const item = p.items.find((i) => i.id === view.item);
@@ -890,15 +1316,37 @@ function render() {
if (item && !view.adding) {
const s = stateOf(item);
const cited = item.specs.map((id) => p.spec.find((r) => r.id === id) || { id, status: 'missing', text: '(not in SPEC.md)' });
+ const baseline = item.checkBaseline;
+ const baselineClass = baseline?.result === 'green' ? 'ok' : baseline?.result === 'red' ? 'no' : baseline?.result === 'pending' ? 'warn' : '';
+ const factRefs = (item.thread || []).filter((entry) => entry.type === 'fact' && entry.ref);
+ const referencedCode = factRefs.length ? '<div><h3>Referenced code</h3>' + factRefs.map((fact) => {
+ const ref = fact.ref;
+ const path = typeof ref.path === 'string' ? ref.path : '';
+ const start = ref.start;
+ const end = ref.end;
+ const commit = typeof ref.commit === 'string' ? ref.commit : '';
+ const safePath = /^[\w.-]+(?:\/[\w.-]+)*$/.test(path) && !path.split('/').some((part) => part === '.' || part === '..');
+ const safeRange = Number.isSafeInteger(start) && start > 0 && Number.isSafeInteger(end) && end >= start;
+ const safeCommit = /^[0-9a-f]{40}$/.test(commit);
+ if (!safePath || !safeRange || !safeCommit) {
+ const missing = [!safePath && 'repository path', !safeRange && 'line range', !safeCommit && 'full commit SHA'].filter(Boolean).join(', ');
+ return '<div class="fact-code"><span class="chip">' + esc(fact.kind) + '</span> <span class="muted">' + esc(agentName(fact.by)) + ' · ' + age(fact.at) + '</span><div class="code no ref-missing" role="status">Code reference unavailable: missing or invalid ' + esc(missing) + '.</div></div>';
+ }
+ const range = path + ':' + start + (end === start ? '' : '-' + end) + '@' + commit;
+ return '<div class="fact-code"><span class="chip">' + esc(fact.kind) + '</span> <span class="muted">' + esc(agentName(fact.by)) + ' · ' + age(fact.at) + '</span>' + codeRef(range, '', true) + '</div>';
+ }).join('') + '</div>' : '';
// Why it came back is the first thing the person reads; the verdicts before it stay below.
const back = rejected(item);
const earlier = back ? item.verdicts.slice(0, -1) : item.verdicts;
- $('detail').innerHTML = '<div class="stack"><div><h2><span>#' + item.id + '</span>' + rich(item.title, titles) + '</h2><div class="meta spaced">' + chip(s) + '<span class="chip">' + esc(item.lane) + '</span><span class="chip">' + esc(item.route) + '</span></div></div>'
+ $('detail').innerHTML = '<div class="stack"><div><h2><span>#' + item.id + '</span>' + rich(item.title, titles) + '</h2><div class="meta spaced">' + (s === 'open' ? openChip(item) : chip(s)) + '<span class="chip">' + esc(item.lane) + '</span><span class="chip">' + esc(item.route) + '</span></div></div>'
+ (back ? '<div class="sentback"><h3>Sent back' + (s === 'building' ? ', being reworked' : s === 'verify' ? ', resubmitted' : s === 'withdrawn' ? ', then withdrawn' : '') + '</h3>' + verdictHtml(item.verdict, titles) + '</div>' : '')
+ (item.criterion ? '<div><h3>Criterion</h3><div class="text">' + rich(item.criterion, titles) + '</div></div>' : '')
+ + (item.check ? '<div><h3>Check</h3><dl class="kv"><dt>command</dt><dd><code>' + esc(item.check) + '</code></dd><dt>baseline</dt><dd><span class="chip ' + baselineClass + '">' + esc(baseline?.result ?? 'not recorded') + '</span></dd></dl>'
+ + (baseline?.warning === 'CRITERION_PROVES_NOTHING' ? '<p class="check-warning">This check already passed before the work, so it proves nothing.</p>' : '') + '</div>' : '')
+ + referencedCode
+ (cited.length ? '<div><h3>Spec rows it serves</h3>' + cited.map((r) => '<div class="rowref"><code>' + esc(r.id) + '</code><div>' + linked(r.text, titles) + ' <span class="chip ' + tone(r.status) + '">' + esc(r.status) + '</span></div></div>').join('') + '</div>' : '')
+ (item.brief ? '<div><h3>Brief</h3><div class="text muted">' + rich(item.brief, titles) + '</div></div>' : '')
- + '<div><h3>People and commits</h3><dl class="kv">' + (item.owner && s === 'building' ? '<dt>holding</dt><dd>' + esc(item.owner) + '</dd>' : '') + (item.builtBy ? '<dt>built by</dt><dd>' + esc(item.builtBy) + '</dd>' : '') + (item.verifiedBy ? '<dt>verified by</dt><dd>' + esc(item.verifiedBy) + '</dd>' : '') + (item.commit ? '<dt>commit</dt><dd><code>' + esc(item.commit.slice(0, 12)) + '</code></dd>' : '') + (item.merged ? '<dt>merged</dt><dd><code>' + esc(item.merged.slice(0, 12)) + '</code></dd>' : '') + (item.blockedBy.length ? '<dt>waits on</dt><dd class="waits-on">' + item.blockedBy.map((id) => '<span class="wait-unit"><button class="ref" data-go="item:' + id + '" type="button">#' + id + '</button></span>').join(', ') + '</dd>' : '') + '</dl></div>'
+ + '<div><h3>People and commits</h3><dl class="kv">' + (item.owner && s === 'building' ? '<dt>holding</dt><dd>' + esc(agentName(item.owner)) + '</dd>' : '') + (item.builtBy ? '<dt>built by</dt><dd>' + esc(agentName(item.builtBy)) + '</dd>' : '') + (item.verifiedBy ? '<dt>verified by</dt><dd>' + esc(agentName(item.verifiedBy)) + '</dd>' : '') + (item.commit ? '<dt>commit</dt><dd><code>' + esc(item.commit.slice(0, 12)) + '</code></dd>' : '') + (item.merged ? '<dt>merged</dt><dd><code>' + esc(item.merged.slice(0, 12)) + '</code></dd>' : '') + (item.blockedBy.length ? '<dt>waits on</dt><dd class="waits-on">' + item.blockedBy.map((id) => '<span class="wait-unit"><button class="ref" data-go="item:' + id + '" type="button">#' + id + '</button></span>').join(', ') + '</dd>' : '') + '</dl></div>'
+ (back && !earlier.length ? '' : '<div><h3>' + (back ? 'Earlier verdicts' : 'Verdicts') + '</h3>' + (earlier.length ? earlier.map((v) => verdictHtml(v, titles)).join('') : '<div class="muted">None yet.</div>') + '</div>')
+ '<div><h3>History</h3>' + timeline(item) + '</div>'
+ '<div class="links"><button data-shout="' + esc(item.lane) + '" data-about="' + item.id + '" type="button">Shout the ' + esc(item.lane) + ' lane about #' + item.id + '</button><button data-new type="button">New item</button></div></div>';
@@ -909,59 +1357,170 @@ function render() {
// a number that names no item stays text. A path:lines@commit reference opens that code (B23). It
// counts only as a whole word, never as the tail of one, so what it opens is what it says, and the
// view refuses what is no path in the repo.
- const mark = (x) => (x.shout_decision ? '<span class="mark ask">decision</span> ' : x.shout_answers ? '<span class="mark">answer</span> ' : '');
+ const mark = (x) => (x.shout_decision ? '<span class="mark ask" role="group" title="decision" aria-label="decision">decision</span> ' : x.shout_answers ? '<span class="mark" role="group" title="answer" aria-label="answer">answer</span> ' : '');
// Evidence a shout carries (B22), as the fields it is: its kind and outcome, the item, who sent it,
// and the commit, shortened, with the full SHA on hover.
- const evidence = (x) => (x.shout_evidence_kind ? '<span class="ev"><b>' + esc(x.shout_evidence_kind) + '</b> ' + esc(x.shout_evidence_outcome) + ' · ' + linked('#' + x.shout_evidence_item, titles) + ' · ' + esc(x.shout_from) + ' · <code title="' + esc(x.shout_evidence_commit) + '">' + esc(String(x.shout_evidence_commit).slice(0, 12)) + '</code></span>' : '');
- $('feed').innerHTML = p.shouts.length ? byDay(p.shouts, (x) => x.shout_at, (x) => '<div><time>' + clock(x.shout_at) + '</time><div><b>' + esc(x.shout_from) + ' → ' + esc(x.shout_to) + '</b> ' + mark(x) + rich(x.shout_text, titles) + evidence(x) + '</div></div>') : '<div class="empty">No shouts yet.</div>';
+ const evidence = (x) => (x.shout_evidence_kind ? '<div class="receipt"><div><span class="badge">' + esc(x.shout_evidence_kind) + '</span> <span class="outcome">' + esc(x.shout_evidence_outcome) + '</span></div>'
+ + '<div class="receipt-foot">' + linked('#' + x.shout_evidence_item, titles) + ' · ' + esc(agentName(x.shout_from)) + ' · ' + codeChip(String(x.shout_evidence_commit), 'sha') + '</div></div>' : '');
+ // A shout as a card (#250): who, in a colour of their own, to whom, its item and when on top; what was said
+ // below. An ask carries a band until it is answered; a long shout folds at six lines.
+ const hue = (id) => [...String(id)].reduce((h, c) => (h * 31 + c.charCodeAt(0)) >>> 0, 7) % 8;
+ const initials = (id) => { const [name, rest = ''] = String(id).split(/[-_ ]/); const digits = rest.replace(/\D/g, ''); return (name.slice(0, digits ? 1 : 2) + digits.slice(0, 3)).toUpperCase(); };
+ const open = new Set([...p.decisions, ...p.asked].map((d) => d.shout_id));
+ const answerOf = new Map(p.shouts.filter((y) => y.shout_answers).map((y) => [y.shout_answers, y]));
+ const band = (x) => !x.shout_decision ? '' : open.has(x.shout_id) ? '<div class="band">Decision needed</div>'
+ : '<div class="band done">Answered' + (answerOf.has(x.shout_id) ? ' by ' + esc(agentName(answerOf.get(x.shout_id).shout_from)) + ': <a href="#shout-' + answerOf.get(x.shout_id).shout_id + '">see the answer</a>' : '') + '</div>';
+ // The shout's item: the first #N in its text that names an item on this board, or else its evidence's.
+ const itemOf = (x) => [...String(x.shout_text).matchAll(/#(\d+)/g)].map((m) => String(Number(m[1]))).find((id) => titles.has(id)) || x.shout_evidence_item;
+ // The coordinator's mark is the board's own: a square with the Pullboard logo, so it stands out from the agents.
+ const LEAD = '<svg viewBox="0 0 64 64" aria-hidden="true"><path fill="currentColor" d="M8 7h35a6 6 0 0 1 6 6v7H8a5 5 0 0 1-5-5v-3a5 5 0 0 1 5-5Z"/><rect width="56" height="14" x="3" y="25" fill="var(--accent)" rx="5"/><path fill="currentColor" d="M8 43h35a6 6 0 0 1 6 6v8H8a5 5 0 0 1-5-5v-4a5 5 0 0 1 5-5Z"/></svg>';
+ const lead = (from) => from === 'coordinator';
+ // Opened from the status bar's unread, the feed is exactly those shouts, the ones after the mark the person had.
+ const unread = view.unread?.root === view.root ? view.unread : null;
+ const heard = unread ? p.shouts.filter((x) => x.shout_id > unread.after) : view.agent ? p.shouts.filter((x) => x.shout_from === view.agent || x.shout_to === view.agent) : p.shouts;
+ const bar = !unread && !view.agent ? '' : '<div class="feed-bar">' + (unread ? '<span><b>' + heard.length + '</b> unread <button class="link" data-unread type="button">show all</button></span>'
+ : '<span>Shouts with <b>' + esc(agentName(view.agent)) + '</b> <button class="link" data-agent="" type="button">show all</button></span>') + '</div>';
+ $('shouts-pane').classList.toggle('bare', view.agentsHidden);
+ // Who has heard a shout of the person's: the agents it reached whose inbox has read past it. Each agent's read
+ // cursor is already on the board, so this is presentation only; reading is all it says, not acting on it.
+ const reached = (x, a) => a.agent_id !== x.shout_from && ['all', a.agent_id, a.agent_lane].includes(x.shout_to);
+ const dot = (a) => '<span class="heard-face h' + hue(a.agent_id) + (lead(a.agent_id) ? ' lead' : '') + '">' + (lead(a.agent_id) ? LEAD : esc(initials(a.agent_id))) + '</span>';
+ const heardBy = (x) => {
+ if (x.shout_from !== 'person') return '';
+ const to = p.agents.filter((a) => reached(x, a)), by = to.filter((a) => (a.agent_last_shout_id ?? 0) >= x.shout_id);
+ // A shout that reaches no agent at all, such as one to a lane nobody has joined, has not been heard either.
+ if (!by.length) return '<div class="heard not">Not heard yet</div>';
+ const first = by.find((a) => lead(a.agent_id)) || by[0], rest = by.length - 1;
+ return '<div class="heard" title="Heard by ' + esc(by.map((a) => agentName(a.agent_id)).join(', ')) + '"><span class="heard-faces">' + [first, ...by.filter((a) => a !== first)].slice(0, 4).map(dot).join('') + '</span>Heard by ' + esc(agentName(first.agent_id)) + (rest ? ' and ' + rest + (rest === 1 ? ' agent' : ' agents') : '') + '</div>';
+ };
+ // One card for a shout, in the feed and among the asks; tail adds what the place needs, such as Answer. Only the
+ // feed's copy carries the band and the id an answer's link lands on, so an ask shown twice never repeats an id.
+ const card = (x, tail = '', inFeed = true) => '<article class="shout h' + hue(x.shout_from) + (lead(x.shout_from) ? ' lead' : '') + (openShouts.has(x.shout_id) ? ' open' : '') + '"' + (inFeed ? ' id="shout-' + x.shout_id + '"' : '') + ' data-shout-id="' + x.shout_id + '">'
+ + (lead(x.shout_from) ? '<span class="avatar">' + LEAD + '</span>' : '<span class="avatar' + (initials(x.shout_from).length > 3 ? ' wide' : '') + '" aria-hidden="true">' + esc(initials(x.shout_from)) + '</span>') + '<div class="shout-main"><header><b class="who">' + shoutAgentName(x.shout_from) + '</b><span class="to">→ ' + shoutAgentName(x.shout_to) + '</span>'
+ + (itemOf(x) ? '<span class="item">#' + esc(itemOf(x)) + '</span>' : '') + mark(x) + '<time class="long" data-ago="' + esc(x.shout_at) + '" title="' + esc(when(x.shout_at)) + '">' + agoLong(x.shout_at) + '</time></header>'
+ + '<div class="text">' + rich(x.shout_text, titles) + '</div><button class="more" data-more type="button">' + (openShouts.has(x.shout_id) ? 'less' : 'more') + '</button>' + (inFeed ? band(x) + heardBy(x) : '') + evidence(x) + tail + '</div></article>';
+ $('feed').innerHTML = bar + (heard.length ? dayRules(heard, (x) => x.shout_at, card) : '<div class="empty">' + (unread ? 'No unread shouts.' : view.agent ? 'No shouts with ' + esc(agentName(view.agent)) + ' among the last forty.' : 'No shouts yet.') + '</div>');
+ foldShouts();
// Each ask waits here until it is answered (B21); the answer itself is typed in the form below. The
// person answers the ones passed up to them; the rest wait on whoever holds them (B26).
- $('decisions').hidden = !p.decisions.length && !p.asked.length;
- $('decisions').innerHTML = (p.decisions.length ? '<div class="head"><i></i>Decision needed</div>' + p.decisions.map((d) => '<div class="ask"><p><small><b>' + esc(d.shout_from) + '</b> asks, ' + age(d.shout_at) + '</small></p><p>' + rich(d.shout_text, titles) + '</p><button class="ghost" data-go="decide:' + d.shout_id + '" type="button">Answer</button></div>').join('') : '')
- + (p.asked.length ? '<div class="head quiet">Waiting on others</div>' + p.asked.map((d) => '<div class="ask other"><p><small><b>' + esc(d.shout_from) + '</b> asks <b>' + esc(d.shout_to) + '</b>, ' + age(d.shout_at) + '</small></p><p>' + rich(d.shout_text, titles) + '</p></div>').join('') : '');
- $('shout-targets').innerHTML = ['all', ...lanes, ...p.agents.map((a) => a.agent_id)].map((t) => '<option value="' + esc(t) + '">').join('');
+ $('decisions').hidden = !p.decisions.length && !(p.asked.length && view.open.waiting);
+ // The asks waiting on others are a toggle at the end of the composer's line, beside Show agents while the panel is hidden.
+ $('asks-slot').innerHTML = (p.asked.length ? '<button class="asks-toggle" data-fold="waiting" type="button" aria-expanded="' + Boolean(view.open.waiting) + '" title="' + esc('Asks between agents, waiting on others: ' + p.asked.map((d) => agentName(d.shout_from) + ' asks ' + agentName(d.shout_to)).join(', ')) + '">' + p.asked.length + (p.asked.length === 1 ? ' ask' : ' asks') + ' waiting <span aria-hidden="true">' + (view.open.waiting ? '▴' : '▾') + '</span></button>' : '')
+ + (view.agentsHidden ? '<button class="asks-toggle" data-agents-toggle type="button">Show agents</button>' : '');
+ // The asks as the feed's cards, folded to three lines: the person's to answer, then those waiting on others.
+ $('decisions').innerHTML = (p.decisions.length ? '<div class="head"><i></i>Decision needed</div>' + p.decisions.map((d) => card(d, '<button class="ghost answer" data-go="decide:' + d.shout_id + '" type="button">Answer</button>', false)).join('') : '')
+ // Asks waiting on someone else are not the person's to answer: they show only once the composer's toggle opens them.
+ + (p.asked.length && view.open.waiting ? p.asked.map((d) => card(d, '', false)).join('') : '');
+ foldShouts();
// Each agent with what it holds: its claim, then its work sent back, then its work waiting for a
// verdict. The worktree path is there on hover; what the person reads is who is doing what.
// A review an agent holds (V15) comes right after its claim.
const rank = (a, i) => i.status === 'claimed' ? 0 : i.reviewer === a.agent_id ? 1 : stateOf(i) === 'back' ? 2 : 3;
const holding = (a) => items.filter((i) => i.status === 'claimed' ? i.owner === a.agent_id : i.reviewer === a.agent_id || (i.builtBy === a.agent_id && ['back', 'verify'].includes(stateOf(i)))).sort((x, y) => rank(a, x) - rank(a, y));
- $('agents').innerHTML = p.agents.length ? p.agents.map((a) => {
- const mine = holding(a);
- return '<div class="agent"><div><b title="' + esc(a.agent_path) + '">' + esc(a.agent_id) + '</b><span class="muted">' + esc(a.agent_lane) + ' · ' + esc(a.agent_route) + '</span>' + (a.lastMoveAt ? '<time data-ago="' + esc(a.lastMoveAt) + '" title="last moved ' + when(a.lastMoveAt) + '">' + ago(a.lastMoveAt) + '</time>' : '') + '</div>'
- + (mine.length ? mine.map((i) => '<div class="agent-work" data-item="' + i.id + '"><span>#' + i.id + ' ' + rich(i.title, titles) + '</span>' + (i.reviewer === a.agent_id ? '<span class="chip warn">reviewing</span>' : chip(stateOf(i))) + '</div>').join('') : '<small>idle</small>') + '</div>';
- }).join('') : '<div class="empty">No agents yet.</div>';
+ // The agents at work: holding a claim or a review now, or moved in the last hour. Every agent is one click away;
+ // work an idle agent left sent back or waiting stays on the Items tab.
+ const recent = (a) => p.items.some((i) => (i.status === 'claimed' && i.owner === a.agent_id) || (i.status === 'submitted' && i.reviewer === a.agent_id))
+ || (a.lastMoveAt && Date.now() - Date.parse(a.lastMoveAt) < 36e5);
+ const listed = view.allAgents ? p.agents : p.agents.filter(recent);
+ // As little room as the panel can take: an agent holding work is one row, with its avatar and colour from the feed,
+ // the age of its latest move and what it holds; an agent holding nothing is a pill. A row or a pill filters the feed
+ // to that agent's shouts, its lane and route on hover, and the picked agent's row opens out to each thing it holds.
+ const busy = listed.filter((a) => holding(a).length), idle = listed.filter((a) => !holding(a).length);
+ const face = (a) => lead(a.agent_id) ? '<span class="avatar">' + LEAD + '</span>' : '<span class="avatar' + (initials(a.agent_id).length > 3 ? ' wide' : '') + '" aria-hidden="true">' + esc(initials(a.agent_id)) + '</span>';
+ const tip = (a) => 'Shouts with ' + agentName(a.agent_id) + ' · ' + a.agent_lane + ' · ' + a.agent_route + ' (' + a.agent_path + ')';
+ const state = (a, i) => i.reviewer === a.agent_id ? '<span class="chip warn">reviewing</span>' : chip(stateOf(i));
+ const marks = (a) => ' h' + hue(a.agent_id) + (lead(a.agent_id) ? ' lead' : '') + (view.agent === a.agent_id ? ' on' : '');
+ const row = (a) => {
+ const mine = holding(a), first = mine[0];
+ return '<div class="agent-card' + marks(a) + '"><button class="agent-row" data-agent="' + esc(a.agent_id) + '" title="' + esc(tip(a)) + '" type="button">' + face(a)
+ + '<span class="agent-who"><b>' + esc(agentName(a.agent_id)) + '</b>' + state(a, first) + (mine.length > 1 ? '<span class="agent-more">+' + (mine.length - 1) + '</span>' : '') + (a.lastMoveAt ? '<time data-ago="' + esc(a.lastMoveAt) + '">' + ago(a.lastMoveAt) + '</time>' : '') + '</span>'
+ + '<span class="agent-doing"><span class="agent-what"><i>#' + first.id + '</i> ' + esc(first.title) + '</span></span></button>'
+ + (view.agent === a.agent_id ? mine.map((i) => '<div class="agent-work" data-item="' + i.id + '" data-go="item:' + i.id + '"><span>#' + i.id + ' ' + rich(i.title, titles) + '</span>' + state(a, i) + '</div>').join('') : '') + '</div>';
+ };
+ // The panel is for who is doing what: agents holding nothing fold to one line that opens to each of them, and stays
+ // open while one of them is picked.
+ if (idle.some((a) => a.agent_id === view.agent)) view.open.idle = true;
+ // Show all ends the open fold while some agents have not moved lately, or stands alone when none is idle.
+ const allAgents = p.agents.length > p.agents.filter(recent).length ? '<button class="link all-agents" data-all-agents type="button">' + (view.allAgents ? 'show only agents at work' : 'show all ' + p.agents.length) + '</button>' : '';
+ const idleBlock = () => !idle.length ? allAgents : '<div class="agents-idle">' + foldLine('idle', idle.length + ' idle', idle.map((a) => agentName(a.agent_id)).join(', '))
+ + (view.open.idle ? '<div class="idle-list">' + idle.map(pill).join('') + '</div>' + allAgents : '') + '</div>';
+ const pill = (a) => '<button class="agent-pill' + marks(a) + '" data-agent="' + esc(a.agent_id) + '" title="' + esc(tip(a)) + '" type="button"><span>' + face(a) + esc(agentName(a.agent_id)) + '</span></button>';
+ $('agents').innerHTML = (listed.length ? busy.map(row).join('') + idleBlock()
+ : '<div class="empty">' + (p.agents.length ? 'No agent has moved today.' : 'No agents yet.') + '</div>');
+ // The status bar: what the board is doing, along the foot of the window. Each number is the length of the list its
+ // click opens (the Active and To verify filters, the gated rows, the agents panel's rows), and a part with none hides.
+ // countUnseen fills the unread shouts once the tab is drawn.
+ const release = (p.milestones || []).find((m) => m.done < m.total), last = p.events[0];
+ const part = (to, n, words, title) => n ? '<button type="button" data-status="' + to + '" title="' + esc(title) + '"><b>' + n + '</b> ' + words + '</button>' : '';
+ $('status-board').innerHTML = part('items', active.length, 'items', 'Show the active items') + '<button type="button" id="status-unread" data-status="unread" title="Show the shouts you have not read" hidden></button>'
+ + part('agents', busy.length, busy.length === 1 ? 'agent' : 'agents', 'Show the agents holding work: ' + busy.map((a) => agentName(a.agent_id)).join(', '))
+ + part('verify', active.filter((i) => stateOf(i) === 'verify').length, 'to verify', 'Show the items waiting on a verdict')
+ + part('gated', active.filter(gatedOf).length, 'gated', 'Show the open items waiting on another item or a held lane')
+ + (release ? '<button type="button" data-status="release" title="' + esc('Show this release on the Roadmap: ' + (release.note || release.name)) + '">' + esc(release.name) + ' <b>' + release.done + '/' + release.total + '</b></button>' : '')
+ + (last ? '<button type="button" class="end" data-status="' + (last.item_id ? 'item:' + last.item_id : 'activity') + '" title="' + esc(last.event_at) + '">' + esc(agentName(last.event_by)) + ' ' + esc(last.event_kind) + (last.item_id ? ' #' + last.item_id : '') + ' · ' + age(last.event_at) + '</button>' : '');
const held = new Map(p.holds.map((h) => [h.hold_lane, h]));
- $('lanes').innerHTML = working.map((l) => '<div class="lane"><span><b>' + esc(l) + '</b> ' + (held.has(l) ? '<span class="chip no">held by ' + esc(held.get(l).hold_by) + '</span> <span class="muted">' + linked(held.get(l).hold_reason, titles) + '</span>' : '<span class="chip ok">open</span>') + '</span>' + (held.has(l) ? '<button class="ghost" data-release="' + esc(l) + '" type="button">Release</button>' : '') + '</div>').join('');
+ $('lanes').innerHTML = working.map((l) => '<div class="lane"><span><b>' + esc(l) + '</b> ' + (held.has(l) ? '<span class="chip no">held by ' + esc(agentName(held.get(l).hold_by)) + '</span> <span class="muted">' + linked(held.get(l).hold_reason, titles) + '</span>' : '<span class="chip ok">open</span>') + '</span>' + (held.has(l) ? '<button class="ghost" data-release="' + esc(l) + '" type="button">Release</button>' : '') + '</div>').join('');
for (const kind of ['spec', 'doctrine']) {
const rows = kind === 'spec' ? p.spec : p.practice;
const filter = view.rows[kind];
const labels = { decide: 'Needs your decision', all: 'All rows', approved: 'Approved' };
- const n = { decide: rows.filter((r) => ['pending', 'draft'].includes(r.status)).length, all: rows.length, approved: rows.filter((r) => r.status === 'approved').length };
+ /** A source row stays in Needs your decision until its person decision is recorded. */
+ const undecided = (r) => ['pending', 'draft'].includes(r.status) && !r.decision;
+ const n = { decide: rows.filter(undecided).length, all: rows.length, approved: rows.filter((r) => r.status === 'approved').length };
$(kind + '-chips').innerHTML = Object.keys(labels).map((f) => '<button data-rows="' + kind + ':' + f + '" class="' + (filter === f ? 'on' : '') + '" type="button">' + labels[f] + '<b>' + n[f] + '</b></button>').join('');
- const shownRows = rows.filter((r) => filter === 'all' || (filter === 'decide' ? ['pending', 'draft'].includes(r.status) : r.status === 'approved'));
+ const shownRows = rows.filter((r) => filter === 'all' || (filter === 'decide' ? undecided(r) : r.status === 'approved'));
+ // With no row picked, or the pick filtered out, the detail opens on the first row shown, as Items does.
+ if (!shownRows.some((r) => r.id === view.row[kind])) view.row[kind] = shownRows[0]?.id ?? null;
+ const feedback = view.specFeedback?.kind === kind && view.specFeedback.root === view.root && view.specFeedback.from === 'list' ? view.specFeedback : null;
+ const feedbackId = feedback && (shownRows.some((r) => r.id === feedback.id) ? feedback.id : shownRows.some((r) => r.id === feedback.next) ? feedback.next : shownRows[0]?.id);
let section = null;
+ const implied = filter === 'decide' ? 'draft' : 'approved';
+ // A Doctrine section is usually all Pullboard's rules or all this repo's, so its header says which; a row says so only
+ // where it differs from its section, such as a standard rule this repo changed.
+ const sectionSource = new Map();
+ if (kind === 'doctrine') for (const r of rows) { const was = sectionSource.get(r.section); sectionSource.set(r.section, was === undefined || was === ruleSource(r) ? ruleSource(r) : null); }
$(kind + '-list').innerHTML = shownRows.length ? shownRows.map((r) => {
- const head = r.section !== section ? '<h4>' + esc(r.section) + '</h4>' : '';
+ const sectionRows = !snapshot && (!readOnly || requests) && kind === 'spec' && r.section !== section ? rows.filter((entry) => entry.section === r.section && undecided(entry)) : [];
+ const head = r.section !== section ? '<div class="spec-section-head"><h4>' + esc(r.section) + (sectionSource.get(r.section) ? ' <small class="section-source" title="' + esc(ruleSourceTitle(r)) + '">' + esc(sectionSource.get(r.section)) + '</small>' : '') + '</h4>' + (sectionRows.length ? '<button class="spec-section-approve" data-section-approve="' + esc(r.section) + '" type="button">Approve all ' + sectionRows.length + ' in this section</button>' : '') + '</div>' : '';
section = r.section;
const declined = kind === 'doctrine' && r.status === 'wont';
const text = declined ? '<s>' + linked(r.standardText || r.text, titles) + '</s>' : linked(r.text, titles);
const reason = declined && r.reason ? '<small class="rule-reason">Reason: ' + linked(r.reason, titles) + '</small>' : '';
- const source = kind === 'doctrine' ? '<small class="rule-source">' + esc(ruleSource(r)) + '</small>' : '';
- return head + '<div class="srow' + (view.row[kind] === r.id ? ' on' : '') + '" data-row="' + kind + ':' + esc(r.id) + '"><code>' + esc(r.id) + '</code><span><span class="chip ' + tone(r.status) + '">' + esc(r.status) + '</span>' + source + '</span><span>' + text + reason + '</span></div>';
- }).join('') : '<div class="empty">' + (rows.length ? 'No rows match.' : kind === 'spec' ? 'No spec rows yet. Each requirement is one row in SPEC.md, such as G1 [draft, must] and a line; write them, or ask an agent to, and they show up here.' : 'No practice rows yet: they live in PRACTICE.md.') + '</div>';
+ // Most rules are Pullboard's own; only the exception, a rule this repo wrote or changed, is marked in the list.
+ const source = kind === 'doctrine' && sectionSource.get(r.section) !== ruleSource(r) ? '<small class="rule-source" title="' + esc(ruleSourceTitle(r)) + '">' + esc(ruleSource(r)) + '</small>' : '';
+ // A row reads as its id and its words; a chip only where its status is not the one the filter already says.
+ const chip = r.status === implied ? '' : '<span class="chip ' + tone(r.status) + '">' + esc(r.stage || r.status) + '</span>';
+ return head + (feedback && feedbackId === r.id ? specFeedback(feedback) : '') + '<div class="srow' + (view.row[kind] === r.id ? ' on' : '') + '" data-row="' + kind + ':' + esc(r.id) + '"><code>' + esc(r.id) + '</code><span class="srow-text">' + chip + source + text + reason + '</span></div>';
+ }).join('') : '<div class="empty">' + (rows.length ? 'No rows match.' : kind === 'spec' ? 'No spec rows yet. Each requirement is one row in SPEC.md, such as G1 [draft, must] and a line; write them, or ask an agent to, and they show up here.' : 'No doctrine rows yet: they live in DOCTRINE.md.') + '</div>';
+ if (feedback && !shownRows.length) $(kind + '-list').innerHTML += specFeedback(feedback);
const row = rows.find((r) => r.id === view.row[kind]);
const citing = row ? p.items.filter((i) => i.specs.includes(row.id)) : [];
const declined = kind === 'doctrine' && row && row.status === 'wont';
const text = row ? declined ? '<s>' + linked(row.standardText || row.text, titles) + '</s>' : linked(row.text, titles) : '';
- const source = kind === 'doctrine' && row ? '<span class="chip">' + esc(ruleSource(row)) + '</span>' : '';
+ const source = kind === 'doctrine' && row ? '<span class="chip" title="' + esc(ruleSourceTitle(row)) + '">' + esc(ruleSource(row)) + '</span>' : '';
const reason = declined && row.reason ? '<dt>reason</dt><dd>' + linked(row.reason, titles) + '</dd>' : '';
- const home = kind === 'doctrine' && row && row.origin === 'standard' ? 'Standard rules come with Pullboard; override or decline one in PRACTICE.md.' : 'Rows change in ' + (kind === 'spec' ? 'SPEC.md' : 'PRACTICE.md') + ', and only you approve them.';
- $(kind + '-detail').innerHTML = row ? '<div class="stack tight"><h2><span>' + esc(row.id) + '</span>' + text + '</h2><div class="meta"><span class="chip ' + tone(row.status) + '">' + esc(row.status) + '</span>' + (row.tier ? '<span class="chip">' + esc(row.tier) + '</span>' : '') + source + '</div><dl class="kv"><dt>section</dt><dd>' + esc(row.section) + '</dd>' + reason + (row.gate ? '<dt>gate</dt><dd>' + esc(row.gate) + '</dd>' : '') + (row.serves && row.serves.length ? '<dt>serves</dt><dd>' + esc(row.serves.join(', ')) + '</dd>' : '') + '</dl><div><h3>Items that cite it</h3>' + (citing.length ? '<div class="links">' + citing.map((i) => '<div class="links-item" data-item="' + i.id + '"><span>#' + i.id + ' ' + rich(i.title, titles) + '</span></div>').join('') + '</div>' : '<div class="muted">None yet.</div>') + '</div><div class="muted">' + home + '</div></div>' : '<div class="empty">Pick a row to see it, and the items that cite it.</div>';
+ const home = kind === 'doctrine' && row && row.origin === 'standard' ? 'Standard rules come with Pullboard; override or decline one in DOCTRINE.md.' : 'Rows change in ' + (kind === 'spec' ? 'SPEC.md' : 'DOCTRINE.md') + ', and only you approve them.';
+ const rowStatus = row?.stage || row?.status;
+ const rowDecisionActions = !snapshot && (!readOnly || requests) && row && undecided(row) && (kind === 'spec' || row.origin !== 'standard')
+ ? '<div class="spec-decision-actions detail-decision-actions"><button class="approve-row" data-row-decision="approve" data-row-kind="' + kind + '" data-row-id="' + esc(row.id) + '" title="Approve (A, from the list)" type="button">Approve</button><button class="decline-row" data-row-decision="decline" data-row-kind="' + kind + '" data-row-id="' + esc(row.id) + '" title="Decline (D, from the list)" type="button">Decline</button></div>'
+ : '';
+ $(kind + '-detail').innerHTML = row ? '<div class="stack tight"><h2><span>' + esc(row.id) + '</span>' + text + '</h2><div class="meta"><span class="chip ' + tone(row.status) + '">' + esc(rowStatus) + '</span>' + (row.tier ? '<span class="chip">' + esc(row.tier) + '</span>' : '') + source + '</div>' + rowDecisionActions + (kind === 'spec' && view.specFeedback?.kind === kind && view.specFeedback.root === view.root && view.specFeedback.from === 'detail' && view.specFeedback.id === row.id ? specFeedback(view.specFeedback) : '') + '<dl class="kv"><dt>section</dt><dd>' + esc(row.section) + '</dd>' + reason + (row.gate ? '<dt>gate</dt><dd>' + esc(row.gate) + '</dd>' : '') + (row.serves && row.serves.length ? '<dt>serves</dt><dd>' + esc(row.serves.join(', ')) + '</dd>' : '') + '</dl><div><h3>Items that cite it</h3>' + (citing.length ? '<div class="links">' + citing.map((i) => '<div class="links-item" data-item="' + i.id + '"><span>#' + i.id + ' ' + rich(i.title, titles) + '</span></div>').join('') + '</div>' : '<div class="muted">None yet.</div>') + '</div><div class="muted">' + home + '</div></div>' : '<div class="empty">Pick a row to see it, and the items that cite it.</div>';
}
if (keep('pb.flow') !== 'hidden') $('flow').innerHTML = flowSvg(p);
- $('activity').innerHTML = p.events.length ? byDay(p.events, (e) => e.event_at, (e) => '<div><time>' + clock(e.event_at) + '</time><div class="act"><b>' + esc(e.event_by) + '</b> ' + esc(e.event_kind) + (e.item_id ? ' <button class="ref" data-go="item:' + e.item_id + '" type="button">#' + e.item_id + '</button>' + (titles.has(String(e.item_id)) ? ' <span class="what">' + rich(titles.get(String(e.item_id)), titles) + '</span>' : '') : '') + '</div></div>') : '<div class="empty">No activity yet.</div>';
+ // A shout or an answer says what it said: who to whom, then its first line, from the shouts on hand.
+ // One older than those still names who it went to.
+ const said = new Map(p.shouts.map((x) => [x.shout_id, x]));
+ const spoke = (e) => {
+ let detail = {};
+ try { detail = JSON.parse(e.event_detail || '{}') || {}; } catch { /* an unreadable detail names the sender alone */ }
+ const x = said.get(detail.shout) || { shout_to: detail.to, shout_decision: detail.decision, shout_answers: detail.answers };
+ const verb = e.event_kind === 'answer' || x.shout_answers ? 'answered' : x.shout_decision ? 'asked' : 'shouted to';
+ const line = firstLine(x.shout_text);
+ return '<b>' + esc(agentName(e.event_by)) + '</b> ' + verb + (x.shout_to ? ' <b>' + esc(agentName(x.shout_to)) + '</b>' : '') + (line ? '<span class="said" title="' + esc(line) + '">' + inline(line, titles) + '</span>' : '');
+ };
+ $('activity').innerHTML = p.events.length ? byDay(p.events, (e) => e.event_at, (e) => '<div><time>' + clock(e.event_at) + '</time><div class="act">' + (e.event_kind === 'shout' || e.event_kind === 'answer' ? spoke(e) : '<b>' + esc(agentName(e.event_by)) + '</b> ' + esc(e.event_kind) + (e.item_id ? ' <button class="ref" data-go="item:' + e.item_id + '" type="button">#' + e.item_id + '</button>' + (titles.has(String(e.item_id)) ? ' <span class="what">' + rich(titles.get(String(e.item_id)), titles) + '</span>' : '') : '')) + '</div></div>') : '<div class="empty">No activity yet.</div>';
showTab();
}
@@ -981,6 +1540,7 @@ function showTab() {
document.querySelectorAll('[data-pane]').forEach((pane) => { pane.hidden = pane.dataset.pane !== view.tab; });
document.querySelectorAll('.tab').forEach((button) => button.classList.toggle('on', button.dataset.tab === view.tab));
countUnseen();
+ if (view.tab === 'shouts') foldShouts();
}
/** The address that names a tab: the Roadmap's own, or the board's, keeping the rest as it is. */
@@ -1045,7 +1605,25 @@ function countUnseen() {
const newest = p.shouts.length ? p.shouts[0].shout_id : 0;
const seen = view.tab === 'shouts' || kept === null || kept === undefined ? newest : Number(kept);
if (String(seen) !== String(kept)) { view.seen[key] = seen; keep(key, String(seen)); }
- $('count-shouts').textContent = (p.unseen && p.unseen.since === seen ? p.unseen.count : p.shouts.filter((x) => x.shout_id > seen).length) || '';
+ const unread = (p.unseen && p.unseen.since === seen ? p.unseen.count : p.shouts.filter((x) => x.shout_id > seen).length) || 0;
+ const slot = $('status-unread');
+ if (slot) { slot.innerHTML = '<b>' + unread + '</b> unread'; slot.hidden = !unread; }
+}
+
+/** A quiet line that opens what it counts: what it says, everything it holds on hover, and show or hide. */
+function foldLine(name, text, names) {
+ return '<button class="fold-line" data-fold="' + name + '" type="button" aria-expanded="' + Boolean(view.open[name]) + '" title="' + esc(names) + '"><span>' + esc(text) + '</span><span class="fold-more">' + (view.open[name] ? 'hide' : 'show') + '</span></button>';
+}
+
+/**
+ * Address the composer: the coordinator unless someone else is named, who then shows as a chip the person can clear.
+ */
+function addressTo(to) {
+ const who = to || 'coordinator';
+ $('shout-to').value = who;
+ $('shout-to-chip').hidden = who === 'coordinator';
+ $('shout-to-chip').innerHTML = who === 'coordinator' ? '' : 'to <b>' + esc(agentName(who)) + '</b><button class="to-clear" data-to-clear type="button" aria-label="Shout to the coordinator instead">×</button>';
+ $('shout-text').placeholder = 'Shout to ' + (who === 'coordinator' ? 'the coordinator' : agentName(who));
}
/**
@@ -1057,19 +1635,45 @@ function countUnseen() {
function answer(id) {
const ask = id === null ? null : data.project.decisions.find((d) => d.shout_id === id) || null;
if (ask && !view.answering) view.to = $('shout-to').value;
- if (!ask && view.answering) $('shout-to').value = view.to || '';
+ if (!ask && view.answering) addressTo(view.to);
view.answering = ask ? { root: view.root, id: ask.shout_id } : null;
$('answering').hidden = !ask;
- $('answering-who').textContent = ask ? ask.shout_from : '';
+ $('answering-who').textContent = ask ? agentName(ask.shout_from) : '';
const question = ask ? linked(ask.shout_text, new Map(data.project.items.map((i) => [String(i.id), i.title]))) : '';
if (question.includes('<button class="ref"')) $('answering-q').innerHTML = question;
else $('answering-q').textContent = ask ? ask.shout_text : '';
- if (ask) $('shout-to').value = ask.shout_from;
+ if (ask) addressTo(ask.shout_from);
$('shout-to').disabled = Boolean(ask);
- $('shout-send').textContent = ask ? 'Answer' : 'Shout';
+ $('shout-to-chip').hidden = Boolean(ask) || $('shout-to').value === 'coordinator';
+ const verb = ask ? 'Answer' : 'Shout';
+ $('shout-send').setAttribute('aria-label', verb);
+ $('shout-send').title = verb + ' (Enter; Shift+Enter for a new line)';
if (ask) $('shout-text').focus();
}
+/** Open what a status-bar part counts: its tab, narrowed to exactly those. */
+function statusGo(to) {
+ view.unread = null;
+ view.roadmapOnly = null;
+ if (to.startsWith('item:')) return go(to);
+ if (to === 'items') { view.state = 'active'; view.lane = null; view.before = null; $('q').value = ''; openTab('items'); }
+ else if (to === 'verify' || to === 'gated') { view.state = to; view.lane = null; view.before = null; $('q').value = ''; openTab('items'); }
+ else if (to === 'unread') {
+ // Only the shouts after the mark the person had; opening Shouts then moves the mark past them.
+ const key = 'pb.seen.' + view.root;
+ view.unread = { root: view.root, after: Number(view.seen[key] ?? keep(key) ?? 0) };
+ view.agent = null;
+ openTab('shouts');
+ }
+ // The agents it counts are the panel's rows, so it opens the panel even where the person hid it.
+ else if (to === 'agents') { view.agentsHidden = false; keep('pb.agents', 'shown'); view.agent = null; openTab('shouts'); }
+ // The release it counts is one milestone, so the Roadmap opens on that one alone.
+ else if (to === 'release') { view.roadmapOnly = (data.project.milestones || []).find((m) => m.done < m.total)?.name ?? null; openTab('roadmap'); }
+ else openTab(to);
+ showTab();
+ render();
+}
+
/**
* Follow a link in the page: an item, a spec row, a tab or a decision to answer. An item can live on
* another project's board, root, which the page then switches to.
@@ -1079,11 +1683,63 @@ function go(target, root = view.root) {
let tab = view.tab;
if (kind === 'item') { tab = 'items'; view.state = 'all'; view.before = null; }
else if (kind === 'spec') { tab = 'spec'; view.row.spec = id; view.rows.spec = 'all'; }
+ else if (kind === 'doctrine') { tab = 'doctrine'; view.row.doctrine = id; view.rows.doctrine = 'all'; }
+ else if (kind === 'shout') { tab = 'shouts'; view.agent = null; view.unread = null; }
else if (kind === 'tab') tab = id;
else if (kind === 'decide') { tab = 'shouts'; answer(Number(id)); }
openTab(tab);
if (kind === 'item') pick(Number(id), root);
else render();
+ if (kind === 'shout') { const card = document.getElementById('shout-' + id); card?.scrollIntoView({ block: 'center' }); card?.classList.add('found'); setTimeout(() => card?.classList.remove('found'), 1600); }
+}
+
+/** An item's state as a word, for a search result. */
+const stateLabel = (i) => ({ building: 'building', verify: 'to verify', verified: 'verified', back: 'sent back', open: 'open', withdrawn: 'withdrawn' })[stateOf(i)] || stateOf(i);
+
+/** A shout's kind as a word, for a search result. */
+const shoutKind = (x) => (x.shout_decision ? 'decision' : x.shout_answers ? 'answer' : x.shout_evidence_kind ? 'evidence' : 'shout');
+
+/** Everything on the board that matches the top bar's words: items, Spec rows, Doctrine rules and shouts, newest first. */
+function findAll(words) {
+ const p = data?.project, q = words.trim().toLowerCase();
+ if (!p || !q) return [];
+ const has = (...parts) => parts.join(' ').toLowerCase().includes(q);
+ const items = p.items.filter((i) => has('#' + i.id, i.title, i.lane, i.specs.join(' '), i.criterion || ''))
+ .sort((a, b) => b.updatedAt.localeCompare(a.updatedAt)).map((i) => ({ go: 'item:' + i.id, id: '#' + i.id, text: i.title, note: stateLabel(i) }));
+ // A Spec row or Doctrine rule is as new as the commit that added it (0 not yet committed; a standard rule, never added
+ // here, last); rows one commit added together read newest first by their place in the file.
+ const rows = (kind, list) => list.map((r, at) => ({ r, at })).filter(({ r }) => has(r.id, r.text))
+ .sort((a, b) => (a.r.added ?? Infinity) - (b.r.added ?? Infinity) || b.at - a.at)
+ .map(({ r }) => ({ go: kind + ':' + r.id, id: r.id, text: r.text, note: r.stage || r.status }));
+ const shouts = p.shouts.filter((x) => has(x.shout_from, x.shout_to, x.shout_text)).map((x) => ({ go: 'shout:' + x.shout_id, id: '#' + x.shout_id, text: firstLine(x.shout_text), note: shoutKind(x) }));
+ return [['Items', items], ['Spec', rows('spec', p.spec)], ['Doctrine', rows('doctrine', p.practice)], ['Shouts', shouts]].filter(([, list]) => list.length);
+}
+
+/** Draw the search's results under it: up to five a group, the highlighted one ready for Enter. */
+function showFound() {
+ const box = $('find-results'), words = $('q').value;
+ const groups = findAll(words);
+ view.found = groups.flatMap(([, list]) => list.slice(0, 5));
+ view.foundAt = Math.min(view.foundAt || 0, Math.max(0, view.found.length - 1));
+ let n = 0;
+ box.innerHTML = groups.length ? groups.map(([name, list]) => '<h4>' + name + '<span>' + (list.length > 5 ? '5 of ' + list.length : list.length) + '</span></h4>'
+ + list.slice(0, 5).map((hit) => '<button class="find-hit' + (n++ === view.foundAt ? ' on' : '') + '" data-find="' + esc(hit.go) + '" type="button" role="option"><code>' + esc(hit.id) + '</code><span>' + esc(hit.text) + '</span><small>' + esc(hit.note) + '</small></button>').join('')).join('')
+ : '<div class="find-empty">Nothing on this board matches “' + esc(words.trim()) + '”.</div>';
+ box.hidden = !words.trim();
+ box.dataset.why = box.hidden ? 'no words' : '';
+}
+
+/** Put the search's results away, and say why on the box, so whoever finds them gone can name what closed them. */
+function hideFound(why) {
+ $('find-results').hidden = true;
+ $('find-results').dataset.why = why;
+}
+
+/** Open what a result names, and put the results away. */
+function openFound(target) {
+ hideFound('opened');
+ $('q').blur();
+ go(target);
}
/** Show an item's detail, on another project's board when root names one. */
@@ -1127,6 +1783,16 @@ async function code(ref, before) {
render();
if (!c.open || c.lines) return;
c.error = null;
+ if (snapshot) {
+ c.error = 'Source code is not included in this relay snapshot; open the reference in the local project view.';
+ render();
+ return;
+ }
+ if (transportModule) {
+ c.error = 'Source code is unavailable in a relay view; open this reference in the local project view.';
+ render();
+ return;
+ }
try {
const reply = await api(boardPath(view.root) + '/code?ref=' + encodeURIComponent(ref) + '&before=' + encodeURIComponent(before));
Object.assign(c, reply.code);
@@ -1136,7 +1802,45 @@ async function code(ref, before) {
render();
}
-/** Translate the page's five actions into the public move shape and a familiar command label. */
+/** Fetch the rest of a bounded local reference in API-sized windows after an explicit request. */
+async function showAllCode(ref, before) {
+ const root = view.root;
+ const c = view.code[root + '\n' + before + '\n' + ref];
+ const parts = codeReferenceParts(ref);
+ if (!c || c.allLoading) return;
+ if (transportModule) { c.error = 'Source code is unavailable in a relay view; open this reference in the local project view.'; render(); return; }
+ if (!parts) { c.error = 'Code reference has an invalid path, range or commit SHA.'; render(); return; }
+ c.error = null;
+ c.allLoading = true;
+ render();
+ try {
+ const lines = [];
+ for (let from = parts.from; from <= parts.to; from += 60) {
+ const to = Math.min(parts.to, from + 59);
+ const pageRef = parts.path + ':' + from + (to === from ? '' : '-' + to) + '@' + parts.commit;
+ const page = await api(boardPath(root) + '/code?ref=' + encodeURIComponent(pageRef) + '&before=' + encodeURIComponent(before));
+ lines.push(...page.code.lines);
+ }
+ if (lines.length !== parts.to - parts.from + 1) throw new Error('The local view returned an incomplete code range.');
+ c.allLines = lines;
+ c.all = true;
+ } catch (error) {
+ c.error = String(error.message || error);
+ } finally {
+ c.allLoading = false;
+ render();
+ }
+}
+
+/** Return an expanded preview to its first bounded window without closing the reference. */
+function showLessCode(ref, before) {
+ const c = view.code[view.root + '\n' + before + '\n' + ref];
+ if (!c) return;
+ c.all = false;
+ render();
+}
+
+/** Translate person actions into their public literal intent and a familiar command label. */
function pageMove(command, args = {}) {
/** Trim form values before constructing the move and its display label. */
const text = (value) => String(value || '').trim();
@@ -1150,6 +1854,16 @@ function pageMove(command, args = {}) {
if (command === 'answer') return { body: { verb: 'answer', item: Number(args.id), args: { text: text(args.text), as: 'person' } }, label: ['answer', text(args.id), text(args.text), '--as', 'person'].join(' ') };
if (command === 'hold') return { body: { verb: 'hold', args: { lane: text(args.lane), reason: text(args.reason) } }, label: ['hold', text(args.lane), '--reason', text(args.reason)].join(' ') };
if (command === 'release') return { body: { verb: 'hold', args: { lane: text(args.lane), off: true } }, label: ['hold', text(args.lane), '--off'].join(' ') };
+ if (command === 'spec-approve') {
+ const ids = text(args.ids);
+ if (!ids) throw new Error('Choose at least one spec row to approve.');
+ return { body: { verb: 'spec-approve', args: { ids } }, label: 'spec approve ' + ids };
+ }
+ if (command === 'spec-decline') {
+ const ids = text(args.ids), reason = text(args.reason);
+ if (!ids || !reason) throw new Error('Choose a spec row and enter a reason to decline it.');
+ return { body: { verb: 'spec-decline', args: { ids, reason } }, label: 'spec decline ' + ids + ' --reason ' + reason };
+ }
throw new Error('No view action ' + String(command) + '; choose add, shout, answer, hold or release.');
}
@@ -1158,39 +1872,107 @@ function moveMessage(move, result) {
if (move.verb === 'add') return 'added #' + result.item.item_id;
if (move.verb === 'shout') return 'shouted to ' + move.args.to;
if (move.verb === 'answer') return 'answered #' + move.item;
+ if (move.verb === 'spec-approve') return 'approved rows ' + move.args.ids + ' (pending apply)';
+ if (move.verb === 'spec-decline') return 'declined rows ' + move.args.ids + ' (pending apply)';
return move.args.off ? 'released the ' + move.args.lane + ' lane' : 'holding the ' + move.args.lane + ' lane: ' + move.args.reason;
}
+/** Render escaped decision feedback beside the affected Spec row (B26, N26). */
+function specFeedback(feedback) {
+ return '<div class="spec-feedback ' + feedback.tone + '" role="status">' + esc(feedback.text) + '</div>';
+}
+
+/** Ask why a Spec row or Doctrine rule is declined; the reason, once given, is recorded where it was asked. */
+function askDecline(kind, id, from) {
+ view.declining = id;
+ view.declineKind = kind;
+ view.declineFrom = from;
+ $('spec-decline-title').textContent = 'Decline ' + id;
+ $('spec-decline-reason').value = '';
+ $('spec-decline-dialog').hidden = false;
+ $('spec-decline-reason').focus();
+}
+
+/**
+ * Record a Spec or Doctrine decision beside its row and retain the list's reading position (B26, N26). A Doctrine rule
+ * goes to the board by its qualified id, doctrine:D1, as the command line names it (pullboard spec approve doctrine:D1).
+ */
+async function decideRow(kind, command, args, anchor) {
+ if (snapshot || (readOnly && !requests)) return false;
+ const root = view.root, scroll = window.scrollY;
+ const ids = String(args.ids).split(/s+/);
+ const prefix = kind + ':';
+ const rows = [...$(kind + '-list').querySelectorAll('[data-row]')];
+ const index = rows.findIndex((row) => row.dataset.row === prefix + ids[0]);
+ const next = rows.slice(index + 1).find((row) => !ids.includes(row.dataset.row.slice(prefix.length)))?.dataset.row.slice(prefix.length);
+ const feedback = { kind, root, id: ids[0], next, from: anchor?.closest('#' + kind + '-detail') ? 'detail' : 'list', tone: '', text: 'Recording decision…' };
+ view.specFeedback = feedback;
+ render();
+ window.scrollTo({ top: scroll, behavior: 'instant' });
+ try {
+ const move = pageMove(command, kind === 'doctrine' ? { ...args, ids: ids.map((id) => 'doctrine:' + id).join(' ') } : args);
+ const result = requests ? await sendPersonRequest(root, move.body) : await api(boardPath(root) + '/moves', move.body);
+ const request = requests && result?.result?.request;
+ if (requests && (!request?.id || !['waiting', 'done', 'refused'].includes(request.status))) throw new Error('The request did not include its status; refresh the board to check it.');
+ feedback.tone = requests ? request.status === 'done' ? 'ok' : request.status === 'refused' ? 'no' : '' : 'ok';
+ feedback.text = requests ? requestNotice(request) : moveMessage(move.body, result.result);
+ if (requests) { feedback.requestId = request.id; feedback.status = request.status; }
+ // Decided from the list, the pick moves on to the next row before the board redraws without the decided one, so
+ // the next key decides that one.
+ if (feedback.from === 'list' && feedback.tone !== 'no' && next && view.row[kind] === ids[0] && root === view.root) view.row[kind] = next;
+ await refresh();
+ } catch (error) {
+ feedback.tone = 'no';
+ feedback.text = String(error.message || error);
+ }
+ if (root === view.root && view.specFeedback === feedback) {
+ render();
+ window.scrollTo({ top: scroll, behavior: 'instant' });
+ if (!requests || feedback.status === 'done') setTimeout(() => { if (view.specFeedback === feedback) { view.specFeedback = null; render(); } }, 6000);
+ }
+ return requests ? Boolean(feedback.requestId) && feedback.status !== 'refused' : feedback.tone === 'ok';
+}
+
/** Run a public API move beside its action and let only the latest one own the console and timer. */
async function act(command, args, anchor) {
const out = $('console');
- if (snapshot || readOnly) { out.hidden = false; out.className = 'console no'; out.textContent = snapshot ? 'This is a read-only snapshot.' : 'This is a read-only view.'; return false; }
+ if (snapshot || (readOnly && !requests)) { out.hidden = false; out.className = 'console no'; out.textContent = snapshot ? 'This is a read-only snapshot.' : 'This is a read-only view.'; return false; }
+ // A form's result stands above its actions, or above the shout composer's bar, never inside that one row.
if (anchor) {
const target = anchor.matches('form')
- ? anchor.querySelector('.actions') || anchor.querySelector('[type="submit"]') || anchor
+ ? anchor.querySelector('.actions') || anchor.querySelector('.composer') || anchor.querySelector('[type="submit"]') || anchor
: anchor.closest('#lanes') || anchor;
target.insertAdjacentElement(anchor.matches('form') ? 'beforebegin' : 'afterend', out);
}
const run = (view.acting = (view.acting || 0) + 1);
- const latest = () => run === view.acting;
+ const root = view.root;
+ const latest = () => run === view.acting && root === view.root;
+ view.request = null;
clearTimeout(view.closing);
out.hidden = false;
out.className = 'console';
- out.textContent = 'running…';
+ out.textContent = requests ? 'Request waiting…' : 'running…';
out.scrollIntoView({ block: 'nearest' });
try {
- const move = pageMove(command, args);
- const result = await api(boardPath(view.root) + '/moves', move.body);
+ // On the local view the person's word to the coordinator is the person's own request, not a shout the
+ // coordinator sends itself; through the relay every action is already a sealed request.
+ const asked = command === 'request' && !requests;
+ const move = asked ? null : pageMove(command === 'request' ? 'shout' : command, command === 'request' ? { to: 'coordinator', text: args.text } : args);
+ const result = asked ? await api(boardPath(root) + '/requests', { text: String(args.text || '').trim() })
+ : requests ? await sendPersonRequest(root, move.body) : await api(boardPath(root) + '/moves', move.body);
+ const request = requests && result?.result?.request;
+ if (requests && (!request?.id || !['waiting', 'done', 'refused'].includes(request.status))) throw new Error('The request did not include its status; refresh the board to check it.');
if (latest()) {
- out.className = 'console ok';
- out.textContent = '$ pullboard ' + move.label + '\n' + moveMessage(move.body, result.result);
+ out.className = 'console' + (requests ? request.status === 'done' ? ' ok' : request.status === 'refused' ? ' no' : '' : ' ok');
+ out.textContent = requests ? requestNotice(request) : asked ? 'Sent to the coordinator.' : '$ pullboard ' + move.label + '\n' + moveMessage(move.body, result.result);
+ if (requests) view.request = { root, id: request.id, run };
out.scrollIntoView({ block: 'center' });
// What went through says so and then steps aside; a refusal stays until the person closes it.
- view.closing = setTimeout(() => { if (latest()) out.hidden = true; }, 6000);
+ if (!requests || request.status === 'done') view.closing = setTimeout(() => { if (latest()) out.hidden = true; }, 6000);
}
await refresh();
if (latest()) out.scrollIntoView({ block: 'center' });
- return true;
+ return !requests || request.status !== 'refused';
} catch (error) {
if (latest()) {
out.className = 'console no';
@@ -1206,8 +1988,21 @@ async function act(command, args, anchor) {
* changes, so a click is never lost to a rebuild; on a quiet board the ages would otherwise stay
* as old as the page.
*/
+/** Shouts the person opened past their six lines, kept across refreshes. */
+const openShouts = new Set();
+
+/** Fold each shout taller than six lines, with 'more' to open it; measured only while Shouts shows. */
+function foldShouts() {
+ if ($('feed').offsetParent === null) return;
+ document.querySelectorAll('#feed .shout, #decisions .shout').forEach((card) => {
+ const text = card.querySelector('.text');
+ card.classList.add('clamp');
+ card.classList.toggle('clamp', card.classList.contains('open') || text.scrollHeight > text.clientHeight + 1);
+ });
+}
+
function tickAges() {
- document.querySelectorAll('[data-ago]').forEach((node) => { node.textContent = ago(node.dataset.ago); });
+ document.querySelectorAll('[data-ago]').forEach((node) => { node.textContent = node.classList.contains('long') ? agoLong(node.dataset.ago) : ago(node.dataset.ago); });
}
/** Open or close the project list where the sidebar is folded into a top bar (under 900px). */
@@ -1237,22 +2032,71 @@ function switchTo(root, target = null, record = true) {
});
}
+// The Shouts tab's own controls: a folded shout's more and less, every agent or only those at work, the agents
+// panel hidden or shown, and an agent's name, which filters the feed to its shouts and addresses the composer to it.
+$('shouts-pane').addEventListener('click', (event) => {
+ if (event.target.closest('[data-credentials]')) { void loadCredentials(); return; }
+ const revoke = event.target.closest('[data-revoke-token]');
+ if (revoke) { void revokeCredential(revoke.dataset.revokeToken); return; }
+ const more = event.target.closest('[data-more]'), pick = event.target.closest('[data-agent]');
+ if (more) {
+ const card = more.closest('.shout'), id = Number(card.dataset.shoutId);
+ if (openShouts.has(id)) openShouts.delete(id); else openShouts.add(id);
+ card.classList.toggle('open', openShouts.has(id));
+ more.textContent = openShouts.has(id) ? 'less' : 'more';
+ return;
+ }
+ if (event.target.closest('[data-to-clear]')) { addressTo('coordinator'); $('shout-text').focus(); return; }
+ const folded = event.target.closest('[data-fold]');
+ if (folded) { view.open[folded.dataset.fold] = !view.open[folded.dataset.fold]; render(); return; }
+ if (event.target.closest('[data-all-agents]')) { view.allAgents = !view.allAgents; render(); return; }
+ if (event.target.closest('[data-agents-toggle]')) { view.agentsHidden = !view.agentsHidden; keep('pb.agents', view.agentsHidden ? 'hidden' : 'shown'); render(); return; }
+ if (event.target.closest('[data-unread]')) { view.unread = null; render(); return; }
+ if (!pick) return;
+ view.unread = null;
+ view.agent = pick.dataset.agent && pick.dataset.agent !== view.agent ? pick.dataset.agent : null;
+ if (!view.answering) addressTo(view.agent);
+ render();
+});
+// Enter shouts; Shift+Enter starts a new line.
+$('shout-text').addEventListener('keydown', (event) => { if (event.key === 'Enter' && !event.shiftKey && !event.isComposing) { event.preventDefault(); $('shout-form').requestSubmit(); } });
document.addEventListener('click', (event) => {
- const t = event.target.closest('[data-root],[data-tab],[data-go],[data-item],[data-state],[data-rows],[data-row],[data-release],[data-shout],[data-new],[data-code],#proj-switch,#console');
+ const t = event.target.closest('[data-status],[data-roadmap-all],[data-root],[data-tab],[data-go],[data-item],[data-state],[data-rows],[data-row],[data-row-decision],[data-section-approve],[data-release],[data-shout],[data-new],[data-code],[data-code-all],[data-code-less],#proj-switch,#console');
if (!event.target.closest('.side')) fold(false);
if (!t) return;
if (t.id === 'proj-switch') { fold(!$('side').classList.contains('open')); return; }
if (t.id === 'console') { t.hidden = true; return; }
+ if (t.dataset.status) { statusGo(t.dataset.status); return; }
+ if ('roadmapAll' in t.dataset) { view.roadmapOnly = null; render(); return; }
if (t.dataset.root) switchTo(t.dataset.root, t.dataset.go || '');
- else if (t.dataset.tab) { openTab(t.dataset.tab); showTab(); }
+ else if (t.dataset.tab) { view.unread = null; view.roadmapOnly = null; openTab(t.dataset.tab); showTab(); }
else if (t.dataset.go) go(t.dataset.go, t.dataset.board);
else if (t.dataset.item) pick(Number(t.dataset.item));
else if (t.dataset.state) { view.state = t.dataset.state; render(); }
else if (t.dataset.rows) { const [kind, f] = t.dataset.rows.split(':'); view.rows[kind] = f; render(); }
- else if (t.dataset.row) { const [kind, id] = t.dataset.row.split(':'); view.row[kind] = id; render(); }
+ else if (t.dataset.rowDecision) {
+ const id = t.dataset.rowId, kind = t.dataset.rowKind;
+ if (t.dataset.rowDecision === 'approve') decideRow(kind, 'spec-approve', { ids: id }, t);
+ else askDecline(kind, id, t.closest('#' + kind + '-detail') ? 'detail' : 'list');
+ }
+ else if (t.dataset.sectionApprove) {
+ const section = t.dataset.sectionApprove;
+ const ids = data.project.spec.filter((row) => row.section === section && ['pending', 'draft'].includes(row.status) && !row.decision).map((row) => row.id);
+ if (ids.length && window.confirm('Approve all ' + ids.length + ' undecided rows in “' + section + '”?')) decideRow('spec', 'spec-approve', { ids: ids.join(' ') }, t);
+ }
+ else if (t.dataset.row) {
+ const [kind, id] = t.dataset.row.split(':');
+ view.row[kind] = id;
+ render();
+ $(kind + '-list').focus({ preventScroll: true });
+ // Where the list and the detail stack, the picked row's detail, with its buttons, comes into view.
+ if (matchMedia('(max-width: 900px)').matches) $(kind + '-detail').scrollIntoView({ block: 'start', behavior: 'smooth' });
+ }
+ else if (t.dataset.codeAll) showAllCode(t.dataset.codeAll, t.dataset.before || '');
+ else if (t.dataset.codeLess) showLessCode(t.dataset.codeLess, t.dataset.before || '');
else if (t.dataset.code) code(t.dataset.code, t.dataset.before || '');
else if (t.dataset.release) act('release', { lane: t.dataset.release }, t);
- else if (t.dataset.shout) { answer(null); $('shout-to').value = t.dataset.shout; $('shout-text').value = '#' + t.dataset.about + ': '; openTab('shouts'); showTab(); $('shout-text').focus(); }
+ else if (t.dataset.shout) { answer(null); addressTo(t.dataset.shout); $('shout-text').value = '#' + t.dataset.about + ': '; openTab('shouts'); showTab(); $('shout-text').focus(); }
else if (t.dataset.new !== undefined) { view.adding = true; render(); $('add-title').focus(); }
});
/** Let a Roadmap row with independent inline links keep its keyboard button behavior. */
@@ -1263,21 +2107,82 @@ document.addEventListener('keydown', (event) => {
event.preventDefault();
go(row.dataset.go, row.dataset.board || view.root);
});
+// In a focused Spec or Doctrine list the arrow keys move the pick, and A approves the picked row and D asks why it is
+// declined, as the detail's buttons do, wherever the detail offers that decision.
+for (const kind of ['spec', 'doctrine']) $(kind + '-list').addEventListener('keydown', (event) => {
+ if (event.target !== event.currentTarget || event.metaKey || event.ctrlKey || event.altKey) return;
+ const ids = [...event.currentTarget.querySelectorAll('[data-row]')].map((row) => row.dataset.row.slice(kind.length + 1));
+ const at = ids.indexOf(view.row[kind]);
+ if (event.key === 'ArrowDown' || event.key === 'ArrowUp') {
+ event.preventDefault();
+ const next = ids[Math.min(ids.length - 1, Math.max(0, at + (event.key === 'ArrowDown' ? 1 : -1)))];
+ if (next && next !== view.row[kind]) { view.row[kind] = next; render(); event.currentTarget.querySelector('.srow.on')?.scrollIntoView({ block: 'nearest' }); }
+ } else if ((event.key === 'a' || event.key === 'd') && view.row[kind] && $(kind + '-detail').querySelector('.approve-row')) {
+ // Only a row still waiting on the person has a decision to make; the detail shows it.
+ event.preventDefault();
+ if (event.key === 'a') decideRow(kind, 'spec-approve', { ids: view.row[kind] }, event.currentTarget);
+ else askDecline(kind, view.row[kind], 'list');
+ }
+});
// The form covers the picked item rather than dropping it, so Cancel brings it back.
$('new-item').addEventListener('click', () => { view.adding = true; render(); $('add-title').focus(); });
$('add-cancel').addEventListener('click', () => { view.adding = false; render(); });
+$('spec-decline-cancel').addEventListener('click', () => { view.declining = null; $('spec-decline-dialog').hidden = true; if (view.declineFrom === 'list') $(view.declineKind + '-list').focus({ preventScroll: true }); });
+$('spec-decline-form').addEventListener('submit', (event) => {
+ event.preventDefault();
+ const id = view.declining, kind = view.declineKind;
+ const reason = $('spec-decline-reason').value.trim();
+ if (!id || !reason) return;
+ view.declining = null;
+ $('spec-decline-dialog').hidden = true;
+ if (view.declineFrom === 'list') $(kind + '-list').focus({ preventScroll: true });
+ const anchor = view.declineFrom === 'detail' ? $(kind + '-detail') : [...$(kind + '-list').querySelectorAll('[data-row]')].find((row) => row.dataset.row === kind + ':' + id);
+ decideRow(kind, 'spec-decline', { ids: id, reason }, anchor);
+});
$('answer-cancel').addEventListener('click', () => answer(null));
$('flow-hide').addEventListener('click', () => showFlow(false));
$('flow-show').addEventListener('click', () => showFlow(true));
$('flow-panel').hidden = keep('pb.flow') === 'hidden';
$('flow-show').hidden = !$('flow-panel').hidden;
// Each press moves on one, from the system's theme to light, then dark, and back; this browser keeps it.
+$('side-toggle').addEventListener('click', () => {
+ // A phone always shows the switcher, so there the logo is only the logo.
+ if (!matchMedia('(width > 900px)').matches) return;
+ const collapsed = !document.documentElement.dataset.side;
+ collapseSide(collapsed);
+ fold(false);
+ keep('pb.side', collapsed ? 'collapsed' : 'open');
+});
$('theme').addEventListener('click', () => {
- const next = { light: 'dark', dark: 'system' }[document.documentElement.dataset.theme] || 'light';
+ const next = document.documentElement.dataset.scheme === 'dark' ? 'light' : 'dark';
keep('pb.theme', next);
theme(next);
});
-$('q').addEventListener('input', search);
+$('q').addEventListener('input', () => { search(); view.foundAt = 0; showFound(); });
+// Leaving the field closes the results a moment later, so a press on a result lands first; coming back to the field
+// before then keeps them, or a search begun straight after Esc would lose its new results to the old close.
+let closingFound = 0;
+$('q').addEventListener('focus', () => { clearTimeout(closingFound); if ($('q').value.trim()) showFound(); });
+$('q').addEventListener('keydown', (event) => {
+ if (event.key === 'Escape') { $('q').value = ''; search(); hideFound('escape'); $('q').blur(); return; }
+ if (!view.found?.length || $('find-results').hidden) return;
+ if (event.key === 'ArrowDown' || event.key === 'ArrowUp') { event.preventDefault(); view.foundAt = (view.foundAt + (event.key === 'ArrowDown' ? 1 : view.found.length - 1)) % view.found.length; showFound(); }
+ else if (event.key === 'Enter') { event.preventDefault(); openFound(view.found[view.foundAt].go); }
+});
+// A press on a result opens it before the field loses focus and the results close.
+$('find-results').addEventListener('mousedown', (event) => { const hit = event.target.closest('[data-find]'); if (hit) { event.preventDefault(); openFound(hit.dataset.find); } });
+$('q').addEventListener('blur', () => {
+ clearTimeout(closingFound);
+ closingFound = setTimeout(() => hideFound('left the field'), 120);
+});
+// "/" goes to the search from anywhere but a field.
+document.addEventListener('keydown', (event) => {
+ if (event.key !== '/' || event.metaKey || event.ctrlKey || event.altKey || event.target.closest('input, textarea, select, [contenteditable]')) return;
+ event.preventDefault();
+ $('q').focus();
+ $('q').select();
+});
+$('lane-pick').addEventListener('change', (event) => { view.lane = event.target.value || null; render(); });
$('add-form').addEventListener('submit', async (event) => {
event.preventDefault();
if (await act('add', { lane: $('add-lane').value, title: $('add-title').value, criterion: $('add-criterion').value, specs: $('add-specs').value, brief: $('add-brief').value }, event.currentTarget)) {
@@ -1292,7 +2197,7 @@ $('shout-form').addEventListener('submit', async (event) => {
const text = $('shout-text').value;
const ask = view.answering;
if (ask && ask.root !== view.root) return answer(null);
- if (!(await (ask ? act('answer', { id: ask.id, text }, event.currentTarget) : act('shout', { to: $('shout-to').value, text }, event.currentTarget)))) return;
+ if (!(await (ask ? act('answer', { id: ask.id, text }, event.currentTarget) : ($('shout-to').value === 'coordinator' ? act('request', { text }, event.currentTarget) : act('shout', { to: $('shout-to').value, text }, event.currentTarget))))) return;
$('shout-text').value = '';
answer(null);
});
diff --git a/docs/demo/view.css b/docs/demo/view.css
index 6b9df189..6da48af1 100644
--- a/docs/demo/view.css
+++ b/docs/demo/view.css
@@ -27,20 +27,45 @@ button, input, select, textarea { font: inherit; color: inherit; }
.shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 0 10px 16px; background: var(--surface); border-right: 1px solid var(--line); }
.side-top { display: flex; align-items: center; gap: 10px; height: var(--top); margin: 0 -10px 6px; padding: 0 16px; border-bottom: 1px solid var(--line); }
-.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; white-space: nowrap; }
+.brand { display: flex; align-items: center; gap: 8px; margin-left: -6px; padding: 0 6px; border: 0; border-radius: 8px; background: none; font-weight: 700; font-size: 15px; white-space: nowrap; cursor: pointer; }
+.brand:hover { background: var(--surface-2); }
.brand svg { width: 22px; height: 22px; flex: none; }
.switch-btn { display: none; align-items: center; gap: 8px; min-width: 0; border: 1px solid var(--line); background: var(--surface-2); border-radius: 8px; padding: 6px 10px; cursor: pointer; font-weight: 600; }
.switch-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
-.switch-btn small { color: var(--ink-faint); font-weight: 400; }
+.switch-btn small { display: grid; place-items: center; color: var(--ink-faint); }
+.switch-btn small svg { width: 16px; height: 16px; }
+/* While the project list is open the arrow points up at once, so the switcher says it will close what it opened. */
+.switch-btn[aria-expanded="true"] small { transform: rotate(180deg); }
.theme-btn { flex: none; margin-left: auto; display: grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 8px; background: none; color: var(--ink-faint); cursor: pointer; }
.theme-btn:hover { color: var(--ink); background: var(--surface-2); }
.theme-btn svg { display: none; width: 16px; height: 16px; }
-:root:not([data-theme]) .theme-btn .sys, :root[data-theme="light"] .theme-btn .sun, :root[data-theme="dark"] .theme-btn .moon { display: block; }
+:root[data-scheme="light"] .theme-btn .sun, :root[data-scheme="dark"] .theme-btn .moon { display: block; }
.side-body { display: grid; gap: 2px; align-content: start; }
-.label { font: 600 11px/1 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--ink-faint); padding: 8px 8px 6px; }
+/* Collapsed, as the person chose: the sidebar shrinks to the project switcher at the left of the tab bar,
+ * the board below takes the whole width, and the project list opens as a dropdown. The logo collapses and
+ * restores it; phones always show the switcher, so there the logo is only the logo. The theme button sits at the
+ * right end of the tab bar on a wide screen, sidebar or not. */
+@media (width > 900px) {
+ .theme-btn { position: fixed; top: calc(var(--top) / 2); right: 10px; z-index: 12; transform: translateY(-50%); }
+ header.top { padding-right: 62px; }
+ :root[data-side="collapsed"] .shell { grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto 1fr; }
+ :root[data-side="collapsed"] .body { display: contents; }
+ :root[data-side="collapsed"] .side { grid-area: 1 / 1; z-index: 11; height: var(--top); overflow: visible; padding: 0 6px; border-right: 0; border-bottom: 1px solid var(--line); }
+ :root[data-side="collapsed"] .top { grid-area: 1 / 2; }
+ :root[data-side="collapsed"] main { grid-area: 2 / 1 / 3 / 3; }
+ :root[data-side="collapsed"] .side-top { margin: 0; padding: 0; gap: 6px; border: 0; }
+ :root[data-side="collapsed"] .brand span { display: none; }
+ :root[data-side="collapsed"] .brand { justify-content: center; width: var(--tap); height: var(--tap); margin: 0; padding: 0; }
+ :root[data-side="collapsed"] .switch-btn { display: flex; max-width: 16rem; }
+ :root[data-side="collapsed"] .side-body { display: none; }
+ :root[data-side="collapsed"] .side.open .side-body { display: grid; position: absolute; top: calc(var(--top) + 4px); left: 8px; width: 300px; max-height: calc(100vh - var(--top) - 16px); overflow-y: auto; padding: 8px 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }
+}
+.label { font: 600 11px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-faint); padding: 8px 8px 6px; }
.proj { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1px 8px; align-items: center; width: 100%; text-align: left; border: 1px solid transparent; background: none; border-radius: 8px; padding: 7px 8px; cursor: pointer; }
.proj:hover { background: var(--surface-2); }
-.proj.on { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
+/* The project shown is a quiet tint, as a picked row is. */
+.proj.on { background: color-mix(in srgb, var(--ink) 7%, transparent); }
+.proj small .asks { color: var(--warn); }
.proj .pname { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proj small { grid-column: 1 / -1; color: var(--ink-faint); font-size: 12px; line-height: 1.35; overflow-wrap: anywhere; }
.repo-group { display: grid; gap: 1px; }
@@ -56,10 +81,9 @@ button, input, select, textarea { font: inherit; color: inherit; }
.group-need > b { color: var(--ink-muted); }
.group-need > code { color: var(--accent-strong); }
.group-need > span { overflow-wrap: anywhere; }
-.group-need > button { min-height: 44px; border: 0; padding: 0; background: none; cursor: pointer; text-align: right; }
+.group-need > button { min-height: var(--tap); border: 0; padding: 0; background: none; cursor: pointer; text-align: right; }
.group-need > button em { color: var(--ink-faint); font-size: 12px; font-style: normal; }
.repo-label { color: var(--ink-muted); }
-.need { min-width: 20px; padding: 1px 6px; border-radius: 999px; background: var(--warn-soft); color: var(--warn); font: 700 11.5px/1.5 var(--mono); text-align: center; }
.products { padding-top: 6px; }
.prod { display: grid; grid-template-columns: minmax(0, 1fr); gap: 5px; padding: 6px 8px 8px; font-size: 13px; }
.prod p { margin: 0; display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
@@ -76,11 +100,30 @@ button, input, select, textarea { font: inherit; color: inherit; }
.tab { border: 0; background: none; padding: 6px 10px; border-radius: 6px; align-self: center; cursor: pointer; color: var(--ink-muted); white-space: nowrap; }
.tab:hover { color: var(--ink); }
.tab.on { color: var(--ink); background: var(--surface-2); font-weight: 600; }
-.tab b { font: 600 11px var(--mono); color: var(--ink-faint); margin-left: 4px; }
-.live { margin-left: auto; align-self: center; font-size: 12px; color: var(--ink-faint); white-space: nowrap; }
+.live { margin-left: auto; align-self: center; font-size: 12px; color: var(--warn); white-space: nowrap; }
.switching main, .switching .products { opacity: .45; transition: opacity .12s; }
-main { padding: 16px 18px 28px; }
+main { padding: 16px 18px 56px; }
+/* The status bar: the page's own surface, frosted so the list shows faintly through it; red when the view is cut off, violet on a snapshot. Each part opens what it counts. */
+.status { --status-bg: color-mix(in srgb, var(--surface) 68%, transparent); --status-ink: var(--ink-muted); --status-strong: var(--ink); --status-hover: color-mix(in srgb, var(--ink) 7%, transparent); -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3); position: fixed; left: 0; right: 0; bottom: 0; z-index: 12; display: flex; align-items: stretch; height: 28px; padding: 0 6px; background: var(--status-bg); color: var(--status-ink); font-size: 12px; white-space: nowrap; overflow: hidden; }
+.status.snap { --status-bg: color-mix(in srgb, var(--violet-soft) 80%, transparent); --status-ink: var(--violet); --status-strong: var(--violet); }
+.status:not(.snap):has(.live:not(:empty)) { --status-bg: color-mix(in srgb, var(--reject-soft) 85%, transparent); --status-ink: var(--reject); --status-strong: var(--reject); }
+.status b { color: var(--status-strong); font: 600 11.5px var(--mono); }
+.status .live { display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 0 8px; color: inherit; }
+.status .live::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--reject); }
+.status .live:empty::before { background: var(--accent); }
+.status .live:empty::after { content: 'live'; }
+.status-board { display: flex; flex: 1; min-width: 0; align-items: stretch; overflow: hidden; }
+.status-group { display: inline-flex; align-items: center; padding-left: 8px; }
+.status button { display: inline-flex; flex: none; align-items: center; gap: 5px; min-height: 0; padding: 0 8px; border: 0; border-radius: 0; background: none; color: inherit; font: inherit; white-space: nowrap; cursor: pointer; }
+.status button:hover { background: var(--status-hover); color: var(--status-strong); }
+.status button:focus-visible { outline: 2px solid var(--status-strong); outline-offset: -2px; }
+.status-board .end { margin-left: auto; opacity: .85; }
+.status #status-unread[hidden] { display: none; }
+/* With touch its parts are 44px targets; a mouse keeps the thin strip. On a phone it shows only when the view is cut off. */
+@media (pointer: coarse) { .status { height: 44px; } .status button { min-height: 44px; } main { padding-bottom: 72px; } }
+@media (width < 480px) { .status:not(:has(.live:not(:empty))) { display: none; } .status { height: 44px; } .status button { min-height: 44px; } main { padding-bottom: 28px; } }
+.side { padding-bottom: 44px; }
.first { display: none; max-width: 520px; margin: 10vh auto 0; padding: 22px 24px; }
.first h2 { margin: 0 0 6px; font-size: 18px; }
.first p { margin: 0; color: var(--ink-muted); }
@@ -97,7 +140,7 @@ main { padding: 16px 18px 28px; }
.milestone-progress { display: block; width: 100%; height: 7px; margin: 10px 0 6px; overflow: hidden; border-radius: 99px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.milestone-progress rect { fill: var(--accent); }
.milestone ul { display: grid; gap: 2px; margin: 0 -9px; padding: 0; list-style: none; }
-.milestone-item { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; gap: 10px; align-items: center; width: 100%; min-height: 44px; padding: 0 9px; border: 1px solid transparent; border-radius: 10px; background: none; text-align: left; }
+.milestone-item { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; gap: 10px; align-items: center; width: 100%; min-height: var(--tap); padding: 0 9px; border: 1px solid transparent; border-radius: 10px; background: none; text-align: left; }
.milestone-item[data-go] { cursor: pointer; }
.milestone-item[data-go]:hover { background: var(--surface-2); }
.milestone-item .t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@@ -111,6 +154,8 @@ main { padding: 16px 18px 28px; }
.side-top { height: auto; margin: 0; padding: 0; border: 0; }
.brand span { display: none; }
.switch-btn { display: flex; }
+ .brand { cursor: default; }
+ .brand:hover { background: none; }
.side-body { display: none; padding-top: 6px; }
.side.open .side-body { display: grid; }
.top { padding: 0 6px; }
@@ -127,13 +172,17 @@ main { padding: 16px 18px 28px; }
.group-need > code { grid-column: 2; }
.group-need > span, .group-need > button { grid-column: 1 / -1; }
.tabs { flex: 1; display: grid; grid-auto-flow: column; grid-auto-columns: auto; gap: 0; }
- .tab { display: grid; grid-template-rows: auto 13px; justify-items: center; align-content: center; padding: 7px 2px 5px; font-size: 13.5px; }
- .tab b { margin: 0; line-height: 13px; }
+ /* Six labels share the bar, so they scale with the screen: 13.5px at 375, 11px at the narrowest, where a
+ * classic scrollbar and wide fonts leave about 290px of bar. */
+ .tab { display: grid; justify-items: center; align-content: center; padding: 7px 2px; font-size: clamp(11px, 3.6vw, 13.5px); }
}
.primary { display: grid; gap: 12px; min-width: 0; }
.card-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); min-width: 0; }
+/* The Items toolbar is one row: the states, the lane picker, and New item at its end. */
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px; }
-.toolbar input { flex: 1 1 96px; }
+.toolbar .lane-pick { flex: none; field-sizing: content; max-width: 11em; padding: 0 8px; color: var(--ink-muted); font-size: 13px; cursor: pointer; }
+.toolbar .lane-pick[hidden] { display: none; }
+.toolbar .go { margin-left: auto; }
input, select, textarea { border: 1px solid var(--line-strong); background: var(--surface); border-radius: 8px; padding: 7px 9px; min-width: 0; }
input:disabled { background: var(--surface-2); color: var(--ink-muted); }
.go { border: 0; background: var(--ink); color: var(--surface); border-radius: 8px; padding: 8px 14px; cursor: pointer; font-weight: 600; white-space: nowrap; }
@@ -144,26 +193,11 @@ input:disabled { background: var(--surface-2); color: var(--ink-muted); }
.needs-you .head { font-weight: 700; display: flex; gap: 8px; align-items: center; }
.needs-you .head i { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); display: inline-block; }
.needs-you .head.quiet { color: var(--ink-muted); font-weight: 600; }
-.needs-you .ask + .head.quiet { margin-top: 12px; }
.needs-you .more { padding: 2px 4px; }
-.ny { display: grid; grid-template-columns: auto minmax(5em, 1fr) minmax(0, max-content); gap: 10px; align-items: baseline; text-align: left; border: 0; background: none; padding: 6px 4px; border-radius: 8px; width: 100%; min-height: 44px; }
-.ny:hover { background: color-mix(in srgb, var(--warn) 10%, var(--surface)); }
-.ny code { font: 600 12px var(--mono); }
-.ny .ny-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-muted); }
-.ny .ny-open { min-height: 44px; border: 0; padding: 0; background: none; color: var(--warn); cursor: pointer; text-align: right; }
-.ny em { font-style: normal; color: var(--warn); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
-@media (width < 480px) { .ny { grid-template-columns: auto minmax(0, 1fr); row-gap: 1px; } .ny .ny-open { grid-column: 2; } }
-.ask { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; align-items: center; padding: 6px 4px; }
-.ask > p { grid-column: 1; margin: 0; overflow-wrap: anywhere; }
-.ask small { color: var(--ink-muted); }
-.ask button { grid-row: 1 / span 2; grid-column: 2; }
.answering { flex: 1 1 100%; display: flex; gap: 10px; align-items: baseline; justify-content: space-between; margin: 0; font-size: 13px; color: var(--ink-muted); }
.answering > span { min-width: 0; overflow-wrap: anywhere; }
.mark { font: 600 11px var(--mono); padding: 0 6px; border-radius: 999px; background: var(--surface-2); color: var(--ink-muted); }
.mark.ask { display: inline; background: var(--warn-soft); color: var(--warn); }
-.ev { display: flex; flex-wrap: wrap; gap: 0 6px; align-items: baseline; width: fit-content; max-width: 100%; margin-top: 4px; padding: 3px 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); font-size: 12px; color: var(--ink-muted); }
-.ev b { font: 600 11px var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--ink); }
-.ev code { font: 12px var(--mono); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 2px; }
.chips button { flex: 0 0 auto; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 3px 9px; cursor: pointer; font-size: 13px; }
@@ -178,12 +212,36 @@ input:disabled { background: var(--surface-2); color: var(--ink-muted); }
.chain { list-style: none; margin: 0; padding: 6px; display: grid; gap: 2px; }
.row { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 9px; border-radius: 10px; border: 1px solid transparent; cursor: pointer; }
.row:hover { background: var(--surface-2); }
-.row.on { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
+/* A row's whole shade says where it stands: blocked rows light red, rows waiting on a verdict light yellow. */
+.row.gated { border-color: light-dark(#ca9d96, #86403b); }
+.row.s-verify { background: light-dark(#fefaea, #262112); }
+.row.s-verify:hover { background: light-dark(#fcf3d6, #2e2816); }
+.row.s-verify:not(.gated) { border-color: light-dark(transparent, #6e5722); }
+.row.on { background: color-mix(in srgb, var(--ink) 7%, transparent); }
+/* What a blocked row waits on stands at the right of its line, beside the gated badge. */
+.row .meta > .gate { margin-left: auto; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); }
.dot.building { background: var(--blue); } .dot.verify { background: var(--warn); } .dot.back { background: var(--reject); } .dot.verified { background: var(--accent); }
-.row .t { font-weight: 600; overflow-wrap: anywhere; }
+/* A row holds its shape: the title takes the whole first line and the meta and chip share the second,
+ * each line cut with an ellipsis, so every row in a list is as tall as the next. The whole title is the
+ * row's tooltip and opens in the detail. */
+/* The second line starts at the row's edge: a rejected row's verdict, or the lane and the spec ids it serves. */
+.row { grid-template-areas: "dot t age" "dot meta chip"; row-gap: 3px; }
+.row .meta > .specs { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
+.row .row-age { grid-area: age; justify-self: end; color: var(--ink-faint); font: 12px var(--mono); }
+.row > div { display: contents; }
+.row > .dot { grid-area: dot; }
+.row .t { grid-area: t; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
+.row .t code { white-space: nowrap; }
.row .t span { color: var(--ink-faint); font: 500 12px var(--mono); margin-right: 5px; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 8px; color: var(--ink-muted); font-size: 12px; margin-top: 2px; }
+.row .meta { grid-area: meta; min-width: 0; margin-top: 0; flex-wrap: nowrap; overflow: hidden; white-space: nowrap; }
+.row .meta > * { flex: none; }
+/* A row's second line is its lane, then what holds it up; the spec ids it serves are in its detail. */
+.row .meta { align-items: center; }
+.row .meta > .gate, .row .meta > .why { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
+.row .meta > .why { flex-grow: 1; }
+.row > .chip { grid-area: chip; justify-self: end; max-width: 10rem; overflow: hidden; text-overflow: ellipsis; }
.chip { font: 600 10.5px/1 var(--mono); letter-spacing: .03em; padding: 4px 6px; border-radius: 5px; background: var(--surface-2); color: var(--ink-muted); white-space: nowrap; }
.chip.ok { background: var(--accent-soft); color: var(--accent-strong); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
@@ -191,8 +249,7 @@ input:disabled { background: var(--surface-2); color: var(--ink-muted); }
.chip.busy { background: var(--blue-soft); color: var(--blue); }
.chip.free { background: var(--violet-soft); color: var(--violet); }
.chip.gate { background: none; color: var(--ink-muted); outline: 1px dashed var(--line-strong); outline-offset: -1px; }
-.row.gated { border-color: color-mix(in srgb, var(--reject) 40%, var(--line)); }
-.meta .gate { padding: 0 7px; border-radius: 999px; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--reject) 35%, var(--line)); }
+.meta .gate { color: var(--ink-muted); }
.meta .gate .wait-unit, .kv dd.waits-on .wait-unit { white-space: nowrap; }
.meta .gate button.ref { min-height: 0; }
.meta button.ref { border: 0; background: none; padding: 0; font: inherit; color: var(--accent-strong); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
@@ -208,6 +265,7 @@ input:disabled { background: var(--surface-2); color: var(--ink-muted); }
.detail h3 { margin: 0 0 6px; font: 600 11px/1 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--ink-faint); }
.detail .text { white-space: pre-wrap; overflow-wrap: anywhere; }
.detail .muted, .muted { color: var(--ink-muted); }
+.check-warning { margin: 6px 0 0; color: var(--warn); font-size: 13px; }
.kv { display: grid; grid-template-columns: 6.5em minmax(0, 1fr); gap: 4px 10px; font-size: 13px; margin: 0; }
.kv dt { color: var(--ink-faint); } .kv dd { margin: 0; overflow-wrap: anywhere; }
.kv dd.waits-on button.ref { border: 0; background: none; padding: 0; font: inherit; color: var(--accent-strong); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
@@ -220,7 +278,9 @@ input:disabled { background: var(--surface-2); color: var(--ink-muted); }
.sentback { border: 1px solid color-mix(in srgb, var(--reject) 40%, var(--line)); background: color-mix(in srgb, var(--reject) 6%, var(--surface)); border-radius: 10px; padding: 10px 12px; }
.sentback h3 { color: var(--reject); }
.sentback .verdict { margin: 0; }
-.meta .why { flex-basis: 100%; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--reject); }
+/* A rejected row keeps its verdict's code in the warning colour while it is reworked; the note after it stays quiet. */
+.meta .why b { color: var(--warn); font-weight: 600; }
+.meta .why { flex-basis: 100%; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-faint); font-size: 11.5px; }
.tl { list-style: none; margin: 0; padding: 0; font-size: 12.5px; }
.tl li { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 10px; padding: 0 0 12px 20px; --c: var(--line-strong); }
.tl li::before { content: ''; position: absolute; left: 0; top: 4px; width: 10px; height: 10px; border-radius: 50%; box-sizing: border-box; border: 2px solid var(--c); background: var(--c); }
@@ -228,57 +288,189 @@ input:disabled { background: var(--surface-2); color: var(--ink-muted); }
.tl li::after { content: ''; position: absolute; left: 4px; top: 16px; bottom: 0; width: 2px; border-radius: 2px; background: var(--c); opacity: .55; }
.tl li:last-child { padding-bottom: 0; } .tl li:last-child::after { display: none; }
.tl .tl-claimed { --c: var(--blue); } .tl .tl-submitted { --c: var(--warn); } .tl .tl-verified { --c: var(--accent); } .tl .tl-withdrawn { --c: var(--ink-faint); } .tl .tl-back { --c: var(--reject); }
+.tl { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
+.tl li.tl-fact { --c: var(--violet); }
+.tl li.tl-judgement { --c: var(--warn); }
+.tl li.tl-superseded { opacity: .56; }
+.tl .tl-fact-head, .tl .tl-body, .tl .tl-code { grid-column: 2; min-width: 0; }
+.tl .tl-fact-head { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
+.tl .tl-body { white-space: pre-wrap; overflow-wrap: anywhere; }
+.tl .tl-fact-head .chip { flex: 0 0 auto; }
+.tl .tl-code { max-width: 100%; overflow-wrap: anywhere; }
+.tl .tl-code button.ref { white-space: normal; overflow-wrap: anywhere; text-align: left; }
+.tl .thread-replacement { color: var(--accent-strong); text-decoration: underline; text-underline-offset: 2px; }
.tl b { font-weight: 600; }
.tl small { grid-column: 2; color: var(--ink-faint); font-size: 12px; }
.tl time, .feed time { color: var(--ink-faint); font: 12px var(--mono); }
.rowref { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; font-size: 13px; padding: 3px 0; }
.rowref code { font-weight: 600; }
.links { display: flex; flex-wrap: wrap; gap: 6px; }
-.links-item { border: 1px solid var(--line); background: var(--surface-2); border-radius: 6px; padding: 3px 9px; cursor: pointer; font-size: 12.5px; min-height: 44px; display: flex; align-items: center; }
+.links-item { border: 1px solid var(--line); background: var(--surface-2); border-radius: 6px; padding: 3px 9px; cursor: pointer; font-size: 12.5px; min-height: var(--tap); display: flex; align-items: center; }
.panel-form { display: grid; gap: 10px; }
.panel-form label, .inline label { display: grid; gap: 4px; font-size: 12px; color: var(--ink-muted); }
.panel-form input, .panel-form select, .panel-form textarea, .inline input, .inline select { width: 100%; }
.panel-form textarea { resize: vertical; }
.actions { display: flex; gap: 8px; } .actions .go { flex: 1; }
-.inline { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; padding: 10px; }
+form.inline { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; padding: 10px; }
.inline label { flex: 1 1 150px; min-width: 0; }
.inline label.wide { flex: 4 1 260px; }
.feed { padding: 6px 10px 10px; display: grid; }
.feed > div { display: grid; grid-template-columns: 4.6em minmax(0, 1fr); gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); overflow-wrap: break-word; }
.feed > .empty { display: block; }
.feed > div:first-child, .feed > .day + div { border-top: 0; }
+/* The shout composer: one bar, to on the left, the message growing with what is typed, send on the right. */
+.shout-form { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px; }
+.shout-form > .composer { flex: 1 1 100%; min-width: 0; }
+.composer { display: flex; align-items: flex-end; gap: 6px; padding: 4px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); }
+.composer:focus-within { border-color: var(--accent); }
+.composer textarea { flex: 1; min-width: 0; min-height: var(--tap); max-height: 12em; padding: calc((var(--tap) - 21px) / 2) 8px; border: 0; background: none; resize: none; field-sizing: content; line-height: 1.5; }
+.composer input:focus-visible, .composer textarea:focus-visible { outline: 0; }
+.composer .send { display: grid; place-items: center; flex: none; width: var(--tap); height: var(--tap); border: 0; border-radius: 9px; background: var(--ink); color: var(--surface); cursor: pointer; }
+.composer .send:hover { background: var(--accent-strong); color: var(--on-accent); }
+.composer .send svg { width: 18px; height: 18px; }
+/* The feed's bar: whose shouts these are, and the agents panel shown or hidden. */
+#feed > .feed-bar { display: flex; border-top: 0; justify-content: space-between; align-items: center; gap: 8px; padding: 0 4px; color: var(--ink-muted); font-size: 13px; }
+.link { display: inline-flex; align-items: center; min-height: var(--tap); padding: 0; border: 0; background: none; color: var(--accent-strong); font: inherit; font-weight: 600; cursor: pointer; }
+[data-pane="shouts"].bare { grid-template-columns: minmax(0, 1fr); }
+[data-pane="shouts"].bare > aside { display: none; }
+/* The asks as cards in a quiet panel; the amber lives in the heading's dot, not in a box. */
+#decisions { background: var(--surface); border-color: var(--line); padding: 10px 12px 4px; }
+#decisions > .shout { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 0 12px; padding: 10px 2px; border-top: 1px solid var(--line); }
+#decisions > .head + .shout { border-top: 0; }
+#decisions .shout.clamp:not(.open) .text { -webkit-line-clamp: 3; }
+#decisions .answer { margin-top: 6px; }
+/* Shouts as cards (#250): who and when on top, what was said below, each agent in a colour of its own. No
+ * card carries a coloured edge; colour lives in the avatar, the name and the chips. */
+:root { --hue-0: light-dark(#0f766e, #5eead4); --hue-1: light-dark(#1d4ed8, #93b4f8); --hue-2: light-dark(#6d28d9, #c4b5fd); --hue-3: light-dark(#be185d, #f9a8d4);
+ --hue-4: light-dark(#b45309, #fcd34d); --hue-5: light-dark(#15803d, #86efac); --hue-6: light-dark(#b91c1c, #fca5a5); --hue-7: light-dark(#475569, #cbd5e1); }
+.shout.h0, .agent-card.h0, .agent-pill.h0, .heard-face.h0 { --h: var(--hue-0); } .shout.h1, .agent-card.h1, .agent-pill.h1, .heard-face.h1 { --h: var(--hue-1); } .shout.h2, .agent-card.h2, .agent-pill.h2, .heard-face.h2 { --h: var(--hue-2); } .shout.h3, .agent-card.h3, .agent-pill.h3, .heard-face.h3 { --h: var(--hue-3); }
+.shout.h4, .agent-card.h4, .agent-pill.h4, .heard-face.h4 { --h: var(--hue-4); } .shout.h5, .agent-card.h5, .agent-pill.h5, .heard-face.h5 { --h: var(--hue-5); } .shout.h6, .agent-card.h6, .agent-pill.h6, .heard-face.h6 { --h: var(--hue-6); } .shout.h7, .agent-card.h7, .agent-pill.h7, .heard-face.h7 { --h: var(--hue-7); }
+#feed > .shout { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 0 12px; align-items: start; padding: 14px 4px; border-top: 1px solid var(--line); }
+#feed > .shout:first-child, #feed > .day-rule + .shout { border-top: 0; }
+#feed > .day-rule { display: flex; align-items: center; gap: 12px; margin: 10px 0 2px; color: var(--ink-faint); font: 600 11px var(--mono); letter-spacing: .06em; text-transform: uppercase; }
+#feed > .day-rule::before, #feed > .day-rule::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
+#feed > .day-rule:first-child { margin-top: 2px; }
+.shout.lead .avatar, .agent-card.lead .avatar, .agent-pill.lead .avatar { border-radius: 9px; background: var(--ink); color: var(--surface); }
+.shout.lead .avatar svg { width: 18px; height: 18px; }
+.shout.lead .who { color: var(--ink); }
+.shout .avatar, .agent-card .avatar, .agent-pill .avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: color-mix(in srgb, var(--h) 16%, var(--surface)); color: var(--h); font: 700 11px var(--mono); }
+.shout .avatar.wide { font-size: 9px; letter-spacing: -.02em; }
+.shout-main { min-width: 0; }
+.shout header { display: flex; flex-wrap: nowrap; align-items: baseline; gap: 2px 7px; }
+.shout .who, .shout .to { display: flex; flex: 0 1 auto; min-width: min-content; white-space: nowrap; }
+.shout .agent-label { display: inline-grid; grid-template-columns: max-content minmax(0, 1fr); min-width: 0; }
+.shout .agent-label.prefix { grid-template-columns: minmax(0, 1fr) max-content; }
+.shout .agent-model { overflow: hidden; text-overflow: ellipsis; white-space: pre; }
+.shout header .mark { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
+.shout header time { flex: none; }
+.shout .who { color: var(--h); font-weight: 700; }
+.shout .to, .shout .item { color: var(--ink-faint); }
+.shout .item { font: 12px var(--mono); }
+.shout header time { margin-left: auto; color: var(--ink-faint); font-size: 12px; white-space: nowrap; }
+/* A waiting ask keeps its address and age whole; a wider fallback font shortens its kind instead. */
+#decisions .shout header { flex-wrap: nowrap; }
+#decisions .shout .who, #decisions .shout .to { flex: 0 1 auto; min-width: min-content; white-space: nowrap; }
+#decisions .shout header .mark { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
+#decisions .shout header time { flex: none; }
+.shout .text { margin-top: 3px; overflow-wrap: break-word; }
+.shout.clamp:not(.open) .text { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 6; overflow: hidden; }
+.shout .more { display: none; align-items: center; min-height: var(--tap); margin: -8px 0 -10px; padding: 0; border: 0; background: none; color: var(--accent-strong); font-weight: 600; font-size: 13px; cursor: pointer; }
+.shout.clamp .more { display: inline-flex; }
+.shout .band { margin-top: 8px; padding: 6px 10px; border-radius: 8px; background: var(--warn-soft); color: var(--warn); font-weight: 600; font-size: 13px; }
+.shout .band.done { background: var(--surface-2); color: var(--ink-muted); font-weight: 500; }
+.shout .receipt { display: grid; gap: 4px; margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); font-size: 13px; }
+.shout .receipt .badge { padding: 1px 7px; border-radius: 999px; background: var(--blue-soft); color: var(--blue); font: 600 11px var(--mono); text-transform: capitalize; }
+.shout .receipt .outcome { color: var(--ink-muted); }
+.shout .receipt-foot { color: var(--ink-faint); font-size: 12px; }
+/* In a shout, a chip says what it is: an item, a path, a commit, a command. */
+.shout button.ref[data-go] { padding: 0 5px; border-radius: 5px; background: var(--violet-soft); color: var(--violet); font-weight: 600; text-decoration: none; }
+.shout code.inline.path { background: var(--blue-soft); color: var(--blue); }
+.shout code.inline.sha { background: var(--warn-soft); color: var(--warn); }
+.shout code.inline.cmd { background: var(--accent-soft); color: var(--accent-strong); }
+/* In a shout a long chip stays one piece: it moves whole to the next line, and one longer than the line ends in an
+ ellipsis, the whole of it on hover and in a copy. */
+.shout code.inline.long { display: inline-block; box-sizing: border-box; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; overflow-wrap: normal; vertical-align: bottom; }
.feed .day { margin: 0; padding: 12px 0 4px; font: 600 11px/1 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--ink-faint); }
.feed .day:first-child { padding-top: 6px; }
button.ref { width: auto; min-height: 0; border: 0; border-radius: 0; background: none; padding: 0; color: var(--accent-strong); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; display: inline; vertical-align: baseline; line-height: inherit; font: inherit; }
-code.inline { padding: 0 3px; border-radius: 3px; background: color-mix(in srgb, var(--ink) 8%, var(--surface)); font: .92em var(--mono); white-space: break-spaces; }
-.code { display: block; margin: 6px 0 2px; padding: 6px 0; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); font: 12px/1.55 var(--mono); white-space: pre; overflow-x: auto; overflow-wrap: normal; }
+/* A code reference (path:lines@sha) is one long token: wider than its line, it breaks anywhere rather than push the page sideways. */
+button.ref[data-code] { display: inline-flex; max-width: 100%; vertical-align: bottom; white-space: nowrap; text-align: left; }
+button.ref[data-code] .ref-path { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
+button.ref[data-code] .ref-at { flex: none; }
+code.inline { padding: 0 3px; border-radius: 3px; background: color-mix(in srgb, var(--ink) 8%, var(--surface)); font: .92em var(--mono); white-space: nowrap; }
+code.inline.long { white-space: break-spaces; overflow-wrap: anywhere; }
+/* A brief's '- ' lines, wherever text is drawn: tight bullets, nested ones indented under their parent. */
+.text-list { list-style: disc; margin: 0; padding-left: 1.35em; }
+.text-list .text-list { list-style: circle; }
+.code { display: block; margin: 6px 0 2px; padding: 8px 0; border: 1px solid var(--line); border-radius: 8px; background: color-mix(in srgb, var(--ink) 4%, var(--surface)); font: 11.5px/1.6 var(--mono); white-space: pre; overflow-x: auto; overflow-wrap: normal; }
.code > span { display: block; padding-right: 12px; }
.code i { display: inline-block; min-width: 3.2em; padding: 0 10px 0 6px; text-align: right; font-style: normal; color: var(--ink-faint); user-select: none; }
.code .more, .code.no { padding: 2px 10px; white-space: normal; color: var(--ink-muted); }
.code.no { color: var(--reject); }
+.code-wrap { min-width: 0; }
+.code-control { display: inline-flex; align-items: center; min-height: var(--tap); border: 0; background: none; padding: 0 12px; color: var(--ink-muted); cursor: pointer; font: 12.5px var(--sans); }
+.code-control:hover { color: var(--accent-strong); }
+.code-control:disabled { color: var(--ink-muted); cursor: wait; }
+.tok-keyword { color: var(--violet); }
+.tok-string { color: var(--warn); }
+.tok-number { color: var(--accent-strong); }
+.tok-comment { color: color-mix(in srgb, var(--accent-strong) 55%, var(--ink-faint)); font-style: italic; }
+/* A code reference on a line of its own: a bordered block, a caret, the path and lines, the short commit muted. */
+.code-ref { margin: 6px 0; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); overflow: hidden; }
+.code-ref > button.ref.block { display: flex; align-items: center; width: 100%; min-height: var(--tap); padding: 0 12px; color: var(--ink); font: 12.5px var(--mono); text-decoration: none; }
+.code-ref > button.ref.block::before { content: ""; flex: none; width: 6px; height: 8px; margin-right: 10px; background: var(--ink-faint); clip-path: polygon(0 0, 100% 50%, 0 100%); transition: transform .12s; }
+.code-ref.open > button.ref.block::before { transform: rotate(90deg); }
+.code-ref > button.ref.block:hover { background: var(--surface-2); }
+.code-ref .ref-sha { margin-left: .7em; color: var(--ink-faint); }
+.code-ref .code-wrap { border-top: 1px solid var(--line); }
+.code-ref .code { margin: 0; border: 0; border-radius: 0; }
+.fact-code { min-width: 0; padding: 5px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
+.fact-code:first-of-type { border-top: 0; }
+.fact-code .muted { margin-left: 4px; font-size: 12px; }
+.fact-code .ref { margin-left: 4px; }
+.ref-missing { display: inline-block; }
.feed .act { display: flex; gap: 0 5px; align-items: baseline; min-width: 0; }
.feed .act .what { flex: 1 1 auto; min-width: 0; overflow-wrap: break-word; color: var(--ink-muted); }
-.agent { display: grid; gap: 2px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 13px; }
-.agent:first-child { border-top: 0; }
-.agent small { color: var(--ink-faint); font: 11.5px var(--mono); overflow-wrap: anywhere; }
-.agent > div { display: flex; gap: 8px; align-items: baseline; min-width: 0; }
-.agent > div > .muted { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
-.agent time { margin-left: auto; color: var(--ink-faint); font: 12px var(--mono); }
+.feed .act .said { flex: 1 1 0; min-width: 0; margin-left: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-muted); }
+.feed .act .said code { white-space: nowrap; }
.agent-work { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; width: 100%; border: 0; background: none; padding: 2px 0; text-align: left; cursor: pointer; }
.agent-work > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agent-work:hover > span:first-child { color: var(--accent-strong); text-decoration: underline; text-underline-offset: 2px; }
.lane { display: flex; justify-content: space-between; gap: 8px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); font-size: 13px; }
.lane:first-child { border-top: 0; }
+.rows-filter { display: flex; padding: 10px 10px 2px; }
.rows { padding: 4px 10px 10px; }
-.rows h4 { margin: 12px 0 4px; font-size: 12.5px; color: var(--ink-muted); }
-.srow { display: grid; grid-template-columns: 4.4em 6.2em minmax(0, 1fr); gap: 8px; padding: 6px 4px; border-top: 1px solid var(--line); align-items: baseline; cursor: pointer; border-radius: 6px; }
+.section-source { margin-left: 6px; color: var(--ink-faint); font: 500 11.5px var(--sans); letter-spacing: 0; text-transform: none; }
+.spec-section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin: 12px 0 4px; }
+.rows h4 { margin: 0; font-size: 12.5px; color: var(--ink-muted); }
+/* Deciding a row is a quiet word beside it, no box: Approve in the accent, Decline in grey, each lit only on hover. */
+.spec-section-approve, .approve-row, .decline-row { min-height: var(--tap); padding: 0 10px; border: 0; border-radius: 8px; background: none; font-weight: 600; white-space: nowrap; cursor: pointer; }
+.spec-section-approve, .approve-row { color: var(--accent-strong); }
+.decline-row { color: var(--ink-muted); }
+.spec-section-approve:hover, .approve-row:hover { background: var(--accent-soft); }
+.decline-row:hover { background: var(--reject-soft); color: var(--reject); }
+.spec-decision-actions { display: flex; align-items: center; gap: 2px; margin: -11px -6px -11px 0; cursor: default; }
+.detail-decision-actions { margin: 4px 0 0 -10px; }
+.detail-decision-actions { margin: 0 0 12px; }
+.spec-reason-backdrop { position: fixed; z-index: 30; inset: 0; display: grid; place-items: center; padding: 16px; background: rgb(15 23 42 / 45%); }
+.spec-reason-dialog { width: min(100%, 420px); display: grid; gap: 12px; padding: 18px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); box-shadow: 0 18px 60px rgb(0 0 0 / 24%); }
+.spec-reason-dialog h2 { margin: 0; font-size: 17px; }
+.spec-reason-dialog label { display: grid; gap: 5px; color: var(--ink-muted); font-size: 12px; }
+.spec-reason-dialog input { width: 100%; min-height: var(--tap); padding: 7px 9px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--ink); font-size: 13px; }
+.spec-reason-dialog .actions { display: flex; flex-wrap: wrap; gap: 8px; }
+.spec-reason-dialog .actions button { min-height: var(--tap); }
+.srow { display: grid; grid-template-columns: 3.4em minmax(0, 1fr); gap: 10px; padding: 9px 8px; border-top: 1px solid var(--line); align-items: baseline; cursor: pointer; }
.srow:hover { background: var(--surface-2); }
-.srow.on { background: var(--accent-soft); }
-.srow code { font: 600 12px var(--mono); }
+.srow.on { background: color-mix(in srgb, var(--ink) 7%, transparent); }
+.srow code { font: 600 12px var(--mono); color: var(--ink-muted); }
+.srow.on code { color: var(--ink); }
+.srow-text .chip { margin-right: 6px; }
+#spec-list:focus, #doctrine-list:focus { outline: none; }
+#spec-list:focus-visible, #doctrine-list:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
.rule-source, .rule-reason { display: block; color: var(--ink-muted); font-size: 11.5px; line-height: 1.5; }
.rule-reason { margin-top: 3px; }
-@media (width < 480px) { .srow { grid-template-columns: auto minmax(0, 1fr); } .srow > span:last-child { grid-column: 1 / -1; } }
+@media (width < 480px) { .srow { grid-template-columns: 3em minmax(0, 1fr); gap: 8px; } }
.flow { position: relative; margin: 0 0 12px; padding: 10px 12px 8px; overflow-x: auto; }
.flow svg { display: block; width: 100%; min-width: 680px; max-width: 920px; height: auto; margin: 0 auto; }
.flow figcaption { color: var(--ink-faint); font-size: 12px; padding: 2px 34px 0 2px; }
@@ -305,13 +497,195 @@ code.inline { padding: 0 3px; border-radius: 3px; background: color-mix(in srgb,
.snapshot-controls label { display: flex; align-items: center; gap: 6px; }
.snapshot-controls output { color: var(--ink-muted); font: 12px/1.5 var(--mono); }
.snapshot #new-item, .snapshot form, .snapshot [data-new], .snapshot [data-release], .snapshot [data-shout], .snapshot [data-go^="decide:"] { display: none !important; }
-.read-only #new-item, .read-only form, .read-only [data-new], .read-only [data-release], .read-only [data-shout], .read-only [data-go^="decide:"] { display: none !important; }
+.read-only:not(.requests) #new-item, .read-only:not(.requests) form, .read-only:not(.requests) [data-new], .read-only:not(.requests) [data-release], .read-only:not(.requests) [data-shout], .read-only:not(.requests) [data-go^="decide:"] { display: none !important; }
+.person-requests { margin-bottom: 12px; padding: 12px; min-width: 0; }
+.person-requests h2 { margin: 0 0 8px; font-size: 14px; }
+.request-list { list-style: none; margin: 0; padding: 0; max-height: 240px; overflow-y: auto; }
+.request-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 8px 0; border-top: 1px solid var(--line); }
+.request-list li:first-child { border-top: 0; }
+.request-label { min-width: 0; overflow-wrap: anywhere; font-size: 13px; }
+.request-status { align-self: start; font-size: 12px; }
+.request-error, .request-next { grid-column: 1 / -1; margin: 0; overflow-wrap: anywhere; font-size: 12px; }
+.request-error { color: var(--reject); }
+.request-next { color: var(--ink-muted); }
-/* Every action keeps a usable touch target at either viewport, including inline controls. */
-button, input, select, textarea, [data-item], [data-row] { min-height: 44px; }
-.theme-btn, .flow-hide { width: 44px; height: 44px; }
+/* Where a finger taps, under a coarse pointer or in a window under 900px, every action keeps a 44px target, a
+ * reference inside running text excepted, as WCAG 2.5.8 exempts inline targets; a reference standing alone is a target
+ * like any button. Under a mouse on a wide screen there is no blanket minimum: controls size to their words, and those
+ * that need room to be clicked take --tap, 32px there. */
+:root { --tap: 32px; }
+@media (pointer: coarse), (width < 900px) {
+ :root { --tap: 44px; }
+ button, input, select, textarea, [data-item], [data-row] { min-height: 44px; }
+ button.ref.alone { display: inline-flex; align-items: center; min-height: 44px; vertical-align: middle; }
+ .theme-btn, .flow-hide { width: 44px; height: 44px; }
+}
+/* A clickable row is never shorter than the target. */
+[data-item], [data-row] { min-height: var(--tap); }
+/* The Items toolbar's controls stand at the target, 32px under a mouse. */
+.seg button, .toolbar .go, .toolbar select, .toolbar input { min-height: var(--tap); }
+.toolbar .go, .toolbar select, .toolbar input { padding-block: 0; }
.seg { flex-wrap: wrap; max-width: 100%; }
.inline > label { min-width: 0; }
+/* On a phone the Items toolbar is one row, Active and Verified with New item at its end, as the person chose; All and
+ * the lane picker drop out unless one of them is what narrows the list now. While a filter beyond Active and Verified
+ * shows, New item is a + (its name is still New item), so the row holds both filters; a long lane name gives way, the
+ * picker shrinking to show what it can, rather than the row. */
@media (width < 480px) {
- .toolbar .seg { flex: 1 1 100%; }
+ .toolbar { flex-wrap: nowrap; }
+ .toolbar .seg, .toolbar .go { flex: none; }
+ .toolbar .lane-pick { flex: 0 1 auto; min-width: 4em; }
+ .toolbar .seg [data-state="all"]:not(.on), .toolbar .lane-pick:not(:has(option:checked:not([value=""]))) { display: none; }
+ .toolbar:has(.seg button.on:not([data-state="active"]):not([data-state="verified"]), .lane-pick option:checked:not([value=""])) .go { width: var(--tap); padding: 0; font-size: 0; }
+ .toolbar:has(.seg button.on:not([data-state="active"]):not([data-state="verified"]), .lane-pick option:checked:not([value=""])) .go::before { content: "+"; font-size: 22px; font-weight: 500; line-height: 1; }
}
+
+.spec-feedback { margin: 8px 0; padding: 8px; border: 1px solid var(--line-strong); border-radius: 8px; overflow-wrap: anywhere; font-size: 13px; }
+.spec-feedback.ok { color: var(--accent-strong); }
+.spec-feedback.no { color: var(--reject); }
+
+/* The agents panel: a row for each agent holding work, a pill for each holding none. */
+.agent-card { border-radius: 10px; }
+.agent-card.on { background: color-mix(in srgb, var(--h) 9%, transparent); }
+.agent-row { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 1px 10px; align-items: center; width: 100%; min-height: 48px; padding: 6px 8px; border: 0; border-radius: 10px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
+.agent-row:hover { background: var(--surface-2); }
+.agent-row .avatar { grid-row: 1 / span 2; width: 28px; height: 28px; font-size: 10px; }
+.agent-row .avatar.wide { font-size: 8px; }
+.agent-card.lead .avatar svg, .agent-pill.lead .avatar svg { width: 60%; height: 60%; }
+.agent-who { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
+.agent-who b { color: var(--h); font-size: 13.5px; }
+.agent-card.lead .agent-who b, .agent-pill.lead > span { color: var(--ink); }
+.agent-who time { margin-left: auto; color: var(--ink-faint); font: 11.5px var(--mono); }
+.agent-doing { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 12.5px; color: var(--ink-muted); }
+.agent-what { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
+.agent-what i { font: normal 11.5px var(--mono); color: var(--ink-faint); }
+.agent-doing .chip { flex: none; font-size: 10.5px; padding-block: 0; }
+.agent-more { flex: none; font: 11px var(--mono); color: var(--ink-faint); }
+.agent-card .agent-work { padding: 0 8px 0 46px; font-size: 12.5px; }
+.fold-line { display: flex; align-items: center; gap: 8px; width: 100%; min-height: var(--tap); padding: 0 8px; border: 0; border-radius: 10px; background: none; color: var(--ink-muted); font: inherit; font-size: 12.5px; text-align: left; cursor: pointer; }
+.fold-line:hover { background: var(--surface-2); }
+.fold-more { margin-left: auto; color: var(--accent-strong); font-weight: 600; }
+/* The fold line reaches 4px from the card edge on every side, its words in line with the card text. */
+
+.agents-quiet { margin: 4px 0 0; padding: 10px 8px 2px; border-top: 1px solid var(--line); color: var(--ink-faint); font-size: 12.5px; }
+.all-agents { margin-top: 2px; font-size: 13px; }
+.agents-idle { margin-top: 4px; padding-top: 2px; border-top: 1px solid var(--line); }
+.idle-summary { display: flex; align-items: center; gap: 8px; width: 100%; min-height: var(--tap); padding: 0 8px; border: 0; border-radius: 10px; background: none; color: var(--ink-muted); font: inherit; font-size: 12.5px; text-align: left; cursor: pointer; }
+.idle-summary:hover { background: var(--surface-2); }
+.idle-more { margin-left: auto; color: var(--accent-strong); font-weight: 600; }
+.idle-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
+.agent-pill { display: flex; align-items: center; min-width: 0; min-height: var(--tap); padding: 0 8px; border: 0; border-radius: 10px; background: none; color: inherit; font: inherit; cursor: pointer; }
+.agent-pill:hover { background: var(--surface-2); }
+.agent-pill.on { background: color-mix(in srgb, var(--h) 9%, transparent); }
+.agent-pill > span { display: inline-flex; align-items: center; gap: 6px; min-width: 0; color: var(--ink-muted); font-size: 12.5px; }
+.agent-pill:hover > span, .agent-pill.on > span { border-color: var(--h); color: var(--h); }
+.agent-pill .avatar { width: 20px; height: 20px; font-size: 8px; }
+.agent-pill .avatar.wide { font-size: 6.5px; }
+
+/* The composer's address, when it is not the coordinator: a chip the person can clear. */
+.composer .to-chip { display: inline-flex; flex: none; align-items: center; align-self: center; gap: 2px; margin-left: 6px; padding-left: 10px; border-radius: 999px; background: var(--violet-soft); color: var(--violet); font-size: 12.5px; white-space: nowrap; }
+.composer .to-chip[hidden] { display: none; }
+.to-clear { display: inline-grid; place-items: center; width: var(--tap); height: var(--tap); margin: -10px -2px -10px 0; padding: 0; border: 0; border-radius: 50%; background: none; color: inherit; font-size: 16px; cursor: pointer; }
+/* Heard: which agents a shout of the person's has reached. */
+.shout .heard { display: flex; align-items: center; gap: 6px; margin-top: 6px; color: var(--ink-muted); font-size: 12px; }
+.shout .heard::before { content: "✓"; color: var(--accent-strong); font-weight: 700; }
+.shout .heard.not { color: var(--ink-faint); }
+.shout .heard.not::before { content: "…"; color: var(--ink-faint); }
+.heard-faces { display: inline-flex; padding-right: 5px; }
+.heard-face { display: grid; place-items: center; width: 18px; height: 18px; margin-right: -5px; border: 1.5px solid var(--surface); border-radius: 50%; background: color-mix(in srgb, var(--h) 16%, var(--surface)); color: var(--h); font: 700 7px var(--mono); }
+.heard-face.lead { border-radius: 5px; background: var(--ink); color: var(--surface); }
+.heard-face svg { width: 11px; height: 11px; }
+.roadmap-only { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 4px; color: var(--ink-muted); font-size: 13px; }
+
+/* One corner in both modes: the logo, then the project name, in the same place and size. Docked, the project list sits
+ * under it; collapsed, the same list drops down from it, and only then does the name carry its arrow. */
+@media (width > 900px) {
+ .side-top { gap: 6px; }
+ .brand span { display: none; }
+ .brand { justify-content: center; width: var(--tap); height: var(--tap); margin: 0 0 0 -10px; padding: 0; }
+ :root[data-side="collapsed"] .brand { margin: 0; }
+ .switch-btn, :root[data-side="collapsed"] .switch-btn { display: flex; max-width: 16rem; padding: 6px 8px; border-color: transparent; background: none; font-size: 15px; font-weight: 700; }
+ :root[data-side="collapsed"] .switch-btn:hover { background: var(--surface-2); }
+ :root:not([data-side="collapsed"]) .switch-btn { cursor: default; }
+ :root:not([data-side="collapsed"]) .switch-btn small { display: none; }
+}
+/* Needs you heads the Items list: each call a row shaped like an item, its kind in the warning colour as a sent-back
+ * verdict is, set off from the items under it by a rule. */
+.list-card { display: grid; gap: 2px; padding: 6px; }
+.list-card > .chain { padding: 0; }
+.needs { display: grid; gap: 2px; margin: 0 0 4px; padding: 0 0 4px; list-style: none; border-bottom: 1px solid var(--line); }
+.needs[hidden] { display: none; }
+.dot.ask { background: var(--warn); }
+.row.ask .meta .why { color: var(--warn); }
+/* Shouts is one card: the composer's line at its head with the asks and Show agents at its end, then the asks once
+ * opened, as a tinted group set apart from the feed, then the feed. */
+.shouts-card { display: grid; min-width: 0; padding: 0; }
+.shouts-card > .shout-form { flex-wrap: wrap; align-items: center; padding: 10px 10px 4px; }
+.shout-form > .composer { flex: 1 1 0; }
+.asks-slot { display: flex; flex: none; gap: 2px; }
+.asks-slot:empty { display: none; }
+.asks-toggle { flex: none; padding: 6px 8px; border: 0; border-radius: 8px; background: none; color: var(--ink-muted); font: inherit; font-size: 13px; white-space: nowrap; cursor: pointer; }
+.asks-toggle:hover, .asks-toggle[aria-expanded="true"] { background: var(--surface-2); color: var(--ink); }
+.shouts-card > #decisions { margin: 2px 10px 8px; padding: 2px 10px; border: 0; border-radius: 10px; background: var(--surface-2); box-shadow: none; }
+.shouts-card > #decisions[hidden] { display: none; }
+.shouts-card > #decisions > .shout:first-child { border-top: 0; }
+.shouts-card > .feed { min-width: 0; }
+/* A sent shout shows as its card in the feed, so only a refusal speaks, on its own line above the composer. */
+.shout-form > .console { flex: 1 1 100%; order: -1; margin: 0; }
+.shout-form > .console.ok { display: none; }
+/* Under a mouse the composer is as tall as a line of text. */
+@media (pointer: fine) and (width >= 900px) {
+ .composer { padding: 3px; border-radius: 10px; }
+ .composer textarea { min-height: 32px; padding: 6px 8px; }
+ .composer .send { width: 32px; height: 32px; border-radius: 8px; }
+ .composer .send svg { width: 15px; height: 15px; }
+}
+/* A panel's heading carries its own control at the right. */
+.detail h3.panel-head { display: flex; align-items: center; justify-content: space-between; }
+.detail h3.panel-head .link { min-height: 44px; margin: -16px -6px -16px 0; padding: 0 6px; color: var(--ink-faint); font: 500 12px var(--sans); letter-spacing: 0; text-transform: none; }
+.detail h3.panel-head .link:hover { color: var(--accent-strong); }
+/* In an agent's row the state is a coloured word beside the name, so what it holds has the row's full width. */
+.agent-who { gap: 6px; }
+.agent-who .chip { flex: none; padding: 0; border: 0; background: none; font: 600 11.5px var(--sans); letter-spacing: 0; }
+/* Search lives in the top bar and covers the whole board; its results drop down under it, grouped, and open what they name. */
+.top-find { position: relative; flex: 0 1 280px; min-width: 150px; margin-left: auto; align-self: center; }
+.top .tabs { flex-wrap: nowrap; }
+.top-find input { width: 100%; padding: 5px 10px 5px 30px; border: 1px solid transparent; border-radius: 8px; background: var(--surface-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='7' cy='7' r='4.5' fill='none' stroke='%237a887f' stroke-width='1.6'/%3E%3Cpath d='M10.5 10.5 14 14' stroke='%237a887f' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat 10px center / 14px; font-size: 13px; }
+.top-find input:focus { outline: 0; border-color: var(--line-strong); background-color: var(--surface); }
+.find-results { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: min(480px, 92vw); max-height: 70vh; overflow-y: auto; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }
+.find-results h4 { display: flex; justify-content: space-between; margin: 8px 8px 4px; color: var(--ink-faint); font: 600 11px var(--sans); letter-spacing: .04em; text-transform: uppercase; }
+.find-results h4:first-child { margin-top: 2px; }
+.find-results h4 span { font: 500 11px var(--mono); letter-spacing: 0; text-transform: none; }
+.find-hit { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 10px; align-items: center; width: 100%; padding: 4px 8px; border: 0; border-radius: 8px; background: none; color: var(--ink); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
+.find-hit code { overflow: hidden; color: var(--ink-faint); font: 600 12px var(--mono); text-overflow: ellipsis; white-space: nowrap; }
+.find-hit span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
+.find-hit small { color: var(--ink-faint); font-size: 11.5px; white-space: nowrap; }
+.find-hit.on, .find-hit:hover { background: var(--surface-2); }
+.find-empty { padding: 10px; color: var(--ink-muted); font-size: 13px; }
+.shout.found { background: color-mix(in srgb, var(--accent) 10%, transparent); transition: background .4s; }
+@media (width < 480px) { .top { flex-wrap: wrap; } .top-find { order: 3; flex-basis: 100%; margin: 0 0 8px; } }
+
+/* Credential ids wrap within the agents panel; every action remains a full touch target. */
+#credentials { min-width: 0; margin-top: 12px; }
+#credentials > .link { min-height: 44px; }
+#credentials p { color: var(--ink-muted); overflow-wrap: anywhere; }
+.credential { display: grid; min-width: 0; gap: 8px; padding: 12px 0; border-top: 1px solid var(--line); }
+.credential > code, .credential > b { overflow-wrap: anywhere; }
+.credential dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 8px; margin: 0; font-size: 12px; }
+.credential dt { color: var(--ink-muted); }
+.credential dd { margin: 0; overflow-wrap: anywhere; }
+.credential > button { justify-self: start; min-height: 44px; }
+
+.proof-stats { padding: 10px 12px; display: grid; gap: 7px; }
+.proof-stats[hidden] { display: none; }
+.proof-stats-head { display: flex; align-items: baseline; gap: 8px; }
+.proof-stats-head b { font-size: 13px; }
+.proof-stats-head > span, .proof-stats-grid > div > span { color: var(--ink-muted); font-size: 11px; }
+.proof-stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px 12px; }
+.proof-stats-grid > div { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
+.proof-stats-grid b { font-size: 14px; font-variant-numeric: tabular-nums; }
+.proof-stats-grid small { overflow-wrap: anywhere; font-size: 11px; color: var(--ink-muted); }
+.proof-stats-detail { border-top: 1px solid var(--line); padding-top: 5px; font-size: 11px; }
+.proof-stats-detail p { margin: 5px 0 0; overflow-wrap: anywhere; }
+
+@media (width < 480px) { .proof-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
diff --git a/docs/shots/demo.mjs b/docs/shots/demo.mjs
index 5e17cc64..4195e3c4 100644
--- a/docs/shots/demo.mjs
+++ b/docs/shots/demo.mjs
@@ -57,7 +57,7 @@ async function buildBoard(base, env) {
await mkdir(repo, { recursive: true });
command('git', ['init', '-q', '-b', 'main'], repo, env);
command(process.execPath, [BIN, 'init'], repo, env);
- await writeFile(join(repo, 'pullboard.json'), JSON.stringify({ name: 'Demo board', project: 'Pullboard demo', gate: 'node --check src/demo.js', spec: 'SPEC.md', verify: { policy: 'any', family: 'require' }, lease: '2h', lanes: { app: { owns: ['src/'], specs: ['G'] }, review: { owns: [], specs: [] } }, shared: [] }, null, 2) + '\n');
+ await writeFile(join(repo, 'pullboard.json'), JSON.stringify({ name: 'Demo board', project: 'Demo project', gate: 'node --check src/demo.js', spec: 'SPEC.md', verify: { policy: 'any', family: 'require' }, lease: '2h', lanes: { app: { owns: ['src/'], specs: ['G'] }, review: { owns: [], specs: [] } }, shared: [] }, null, 2) + '\n');
await writeFile(join(repo, 'SPEC.md'), '# Demo\n\n## G · Goals\n- G1 [approved, must] A demo item exists to show the board. | gate: none\n- G2 [approved, must] The verified item shows its review history. | gate: none\n');
command('git', ['add', '-A'], repo, env);
command('git', ['commit', '-q', '-m', 'chore: initialize demo board'], repo, env);
@@ -70,12 +70,12 @@ async function buildBoard(base, env) {
pb(repo, 'add', 'app', 'Withdrawn example', '--specs', 'G1', '--criterion', 'The demo includes withdrawn work.');
pb(repo, 'withdraw', '6', 'this example was dropped');
- const app = pb(repo, 'worktree', 'app').match(/made (.+) on branch app\/1/)?.[1];
+ const app = pb(repo, 'worktree', 'app', '--model', 'Demo builder').match(/made (.+) on branch app\/1/)?.[1];
if (!app) throw new Error('Could not create the demo builder worktree');
- pb(app, 'join', 'app', '--family', 'codex');
- const review = pb(repo, 'worktree', 'review').match(/made (.+) on branch review\/1/)?.[1];
+ pb(app, 'join', 'app', '--family', 'codex', '--model', 'Demo builder');
+ const review = pb(repo, 'worktree', 'review', '--model', 'Demo reviewer').match(/made (.+) on branch review\/1/)?.[1];
if (!review) throw new Error('Could not create the demo reviewer worktree');
- pb(review, 'join', 'review', '--family', 'claude');
+ pb(review, 'join', 'review', '--family', 'claude', '--model', 'Demo reviewer');
pb(app, 'next');
await mkdir(join(app, 'src'), { recursive: true });
await writeFile(join(app, 'src', 'demo.js'), 'export const reviewed = false;\n');
@@ -95,24 +95,22 @@ async function buildBoard(base, env) {
pb(review, 'verify', '1', 'accept', '--note', 'Tried the edge that failed before; the revised demo passes.');
command('git', ['merge', '-q', '--ff-only', 'app/1'], repo, env);
pb(repo, 'merged', '1', second);
- const app2 = pb(repo, 'worktree', 'app').match(/made (.+) on branch app\/2/)?.[1];
- if (!app2) throw new Error('Could not create the second demo builder worktree');
- pb(app2, 'join', 'app', '--family', 'codex');
- pb(app2, 'claim', '3');
- await mkdir(join(app2, 'src'), { recursive: true });
- await writeFile(join(app2, 'src', 'review.js'), 'export const ready = true;\n');
- command('git', ['add', '-A'], app2, env);
- command('git', ['commit', '-q', '-m', 'feat(app): prepare the next review [G1]'], app2, env);
- pb(app2, 'submit', '3');
- const app3 = pb(repo, 'worktree', 'app').match(/made (.+) on branch app\/3/)?.[1];
- if (!app3) throw new Error('Could not create the third demo builder worktree');
- pb(app3, 'join', 'app', '--family', 'codex');
- pb(app3, 'claim', '4');
- const decision = pb(app3, 'shout', 'coordinator', 'The review is complete. May the verified change proceed?', '--decision').match(/as #(\d+)/)?.[1];
+ command('git', ['switch', '-q', '-c', 'app/next-review', 'main'], app, env);
+ pb(app, 'claim', '3');
+ await writeFile(join(app, 'src', 'review.js'), 'export const ready = true;\n');
+ command('git', ['add', '-A'], app, env);
+ command('git', ['commit', '-q', '-m', 'feat(app): prepare the next review [G1]'], app, env);
+ pb(app, 'submit', '3');
+ pb(app, 'claim', '4');
+ pb(review, 'shout', 'coordinator', `#1 passes the edge that failed before. The fix is in src/demo.js:1@${second}.`, '--evidence', 'receipt', '--outcome', 'edge passes', '--item', '1', '--commit', second);
+ const decision = pb(app, 'shout', 'coordinator', 'The review is complete. May the verified change proceed?', '--decision').match(/as #(\d+)/)?.[1];
if (!decision) throw new Error('The demo decision request was not recorded.');
const passed = pb(repo, 'pass', decision, 'The review passed; ask the person before proceeding.').match(/as #(\d+)/)?.[1];
if (!passed) throw new Error('The coordinator did not pass the demo decision to the person.');
pb(repo, 'answer', passed, 'Proceed with the verified change.', '--as', 'person');
+ pb(repo, 'inbox');
+ pb(app, 'inbox');
+ pb(repo, 'shout', 'app-1', '#4 can continue while #3 waits for review.');
pb(repo, 'hold', 'review', '--reason', 'Waiting for the next demo item.');
if (!/1 withdrawn/.test(pb(repo, 'status'))) throw new Error('The demo board must include a withdrawn item.');
const item = JSON.parse(pb(repo, 'show', '1', '--json'));
@@ -145,9 +143,11 @@ async function recordTour(env) {
await writeFile(join(OUTPUT, 'tour.svg'), renderTour(lines));
}
+const boardOnly = process.argv.includes('--board-only');
+const screenshotsOnly = process.argv.includes('--screenshots-only');
const tourOnly = process.argv.includes('--tour-only');
-const chrome = !tourOnly && CHROME.find((path) => { try { return spawnSync(path, ['--version'], { stdio: 'ignore' }).status === 0; } catch { return false; } });
-if (!chrome && !tourOnly) { process.stderr.write('pullboard demo: install Google Chrome to capture the board screenshots.\n'); process.exitCode = 1; }
+const chrome = !tourOnly && !boardOnly && CHROME.find((path) => { try { return spawnSync(path, ['--version'], { stdio: 'ignore' }).status === 0; } catch { return false; } });
+if (!chrome && !tourOnly && !boardOnly) { process.stderr.write('pullboard demo: install Google Chrome to capture the board screenshots.\n'); process.exitCode = 1; }
else {
const base = await realpath(await mkdtemp(join(tmpdir(), 'pullboard-readme-demo-')));
let view;
@@ -161,29 +161,38 @@ else {
} else {
const repo = await buildBoard(base, env);
await exportBoard(repo, env);
- server = spawn(process.execPath, [BIN, 'view', '--no-open'], { cwd: repo, env, stdio: ['ignore', 'pipe', 'ignore'] });
- const url = await new Promise((resolveUrl, reject) => {
- let output = '';
- const timer = setTimeout(() => reject(new Error('The demo view did not start')), 10000);
- server.stdout.setEncoding('utf8');
- server.stdout.on('data', (chunk) => { output += chunk; const match = /Pullboard view: (http:\/\/[^\s]+)/.exec(output); if (match) { clearTimeout(timer); resolveUrl(match[1]); } });
- server.once('close', () => { clearTimeout(timer); reject(new Error('The demo view stopped before it opened')); });
- });
- view = await browser(chrome, join(base, 'chrome-profile'), url);
- await waitForDemoBoard(view, repo);
- await view.viewport(1440, 700);
- await view.evaluate("document.querySelector('[data-state=all]').click()");
- await view.waitFor("!!document.querySelector('#chain .row[data-item=\"1\"]')", 'accepted item in All');
- await view.evaluate("(()=>{document.documentElement.dataset.theme='light'; localStorage.setItem('pb.theme','light'); document.querySelector('#chain .row[data-item=\"1\"]').click()})()");
- await view.waitFor("view.item === 1 && !!document.querySelector('#chain .row.on[data-item=\"1\"]') && document.querySelector('#detail').textContent.includes('Reviewed and accepted') && document.querySelector('#detail').textContent.includes('REJECT') && document.querySelector('#detail').textContent.includes('ACCEPT')", 'selected accepted item and both verdicts');
- await view.evaluate('document.fonts.ready.then(() => new Promise(resolve => requestAnimationFrame(() => requestAnimationFrame(resolve))))');
- await view.screenshot(join(OUTPUT, 'desktop.png'));
- await view.viewport(390, 900);
- await view.evaluate("(()=>{document.documentElement.dataset.theme='dark'; localStorage.setItem('pb.theme','dark'); const item=document.querySelector('[data-item=\"1\"]'); const detail=document.querySelector('#detail')?.textContent??''; if(document.documentElement.dataset.theme!=='dark'||!item||!detail.includes('ACCEPT')) throw new Error('The phone screenshot must show the selected accepted item in dark mode'); return true})()");
- await view.screenshot(join(OUTPUT, 'phone.png'));
- await view.close(); view = null;
- await stop(server); server = null;
- await recordTour(env);
+ if (!boardOnly) {
+ server = spawn(process.execPath, [BIN, 'view', '--no-open'], { cwd: repo, env, stdio: ['ignore', 'pipe', 'ignore'] });
+ const url = await new Promise((resolveUrl, reject) => {
+ let output = '';
+ const timer = setTimeout(() => reject(new Error('The demo view did not start')), 10000);
+ server.stdout.setEncoding('utf8');
+ server.stdout.on('data', (chunk) => { output += chunk; const match = /Pullboard view: (http:\/\/[^\s]+)/.exec(output); if (match) { clearTimeout(timer); resolveUrl(match[1]); } });
+ server.once('close', () => { clearTimeout(timer); reject(new Error('The demo view stopped before it opened')); });
+ });
+ view = await browser(chrome, join(base, 'chrome-profile'), url);
+ await waitForDemoBoard(view, repo);
+ await view.viewport(1440, 900);
+ await view.evaluate("document.querySelector('[data-state=all]').click()");
+ await view.waitFor("!!document.querySelector('#chain .row[data-item=\"1\"]')", 'accepted item in All');
+ await view.evaluate("(()=>{document.documentElement.dataset.theme='light'; localStorage.setItem('pb.theme','light'); document.querySelector('#chain .row[data-item=\"1\"]').click()})()");
+ await view.waitFor("view.item === 1 && !!document.querySelector('#chain .row.on[data-item=\"1\"]') && document.querySelector('#detail').textContent.includes('Reviewed and accepted') && document.querySelector('#detail').textContent.includes('REJECT') && document.querySelector('#detail').textContent.includes('ACCEPT')", 'selected accepted item and both verdicts');
+ await view.evaluate("document.querySelector('[data-state=active]').click()");
+ await view.waitFor("!document.querySelector('#needs').hidden && document.querySelector('#needs').textContent.includes('NEEDS YOU') && document.querySelector('#detail').textContent.includes('ACCEPT')", 'Active items, Needs you and the selected review history');
+ await view.evaluate('document.fonts.ready.then(() => new Promise(resolve => requestAnimationFrame(() => requestAnimationFrame(resolve))))');
+ await view.screenshot(join(OUTPUT, 'desktop.png'));
+ await view.viewport(390, 900);
+ await view.evaluate("(()=>{document.documentElement.dataset.theme='dark'; localStorage.setItem('pb.theme','dark'); const item=document.querySelector('[data-item=\"4\"]'); const detail=document.querySelector('#detail')?.textContent??''; if(document.documentElement.dataset.theme!=='dark'||!item||!detail.includes('ACCEPT')||document.querySelector('#needs').hidden) throw new Error('The phone screenshot must show active work and Needs you in dark mode'); return true})()");
+ await view.screenshot(join(OUTPUT, 'phone.png'));
+ await view.viewport(1440, 900);
+ await view.evaluate("document.documentElement.dataset.theme='light'; localStorage.setItem('pb.theme','light'); document.querySelector('[data-tab=\"shouts\"]').click()");
+ await view.waitFor("!document.querySelector('#shouts-pane').hidden && !!document.querySelector('#feed .heard:not(.not)') && !!document.querySelector('#feed .receipt') && !!document.querySelector('#feed [data-code]') && !!document.querySelector('#feed .band.done')", 'answered conversation, Heard, receipt and code reference');
+ await view.evaluate('document.fonts.ready.then(() => new Promise(resolve => requestAnimationFrame(() => requestAnimationFrame(resolve))))');
+ await view.screenshot(join(OUTPUT, 'shouts.png'));
+ await view.close(); view = null;
+ await stop(server); server = null;
+ if (!screenshotsOnly) await recordTour(env);
+ }
}
} finally {
if (view) await view.close();
diff --git a/docs/shots/desktop.png b/docs/shots/desktop.png
index 9f2a36fb..338bbcc2 100644
Binary files a/docs/shots/desktop.png and b/docs/shots/desktop.png differ
diff --git a/docs/shots/phone.png b/docs/shots/phone.png
index aced8ee1..9b8eee4d 100644
Binary files a/docs/shots/phone.png and b/docs/shots/phone.png differ
diff --git a/docs/shots/shots.test.js b/docs/shots/shots.test.js
index d1f59271..7557ef88 100644
--- a/docs/shots/shots.test.js
+++ b/docs/shots/shots.test.js
@@ -13,7 +13,7 @@ import { narrationDurations, parseVtt } from './video.mjs';
const ROOT = new URL('../../', import.meta.url);
const README = readFileSync(new URL('README.md', ROOT), 'utf8');
-const files = ['desktop.png', 'phone.png', 'tour.svg'];
+const files = ['desktop.png', 'phone.png', 'shouts.png', 'tour.svg'];
const shots = (name) => new URL(`docs/shots/${name}`, ROOT);
/** Assert that an image is embedded in a named README section with useful alt text. */
@@ -32,10 +32,42 @@ test('the README links the desktop board and timed tour with descriptive alt tex
linkedInSection('Installation', 'tour.svg', ['submitted', 'rejected', 'fixed', 'accepted']);
});
+test('the demo board stages a Shouts conversation [I11,I13]', () => {
+ const { state } = JSON.parse(readFileSync(new URL('docs/demo/api/v1/boards/demo-board/state.json', ROOT), 'utf8'));
+ const agents = state.agents.filter((agent) => agent.agent_id !== 'person');
+ assert.equal(agents.length, 3, 'the demo has a coordinator, builder and reviewer');
+ const senders = new Set(state.shouts.map((shout) => shout.shout_from).filter((id) => id !== 'person'));
+ assert.deepEqual([...senders].sort(), ['app-1', 'coordinator', 'review-1']);
+ const decision = state.shouts.find((shout) => shout.shout_decision && shout.shout_to === 'person');
+ assert.ok(decision, 'the coordinator asks the person');
+ const answer = state.shouts.find((shout) => shout.shout_from === 'person' && shout.shout_answers === decision.shout_id);
+ assert.ok(answer, 'the person answers that decision');
+ assert.ok(agents.some((agent) => ['all', agent.agent_id, agent.agent_lane].includes(answer.shout_to)
+ && agent.agent_last_shout_id >= answer.shout_id), 'an addressed agent has Heard the person');
+ const receipt = state.shouts.find((shout) => shout.shout_evidence_kind === 'receipt');
+ assert.ok(receipt, 'the conversation includes an evidence receipt');
+ assert.equal(receipt.shout_evidence_item, 1);
+ assert.equal(receipt.shout_evidence_outcome, 'edge passes');
+ assert.equal(receipt.shout_evidence_commit, state.items.find((item) => item.id === 1).commit);
+ assert.ok(state.shouts.some((shout) => shout.shout_text.includes(`src/demo.js:1@${receipt.shout_evidence_commit}`)), 'the code reference points at the reviewed fix');
+});
+
+test('the README shows the Shouts capture [I11,I13]', () => {
+ linkedInSection('Pullboard View', 'shouts.png', ['shouts', 'answered', 'heard', 'receipt', 'code reference']);
+ linkedInSection('Pullboard View', 'desktop.png', ['needs you', 'search', 'status bar']);
+ linkedInSection('Pullboard View', 'phone.png', ['phone', 'dark', 'active work', 'needs you', 'search']);
+ const section = README.slice(README.indexOf('## Pullboard View'), README.indexOf('## Get started'));
+ assert.match(section, /desktop\.png\)[^]*shouts\.png\)/, 'desktop and Shouts captures are together');
+ const png = readFileSync(shots('shouts.png'));
+ assert.deepEqual([...png.subarray(0, 8)], [137, 80, 78, 71, 13, 10, 26, 10]);
+ assert.equal(png.readUInt32BE(16), 1440, 'the Shouts capture is desktop width');
+});
+
test('the demo assets exist and stay within their size budgets [I11,I13]', () => {
for (const name of files) assert.ok(statSync(shots(name)).size > 0, `${name} exists`);
assert.ok(statSync(shots('desktop.png')).size < 300_000, 'desktop PNG is under 300 KB');
assert.ok(statSync(shots('phone.png')).size < 300_000, 'phone PNG is under 300 KB');
+ assert.ok(statSync(shots('shouts.png')).size < 300_000, 'Shouts PNG is under 300 KB');
assert.ok(statSync(shots('tour.svg')).size < 200_000, 'tour SVG is under 200 KB');
const tour = readFileSync(shots('tour.svg'), 'utf8');
assert.match(tour, /animation:light-step 16s linear infinite/, 'the SVG carries its own timed animation');
@@ -84,11 +116,12 @@ test('the exported demo is synthetic and contains no machine paths or unrelated
const state = JSON.parse(readFileSync(new URL('docs/demo/api/v1/boards/demo-board/state.json', ROOT), 'utf8')).state;
assert.ok(state.agents.every((agent) => /^(coordinator|person|app-\d+|review-\d+)$/.test(agent.agent_id)), 'only generic demo roles appear as agents');
assert.ok(state.shouts.every((shout) => [
+ '#4 can continue while #3 waits for review.',
'The review is complete. May the verified change proceed?',
- 'Passed up from app-3: The review is complete. May the verified change proceed?\nCoordinator note: The review passed; ask the person before proceeding.',
+ 'Passed up from app-1: The review is complete. May the verified change proceed?\nCoordinator note: The review passed; ask the person before proceeding.',
'Proceed with the verified change.',
- 'Person answered #2: Proceed with the verified change.',
- ].includes(shout.shout_text)), 'the board contains only the synthetic decision exchange');
+ 'Person answered #3: Proceed with the verified change.',
+ ].includes(shout.shout_text) || /^#1 passes the edge that failed before\. The fix is in src\/demo\.js:1@[a-f0-9]{40}\.$/.test(shout.shout_text)), 'the board contains only the synthetic conversation');
});
test('the demo rebuild script uses a temporary repo and isolated home [I11,I13]', () => {
diff --git a/docs/shots/shouts.png b/docs/shots/shouts.png
new file mode 100644
index 00000000..dd8d1d2b
Binary files /dev/null and b/docs/shots/shouts.png differ