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.
JavaScript agentic-codingai-agentsai-governanceautonomous-agentsclaude-codeclicode-reviewcodexcoding-agentsdeveloper-toolsgit-hooksllmlocal-firstmulti-agentsoftware-factoryspec-driven-developmentverificationvibe-coding
docs(roadmap): show expanded demo release in both themes [I10,I13,N26]
Corey Olsona34bd3d7ec9b
diff --git a/README.md b/README.mdindex 7372b498..ccedd119 100644--- a/README.md+++ b/README.md@@ -313,6 +313,13 @@ Pullboard exists to keep a team of agents coherent over a long build.- Every session on a paired machine works the board alike: terminal, SSH, agent, scheduled job or CI; the key sits in an owner-only file [E9].- Each person may keep a private board per repo in ~/.pullboard; its items stay on that person's devices [E11].+The demo roadmap shows release progress and an item expanded in place, with its criterion, agents, history and release.++<picture>+ <source media="(prefers-color-scheme: dark)" srcset="docs/img/roadmap-dark.png">+ <img src="docs/img/roadmap-light.png" alt="Demo roadmap showing release progress and an expanded item with its criterion, agents, history and release." width="1440">+</picture>+The full plan lives in the Roadmap tab in Pullboard View and `pullboard roadmap`.### Docsdiff --git a/docs/demo/api/v1/boards/demo-board/events.json b/docs/demo/api/v1/boards/demo-board/events.jsonindex bf00085b..4fd26663 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\",\"model\":\"Demo 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\",\"model\":\"Demo coordinator\"}"},{"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\":\"Demo coordinator\"}"},{"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\":\"Demo coordinator\"}"},{"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\":\"Demo coordinator\"}"},{"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\":\"Demo coordinator\"}"},{"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\":\"Demo coordinator\"}"},{"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\":\"Demo coordinator\"}"},{"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:01:00.000Z","event_by":"app-1","event_kind":"claim","item_id":1,"event_detail":"{\"leaseUntil\":\"2026-10-06T14:01:00.000Z\",\"digest\":\"02f3c088ed84dd931b2f700f9562fa25bb86eee11dd77a583089423366ec4136\",\"model\":\"Demo builder\"}"},{"event_id":14,"event_at":"2026-10-06T12:02:00.000Z","event_by":"app-1","event_kind":"submit","item_id":1,"event_detail":"{\"commit\":\"fc10f1f82286128837b1dcfbeeb746cb085d0e67\",\"tree\":\"3304bca878fe12490eceebd297238abace8bb54f\",\"policyCommit\":\"b74621c7437824c109d32328ba9631bbedb06b8a\",\"criterionDigest\":\"02f3c088ed84dd931b2f700f9562fa25bb86eee11dd77a583089423366ec4136\",\"model\":\"Demo builder\"}"},{"event_id":15,"event_at":"2026-10-06T12:03:00.000Z","event_by":"review-1","event_kind":"reserve","item_id":1,"event_detail":"{\"until\":\"2026-10-06T12:33:00.000Z\",\"model\":\"Demo reviewer\"}"},{"event_id":16,"event_at":"2026-10-06T12:04:00.000Z","event_by":"review-1","event_kind":"reject","item_id":1,"event_detail":"{\"reason\":\"BEHAVIOR_MISMATCH\",\"commit\":\"fc10f1f82286128837b1dcfbeeb746cb085d0e67\",\"model\":\"Demo reviewer\"}"},{"event_id":17,"event_at":"2026-10-06T12:05:00.000Z","event_by":"app-1","event_kind":"claim","item_id":1,"event_detail":"{\"leaseUntil\":\"2026-10-06T14:05:00.000Z\",\"digest\":\"02f3c088ed84dd931b2f700f9562fa25bb86eee11dd77a583089423366ec4136\",\"model\":\"Demo builder\"}"},{"event_id":18,"event_at":"2026-10-06T12:06:00.000Z","event_by":"app-1","event_kind":"submit","item_id":1,"event_detail":"{\"commit\":\"97f25104de797e53bc2813deebbb66562b24b094\",\"tree\":\"24231a5bf42a6d80f59186e10b542b7eb09c545d\",\"policyCommit\":\"b74621c7437824c109d32328ba9631bbedb06b8a\",\"criterionDigest\":\"02f3c088ed84dd931b2f700f9562fa25bb86eee11dd77a583089423366ec4136\",\"model\":\"Demo builder\"}"},{"event_id":19,"event_at":"2026-10-06T12:12:00.000Z","event_by":"review-1","event_kind":"reserve","item_id":1,"event_detail":"{\"until\":\"2026-10-06T12:42:00.000Z\",\"model\":\"Demo reviewer\"}"},{"event_id":20,"event_at":"2026-10-06T12:13:00.000Z","event_by":"review-1","event_kind":"accept","item_id":1,"event_detail":"{\"reason\":\"CRITERION_MET\",\"commit\":\"97f25104de797e53bc2813deebbb66562b24b094\",\"check\":\"none\",\"model\":\"Demo reviewer\"}"},{"event_id":21,"event_at":"2026-10-06T12:14:00.000Z","event_by":"coordinator","event_kind":"merged","item_id":1,"event_detail":"{\"commit\":\"97f25104de797e53bc2813deebbb66562b24b094\",\"model\":\"Demo coordinator\"}"},{"event_id":22,"event_at":"2026-10-06T12:14:00.000Z","event_by":"app-1","event_kind":"claim","item_id":3,"event_detail":"{\"leaseUntil\":\"2026-10-06T14:14:00.000Z\",\"digest\":\"46d9a01fec6bb0b3f4447a72703a55edee9702f32c30750c391a8208e0fe118c\",\"model\":\"Demo builder\"}"},{"event_id":23,"event_at":"2026-10-06T12:14:00.000Z","event_by":"app-1","event_kind":"submit","item_id":3,"event_detail":"{\"commit\":\"0f3f96cc328ea513845fe3fe04eae8a3b9e7d81e\",\"tree\":\"20cacf0d7d99b3938b5e8e0b0fdf0922516fa673\",\"policyCommit\":\"97f25104de797e53bc2813deebbb66562b24b094\",\"criterionDigest\":\"46d9a01fec6bb0b3f4447a72703a55edee9702f32c30750c391a8208e0fe118c\",\"model\":\"Demo builder\"}"},{"event_id":24,"event_at":"2026-10-06T12:14:00.000Z","event_by":"app-1","event_kind":"claim","item_id":4,"event_detail":"{\"leaseUntil\":\"2026-10-06T14:14:00.000Z\",\"digest\":\"12667b0bee050513e34b14d87a0f9555af16749a3f5c77ca78d6fe568f45044f\",\"model\":\"Demo builder\"}"},{"event_id":25,"event_at":"2026-10-06T12:14: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":26,"event_at":"2026-10-06T13:15: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":27,"event_at":"2026-10-06T13:15:00.000Z","event_by":"coordinator","event_kind":"pass","item_id":null,"event_detail":"{\"shout\":3,\"to\":\"person\",\"decision\":true,\"request\":false,\"answers\":2,\"model\":\"Demo coordinator\"}"},{"event_id":28,"event_at":"2026-10-06T13:15: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":29,"event_at":"2026-10-06T13:15: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":30,"event_at":"2026-10-06T13:15: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\":\"Demo coordinator\"}"},{"event_id":31,"event_at":"2026-10-06T13:15:00.000Z","event_by":"coordinator","event_kind":"hold","item_id":null,"event_detail":"{\"lane\":\"review\",\"reason\":\"Waiting for the next demo item.\",\"model\":\"Demo coordinator\"}"}],"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\":\"Demo 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\",\"model\":\"Demo coordinator\"}"},{"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\":\"Demo coordinator\"}"},{"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\":\"Demo coordinator\"}"},{"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\":\"Demo coordinator\"}"},{"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\":\"Demo coordinator\"}"},{"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\":\"Demo coordinator\"}"},{"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\":\"Demo coordinator\"}"},{"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:01:00.000Z","event_by":"app-1","event_kind":"claim","item_id":1,"event_detail":"{\"leaseUntil\":\"2026-10-06T14:01:00.000Z\",\"digest\":\"b716ff81e921addcabad251b91b6fa5915d167dd9f518c46a478b040414a8035\",\"model\":\"Demo builder\"}"},{"event_id":14,"event_at":"2026-10-06T12:01:00.000Z","event_by":"board","event_kind":"guards","item_id":null,"event_detail":"{\"missing\":[],\"changed\":[\"machine_item_move\",\"machine_fields_claimed\",\"machine_fields_submitted\",\"machine_fields_verified\",\"machine_fields_withdrawn\",\"machine_proof_verified\"],\"stale\":[]}"},{"event_id":15,"event_at":"2026-10-06T12:02:00.000Z","event_by":"board","event_kind":"guards","item_id":null,"event_detail":"{\"missing\":[],\"changed\":[\"machine_item_move\",\"machine_fields_claimed\",\"machine_fields_submitted\",\"machine_fields_verified\",\"machine_fields_withdrawn\",\"machine_proof_verified\"],\"stale\":[]}"},{"event_id":16,"event_at":"2026-10-06T12:02:00.000Z","event_by":"app-1","event_kind":"submit","item_id":1,"event_detail":"{\"commit\":\"30ca4edaa8b5a159174069393df237fbedafdcb8\",\"tree\":\"d464314ab609a35f6d9e79307cd419d41bd34d48\",\"policyCommit\":\"eec139f05f615ddc67f46305e77903d5fc0defbe\",\"criterionDigest\":\"b716ff81e921addcabad251b91b6fa5915d167dd9f518c46a478b040414a8035\",\"submissionProof\":{\"version\":1,\"files\":[],\"full\":true,\"deferred\":false,\"reason\":\"affected-test selection is not enabled for this project\"},\"model\":\"Demo builder\"}"},{"event_id":17,"event_at":"2026-10-06T12:03:00.000Z","event_by":"review-1","event_kind":"reserve","item_id":1,"event_detail":"{\"until\":\"2026-10-06T12:33:00.000Z\",\"model\":\"Demo reviewer\"}"},{"event_id":18,"event_at":"2026-10-06T12:04:00.000Z","event_by":"review-1","event_kind":"reject","item_id":1,"event_detail":"{\"reason\":\"BEHAVIOR_MISMATCH\",\"commit\":\"30ca4edaa8b5a159174069393df237fbedafdcb8\",\"review\":{\"commit\":\"30ca4edaa8b5a159174069393df237fbedafdcb8\",\"head\":\"30ca4edaa8b5a159174069393df237fbedafdcb8\",\"trunk\":\"eec139f05f615ddc67f46305e77903d5fc0defbe\",\"paths\":[\"src/demo.js\"]},\"model\":\"Demo reviewer\"}"},{"event_id":19,"event_at":"2026-10-06T12:05:00.000Z","event_by":"app-1","event_kind":"claim","item_id":1,"event_detail":"{\"leaseUntil\":\"2026-10-06T14:05:00.000Z\",\"digest\":\"b716ff81e921addcabad251b91b6fa5915d167dd9f518c46a478b040414a8035\",\"model\":\"Demo builder\"}"},{"event_id":20,"event_at":"2026-10-06T12:05:00.000Z","event_by":"board","event_kind":"guards","item_id":null,"event_detail":"{\"missing\":[],\"changed\":[\"machine_item_move\",\"machine_fields_claimed\",\"machine_fields_submitted\",\"machine_fields_verified\",\"machine_fields_withdrawn\",\"machine_proof_verified\"],\"stale\":[]}"},{"event_id":21,"event_at":"2026-10-06T12:06:00.000Z","event_by":"board","event_kind":"guards","item_id":null,"event_detail":"{\"missing\":[],\"changed\":[\"machine_item_move\",\"machine_fields_claimed\",\"machine_fields_submitted\",\"machine_fields_verified\",\"machine_fields_withdrawn\",\"machine_proof_verified\"],\"stale\":[]}"},{"event_id":22,"event_at":"2026-10-06T12:06:00.000Z","event_by":"app-1","event_kind":"submit","item_id":1,"event_detail":"{\"commit\":\"570594e0da442b950a3b2dea95b1951a152a9850\",\"tree\":\"58ad64198a51fc395c554bd1b3bf0c4ad976f4b4\",\"policyCommit\":\"eec139f05f615ddc67f46305e77903d5fc0defbe\",\"criterionDigest\":\"b716ff81e921addcabad251b91b6fa5915d167dd9f518c46a478b040414a8035\",\"submissionProof\":{\"version\":1,\"files\":[],\"full\":true,\"deferred\":false,\"reason\":\"affected-test selection is not enabled for this project\"},\"model\":\"Demo builder\"}"},{"event_id":23,"event_at":"2026-10-06T12:12:00.000Z","event_by":"review-1","event_kind":"reserve","item_id":1,"event_detail":"{\"until\":\"2026-10-06T12:42:00.000Z\",\"model\":\"Demo reviewer\"}"},{"event_id":24,"event_at":"2026-10-06T12:13:00.000Z","event_by":"review-1","event_kind":"accept","item_id":1,"event_detail":"{\"reason\":\"CRITERION_MET\",\"commit\":\"570594e0da442b950a3b2dea95b1951a152a9850\",\"check\":\"none\",\"review\":{\"commit\":\"570594e0da442b950a3b2dea95b1951a152a9850\",\"head\":\"570594e0da442b950a3b2dea95b1951a152a9850\",\"trunk\":\"eec139f05f615ddc67f46305e77903d5fc0defbe\",\"paths\":[\"src/demo.js\"]},\"model\":\"Demo reviewer\"}"},{"event_id":25,"event_at":"2026-10-06T12:14:00.000Z","event_by":"coordinator","event_kind":"merged","item_id":1,"event_detail":"{\"commit\":\"570594e0da442b950a3b2dea95b1951a152a9850\",\"model\":\"Demo coordinator\"}"},{"event_id":26,"event_at":"2026-10-06T12:14:00.000Z","event_by":"app-1","event_kind":"claim","item_id":3,"event_detail":"{\"leaseUntil\":\"2026-10-06T14:14:00.000Z\",\"digest\":\"17ca3a230599e6c5fcb2ac4ec14addfe2ffe7d3fcc1d80521460c1e8a9ac749d\",\"model\":\"Demo builder\"}"},{"event_id":27,"event_at":"2026-10-06T12:14:00.000Z","event_by":"board","event_kind":"guards","item_id":null,"event_detail":"{\"missing\":[],\"changed\":[\"machine_item_move\",\"machine_fields_claimed\",\"machine_fields_submitted\",\"machine_fields_verified\",\"machine_fields_withdrawn\",\"machine_proof_verified\"],\"stale\":[]}"},{"event_id":28,"event_at":"2026-10-06T12:14:00.000Z","event_by":"board","event_kind":"guards","item_id":null,"event_detail":"{\"missing\":[],\"changed\":[\"machine_item_move\",\"machine_fields_claimed\",\"machine_fields_submitted\",\"machine_fields_verified\",\"machine_fields_withdrawn\",\"machine_proof_verified\"],\"stale\":[]}"},{"event_id":29,"event_at":"2026-10-06T12:14:00.000Z","event_by":"app-1","event_kind":"submit","item_id":3,"event_detail":"{\"commit\":\"66cf065feffe937a2fc921bec70d75f9705817b3\",\"tree\":\"3735b416e4d5c2ad1a2c9212ba7dd4c109e893c1\",\"policyCommit\":\"570594e0da442b950a3b2dea95b1951a152a9850\",\"criterionDigest\":\"17ca3a230599e6c5fcb2ac4ec14addfe2ffe7d3fcc1d80521460c1e8a9ac749d\",\"submissionProof\":{\"version\":1,\"files\":[],\"full\":true,\"deferred\":false,\"reason\":\"affected-test selection is not enabled for this project\"},\"model\":\"Demo builder\"}"},{"event_id":30,"event_at":"2026-10-06T12:14:00.000Z","event_by":"app-1","event_kind":"claim","item_id":4,"event_detail":"{\"leaseUntil\":\"2026-10-06T14:14:00.000Z\",\"digest\":\"a28eec89fb38b9ccbe5b533ef7204081b83e6341b1cac9478b4aeece8e42ae54\",\"model\":\"Demo builder\"}"},{"event_id":31,"event_at":"2026-10-06T12:14: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":32,"event_at":"2026-10-06T13:15: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":33,"event_at":"2026-10-06T13:15:00.000Z","event_by":"coordinator","event_kind":"pass","item_id":null,"event_detail":"{\"shout\":3,\"to\":\"person\",\"decision\":true,\"request\":false,\"answers\":2,\"model\":\"Demo coordinator\"}"},{"event_id":34,"event_at":"2026-10-06T13:15: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":35,"event_at":"2026-10-06T13:15: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":36,"event_at":"2026-10-06T13:15: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\":\"Demo coordinator\"}"},{"event_id":37,"event_at":"2026-10-06T13:15:00.000Z","event_by":"coordinator","event_kind":"hold","item_id":null,"event_detail":"{\"lane\":\"review\",\"reason\":\"Waiting for the next demo item.\",\"model\":\"Demo coordinator\"}"},{"event_id":38,"event_at":"2026-10-06T13:15:00.000Z","event_by":"coordinator","event_kind":"milestone_add","item_id":null,"event_detail":"{\"name\":\"Demo release\",\"items\":[1,2,3,4,5],\"model\":\"Demo coordinator\"}"}],"eventLogVersion":1}diff --git a/docs/demo/api/v1/boards/demo-board/state.json b/docs/demo/api/v1/boards/demo-board/state.jsonindex 7499b5e8..7ecd62aa 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","rowAgesAt":{"SPEC.md":"97f25104de797e53bc2813deebbb66562b24b094","DOCTRINE.md":"97f25104de797e53bc2813deebbb66562b24b094"},"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":"Demo coordinator"}},{"type":"move","eventId":8,"kind":"withdraw","by":"coordinator","at":"2026-10-06T12:00:00.000Z","detail":{"reason":"this example was dropped","model":"Demo coordinator"}}]},{"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":"Demo coordinator"}}]},{"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:14: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:14: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":"Demo coordinator"}},{"type":"move","eventId":24,"kind":"claim","by":"app-1","at":"2026-10-06T12:14:00.000Z","detail":{"leaseUntil":"2026-10-06T14:14:00.000Z","digest":"12667b0bee050513e34b14d87a0f9555af16749a3f5c77ca78d6fe568f45044f","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":"0f3f96cc328ea513845fe3fe04eae8a3b9e7d81e","merged":null,"blockedBy":[],"updatedAt":"2026-10-06T12:14: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:14:00.000Z"},{"kind":"submit","by":"app-1","at":"2026-10-06T12:14: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":"Demo coordinator"}},{"type":"move","eventId":22,"kind":"claim","by":"app-1","at":"2026-10-06T12:14:00.000Z","detail":{"leaseUntil":"2026-10-06T14:14:00.000Z","digest":"46d9a01fec6bb0b3f4447a72703a55edee9702f32c30750c391a8208e0fe118c","model":"Demo builder"}},{"type":"move","eventId":23,"kind":"submit","by":"app-1","at":"2026-10-06T12:14:00.000Z","detail":{"commit":"0f3f96cc328ea513845fe3fe04eae8a3b9e7d81e","tree":"20cacf0d7d99b3938b5e8e0b0fdf0922516fa673","policyCommit":"97f25104de797e53bc2813deebbb66562b24b094","criterionDigest":"46d9a01fec6bb0b3f4447a72703a55edee9702f32c30750c391a8208e0fe118c","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":"Demo coordinator"}}]},{"id":1,"title":"Reviewed and accepted","lane":"app","status":"verified","route":"strong","owner":"app-1","reviewer":null,"reviewUntil":"2026-10-06T12:42:00.000Z","builtBy":"app-1","verifiedBy":"review-1","specs":["G1"],"criterion":"The demo item is accepted after review.","brief":"","commit":"97f25104de797e53bc2813deebbb66562b24b094","merged":"97f25104de797e53bc2813deebbb66562b24b094","blockedBy":[],"updatedAt":"2026-10-06T12:14: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:13:00.000Z","commit":"97f25104de797e53bc2813deebbb66562b24b094"},"verdicts":[{"decision":"REJECT","reason":"BEHAVIOR_MISMATCH","note":"The example skipped an edge; revise it before merging.","by":"review-1","at":"2026-10-06T12:04:00.000Z","commit":"fc10f1f82286128837b1dcfbeeb746cb085d0e67"},{"decision":"ACCEPT","reason":"CRITERION_MET","note":"Tried the edge that failed before; the revised demo passes.","by":"review-1","at":"2026-10-06T12:13:00.000Z","commit":"97f25104de797e53bc2813deebbb66562b24b094"}],"history":[{"kind":"add","by":"coordinator","at":"2026-10-06T12:00:00.000Z"},{"kind":"claim","by":"app-1","at":"2026-10-06T12:01:00.000Z"},{"kind":"submit","by":"app-1","at":"2026-10-06T12:02:00.000Z"},{"kind":"reserve","by":"review-1","at":"2026-10-06T12:03:00.000Z"},{"kind":"reject","by":"review-1","at":"2026-10-06T12:04:00.000Z"},{"kind":"claim","by":"app-1","at":"2026-10-06T12:05:00.000Z"},{"kind":"submit","by":"app-1","at":"2026-10-06T12:06:00.000Z"},{"kind":"reserve","by":"review-1","at":"2026-10-06T12:12:00.000Z"},{"kind":"accept","by":"review-1","at":"2026-10-06T12:13:00.000Z"},{"kind":"merged","by":"coordinator","at":"2026-10-06T12:14: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":"Demo coordinator"}},{"type":"move","eventId":13,"kind":"claim","by":"app-1","at":"2026-10-06T12:01:00.000Z","detail":{"leaseUntil":"2026-10-06T14:01:00.000Z","digest":"02f3c088ed84dd931b2f700f9562fa25bb86eee11dd77a583089423366ec4136","model":"Demo builder"}},{"type":"move","eventId":14,"kind":"submit","by":"app-1","at":"2026-10-06T12:02:00.000Z","detail":{"commit":"fc10f1f82286128837b1dcfbeeb746cb085d0e67","tree":"3304bca878fe12490eceebd297238abace8bb54f","policyCommit":"b74621c7437824c109d32328ba9631bbedb06b8a","criterionDigest":"02f3c088ed84dd931b2f700f9562fa25bb86eee11dd77a583089423366ec4136","model":"Demo builder"}},{"type":"move","eventId":15,"kind":"reserve","by":"review-1","at":"2026-10-06T12:03:00.000Z","detail":{"until":"2026-10-06T12:33:00.000Z","model":"Demo reviewer"}},{"type":"move","eventId":16,"kind":"reject","by":"review-1","at":"2026-10-06T12:04:00.000Z","detail":{"reason":"BEHAVIOR_MISMATCH","commit":"fc10f1f82286128837b1dcfbeeb746cb085d0e67","model":"Demo reviewer"}},{"type":"move","eventId":17,"kind":"claim","by":"app-1","at":"2026-10-06T12:05:00.000Z","detail":{"leaseUntil":"2026-10-06T14:05:00.000Z","digest":"02f3c088ed84dd931b2f700f9562fa25bb86eee11dd77a583089423366ec4136","model":"Demo builder"}},{"type":"move","eventId":18,"kind":"submit","by":"app-1","at":"2026-10-06T12:06:00.000Z","detail":{"commit":"97f25104de797e53bc2813deebbb66562b24b094","tree":"24231a5bf42a6d80f59186e10b542b7eb09c545d","policyCommit":"b74621c7437824c109d32328ba9631bbedb06b8a","criterionDigest":"02f3c088ed84dd931b2f700f9562fa25bb86eee11dd77a583089423366ec4136","model":"Demo builder"}},{"type":"move","eventId":19,"kind":"reserve","by":"review-1","at":"2026-10-06T12:12:00.000Z","detail":{"until":"2026-10-06T12:42:00.000Z","model":"Demo reviewer"}},{"type":"move","eventId":20,"kind":"accept","by":"review-1","at":"2026-10-06T12:13:00.000Z","detail":{"reason":"CRITERION_MET","commit":"97f25104de797e53bc2813deebbb66562b24b094","check":"none","model":"Demo reviewer"}},{"type":"move","eventId":21,"kind":"merged","by":"coordinator","at":"2026-10-06T12:14:00.000Z","detail":{"commit":"97f25104de797e53bc2813deebbb66562b24b094","model":"Demo coordinator"}}]}],"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-06T13:15: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-06T13:15: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-06T13:15: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-06T13:15: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-06T13:15: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@97f25104de797e53bc2813deebbb66562b24b094.","shout_at":"2026-10-06T12:14:00.000Z","shout_decision":0,"shout_answers":null,"shout_evidence_kind":"receipt","shout_evidence_outcome":"edge passes","shout_evidence_item":1,"shout_evidence_commit":"97f25104de797e53bc2813deebbb66562b24b094","shout_request":0,"shout_request_outcome":""}],"decisions":[],"asked":[],"events":[{"event_id":31,"event_at":"2026-10-06T13:15:00.000Z","event_by":"coordinator","event_kind":"hold","item_id":null,"event_detail":"{\"lane\":\"review\",\"reason\":\"Waiting for the next demo item.\",\"model\":\"Demo coordinator\"}"},{"event_id":30,"event_at":"2026-10-06T13:15: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\":\"Demo coordinator\"}"},{"event_id":29,"event_at":"2026-10-06T13:15: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-06T13:15: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-06T13:15:00.000Z","event_by":"coordinator","event_kind":"pass","item_id":null,"event_detail":"{\"shout\":3,\"to\":\"person\",\"decision\":true,\"request\":false,\"answers\":2,\"model\":\"Demo coordinator\"}"},{"event_id":26,"event_at":"2026-10-06T13:15: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:14: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:14:00.000Z","event_by":"app-1","event_kind":"claim","item_id":4,"event_detail":"{\"leaseUntil\":\"2026-10-06T14:14:00.000Z\",\"digest\":\"12667b0bee050513e34b14d87a0f9555af16749a3f5c77ca78d6fe568f45044f\",\"model\":\"Demo builder\"}"},{"event_id":23,"event_at":"2026-10-06T12:14:00.000Z","event_by":"app-1","event_kind":"submit","item_id":3,"event_detail":"{\"commit\":\"0f3f96cc328ea513845fe3fe04eae8a3b9e7d81e\",\"tree\":\"20cacf0d7d99b3938b5e8e0b0fdf0922516fa673\",\"policyCommit\":\"97f25104de797e53bc2813deebbb66562b24b094\",\"criterionDigest\":\"46d9a01fec6bb0b3f4447a72703a55edee9702f32c30750c391a8208e0fe118c\",\"model\":\"Demo builder\"}"},{"event_id":22,"event_at":"2026-10-06T12:14:00.000Z","event_by":"app-1","event_kind":"claim","item_id":3,"event_detail":"{\"leaseUntil\":\"2026-10-06T14:14:00.000Z\",\"digest\":\"46d9a01fec6bb0b3f4447a72703a55edee9702f32c30750c391a8208e0fe118c\",\"model\":\"Demo builder\"}"},{"event_id":21,"event_at":"2026-10-06T12:14:00.000Z","event_by":"coordinator","event_kind":"merged","item_id":1,"event_detail":"{\"commit\":\"97f25104de797e53bc2813deebbb66562b24b094\",\"model\":\"Demo coordinator\"}"},{"event_id":20,"event_at":"2026-10-06T12:13:00.000Z","event_by":"review-1","event_kind":"accept","item_id":1,"event_detail":"{\"reason\":\"CRITERION_MET\",\"commit\":\"97f25104de797e53bc2813deebbb66562b24b094\",\"check\":\"none\",\"model\":\"Demo reviewer\"}"},{"event_id":19,"event_at":"2026-10-06T12:12:00.000Z","event_by":"review-1","event_kind":"reserve","item_id":1,"event_detail":"{\"until\":\"2026-10-06T12:42:00.000Z\",\"model\":\"Demo reviewer\"}"},{"event_id":18,"event_at":"2026-10-06T12:06:00.000Z","event_by":"app-1","event_kind":"submit","item_id":1,"event_detail":"{\"commit\":\"97f25104de797e53bc2813deebbb66562b24b094\",\"tree\":\"24231a5bf42a6d80f59186e10b542b7eb09c545d\",\"policyCommit\":\"b74621c7437824c109d32328ba9631bbedb06b8a\",\"criterionDigest\":\"02f3c088ed84dd931b2f700f9562fa25bb86eee11dd77a583089423366ec4136\",\"model\":\"Demo builder\"}"},{"event_id":17,"event_at":"2026-10-06T12:05:00.000Z","event_by":"app-1","event_kind":"claim","item_id":1,"event_detail":"{\"leaseUntil\":\"2026-10-06T14:05:00.000Z\",\"digest\":\"02f3c088ed84dd931b2f700f9562fa25bb86eee11dd77a583089423366ec4136\",\"model\":\"Demo builder\"}"},{"event_id":16,"event_at":"2026-10-06T12:04:00.000Z","event_by":"review-1","event_kind":"reject","item_id":1,"event_detail":"{\"reason\":\"BEHAVIOR_MISMATCH\",\"commit\":\"fc10f1f82286128837b1dcfbeeb746cb085d0e67\",\"model\":\"Demo reviewer\"}"},{"event_id":15,"event_at":"2026-10-06T12:03:00.000Z","event_by":"review-1","event_kind":"reserve","item_id":1,"event_detail":"{\"until\":\"2026-10-06T12:33:00.000Z\",\"model\":\"Demo reviewer\"}"},{"event_id":14,"event_at":"2026-10-06T12:02:00.000Z","event_by":"app-1","event_kind":"submit","item_id":1,"event_detail":"{\"commit\":\"fc10f1f82286128837b1dcfbeeb746cb085d0e67\",\"tree\":\"3304bca878fe12490eceebd297238abace8bb54f\",\"policyCommit\":\"b74621c7437824c109d32328ba9631bbedb06b8a\",\"criterionDigest\":\"02f3c088ed84dd931b2f700f9562fa25bb86eee11dd77a583089423366ec4136\",\"model\":\"Demo builder\"}"},{"event_id":13,"event_at":"2026-10-06T12:01:00.000Z","event_by":"app-1","event_kind":"claim","item_id":1,"event_detail":"{\"leaseUntil\":\"2026-10-06T14:01:00.000Z\",\"digest\":\"02f3c088ed84dd931b2f700f9562fa25bb86eee11dd77a583089423366ec4136\",\"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\":\"Demo coordinator\"}"},{"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\":\"Demo coordinator\"}"},{"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\":\"Demo coordinator\"}"},{"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\":\"Demo coordinator\"}"},{"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\":\"Demo coordinator\"}"},{"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\":\"Demo 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\",\"model\":\"Demo coordinator\"}"},{"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\":\"Demo coordinator\"}"}],"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":"Demo coordinator","model":"Demo coordinator","displayName":"coordinator (Demo coordinator)","lastMoveAt":"2026-10-06T13:15: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-06T13:15: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:14:00.000Z"}],"holds":[{"hold_lane":"review","hold_reason":"Waiting for the next demo item.","hold_by":"coordinator","hold_at":"2026-10-06T13:15: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":"","standardVersion":1,"overrides":false,"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":"","standardVersion":1,"overrides":false,"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":"","standardVersion":1,"overrides":false,"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":"","standardVersion":1,"overrides":false,"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":"","standardVersion":1,"overrides":false,"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":"","standardVersion":1,"overrides":false,"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":"","standardVersion":1,"overrides":false,"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":"","standardVersion":1,"overrides":false,"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":"","standardVersion":1,"overrides":false,"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":"","standardVersion":1,"overrides":false,"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":"","standardVersion":1,"overrides":false,"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":"","standardVersion":1,"overrides":false,"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-06T13:15: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":7,"families":["claude","unknown"]}],"families":[{"name":"claude","agents":1,"moves":6},{"name":"codex","agents":1,"moves":9},{"name":"unknown","agents":3,"moves":14}],"flow":{"asOf":"2026-10-06T13:15:00.000Z","stages":{"build":{"count":2,"totalMinutes":5,"averageMinutes":2.5,"medianMinutes":2.5,"unmeasuredCompleted":0},"reviewWait":{"count":1,"totalMinutes":6,"averageMinutes":6,"medianMinutes":6,"unmeasuredCompleted":0},"review":{"count":1,"totalMinutes":1,"averageMinutes":1,"medianMinutes":1,"unmeasuredCompleted":0},"mergeWait":{"count":1,"totalMinutes":1,"averageMinutes":1,"medianMinutes":1,"unmeasuredCompleted":0}},"queues":{"open":{"size":2,"oldest":{"id":2,"since":"2026-10-06T12:00:00.000Z","ageMinutes":75}},"claimed":{"size":1,"oldest":{"id":4,"since":"2026-10-06T12:14:00.000Z","ageMinutes":61}},"submitted":{"size":1,"oldest":{"id":3,"since":"2026-10-06T12:14:00.000Z","ageMinutes":61}},"accepted":{"size":0,"oldest":null}},"unreviewed":{"size":1,"oldest":{"id":3,"since":"2026-10-06T12:14:00.000Z","ageMinutes":61}},"daily":[{"date":"2026-10-06","added":6,"merged":1}],"submitsPerMerged":3,"activeAgents":{"total":2,"agents":[{"id":"app-1","lane":"app","role":"builder"},{"id":"coordinator","lane":"coordinator","role":"coordinator"}],"roles":{"builder":1,"verifier":0,"coordinator":1,"unknown":0},"lanes":{"app":1,"coordinator":1}},"bottleneck":{"stage":"reviewWait","share":0.46153846153846156,"completedItems":1,"fullyMeasuredCycles":1,"totalCycleMinutes":13,"lowConfidence":false,"message":"review wait has the largest share of cycle time; bottleneck from 1 fully measured cycles of 1","recommendation":"add a verifier"}}},"requests":[],"personRequests":[],"milestones":[]},"eventLogVersion":1}+{"version":1,"state":{"root":"demo-board","releaseNotes":{"version":"0.9.0","releases":[{"version":"0.9.0","headline":"Open your board from pullboard.dev","paragraph":"pullboard.dev now lists the boards on this machine beside your linked boards, so one page opens all of them. Link every board once with `pullboard relay on --all`, pair your phone from the QR it prints, and open pullboard.dev on any device."},{"version":"0.8.29","headline":"Blueprints, MCP, and refusals that tell you what to do next","paragraph":"0.8.28 never reached npm: one runner test hung on Linux CI, and that's fixed here. Everything listed under 0.8.28 in the changelog ships in this release too."},{"version":"0.8.27","headline":"A faster gate, and 0.8.26 reaches npm","paragraph":"0.8.26 was tagged but never reached npm (its publish check refused a Node 22.13 test failure, fixed here). Everything in [0.8.26](https://github.com/pullboard-dev/pullboard/releases/tag/v0.8.26) ships in this release too."},{"version":"0.8.25","headline":"Project switches you can trust, and a 98-second explainer","paragraph":"New on [pullboard.dev](https://pullboard.dev): a 98-second explainer video on the home page, showing some of the problems Pullboard addresses."},{"version":"0.8.24","headline":"A first board without surprises","paragraph":"Fixes from a newcomer's first board: setup tells you what it's waiting on, spec drafts go where you put them, and a fresh repo's errors name the real cause."},{"version":"0.8.23","headline":"Faster reads, and your approvals stay on their board","paragraph":"A repeated read starts no processes, \"Approve all\" and declines happen in the page and stay on the board they were opened on, and agents' heavy test runs queue on their own."},{"version":"0.8.22","headline":"The view follows the board, and reads stay fast","paragraph":"The view no longer re-reads the whole board every few seconds, and a change no longer makes the server rebuild every item."},{"version":"0.8.21","headline":"One stream for many boards, and the local API never speaks for you","paragraph":"A project group can follow every board on one connection, and nothing sent through pullboard serve counts as you."},{"version":"0.8.20","headline":"A lighter board, and the local API can't speak for you","paragraph":"The board now answers with item summaries instead of every item's full history, a client can ask for only what changed, and nothing sent through the local API counts as you."},{"version":"0.8.19","headline":"A faster view, and a red landing hands work back","paragraph":"The view answers an unchanged board in about 40 ms instead of more than a second, and a verified item whose landing gate goes red returns to its builder instead of needing a new item."},{"version":"0.8.18","headline":"The board stays safe","paragraph":"Removing someone's write access on GitHub now stops their agents as well as them. A red submit no longer holds up the agent that made it."},{"version":"0.8.17","headline":"An agent sets it up alone","paragraph":"Tell your agent \"install Pullboard and set it up here\". It runs init, carries on in the same session, and walks you through setup. A board with no build to prove, such as research or writing, still gets a gate."},{"version":"0.8.16","headline":"Steadier views","paragraph":"pullboard view now has one address on your machine, and running it again reuses the view that is already open. On Node 24 it no longer stalls or crashes."},{"version":"0.8.15","headline":"Setup without snags","paragraph":"Your agent can now record your first requirements in one command, gets its terminal back when it opens the view, and help names every spec command and who runs it."},{"version":"0.8.14","headline":"Your agent sets it up","paragraph":"Run pullboard init, then ask your agent to set up Pullboard here. Whatever model it is, it now walks you through what you are building, your lanes, the command that proves the build, your first item, and opening the view."},{"version":"0.8.13","headline":"Replays hold still","paragraph":"A shared replay's Pause button stays where it is while you press it, and Pullboard's own checks now hold on Linux and macOS under load."},{"version":"0.8.12","headline":"Your answer always lands","paragraph":"An answer you send in Pullboard View is recorded as your answer, even while your previous shout is still sending."},{"version":"0.8.11","headline":"A proper first visit, safer releases","paragraph":"A brand-new project opens on a calm board, not a list of decisions, and a release can no longer publish anything main's CI did not pass."},{"version":"0.8.10","headline":"Accumulated judgement","paragraph":"The README now opens with what Pullboard is for: accumulated judgement for agents, and a figure of how it holds."},{"version":"0.8.9","headline":"0.8.8 reaches npm","paragraph":"0.8.8 was tagged but never published: its publish gate failed when a git hook read the board while another process was writing it. 0.8.9 is everything in 0.8.8, plus that fix and a few more from the same night."},{"version":"0.8.8","headline":"Steadier CI, safer boards","paragraph":"A worktree's unmerged code can no longer upgrade the board everyone shares, from the CLI or from Pullboard View. CI now runs in shards and drops runs a newer push has replaced, and the clicks it caught going missing under load now land."},{"version":"0.8.7","headline":"What you see first","paragraph":"Pullboard View opens on your work. The Items tab leads with your list, with the board's stats in one line above it. The Roadmap leads with the next release, keeps every upcoming one open, and has a panel for moving between them. Every tab, item, row and shout now has an address you can share, reload and come back to."},{"version":"0.8.6","headline":"See the flow","paragraph":"Pullboard now tells you where work is waiting. The stats card and the coordinator's resume name the bottleneck and what would fix it, and a Pipeline view shows every item's stage at a glance."},{"version":"0.8.5","headline":"A prettier board","paragraph":"Pullboard View got a full design pass, so the board is cleaner and easier on the eyes. It's quicker to read at a glance, with what needs you up top and search in the top bar. It works in light or dark and feels right on a phone."}],"notes":"https://github.com/pullboard-dev/pullboard/blob/main/CHANGELOG.md"},"rowAgesAt":{"SPEC.md":"570594e0da442b950a3b2dea95b1951a152a9850","DOCTRINE.md":"570594e0da442b950a3b2dea95b1951a152a9850"},"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":"Demo coordinator"}},{"type":"move","eventId":8,"kind":"withdraw","by":"coordinator","at":"2026-10-06T12:00:00.000Z","detail":{"reason":"this example was dropped","model":"Demo coordinator"}}],"milestone":null,"claim":null,"stage":"withdrawn","since":"2026-10-06T12:00:00.000Z","counts":{"verdicts":0,"facts":0}},{"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":"Demo coordinator"}}],"milestone":"Demo release","claim":null,"stage":"open","since":"2026-10-06T12:00:00.000Z","counts":{"verdicts":0,"facts":0}},{"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:14: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:14: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":"Demo coordinator"}},{"type":"move","eventId":30,"kind":"claim","by":"app-1","at":"2026-10-06T12:14:00.000Z","detail":{"leaseUntil":"2026-10-06T14:14:00.000Z","digest":"a28eec89fb38b9ccbe5b533ef7204081b83e6341b1cac9478b4aeece8e42ae54","model":"Demo builder"}}],"milestone":"Demo release","claim":{"by":"app-1","until":"2026-10-06T14:14:00.000Z"},"stage":"claimed","since":"2026-10-06T12:14:00.000Z","counts":{"verdicts":0,"facts":0}},{"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":"66cf065feffe937a2fc921bec70d75f9705817b3","merged":null,"blockedBy":[],"updatedAt":"2026-10-06T12:14: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:14:00.000Z"},{"kind":"submit","by":"app-1","at":"2026-10-06T12:14: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":"Demo coordinator"}},{"type":"move","eventId":26,"kind":"claim","by":"app-1","at":"2026-10-06T12:14:00.000Z","detail":{"leaseUntil":"2026-10-06T14:14:00.000Z","digest":"17ca3a230599e6c5fcb2ac4ec14addfe2ffe7d3fcc1d80521460c1e8a9ac749d","model":"Demo builder"}},{"type":"move","eventId":29,"kind":"submit","by":"app-1","at":"2026-10-06T12:14:00.000Z","detail":{"commit":"66cf065feffe937a2fc921bec70d75f9705817b3","tree":"3735b416e4d5c2ad1a2c9212ba7dd4c109e893c1","policyCommit":"570594e0da442b950a3b2dea95b1951a152a9850","criterionDigest":"17ca3a230599e6c5fcb2ac4ec14addfe2ffe7d3fcc1d80521460c1e8a9ac749d","submissionProof":{"version":1,"files":[],"full":true,"deferred":false,"reason":"affected-test selection is not enabled for this project"},"model":"Demo builder"}}],"milestone":"Demo release","claim":null,"stage":"submitted","since":"2026-10-06T12:14:00.000Z","counts":{"verdicts":0,"facts":0}},{"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":"Demo coordinator"}}],"milestone":"Demo release","claim":null,"stage":"open","since":"2026-10-06T12:00:00.000Z","counts":{"verdicts":0,"facts":0}},{"id":1,"title":"Reviewed and accepted","lane":"app","status":"verified","route":"strong","owner":"app-1","reviewer":null,"reviewUntil":"2026-10-06T12:42:00.000Z","builtBy":"app-1","verifiedBy":"review-1","specs":["G1"],"criterion":"The demo item is accepted after review.","brief":"","commit":"570594e0da442b950a3b2dea95b1951a152a9850","merged":"570594e0da442b950a3b2dea95b1951a152a9850","blockedBy":[],"updatedAt":"2026-10-06T12:14: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:13:00.000Z","commit":"570594e0da442b950a3b2dea95b1951a152a9850"},"verdicts":[{"decision":"REJECT","reason":"BEHAVIOR_MISMATCH","note":"The example skipped an edge; revise it before merging.","by":"review-1","at":"2026-10-06T12:04:00.000Z","commit":"30ca4edaa8b5a159174069393df237fbedafdcb8"},{"decision":"ACCEPT","reason":"CRITERION_MET","note":"Tried the edge that failed before; the revised demo passes.","by":"review-1","at":"2026-10-06T12:13:00.000Z","commit":"570594e0da442b950a3b2dea95b1951a152a9850"}],"history":[{"kind":"add","by":"coordinator","at":"2026-10-06T12:00:00.000Z"},{"kind":"claim","by":"app-1","at":"2026-10-06T12:01:00.000Z"},{"kind":"submit","by":"app-1","at":"2026-10-06T12:02:00.000Z"},{"kind":"reserve","by":"review-1","at":"2026-10-06T12:03:00.000Z"},{"kind":"reject","by":"review-1","at":"2026-10-06T12:04:00.000Z"},{"kind":"claim","by":"app-1","at":"2026-10-06T12:05:00.000Z"},{"kind":"submit","by":"app-1","at":"2026-10-06T12:06:00.000Z"},{"kind":"reserve","by":"review-1","at":"2026-10-06T12:12:00.000Z"},{"kind":"accept","by":"review-1","at":"2026-10-06T12:13:00.000Z"},{"kind":"merged","by":"coordinator","at":"2026-10-06T12:14: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":"Demo coordinator"}},{"type":"move","eventId":13,"kind":"claim","by":"app-1","at":"2026-10-06T12:01:00.000Z","detail":{"leaseUntil":"2026-10-06T14:01:00.000Z","digest":"b716ff81e921addcabad251b91b6fa5915d167dd9f518c46a478b040414a8035","model":"Demo builder"}},{"type":"move","eventId":16,"kind":"submit","by":"app-1","at":"2026-10-06T12:02:00.000Z","detail":{"commit":"30ca4edaa8b5a159174069393df237fbedafdcb8","tree":"d464314ab609a35f6d9e79307cd419d41bd34d48","policyCommit":"eec139f05f615ddc67f46305e77903d5fc0defbe","criterionDigest":"b716ff81e921addcabad251b91b6fa5915d167dd9f518c46a478b040414a8035","submissionProof":{"version":1,"files":[],"full":true,"deferred":false,"reason":"affected-test selection is not enabled for this project"},"model":"Demo builder"}},{"type":"move","eventId":17,"kind":"reserve","by":"review-1","at":"2026-10-06T12:03:00.000Z","detail":{"until":"2026-10-06T12:33:00.000Z","model":"Demo reviewer"}},{"type":"move","eventId":18,"kind":"reject","by":"review-1","at":"2026-10-06T12:04:00.000Z","detail":{"reason":"BEHAVIOR_MISMATCH","commit":"30ca4edaa8b5a159174069393df237fbedafdcb8","review":{"commit":"30ca4edaa8b5a159174069393df237fbedafdcb8","head":"30ca4edaa8b5a159174069393df237fbedafdcb8","trunk":"eec139f05f615ddc67f46305e77903d5fc0defbe","paths":["src/demo.js"]},"model":"Demo reviewer"}},{"type":"move","eventId":19,"kind":"claim","by":"app-1","at":"2026-10-06T12:05:00.000Z","detail":{"leaseUntil":"2026-10-06T14:05:00.000Z","digest":"b716ff81e921addcabad251b91b6fa5915d167dd9f518c46a478b040414a8035","model":"Demo builder"}},{"type":"move","eventId":22,"kind":"submit","by":"app-1","at":"2026-10-06T12:06:00.000Z","detail":{"commit":"570594e0da442b950a3b2dea95b1951a152a9850","tree":"58ad64198a51fc395c554bd1b3bf0c4ad976f4b4","policyCommit":"eec139f05f615ddc67f46305e77903d5fc0defbe","criterionDigest":"b716ff81e921addcabad251b91b6fa5915d167dd9f518c46a478b040414a8035","submissionProof":{"version":1,"files":[],"full":true,"deferred":false,"reason":"affected-test selection is not enabled for this project"},"model":"Demo builder"}},{"type":"move","eventId":23,"kind":"reserve","by":"review-1","at":"2026-10-06T12:12:00.000Z","detail":{"until":"2026-10-06T12:42:00.000Z","model":"Demo reviewer"}},{"type":"move","eventId":24,"kind":"accept","by":"review-1","at":"2026-10-06T12:13:00.000Z","detail":{"reason":"CRITERION_MET","commit":"570594e0da442b950a3b2dea95b1951a152a9850","check":"none","review":{"commit":"570594e0da442b950a3b2dea95b1951a152a9850","head":"570594e0da442b950a3b2dea95b1951a152a9850","trunk":"eec139f05f615ddc67f46305e77903d5fc0defbe","paths":["src/demo.js"]},"model":"Demo reviewer"}},{"type":"move","eventId":25,"kind":"merged","by":"coordinator","at":"2026-10-06T12:14:00.000Z","detail":{"commit":"570594e0da442b950a3b2dea95b1951a152a9850","model":"Demo coordinator"}}],"milestone":"Demo release","claim":null,"stage":"merged","since":"2026-10-06T12:14:00.000Z","counts":{"verdicts":2,"facts":0}}],"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-06T13:15: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-06T13:15: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-06T13:15: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-06T13:15: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-06T13:15: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@570594e0da442b950a3b2dea95b1951a152a9850.","shout_at":"2026-10-06T12:14:00.000Z","shout_decision":0,"shout_answers":null,"shout_evidence_kind":"receipt","shout_evidence_outcome":"edge passes","shout_evidence_item":1,"shout_evidence_commit":"570594e0da442b950a3b2dea95b1951a152a9850","shout_request":0,"shout_request_outcome":""}],"decisions":[],"asked":[],"events":[{"event_id":38,"event_at":"2026-10-06T13:15:00.000Z","event_by":"coordinator","event_kind":"milestone_add","item_id":null,"event_detail":"{\"name\":\"Demo release\",\"items\":[1,2,3,4,5],\"model\":\"Demo coordinator\"}"},{"event_id":37,"event_at":"2026-10-06T13:15:00.000Z","event_by":"coordinator","event_kind":"hold","item_id":null,"event_detail":"{\"lane\":\"review\",\"reason\":\"Waiting for the next demo item.\",\"model\":\"Demo coordinator\"}"},{"event_id":36,"event_at":"2026-10-06T13:15: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\":\"Demo coordinator\"}"},{"event_id":35,"event_at":"2026-10-06T13:15: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":34,"event_at":"2026-10-06T13:15: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":33,"event_at":"2026-10-06T13:15:00.000Z","event_by":"coordinator","event_kind":"pass","item_id":null,"event_detail":"{\"shout\":3,\"to\":\"person\",\"decision\":true,\"request\":false,\"answers\":2,\"model\":\"Demo coordinator\"}"},{"event_id":32,"event_at":"2026-10-06T13:15: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":31,"event_at":"2026-10-06T12:14: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":30,"event_at":"2026-10-06T12:14:00.000Z","event_by":"app-1","event_kind":"claim","item_id":4,"event_detail":"{\"leaseUntil\":\"2026-10-06T14:14:00.000Z\",\"digest\":\"a28eec89fb38b9ccbe5b533ef7204081b83e6341b1cac9478b4aeece8e42ae54\",\"model\":\"Demo builder\"}"},{"event_id":29,"event_at":"2026-10-06T12:14:00.000Z","event_by":"app-1","event_kind":"submit","item_id":3,"event_detail":"{\"commit\":\"66cf065feffe937a2fc921bec70d75f9705817b3\",\"tree\":\"3735b416e4d5c2ad1a2c9212ba7dd4c109e893c1\",\"policyCommit\":\"570594e0da442b950a3b2dea95b1951a152a9850\",\"criterionDigest\":\"17ca3a230599e6c5fcb2ac4ec14addfe2ffe7d3fcc1d80521460c1e8a9ac749d\",\"submissionProof\":{\"version\":1,\"files\":[],\"full\":true,\"deferred\":false,\"reason\":\"affected-test selection is not enabled for this project\"},\"model\":\"Demo builder\"}"},{"event_id":28,"event_at":"2026-10-06T12:14:00.000Z","event_by":"board","event_kind":"guards","item_id":null,"event_detail":"{\"missing\":[],\"changed\":[\"machine_item_move\",\"machine_fields_claimed\",\"machine_fields_submitted\",\"machine_fields_verified\",\"machine_fields_withdrawn\",\"machine_proof_verified\"],\"stale\":[]}"},{"event_id":27,"event_at":"2026-10-06T12:14:00.000Z","event_by":"board","event_kind":"guards","item_id":null,"event_detail":"{\"missing\":[],\"changed\":[\"machine_item_move\",\"machine_fields_claimed\",\"machine_fields_submitted\",\"machine_fields_verified\",\"machine_fields_withdrawn\",\"machine_proof_verified\"],\"stale\":[]}"},{"event_id":26,"event_at":"2026-10-06T12:14:00.000Z","event_by":"app-1","event_kind":"claim","item_id":3,"event_detail":"{\"leaseUntil\":\"2026-10-06T14:14:00.000Z\",\"digest\":\"17ca3a230599e6c5fcb2ac4ec14addfe2ffe7d3fcc1d80521460c1e8a9ac749d\",\"model\":\"Demo builder\"}"},{"event_id":25,"event_at":"2026-10-06T12:14:00.000Z","event_by":"coordinator","event_kind":"merged","item_id":1,"event_detail":"{\"commit\":\"570594e0da442b950a3b2dea95b1951a152a9850\",\"model\":\"Demo coordinator\"}"},{"event_id":24,"event_at":"2026-10-06T12:13:00.000Z","event_by":"review-1","event_kind":"accept","item_id":1,"event_detail":"{\"reason\":\"CRITERION_MET\",\"commit\":\"570594e0da442b950a3b2dea95b1951a152a9850\",\"check\":\"none\",\"review\":{\"commit\":\"570594e0da442b950a3b2dea95b1951a152a9850\",\"head\":\"570594e0da442b950a3b2dea95b1951a152a9850\",\"trunk\":\"eec139f05f615ddc67f46305e77903d5fc0defbe\",\"paths\":[\"src/demo.js\"]},\"model\":\"Demo reviewer\"}"},{"event_id":23,"event_at":"2026-10-06T12:12:00.000Z","event_by":"review-1","event_kind":"reserve","item_id":1,"event_detail":"{\"until\":\"2026-10-06T12:42:00.000Z\",\"model\":\"Demo reviewer\"}"},{"event_id":22,"event_at":"2026-10-06T12:06:00.000Z","event_by":"app-1","event_kind":"submit","item_id":1,"event_detail":"{\"commit\":\"570594e0da442b950a3b2dea95b1951a152a9850\",\"tree\":\"58ad64198a51fc395c554bd1b3bf0c4ad976f4b4\",\"policyCommit\":\"eec139f05f615ddc67f46305e77903d5fc0defbe\",\"criterionDigest\":\"b716ff81e921addcabad251b91b6fa5915d167dd9f518c46a478b040414a8035\",\"submissionProof\":{\"version\":1,\"files\":[],\"full\":true,\"deferred\":false,\"reason\":\"affected-test selection is not enabled for this project\"},\"model\":\"Demo builder\"}"},{"event_id":21,"event_at":"2026-10-06T12:06:00.000Z","event_by":"board","event_kind":"guards","item_id":null,"event_detail":"{\"missing\":[],\"changed\":[\"machine_item_move\",\"machine_fields_claimed\",\"machine_fields_submitted\",\"machine_fields_verified\",\"machine_fields_withdrawn\",\"machine_proof_verified\"],\"stale\":[]}"},{"event_id":20,"event_at":"2026-10-06T12:05:00.000Z","event_by":"board","event_kind":"guards","item_id":null,"event_detail":"{\"missing\":[],\"changed\":[\"machine_item_move\",\"machine_fields_claimed\",\"machine_fields_submitted\",\"machine_fields_verified\",\"machine_fields_withdrawn\",\"machine_proof_verified\"],\"stale\":[]}"},{"event_id":19,"event_at":"2026-10-06T12:05:00.000Z","event_by":"app-1","event_kind":"claim","item_id":1,"event_detail":"{\"leaseUntil\":\"2026-10-06T14:05:00.000Z\",\"digest\":\"b716ff81e921addcabad251b91b6fa5915d167dd9f518c46a478b040414a8035\",\"model\":\"Demo builder\"}"},{"event_id":18,"event_at":"2026-10-06T12:04:00.000Z","event_by":"review-1","event_kind":"reject","item_id":1,"event_detail":"{\"reason\":\"BEHAVIOR_MISMATCH\",\"commit\":\"30ca4edaa8b5a159174069393df237fbedafdcb8\",\"review\":{\"commit\":\"30ca4edaa8b5a159174069393df237fbedafdcb8\",\"head\":\"30ca4edaa8b5a159174069393df237fbedafdcb8\",\"trunk\":\"eec139f05f615ddc67f46305e77903d5fc0defbe\",\"paths\":[\"src/demo.js\"]},\"model\":\"Demo reviewer\"}"},{"event_id":17,"event_at":"2026-10-06T12:03:00.000Z","event_by":"review-1","event_kind":"reserve","item_id":1,"event_detail":"{\"until\":\"2026-10-06T12:33:00.000Z\",\"model\":\"Demo reviewer\"}"},{"event_id":16,"event_at":"2026-10-06T12:02:00.000Z","event_by":"app-1","event_kind":"submit","item_id":1,"event_detail":"{\"commit\":\"30ca4edaa8b5a159174069393df237fbedafdcb8\",\"tree\":\"d464314ab609a35f6d9e79307cd419d41bd34d48\",\"policyCommit\":\"eec139f05f615ddc67f46305e77903d5fc0defbe\",\"criterionDigest\":\"b716ff81e921addcabad251b91b6fa5915d167dd9f518c46a478b040414a8035\",\"submissionProof\":{\"version\":1,\"files\":[],\"full\":true,\"deferred\":false,\"reason\":\"affected-test selection is not enabled for this project\"},\"model\":\"Demo builder\"}"},{"event_id":15,"event_at":"2026-10-06T12:02:00.000Z","event_by":"board","event_kind":"guards","item_id":null,"event_detail":"{\"missing\":[],\"changed\":[\"machine_item_move\",\"machine_fields_claimed\",\"machine_fields_submitted\",\"machine_fields_verified\",\"machine_fields_withdrawn\",\"machine_proof_verified\"],\"stale\":[]}"},{"event_id":14,"event_at":"2026-10-06T12:01:00.000Z","event_by":"board","event_kind":"guards","item_id":null,"event_detail":"{\"missing\":[],\"changed\":[\"machine_item_move\",\"machine_fields_claimed\",\"machine_fields_submitted\",\"machine_fields_verified\",\"machine_fields_withdrawn\",\"machine_proof_verified\"],\"stale\":[]}"},{"event_id":13,"event_at":"2026-10-06T12:01:00.000Z","event_by":"app-1","event_kind":"claim","item_id":1,"event_detail":"{\"leaseUntil\":\"2026-10-06T14:01:00.000Z\",\"digest\":\"b716ff81e921addcabad251b91b6fa5915d167dd9f518c46a478b040414a8035\",\"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\":\"Demo coordinator\"}"},{"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\":\"Demo coordinator\"}"},{"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\":\"Demo coordinator\"}"},{"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\":\"Demo coordinator\"}"},{"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\":\"Demo coordinator\"}"},{"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\":\"Demo 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\",\"model\":\"Demo coordinator\"}"},{"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\":\"Demo coordinator\"}"}],"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":"Demo coordinator","model":"Demo coordinator","displayName":"coordinator (Demo coordinator)","lastMoveAt":"2026-10-06T13:15: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-06T13:15: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:14:00.000Z"}],"holds":[{"hold_lane":"review","hold_reason":"Waiting for the next demo item.","hold_by":"coordinator","hold_at":"2026-10-06T13:15: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":"","standardVersion":1,"overrides":false,"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":"","standardVersion":1,"overrides":false,"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":"","standardVersion":1,"overrides":false,"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":"","standardVersion":1,"overrides":false,"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":"","standardVersion":1,"overrides":false,"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":"","standardVersion":1,"overrides":false,"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":"","standardVersion":1,"overrides":false,"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":"","standardVersion":1,"overrides":false,"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":"","standardVersion":1,"overrides":false,"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":"","standardVersion":1,"overrides":false,"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":"","standardVersion":1,"overrides":false,"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":"","standardVersion":1,"overrides":false,"added":null}],"unseen":null,"products":[],"rigorDrafts":[],"needs":[{"kind":"hold","id":"review","ref":"review","text":"Waiting for the next demo item.","what":"lane held by coordinator (Demo coordinator)"}],"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-06T13:15:00.000Z","agentCount":3,"familyCount":3,"agents":[{"id":"app-1","moves":10,"families":["codex","unknown"]},{"id":"coordinator","moves":13,"families":["unknown"]},{"id":"review-1","moves":7,"families":["claude","unknown"]}],"families":[{"name":"claude","agents":1,"moves":6},{"name":"codex","agents":1,"moves":9},{"name":"unknown","agents":3,"moves":15}],"bars":{"coordinator":{"corrections":0,"barRejects":0,"buildRejects":1}},"flow":{"asOf":"2026-10-06T13:15:00.000Z","stages":{"build":{"count":2,"totalMinutes":5,"averageMinutes":2.5,"medianMinutes":2.5,"unmeasuredCompleted":0},"reviewWait":{"count":1,"totalMinutes":6,"averageMinutes":6,"medianMinutes":6,"unmeasuredCompleted":0},"review":{"count":1,"totalMinutes":1,"averageMinutes":1,"medianMinutes":1,"unmeasuredCompleted":0},"mergeWait":{"count":1,"totalMinutes":1,"averageMinutes":1,"medianMinutes":1,"unmeasuredCompleted":0}},"queues":{"open":{"size":2,"oldest":{"id":2,"since":"2026-10-06T12:00:00.000Z","ageMinutes":75}},"claimed":{"size":1,"oldest":{"id":4,"since":"2026-10-06T12:14:00.000Z","ageMinutes":61}},"submitted":{"size":1,"oldest":{"id":3,"since":"2026-10-06T12:14:00.000Z","ageMinutes":61}},"accepted":{"size":0,"oldest":null}},"unreviewed":{"size":1,"oldest":{"id":3,"since":"2026-10-06T12:14:00.000Z","ageMinutes":61}},"daily":[{"date":"2026-10-06","added":6,"merged":1}],"submitsPerMerged":3,"activeAgents":{"total":2,"agents":[{"id":"app-1","lane":"app","role":"builder"},{"id":"coordinator","lane":"coordinator","role":"coordinator"}],"roles":{"builder":1,"verifier":0,"coordinator":1,"unknown":0},"lanes":{"app":1,"coordinator":1}},"bottleneck":{"stage":"reviewWait","share":0.46153846153846156,"completedItems":1,"fullyMeasuredCycles":1,"totalCycleMinutes":13,"lowConfidence":false,"message":"review wait has the largest share of cycle time; bottleneck from 1 fully measured cycles of 1","recommendation":"add a verifier"}}},"requests":[],"personRequests":[],"milestones":[{"name":"Demo release","note":"A demo release with reviewed, active and future work.","target":null,"pastTarget":false,"shipped":null,"items":[{"id":2,"title":"Future work","status":"open","state":"open"},{"id":3,"title":"Ready for review","status":"submitted","state":"submitted"},{"id":4,"title":"Claimed for work","status":"claimed","state":"claimed"},{"id":5,"title":"Decision follow-up","status":"open","state":"open"},{"id":1,"title":"Reviewed and accepted","status":"verified","state":"landed"}],"landed":1,"done":1,"total":5,"withdrawn":0,"summary":{"total":5,"left":4,"landed":1,"landing":0,"review":1,"building":1,"held":0,"waiting":2,"needsYou":[],"pace":{"last6h":1,"last2h":1,"last24h":1},"estimate":null,"window":null,"reason":"few-landings"}}],"moveCounts":{"open>withdrawn:withdraw":1,"open>claimed:claim":4,"claimed>submitted:submit":3,"submitted>submitted:reserve":2,"submitted>open:reject":1,"submitted>verified:accept":1},"sequence":38},"eventLogVersion":1}diff --git a/docs/demo/index.html b/docs/demo/index.htmlindex d3ff8294..19ab4bb2 100644--- a/docs/demo/index.html+++ b/docs/demo/index.html@@ -18,6 +18,7 @@<div class="side-body" id="side-body"><div class="label">Projects</div><nav id="proj-list" aria-label="Projects on this machine"></nav>+ <button class="share-again" id="share-again" type="button" hidden>Link boards to pullboard.dev…</button><section class="products" id="products" aria-label="Products" hidden><div class="label">Products</div><div id="prod-list"></div></section></div></aside>@@ -38,6 +39,38 @@<h2>No boards yet</h2><p>Run <code>pullboard init</code> in a git repo, or ask an agent to. Its board shows up here by itself.</p></section>+ <p class="empty" id="project-loading" role="status" hidden>Loading project…</p>+ <section class="open-board" id="local-note" role="status" data-state="" data-kind="" hidden>+ <header class="ob-top"><button class="theme-btn" id="ob-theme" type="button" title="Theme"><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></header>+ <div class="ob-panel">+ <div class="ob-mark"><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 fill="var(--accent)" width="56" height="14" x="3" y="25" 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>+ <h1 id="local-note-title"></h1>+ <p class="ob-say" id="local-note-text" hidden></p>+ <div class="ob-spin" data-part="spin" aria-hidden="true" hidden></div>+ <div class="ob-ask" data-part="ask" hidden><div class="t">app.pullboard.dev wants to</div> <div class="d">Access other apps and services on this device</div> <div class="b"><span>Block</span> <span class="yes">Allow</span></div> <div class="arrow">↑ click this</div></div>+ <ol class="ob-steps" data-part="steps" hidden><li><span>Click the <b>icon left of the address</b>, at the top of this window.</span></li><li><span>Find <b>Local network access</b>, or <b>Apps on this device</b>.</span></li><li><span>Set it to <b>Allow</b>.</span></li></ol>+ <div class="ob-two" data-part="two" hidden>+ <section class="ob-card"><span class="ob-k">Local only</span><h2>Open them on this computer</h2><p>Your boards stay on this computer, and only this computer sees them. Open a terminal and run:</p>+ <div class="ob-act"><div class="ob-cmd"><code><span class="ob-p" aria-hidden="true">$</span><span>pullboard view</span></code><button type="button" data-copy="pullboard view">Copy</button></div><div class="ob-or">or</div><div class="ob-agent"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M21 12a8 8 0 0 1-11.6 7.1L4 20l1-4.6A8 8 0 1 1 21 12Z"/></svg><span>Ask your agent<small>“Help me open my Pullboard board.”</small></span><button type="button" data-copy="Help me open my Pullboard board.">Copy</button></div></div>+ <p class="ob-small">Either way, this page opens your boards by itself.</p></section>+ <section class="ob-card"><span class="ob-k">Everywhere</span><h2>Open them from any device</h2><p>Your boards on your phone and every computer, from the GitHub account you shared them with.</p>+ <div class="ob-act"><a class="ob-big ob-gh"><svg viewBox="0 0 16 16" aria-hidden="true"><path fill="currentColor" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8Z"/></svg>Sign in with GitHub</a></div>+ <p class="ob-small">Not shared yet? After you sign in, it shows the one step.</p></section>+ </div>+ <div class="ob-act" data-part="github" hidden><a id="local-note-go" class="ob-big ob-gh"><svg viewBox="0 0 16 16" aria-hidden="true"><path fill="currentColor" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8Z"/></svg>Sign in with GitHub</a></div>+ <div class="ob-act" data-part="command" hidden><div class="ob-cmd"><code><span class="ob-p" aria-hidden="true">$</span><span id="local-note-code"></span></code><button type="button" data-copy="" id="local-note-copy">Copy</button></div><div class="ob-or">or</div><div class="ob-agent"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M21 12a8 8 0 0 1-11.6 7.1L4 20l1-4.6A8 8 0 1 1 21 12Z"/></svg><span>Ask your agent<small id="local-note-ask">“Help me open my Pullboard board.”</small></span><button type="button" data-copy="Help me open my Pullboard board." id="local-note-agent">Copy</button></div></div>+ <div class="ob-act" data-part="open" hidden><a class="ob-big ob-go" id="local-note-view" href="http://127.0.0.1:4890/local/view">Open your board</a></div>+ <p class="ob-small" id="local-note-small" hidden></p>+ <p class="ob-live" id="local-note-live" hidden><i aria-hidden="true"></i><span></span></p>+ <div class="ob-help" id="local-note-help" hidden><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M21 12a8 8 0 0 1-11.6 7.1L4 20l1-4.6A8 8 0 1 1 21 12Z"/></svg><span><span id="local-note-lead"></span><small id="local-note-said"></small></span><button type="button" id="local-note-help-copy" data-copy="">Copy</button></div>+ </div>+ </section>+ <div class="share-card" id="share-note" hidden><span class="share-ic" aria-hidden="true"><svg viewBox="0 0 24 24" width="17" height="17" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="4" width="13" height="10" rx="1.5"/><path d="M7 18h5M9.5 14v4"/><rect x="17" y="9" width="5" height="10" rx="1"/></svg></span><span class="share-txt"><b>Open your boards on any device</b><span>Sign in to use pullboard.dev while on the go.</span> <a href="https://pullboard.dev/relay/" target="_blank" rel="noopener">How the relay works</a></span><button class="ob-gh share-gh" id="share-start" type="button"><svg viewBox="0 0 16 16" width="15" height="15" aria-hidden="true" fill="currentColor"><path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"/></svg>Sign in with GitHub</button><button class="share-x" id="share-hide" type="button" aria-label="Hide this; bring it back from the projects list" title="Hide this; bring it back from the projects list">×</button></div>+ <section class="card-panel" id="share-panel" aria-label="Link these boards" hidden>+ <p id="share-status" role="status" aria-live="polite"></p>+ <button class="ghost" id="share-pair" type="button" hidden>Pair a device</button>+ <button class="ghost" id="share-close" type="button">Cancel sign-in</button>+ </section><section class="card-panel snapshot-controls" id="snapshot-controls" aria-label="Snapshot replay"><span>Read-only snapshot</span><button class="ghost" id="replay-play" type="button">Play from first event</button>@@ -58,6 +91,7 @@<div class="filter-control"><button class="filter-toggle" id="filter-toggle" data-filter-toggle type="button" aria-haspopup="menu" aria-expanded="false" aria-controls="filter-menu"><span class="filter-label" id="filter-label">Filter</span><svg viewBox="0 0 16 16" aria-hidden="true"><path d="M4 6l4 4 4-4" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/></svg></button><div class="filter-menu" id="filter-menu" role="menu" aria-label="Filter" hidden></div></div><button class="go" id="new-item" type="button" aria-label="New item"><span class="new-item-wide">New item</span><span class="new-item-narrow" aria-hidden="true">New</span></button></div>+ <section class="card-panel upgrade-note" id="upgrade-note" aria-label="What is new" hidden></section><div class="card-panel list-card" id="item-list"><ol class="needs" id="needs" aria-label="What needs you" hidden></ol><ol class="chain" id="chain" aria-label="Items"></ol></div><ol class="pipeline" id="pipeline" aria-label="Item pipeline" hidden></ol></div>@@ -98,6 +132,7 @@<div class="card-panel feed" id="activity"></div></section><section data-pane="roadmap" class="roadmap-layout" id="roadmap" aria-label="Roadmap"></section>+</main></div></div>@@ -109,15 +144,82 @@<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="spec-reason-backdrop" id="spec-approve-dialog" hidden>+ <form class="spec-reason-dialog" id="spec-approve-form" aria-labelledby="spec-approve-title">+ <h2 id="spec-approve-title">Approve rows</h2>+ <div class="muted" id="spec-approve-rows"></div>+ <div class="actions"><button class="go" id="spec-approve-submit" type="submit">Approve rows</button><button class="ghost" id="spec-approve-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;+let readOnly = false;+let requests = false;+const pageReadOnly = false;+const pageRequests = false;+const relayRequestsEnabled = requests;+const configuredTransportModule = null;+let transportModule = configuredTransportModule;const connection = {"base":"","headers":{"x-pullboard-key":""}};let transport = null;let transportLoadError = null;+// Hosted pages can read two independent authorities at once. Local boards use the view's API; relay boards+// retain the relay client's device-only decryption and event stream. The board id, never a mutable global mode,+// selects the authority for each request.+const boardSources = new Map();+const localBoardIds = new Set();+let localReadBase = connection.base;+let localReadHeaders = { ...connection.headers };+// The hosted page (N26, #513): at https://app.pullboard.dev, on the machine that runs pullboard view, the page reads+// that view straight instead of the relay. The view hands it the session's secret by a round trip that ends back here+// with the secret in the address's fragment, which no request carries; the page takes it out of the address before+// anything else reads the address, and keeps it for this tab only. Every request then sends it in x-pullboard-key.+const hosted = {"local":false,"relaySession":false,"signIn":null};+const LOCAL_VIEW = 'http://127.0.0.1:4890';+const LOCAL_TAB = 'pullboard.local.session';+const LOCAL_TRIPS = 'pullboard.local.trips';+let localSession = null;+let localProblem = null;+let localConfirmed = false;+/** Read, keep or forget a value for this tab only; a browser that refuses keeps nothing, and the page goes on. */+function tabValue(name, value) {+ try {+ if (value === undefined) return sessionStorage.getItem(name);+ if (value === null) sessionStorage.removeItem(name);+ else sessionStorage.setItem(name, value);+ } catch { return null; }+ return value;+}+/** Whether a value is a local session this page may use: version 1, a loopback origin with its port, and a secret. */+function validLocalSession(value) {+ if (!value || value.version !== 1 || typeof value.key !== 'string' || !/^[\x21-\x7e]{1,256}$/.test(value.key) || typeof value.origin !== 'string') return false;+ try {+ const address = new URL(value.origin);+ return address.protocol === 'http:' && ['127.0.0.1', 'localhost'].includes(address.hostname) && address.port !== '' && address.origin === value.origin;+ } catch { return false; }+}+// A relay pairing link carries its own fragment; that load stays the relay's, as before.+const relayPairing = hosted.local && ['board', 'key', 'device'].some((name) => new URLSearchParams(location.hash.slice(1)).has(name));+if (hosted.local && !relayPairing) {+ const fragment = new URLSearchParams(location.hash.slice(1));+ const returned = fragment.get('pullboard-local');+ if (returned !== null) {+ fragment.delete('pullboard-local');+ const rest = fragment.toString();+ let removed = true;+ try { history.replaceState(history.state, '', location.pathname + location.search + (rest ? '#' + rest : '')); }+ catch { removed = false; }+ let returnedSession = null;+ try { returnedSession = JSON.parse(returned); } catch { /* refused below */ }+ if (!removed) localProblem = 'This browser kept the connection secret in the address, so this page will not use it. Close this tab, then open your board below.';+ else if (validLocalSession(returnedSession)) localSession = { version: 1, origin: returnedSession.origin, key: returnedSession.key };+ else localProblem = 'Pullboard on this computer sent back a connection this page cannot read.';+ } else {+ try { const kept = JSON.parse(tabValue(LOCAL_TAB) ?? 'null'); if (validLocalSession(kept)) localSession = kept; } catch { /* nothing kept for this tab */ }+ }+ tabValue(LOCAL_TAB, localSession ? JSON.stringify(localSession) : null);+}const snapshotReplay = { final: null, events: [], index: 0, playing: false, timer: null };const keep = (name, value) => { name = snapshot ? 'snapshot.' + name : name; try { if (value === undefined) return localStorage.getItem(name); localStorage.setItem(name, value); } catch { return null; } return value; };// Whether the host serves this page at /roadmap as well as at /, so the Roadmap's address is a path;@@ -151,18 +253,259 @@ function homeTab() {}const view = { roadmapOpen: new Map(), root: keep('pb.project'), tab: addressTab() || homeTab(), itemsView: typeof location !== 'undefined' && location.hash === '#items/pipeline' ? 'pipeline' : 'list', filterOpen: false, 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', statsOpen: false, open: {}, addressDetail: null, shout: null, scrollPlace: false };let switchGeneration = 0;+// Each board read in the order it started, and the newest one drawn: an answer older than that one is stale.+let refreshStarted = 0;+let refreshDrawn = { generation: 0, full: true };if (snapshot) view.state = 'all';let data = null;let seen = '';let addressReady = false;let heldClickPointer = null;let deferredClickRender = false;+// Detail replies stay with an unchanged summary, while search results are keyed by board and words.+const itemDetails = new Map();+const itemSearches = new Map();+let detailRead = null;const addressedShouts = new Map();const $ = (id) => document.getElementById(id);+// The update note from src/view/hosted-release.js (#632): only a confirmed read of this machine's view says how far behind it is.+// Only the hosted page builds it; every other page draws nothing and never touches the DOM for it.+const renderHostedReleaseNote = () => {};++const hostedState = (function hostedState(state, facts = {}) {+ const agent = 'Something not working? Ask your agent';+ const opening = 'Help me open my Pullboard board.';+ const updating = 'Help me update Pullboard.';+ const shared = facts.linked || [];+ const share = { kind: 'state', heading: 'One step on your computer', text: 'On the computer with your projects, open a terminal and run this once:', parts: ['command'], command: 'pullboard relay on --all', ask: 'Help me share my boards with my phone.',+ small: 'It shares every project with your account. Your boards show up here by themselves.', live: 'Waiting for your boards' };+ const models = {+ 'looking': { kind: 'state', heading: 'Finding your boards…', parts: ['spin'] },+ 'asking': { kind: 'state', heading: 'Click Allow', text: 'Your browser is asking if this page may open the boards on this computer. Your boards stay on this computer.', parts: ['ask'],+ live: 'Waiting for you to click Allow', lead: agent, help: 'Help me allow Pullboard in my browser.' },+ 'blocked': { kind: 'state', heading: 'Your browser said no', text: 'That\'s fine. Turn it back on in three clicks:', parts: ['steps'],+ live: 'Your boards open as soon as it\'s on', lead: agent, help: 'My browser blocked Pullboard. Help me fix it.' },+ 'not-running': { kind: 'state', heading: 'Where are your projects?', parts: ['two'], live: 'Still looking on this computer', wide: true },+ 'mismatch': { kind: 'state', heading: 'Update Pullboard on this computer', text: 'The Pullboard on this computer does not match this page. Update it, and this page opens your boards by itself.', parts: ['command'],+ command: 'npm i -g pullboard', ask: updating, live: 'Still looking on this computer', lead: agent, help: updating },+ 'problem': { kind: 'state', heading: 'Open your board', text: facts.detail || 'This page could not take the connection Pullboard on this computer sent back.', parts: ['open'], lead: agent, help: opening },+ 'signed-out': facts.phone+ ? { kind: 'state', heading: 'Your boards, on your phone', text: 'Sign in with the GitHub account you use on your computer.', parts: ['github'], small: 'Nothing to install on your phone.',+ lead: 'Stuck? On your computer, ask your agent', help: 'Help me see my boards on my phone.' }+ : { kind: 'state', heading: 'Open them from any device', text: 'Your boards on your phone and every computer, from the GitHub account you shared them with.', parts: ['github'], small: 'Not shared yet? After you sign in, it shows the one step.',+ lead: agent, help: opening },+ 'no-linked': share,+ // The account shares boards this browser holds no key for. Running the command alone never opens them here: a+ // browser enrolls only from the pairing link the command prints (relay/browser-devices.js enrollPhone), so the+ // screen says to open that link or scan its QR, as the screen before it did.+ 'unpaired': { ...share, text: 'On the computer with your projects, open a terminal and run this, then open the link it prints here or scan its QR:', ask: opening,+ small: 'Your account shares ' + (shared.join(', ') || 'your boards') + '. This browser opens ' + (shared.length === 1 ? 'it' : 'them') + ' from that link.' },+ 'linked-failed': { kind: 'note', heading: 'Shared boards did not load', text: 'They show here by themselves once they answer.', parts: [], detail: facts.detail },+ 'local-failed': { kind: 'note', heading: 'This computer\'s boards did not load', text: 'They show here by themselves once Pullboard answers.', parts: [], detail: facts.detail },+ };+ const model = state ? models[state] : null;+ return model ? { state, ...model } : null;+});+const hostedBrowser = (function hostedBrowser(agent) {+ const brands = (agent?.userAgentData?.brands || []).map((entry) => entry.brand).join(' ');+ const said = brands + ' ' + (agent?.userAgent || '');+ if (/Edge|Edg\//.test(said)) return 'Edge';+ if (/Opera|OPR\//.test(said)) return 'Opera';+ if (/Chrom/.test(said)) return 'Chrome';+ if (/Firefox\//.test(said)) return 'Firefox';+ if (/Safari\//.test(said)) return 'Safari';+ return 'This browser';+});+const drawHosted = (function drawHosted(doc, model, place) {+ const $ = (id) => doc.getElementById(id);+ const full = Boolean(model && model.kind === 'state');+ const note = $('local-note');+ /** Show an element with these words, or hide it with none. */+ const say = (id, text) => { $(id).hidden = !text; $(id).textContent = text || ''; };+ note.hidden = !model;+ note.dataset.state = model ? model.state : '';+ note.dataset.kind = model ? model.kind : '';+ note.classList.toggle('wide', Boolean(model?.wide));+ note.title = model?.detail || '';+ doc.body.classList.toggle('open-board', full);+ $('local-note-title').textContent = model ? model.heading : '';+ say('local-note-text', model?.text);+ for (const part of note.querySelectorAll('[data-part]')) part.hidden = !(model?.parts || []).includes(part.dataset.part);+ $('local-note-code').textContent = model?.command || '';+ $('local-note-copy').dataset.copy = model?.command || '';+ $('local-note-ask').textContent = model?.ask ? '“' + model.ask + '”' : '';+ $('local-note-agent').dataset.copy = model?.ask || '';+ say('local-note-small', model?.small);+ $('local-note-live').hidden = !model?.live;+ $('local-note-live').lastElementChild.textContent = model?.live || '';+ $('local-note-help').hidden = !model?.help;+ $('local-note-lead').textContent = model?.lead || '';+ $('local-note-said').textContent = model?.help ? '“' + model.help + '”' : '';+ $('local-note-help-copy').dataset.copy = model?.help || '';+ for (const button of note.querySelectorAll('button[data-copy]')) button.textContent = 'Copy';+ $('local-note-view').href = place.view + '/local/view';+ for (const link of note.querySelectorAll('.ob-gh')) if (place.signIn) link.href = place.signIn;+ // A person already signed in is never asked to sign in: Where are your projects? keeps only this computer's card.+ note.querySelector('.ob-two').classList.toggle('signed-in', Boolean(place.session));+ // The relay's banner says what the state now says; it comes back when the state goes.+ const banner = $('relay-notice');+ if (banner && full && ['signed-out', 'no-linked', 'unpaired'].includes(model.state)) { banner.hidden = true; banner.dataset.hostedHid = '1'; }+ else if (banner && banner.dataset.hostedHid && !full) { banner.hidden = false; delete banner.dataset.hostedHid; }+});+/**+ * Show the open-board screen the page is in (src/view/hosted.js), or none with null. A phone is the one the relay's+ * page names before first paint (#757), and it hears nothing about this computer.+ */+function localNote(state, facts = {}) {+ drawHosted(document, hostedState(state, { browser: hostedBrowser(navigator), phone: document.documentElement.dataset.relayDevice === 'phone', ...facts }), { view: localSession?.origin || LOCAL_VIEW, signIn: hosted.signIn, session: hosted.relaySession });+}++let starLinked = { at: 0, linked: false, reading: false };+/**+ * Show the hosted page's star line (src/view/star.js) to a signed-in person whose account lists a linked board, until+ * dismissed here; pass a board list through. Why the account's list: it is the linked-board metadata the relay serves+ * this page, whichever source then draws a board, so a linked board this machine reads locally still counts, and no+ * relay client loads to decide it. It is read until it lists one, at most every few seconds, and+ * declares the relay's engine as every relay request does.+ */+function starLine(list) {+ const line = $('star-line');+ if (!line) return list;+ const show = () => { line.hidden = !(hosted.relaySession && starLinked.linked && keep("pb.star") !== 'dismissed'); };+ const learn = (reply) => {+ const linked = Boolean(reply?.boards?.some((board) => typeof board?.id === 'string'));+ starLinked = { at: Date.now(), linked, reading: false };+ line.dataset.linked = linked ? 'yes' : 'no';+ show();+ };+ if (hosted.relaySession && !starLinked.linked && !starLinked.reading) {+ // The page's own read of the account, when it made one since the line last looked, answers the line, refused+ // or not: the line reads the account itself only when the page made no such read, so a listing never brings a+ // second one (#817).+ if (linkedSeen && linkedSeen.at > starLinked.at) learn(linkedSeen.reply);+ else if (Date.now() - starLinked.at > 2500) {+ starLinked = { at: Date.now(), linked: false, reading: true };+ linkedList().then(learn, () => learn(null));+ }+ }+ show();+ return list;+}+$('star-dismiss')?.addEventListener('click', () => { keep("pb.star", 'dismissed'); starLine(null); });+// No first look of its own (#817): every signed-in page lists its boards, and api() hands that list here, so the+// account is read only after a listing succeeds, never beside it. A session that its first listing revokes therefore+// sees exactly one listing, and the line, hidden in its markup, stays hidden until a listing shows it.++/** Hide the relay's own banner, which speaks for the relay, on a page the relay does not serve this time. */+function hideRelayNotice() {+ const banner = document.getElementById('relay-notice');+ if (banner) banner.hidden = true;+}++/** Send this tab on the round trip to the local view, which sends it straight back here; two tries in a row at most. */+function localTrip(base) {+ const trips = Number(tabValue(LOCAL_TRIPS) || 0);+ if (trips >= 2) {+ tabValue(LOCAL_TRIPS, null);+ localNote('problem', { detail: 'Pullboard on this computer did not give this page a session it accepts.' });+ return false;+ }+ tabValue(LOCAL_TRIPS, String(trips + 1));+ location.assign(base + '/local/connect');+ return true;+}++/** The local view refused this tab's secret, as after a restart with a new one: go round again for it, unasked. */+function localExpired() {+ const base = localSession.origin;+ localSession = null;+ localConfirmed = false;+ tabValue(LOCAL_TAB, null);+ localTrip(base);+}++// The screens that wait on this computer: the page looks again by itself while one shows, with no Try again (#764).+const LOCAL_STATES = ['looking', 'asking', 'blocked', 'not-running', 'mismatch'];+let localChecking = false;+let localReached = false;++/**+ * Reach this machine's view: read the view's public protocol, which holds no secret and no board, and take the session+ * the round trip brought back. While the browser asks the person, which it does before the request goes anywhere, the+ * page draws the prompt and says it waits. It is 'local' when the page now reads the local view, 'away' when the+ * browser is on the round trip, 'unreachable' when the page cannot read it, with the screen that says why, and 'busy'+ * while another look is still on its way. A look again by itself (again) redraws only a screen that waits on this+ * computer, so a later screen, such as signing in, stays.+ */+async function connectLocal(again = false) {+ if (localChecking) return 'busy';+ localChecking = true;+ try { return await lookLocal(again); }+ finally { localChecking = false; }+}++/** One look for this machine's view, for connectLocal, which keeps two from running at once. */+async function lookLocal(again) {+ const base = localSession?.origin || LOCAL_VIEW;+ /** Draw this screen, unless the page has moved past the ones that wait on this computer. */+ const show = (state) => {+ const shown = $('local-note').dataset.state || '';+ if (shown !== state && (!again || LOCAL_STATES.includes(shown))) localNote(state);+ };+ let permission = null;+ for (const name of ['loopback-network', 'local-network-access']) {+ try { permission = (await navigator.permissions.query({ name })).state; break; } catch { /* this browser has no such permission */ }+ }+ if (permission === 'denied') {+ show('blocked');+ return 'unreachable';+ }+ // A browser that says it will ask gets Click Allow on screen before the request that raises its prompt; one that+ // says nothing gets it only once the request is slow to come back, as it is while a prompt waits.+ let slow = null;+ if (permission === 'prompt' && !again) {+ show('asking');+ await new Promise((painted) => requestAnimationFrame(() => requestAnimationFrame(painted)));+ } else if (permission !== 'granted' && !again) slow = setTimeout(() => show('asking'), 800);+ let reply;+ try {+ for (let attempt = 1; !reply; attempt += 1) {+ try { reply = await fetch(base + '/local/protocol', { signal: AbortSignal.timeout(3000), credentials: 'omit', redirect: 'error' }); }+ catch (error) {+ // A read that ran out of time may have met a slow first answer or a browser prompt still open, so it asks once+ // more (#786). After that, one that ran out of time while the browser may still be asking is the prompt waiting+ // for the person, and one refused at once means nothing runs here (#764). One discovery request at a time is all+ // this page makes of this device (P5), so a view too old to answer it reads as none.+ if (attempt < 2 && error?.name === 'TimeoutError') continue;+ show(error?.name === 'TimeoutError' && permission !== 'granted' ? 'asking' : 'not-running');+ return 'unreachable';+ }+ }+ } finally { clearTimeout(slow); }+ let protocol = null;+ try { protocol = await reply.json(); } catch { /* not this protocol */ }+ if (!reply.ok || protocol?.version !== 1 || protocol?.apiVersion !== 1 || protocol?.hostedOrigin !== location.origin) {+ show('mismatch');+ return 'unreachable';+ }+ if (!localSession) return localTrip(base) ? 'away' : 'unreachable';+ connection.base = localSession.origin;+ connection.headers = { 'x-pullboard-key': localSession.key };+ localReadBase = connection.base;+ localReadHeaders = { ...connection.headers };+ readOnly = false;+ requests = false;+ localReached = true;+ document.body.classList.remove('read-only', 'requests');+ hideRelayNotice();+ // Finding your boards stays until the list arrives, so the page never shows an empty board on its way to one.+ if (LOCAL_STATES.includes($('local-note').dataset.state || '')) localNote('looking');+ return 'local';+}/** Mark primary pointer targets whose click would be lost if a refresh replaces them. */function holdClickPointer(event) {- if (!event.isPrimary || event.button !== 0 || !(event.target instanceof Element && event.target.closest('#pipeline .pipeline-item, #spec-detail [data-row-decision="decline"], #spec-decline-submit'))) return;+ if (!event.isPrimary || event.button !== 0 || !(event.target instanceof Element && event.target.closest('#pipeline .pipeline-item, #spec-detail [data-row-decision="decline"], #spec-decline-submit, #roadmap-panel [data-roadmap-jump]'))) return;heldClickPointer = event.pointerId;}@@ -191,8 +534,11 @@ function theme(pick) {else delete document.documentElement.dataset.theme;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);+ // The open-board screens carry the same toggle in their own header (#764), as the sidebar is hidden there.+ for (const button of [$('theme'), $('ob-theme')]) {+ button.title = now === 'dark' ? 'Dark theme: switch to light' : 'Light theme: switch to dark';+ button.setAttribute('aria-label', button.title);+ }}theme(keep('pb.theme'));matchMedia('(prefers-color-scheme: dark)').addEventListener?.('change', () => theme(keep('pb.theme')));@@ -227,13 +573,15 @@ const dayName = (iso) => {today.setDate(today.getDate() - 1);return then === today.toDateString() ? 'Yesterday' : new Date(iso).toLocaleDateString([], { weekday: 'short', month: 'short', day: 'numeric' });};+// When the page last named days, so tickDays can rename them in place once the clock passes midnight (#644).+let daysNamedAt = new Date();// 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('');+const byDay = (rows, at, row) => { daysNamedAt = new Date(); return 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 dayRules = (rows, at, row) => { daysNamedAt = new Date(); return 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('');+}).join(''); };const firstLine = (text) => String(text ?? '').split('\n').map((line) => line.trim()).find(Boolean) || '';/** Omit a duplicated leading verdict code from rendered copy while preserving the recorded note. */function visibleVerdictNote(reason, note) {@@ -262,9 +610,129 @@ function shoutAgentName(id) {}/** 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(agentName(v.by)) + ' · ' + when(v.at) + ' · at ' + esc(String(v.commit || '').slice(0, 12)) + '</span><div class="note">' + inline(visibleVerdictNote(v.reason, v.note), titles) + '</div></div>';+const roadmapSummary = (function roadmapSummary(milestone, context = {}) {+ /** Escape supplied milestone text before placing it in HTML or attributes. */+ const escape = text => String(text ?? '').replace(/[&<>"']/g, c => ({'&':'&','<':'<','>':'>','"':'"',"'":'''})[c]);+ const summary = milestone.summary;+ const states = [['landed','landed'],['landing','accepted, landing'],['review','in review'],['building','building'],['waiting','waiting'],['held','held']];+ /** Accept only nonnegative integer counts from the backend contract. */+ const number = value => Number.isInteger(value) && value >= 0;+ if (!summary || !number(summary.total) || !number(summary.left) || states.some(([key]) => !number(summary[key]))) return null;+ // Only a milestone with work left has a header: a finished one or an empty plan never reads "0 remaining" or+ // "About 0 to 0 h"; an empty plan keeps its No items yet reading, as before this header.+ if (summary.left === 0) return null;+ const count = '<span class="roadmap-left"><b>'+escape(summary.left)+' remaining</b><span aria-label="'+escape(summary.landed)+'/'+escape(summary.total)+' landed">'+escape(summary.landed)+' of '+escape(summary.total)+' landed</span></span>';+ const description = states.map(([key,label]) => summary[key]+' '+label).join(', ');+ let offset = 0;+ const segments = states.map(([key]) => { const x = offset; offset += summary[key]; return '<rect class="roadmap-summary-segment ' + key + '" data-summary-segment="' + key + '" data-count="' + summary[key] + '" x="' + x + '" width="' + summary[key] + '" height="1"/>'; }).join('');+ // Geometry uses the supplied counts as SVG units; inline CSS is disallowed by the view's policy.+ const bar = '<svg class="milestone-progress roadmap-summary-bar" viewBox="0 0 ' + (summary.total || 1) + ' 1" preserveAspectRatio="none" role="img" aria-label="' + escape(milestone.name+': '+description) + '" data-total="' + summary.total + '">' + segments + '</svg>';+ const legend = '<div class="roadmap-summary-legend">'+states.map(([key,label]) => '<span data-summary-state="'+key+'"><i class="roadmap-summary-swatch '+key+'" aria-hidden="true"></i><b>'+escape(summary[key])+'</b> '+label+'</span>').join('')+'</div>';+ const target = milestone.target ? '<span class="roadmap-target">Target <time datetime="'+escape(milestone.target)+'">'+escape(context.time ? context.time(milestone.target) : milestone.target)+'</time>'+(milestone.pastTarget?' <span class="chip warn">past target</span>':'')+'</span>' : '';+ const estimate = summary.estimate, pace = summary.pace;+ // The time line reads the summary's estimate, window and reason as given (#853): today's pace for the 6 h+ // window, the last day's for the 24 h window, and plain words when too few items have landed to estimate.+ const bounds = estimate && Number.isFinite(estimate.low) && Number.isFinite(estimate.high)+ ? escape(estimate.low)+(estimate.low === estimate.high ? '' : ' to '+escape(estimate.high))+' h' : '';+ const when = bounds ? 'About '+bounds+(summary.window === '24h' ? ' at the last day’s pace' : ' at today’s pace')+ : summary.reason === 'few-landings' ? 'Too few landings yet to estimate' : '';+ const paced = pace && number(pace.last6h) && number(pace.last2h);+ const forecast = when ? '<span class="roadmap-estimate">'+when+'</span>'+(paced ? '<span class="roadmap-pace">'+escape(pace.last6h)+' landed in the last 6 h, '+escape(pace.last2h)+' in the last 2 h</span>' : '') : '';+ const meta = target || forecast ? '<div class="roadmap-summary-meta">'+target+forecast+'</div>' : '';+ const needs = Array.isArray(summary.needsYou) ? summary.needsYou.map(id => {+ const item = context.lookup ? context.lookup(id) : null;+ const text = escape(item?.label || '#'+id)+(item?.title?' '+escape(item.title):'');+ return item?.address ? '<a class="ref" href="'+escape(item.address)+'" data-go="item:'+escape(item.id)+'"'+(item.board?' data-board="'+escape(item.board)+'"':'')+'>'+text+'</a>' : '<span>'+text+'</span>';+ }).join(', ') : '';+ return { count, detail: '<div class="roadmap-summary">'+bar+legend+meta+(needs?'<div class="roadmap-summary-needs"><b>Needs you:</b> '+needs+'</div>':'')+'</div>' };+}), roadmapHeaders = (function roadmapHeaders(summarize, page) {+ const made = new Map();+ return (read) => {+ if (!read) return null;+ if (!made.has(read)) made.set(read, summarize(read.milestone, { time: page.time, lookup: (id) => {+ const label = typeof id === 'number' ? '#' + id : String(id), row = read.rows.find((row) => row.label === label);+ return row ? { label, title: row.title, id: row.open?.id, address: row.open ? page.address(row.open.id, row.open.root) : null, board: row.open?.root !== page.root ? row.open?.root : null } : null;+ } }));+ return made.get(read);+ };+});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: ['unclaimed', 'free'], withdrawn: ['withdrawn', ''] };const chip = (s) => '<span class="chip ' + STATES[s][1] + '">' + STATES[s][0] + '</span>';+// A verified item's stale mark from src/view/stale.js (#726): Core publishes verdictState and the page only draws it.+const staleChip = (function staleChip(item) {+ const state = item && item.verdictState;+ // A merged item's verdict is final whatever main does next; only a verified item waiting to land can go stale.+ // A summary row names a merge by its stage, an item's detail by its merged commit.+ if (!state || state.code !== 'STALE_VERDICT' || item.status !== 'verified' || item.merged || item.stage === 'merged') return '';+ const escape = (text) => String(text).replace(/[&<>"']/g, (c) => ({ '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' })[c]);+ const why = state.file && state.commit+ ? 'main changed ' + state.file + ' in ' + state.commit + ' after this verdict checked it'+ : state.reason || 'main changed files this verdict checked';+ // A legacy receipt sealed no reviewed trunk, so Core judged it from the claim's base instead.+ const title = 'Stale verdict: ' + why + (state.legacy ? ' (an older receipt, judged from where the claim began)' : '') + '. Re-review it before it lands.';+ return '<span class="chip stale" role="img" title="' + escape(title) + '" aria-label="' + escape(title) + '">stale</span>';+});+// A roadmap item's blocker dot and unfolded reason from src/view/roadmap-block.js (#605), read from the summaries held.+const roadmapBlock = (function roadmapBlock(item, context = {}) {+ if (!item) return null;+ const escape = text => String(text ?? '').replace(/[&<>"']/g, c => ({'&':'&','<':'<','>':'>','"':'"',"'":'''})[c]);+ const items = context.items || [], name = context.name || (id => id), time = context.time || (at => at);+ const waits = (item.blockedBy || []).map(id => items.find(other => other.id === id) || {id,status:'unavailable'});+ const hold = (context.holds || []).find(h => h.hold_lane === item.lane);+ const blocked = item.status === 'open' && Boolean(waits.length || hold);+ const label = blocked ? 'Blocked: ' + [waits.length ? 'waits on ' + waits.map(w => '#' + w.id + ' (' + w.status + ')').join(', ') : '',hold ? 'lane ' + item.lane + ' held' : ''].filter(Boolean).join('; ') : '';+ const paths = {+ Criterion:'<circle cx="12" cy="12" r="8"/><circle cx="12" cy="12" r="4"/><path d="M12 9v6m-3-3h6"/>',+ Agents:'<circle cx="9" cy="7" r="3"/><path d="M3 21v-3a6 6 0 0 1 12 0v3m1-17a3 3 0 0 1 0 6m2 4a5 5 0 0 1 3 4v3"/>',+ 'Waits on':'<path d="M6 3h12M6 21h12M7 3v4l10 10v4M17 3v4L7 17v4"/>',+ Blocks:'<path d="M5 4v8a5 5 0 0 0 5 5h9m-5-5 5 5-5 5"/>',+ 'Sent back':'<path d="m9 4-5 5 5 5M4 9h10a6 6 0 0 1 0 12h-3"/>',+ History:'<path d="M4 6h16M4 12h16M4 18h16"/><circle cx="8" cy="6" r="2"/><circle cx="16" cy="12" r="2"/><circle cx="10" cy="18" r="2"/>',+ Release:'<path d="M3 3h8l10 10-8 8L3 11z"/><circle cx="7" cy="7" r="1"/>',+ };+ const icon = field => '<svg aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round">' + paths[field] + '</svg>';+ const state = other => context.state ? context.state(other) : other.status === 'claimed' ? 'building' : other.status === 'submitted' ? 'verify' : other.status === 'verified' ? 'verified' : other.verdict?.decision === 'REJECT' ? 'back' : 'open';+ const words = {building:['building','busy'],verify:['to verify','warn'],verified:[null,'ok'],back:['sent back','no'],open:['unclaimed','free'],withdrawn:['withdrawn','']};+ const ref = other => {const [word,color] = words[state(other)] || [other.status,''];return '<span class="chip roadmap-ref '+color+'">#'+escape(other.id)+' '+escape(word || (other.merged || other.stage === 'merged' ? 'landed' : 'verified'))+'</span>';};+ const field = (key,value,extra='') => value ? '<dt>'+icon(key)+escape(key)+'</dt><dd'+(extra?' class="'+extra+'"':'')+'>'+value+'</dd>' : '';+ const first = text => String(text || '').split('\n').find(line => line.trim())?.trim() || '';+ const criterion = first(item.criterion).match(/^.*?[.!?](?:\s|$)|^.*$/u)?.[0]?.trim() || '';+ const agents = [];+ const builder = item.status === 'claimed' ? item.claim?.by || item.owner : item.builtBy;+ const reviewer = item.status === 'submitted' ? item.claim?.by || item.reviewer : item.verifiedBy;+ if (builder) agents.push('<b>'+escape(name(builder))+'</b> '+(item.status === 'claimed'?'building':'built'));+ if (reviewer) agents.push('<b>'+escape(name(reviewer))+'</b> '+(item.status === 'submitted'?'verifying':'verified'));+ const waiting = waits.map(other => {+ const holder = ['claimed','submitted'].includes(other.status) ? other.claim?.by || (other.status==='claimed'?other.owner:other.reviewer) : null;+ return ref(other)+(holder?' <b>'+escape(name(holder))+'</b>':'')+(other.since?' <span class="muted">since '+escape(time(other.since))+'</span>':'');+ });+ if (hold) waiting.push('<span class="chip warn">lane held</span> '+escape(item.lane)+(hold.hold_reason?': '+escape(hold.hold_reason):''));+ const downstream = items.filter(other => other.status === 'open' && (other.blockedBy || []).includes(item.id));+ const reject = (item.verdicts || []).findLast(v => v.decision === 'REJECT') || (item.verdict?.decision === 'REJECT' ? item.verdict : null);+ const reasons = {TEST_FAILURE:'A test failed',BEHAVIOR_MISMATCH:'Behavior differs from the criterion',INSUFFICIENT_EVIDENCE:'More evidence is needed',STALE_HEAD:'The submitted commit is out of date',OTHER:'Sent back'};+ let returned = '';+ if (reject) {+ const note = first(reject.note).replace(new RegExp('^'+String(reject.reason || '')+'(?::|\\s*[-–—])?\\s*','u'),'');+ returned = (reject.at?escape(time(reject.at))+' ':'')+(reject.by?'by <b>'+escape(name(reject.by))+'</b>: ':'')+escape(note || reasons[reject.reason] || 'Sent back');+ }+ let claims = 0;+ const moves = {add:['added','free'],claim:['claimed','busy'],submit:['submitted','warn'],accept:['accepted','ok'],reject:['sent back','no'],merged:['landed','ok']};+ const history = (item.history || []).filter(event => moves[event.kind]).map(event => {+ let [word,color] = moves[event.kind];if(event.kind==='claim' && ++claims>1)word='claimed again';+ return '<span class="roadmap-event"><span class="roadmap-step '+color+'" aria-hidden="true"></span>'+escape(word)+' <time datetime="'+escape(event.at)+'">'+escape(time(event.at))+'</time></span>';+ }).join('<span class="roadmap-arrow" aria-hidden="true"> → </span>');+ const releases = (context.releases || []).map(release => '<b>'+escape(release)+'</b>').join(', ');+ const specs = (item.specs || []).map(escape).join(', ');+ const rows = field('Criterion',criterion?'<b>'+escape(criterion)+'</b>':'','roadmap-criterion')+field('Agents',agents.join(' · '))+ +field('Waits on',waiting.join('<br>'))+field('Blocks',downstream.map(ref).join(' '))+ +field('Sent back',returned,'roadmap-return')+field('History',history,'roadmap-history')+ +field('Release',[releases,specs?'spec '+specs:''].filter(Boolean).join(' · '));+ const address = context.address || (id => '#items/'+id);+ return {label,dot:blocked?'<span class="block-dot" role="img" aria-label="'+escape(label)+'" title="'+escape(label)+'"></span>':'',+ detail:context.loading?'<span class="roadmap-loading muted">Loading detail…</span>':context.error?'<p class="muted">'+escape(context.error)+'</p>':+ '<dl class="roadmap-detail">'+rows+'</dl><a class="ref roadmap-items" href="'+escape(address(item.id))+'" data-go="item:'+item.id+'"'+(context.board?' data-board="'+escape(context.board)+'"':'')+'>Open #'+item.id+' in Items <svg aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6"><path d="M14 3h7v7m0-7L10 14M10 3H3v18h18v-7"/></svg></a>'};+});/** 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));@@ -385,19 +853,36 @@ const count = (n, one, many = one) => n + ' ' + (n === 1 ? one : many);// the decisions passed up to them, spec rows waiting for them, and held lanes, which only the main// checkout, the person's seat, can set. Work waiting for a verdict or sent back belongs to the agents,// and the line under the project says so without counting it.-const needCount = (x) => x.ok ? x.decisions + x.pending + x.drafts + x.holds : 0;+const needCount = (x) => x.ok && !x.loading ? x.decisions + x.pending + x.drafts + x.holds : 0;const doing = (x) => [x.decisions && count(x.decisions, 'decision', 'decisions'), x.pending && count(x.pending, 'question', 'questions'), x.drafts && count(x.drafts, 'draft row', 'draft rows'), x.holds && count(x.holds, 'lane held', 'lanes held'), x.sentBack && count(x.sentBack, 'sent back'), x.awaiting && count(x.awaiting, 'to verify'), x.building && count(x.building, 'building')].filter(Boolean).join(' · ') || (x.open ? count(x.open, 'item open', 'items open') : 'nothing open');-/** The person's calls in one repo, as its Needs-you panel shows them, reused by a combined project view. */-function projectNeeds(p) {+// Embed the standalone shared builder for every page; the binding also lets the page fixture substitute its output.+let personNeeds = (function personNeeds(state) {+ /** Keep visible agent names identical to the page without depending on its runtime. */+ const name = (id) => {+ const agent = state.agents?.find(entry => entry.agent_id === id);+ return agent?.displayName || (agent ? `${id} (${agent.model || agent.agent_model || 'unknown'})` : id);+ };+ const rows = (state.spec ?? []).filter(row => !row.decision);+ const rigorDrafts = state.rigorDrafts ?? [];+ const drafts = rows.filter(row => (row.status === 'draft' || row.staleDecision) && !rigorDrafts.some(draft => draft.target === `spec:${row.id}`)).length;return [- ...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' }] : []),+ ...(state.decisions ?? []).map(ask => ({ kind: 'decision', id: ask.shout_id,+ ref: name(ask.shout_from), text: ask.shout_text, what: 'decision', at: ask.shout_at })),+ ...rows.filter(row => row.status === 'pending').map(row => ({ kind: 'pending', id: row.id,+ ref: row.id, text: row.text, what: `pullboard spec answer ${row.id} "<choice>"` })),+ ...(state.holds ?? []).map(hold => ({ kind: 'hold', id: hold.hold_lane,+ ref: hold.hold_lane, text: hold.hold_reason, what: 'lane held by ' + name(hold.hold_by) })),+ ...rigorDrafts,+ ...(drafts ? [{ kind: 'draft', id: 'drafts', count: drafts, ref: String(drafts),+ text: 'draft spec rows to approve or drop' + rows.filter(row => row.staleDecision).map(row => `; ${row.stage}`).join(''), what: 'review in SPEC.md', target: 'tab:spec' }] : []),];+});+/** The person's calls in one repo, reused by a combined project view. */+function projectNeeds(p) {+ return personNeeds(p);}// 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 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)"]}]};+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":false,"entry":["the caller's checkout contains the submitted commit","the caller did not build it; on a linked board, at engine 48 or newer, the caller was enrolled through the relay by a line of creating seats from the coordinator that includes neither the builder nor a machine join","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's check does not already pass on main, or the person accepted that exact check (CRITERION_PROVES_NOTHING)","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 item's check does not already pass on main, or the person accepted that exact check (CRITERION_PROVES_NOTHING)","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)","every touched doctrine check counts (exit 0 or 1), none rises above its committed count and no changed file gains a problem; watch-mode rules only count (RATCHET_ROSE)","the repo names a gate command (NO_GATE)","the caller still owns the same live item claim or review and can renew it against the frozen criterion (ITEM_LEASE_LOST)","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)","recorded test selection names literal project files and its full-fallback policy (SUBMISSION_PROOF)","every child item is verified or withdrawn (CHILDREN_OPEN)","a verifier has not rejected this commit at this bar; after a no-verdict reopen, the bar was refrozen (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; on a linked board, at engine 48 or newer, the caller was enrolled through the relay by a line of creating seats from the coordinator that includes neither the builder nor a machine join (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","verified"],"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 or verified (NOT_SUBMITTED)","the caller's checkout contains the submitted commit (NOT_AT_COMMIT)","the item has no recorded merge receipt (ALREADY_MERGED)","a new review binds the submitted commit, its exact checked commit, a valid trunk commit and canonical candidate paths (BAD_VERDICT_REVIEW)","a stale acceptance is re-reviewed at a clean HEAD containing the current trunk, which stays fixed through its check (STALE_VERDICT)","the caller did not build it; on a linked board, at engine 48 or newer, the caller was enrolled through the relay by a line of creating seats from the coordinator that includes neither the builder nor a machine join (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 caller still owns the same live item claim or review and can renew it against the frozen criterion (ITEM_LEASE_LOST)","the frozen item check passes at the submitted commit, or its clean reviewed composition for a stale acceptance (CHECK_RED)","an accept notes how it was proved (PROOF_REQUIRED)"]},{"verb":"reject","from":["submitted","verified"],"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 or verified (NOT_SUBMITTED)","the caller's checkout contains the submitted commit (NOT_AT_COMMIT)","the item has no recorded merge receipt (ALREADY_MERGED)","a new review binds the submitted commit, its exact checked commit, a valid trunk commit and canonical candidate paths (BAD_VERDICT_REVIEW)","a stale acceptance is re-reviewed at a clean HEAD containing the current trunk, which stays fixed through its check (STALE_VERDICT)","the caller did not build it; on a linked board, at engine 48 or newer, the caller was enrolled through the relay by a line of creating seats from the coordinator that includes neither the builder nor a machine join (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)","a cause, when given, is test:\u003cfile>::\u003ctitle>, refusal:\u003cCODE>, row:\u003cid> or doctrine:\u003cid> (BAD_CAUSE)"]},{"verb":"reopen","from":["submitted","verified"],"to":"open","by":["coordinator"],"how":"pullboard reopen \u003cid> --note \"why\" | --conflict \u003cfile> [--conflict \u003cfile>]","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 or verified (NOT_SUBMITTED)","the caller is the coordinator (COORDINATOR_ONLY)","the move carries a note: what failed, what was tried, or why (NOTE_REQUIRED)","a cause, when given, is test:\u003cfile>::\u003ctitle>, refusal:\u003cCODE>, row:\u003cid> or doctrine:\u003cid> (BAD_CAUSE)","the item has no recorded merge receipt (ALREADY_MERGED)","a verified item note names the failing test and landing merge commit (LANDING_FAILURE_REQUIRED)","the accepted commit no longer merges onto the trunk, and every named file is one that conflicts (NOT_CONFLICTING)","a trunk conflict reopens an accepted item, names its files and the full trunk commit, and replays only under engine 52 or later (NOT_ACCEPTED)"]},{"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@@ -429,12 +914,14 @@ function replay(item) {/** A recorded merge, rather than an accept, is the end of the shipping pipeline. */function pipelineStage(item) {+ if (item.stage !== undefined) return item.stage;if (item.merged) return 'merged';return item.status === 'verified' ? 'accepted' : item.status;}/** The last arrival in this stage; edits, review reservations and renewals do not restart its age. */function pipelineSince(item) {+ if (item.since !== undefined) return item.since;if (item.merged) return item.history.findLast((event) => event.kind === 'merged')?.at || item.updatedAt;const arrival = replay(item).findLast((step) => step.move && step.from !== step.move.to);// Lapses are inferred, but the native claim receipt records the deadline that caused them.@@ -445,14 +932,28 @@ function pipelineSince(item) {return arrival ? arrival.at || item.updatedAt : item.history.find((event) => event.kind === 'add')?.at || item.updatedAt;}+/** Add the list and pipeline fields omitted from full snapshots, while leaving API summaries intact. */+function listFields(item, fresh = false) {+ if (!fresh && item.stage !== undefined) return item;+ const claim = item.status === 'claimed' && item.owner ? { by: item.owner, until: null }+ : item.status === 'submitted' && item.reviewer ? { by: item.reviewer, until: item.reviewUntil ?? null } : null;+ return { ...item, stage: pipelineStage(item), since: pipelineSince(item), claim,+ counts: { verdicts: item.verdicts.length, facts: (item.thread || []).filter((entry) => entry.type === 'fact').length } };+}++/** Resolve a builder from the full item's owner or the live claim in an API summary. */+const holderOf = (item) => item.status === 'claimed' ? item.claim?.by ?? item.owner ?? null : null;+/** Resolve a reviewer from the full item or the live claim in an API summary. */+const reviewerOf = (item) => item.status === 'submitted' ? item.claim?.by ?? item.reviewer ?? null : null;+/** Render the same board's items in lifecycle order, retaining every item as a detail link. */function pipelineCard(items) {const stages = [['open', 'Not started'], ['claimed', 'Building'], ['submitted', 'Waiting for review'], ['accepted', 'Accepted, waiting to merge'], ['merged', 'Merged']];return stages.map(([stage, label]) => {- const rows = items.filter((item) => pipelineStage(item) === stage).sort((a, b) => pipelineSince(a).localeCompare(pipelineSince(b)) || a.id - b.id);+ const rows = items.map((item) => listFields(item)).filter((item) => item.stage === stage).sort((a, b) => a.since.localeCompare(b.since) || a.id - b.id);const oldest = rows[0];return '<li class="card-panel pipeline-stage" data-pipeline-stage="' + stage + '"><header><h2>' + label + '</h2><b data-stage-count="' + stage + '">' + rows.length + '</b></header>'- + (oldest ? '<p class="pipeline-oldest">Oldest <a class="ref" href="' + esc(itemAddress(oldest.id)) + '" data-go="item:' + oldest.id + '">#' + oldest.id + '</a> · ' + age(pipelineSince(oldest)) + ' in this stage</p>' : '<p class="pipeline-oldest">No items</p>')+ + (oldest ? '<p class="pipeline-oldest">Oldest <a class="ref" href="' + esc(itemAddress(oldest.id)) + '" data-go="item:' + oldest.id + '">#' + oldest.id + '</a> · ' + age(oldest.since) + ' in this stage</p>' : '<p class="pipeline-oldest">No items</p>')+ '<ul>' + rows.map((item) => '<li><button class="pipeline-item' + (view.item === item.id ? ' on' : '') + '" type="button" data-item="' + item.id + '"><span>#' + item.id + '</span><span>' + esc(item.title) + '</span></button></li>').join('') + '</ul></li>';}).join('');}@@ -498,7 +999,7 @@ function timeline(item) {const final = FLOW.states.some((f) => f.id === state && f.final);const next = steps.slice(index + 1).find((n) => n.move);const named = s.kind === 'reject' ? 'sent back' : state;- const stay = !enters || final ? ''+ const stay = !enters || (final && !next) ? '': !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')@@ -535,12 +1036,14 @@ function timeline(item) {* tie, its states joined by straight arrows. A pair of states a move leads back along takes a dashed* square route above the row, the further back the higher. The moves that keep a state are written* in its box after a ↻. A state off the row sits below the last state on the row that leads to it,- * and the routes into it join into one, labelled once. Final states have a double border. Boxes+ * and routes into it from the row join into one, labelled once. Moves out of those states take+ * separate routes below the boxes, with their words above each route. Final states have a double border. Boxes* count the items there now; labels count the moves made along each route, or name its moves when* none was. Words are wrapped and placed by a generous estimate of their width, so none overlaps.*/function flowSvg(p) {- const counts = moveCounts(p.items);+ // Summary states include board-wide tallies, so the lifecycle drawing needs no per-item histories.+ const counts = p.moveCounts ? new Map(Object.entries(p.moveCounts)) : moveCounts(p.items);const finals = FLOW.states.filter((s) => s.final).map((s) => s.id);const leads = (s) => FLOW.moves.filter((m) => m.from.includes(s) && m.to !== s).map((m) => m.to);let row = [];@@ -608,6 +1111,15 @@ function flowSvg(p) {up.said = told([up.pair]);up.lines = wrap(up.said.words, Math.abs(up.start - up.end) - 20, 12);}+ // Higher routes cross this level vertically; put its words in the widest gap between them.+ for (const up of ups) {+ const left = Math.min(up.start, up.end), right = Math.max(up.start, up.end);+ const cuts = [left, ...ups.filter((other) => other.span > up.span).flatMap((other) => [other.start, other.end]).filter((x) => x > left && x < right), right].sort((a, b) => a - b);+ const rooms = cuts.slice(1).map((end, index) => ({ left: cuts[index], right: end })).sort((a, b) => (b.right - b.left) - (a.right - a.left));+ const room = rooms[0];+ up.labelX = (room.left + room.right) / 2;+ up.lines = wrap(up.said.words, room.right - room.left - 20, 12);+ }// Each level stands clear of the words of the level below it.const rise = [];for (const level of spans.keys()) {@@ -624,7 +1136,8 @@ function flowSvg(p) {const from = row.filter((r) => leads(r).includes(s.id));pos.set(s.id, { x: from.length ? pos.get(from[from.length - 1]).x : W / 2, y: bottom + 80 + BH / 2 });}- const H = (below.length ? bottom + 80 + BH : bottom) + 14;+ const outgoing = pairs.filter((pair) => pair.from !== pair.to && below.some((state) => state.id === pair.from));+ const H = (below.length ? bottom + 80 + BH : bottom) + 14 + (outgoing.length ? 44 + 40 * (outgoing.length - 1) : 0);const group = (pairList, route, label) => pairList.map((pair, n) => '<g><title>' + esc(says(pair)) + '</title><path class="edge' + (route.back ? ' back' : '') + '" d="' + route.d + '" marker-end="url(#pb-head' + (route.back ? '-back' : '') + ')"/>' + (n === 0 ? label : '') + '</g>').join('');const tone = (said, extra = '') => 'tag' + (said.idle ? ' idle' : '') + extra;@@ -632,16 +1145,19 @@ function flowSvg(p) {// Straight along the row.for (const pair of pairs.filter((pair) => col(pair.from) >= 0 && col(pair.to) === col(pair.from) + 1)) {const a = pos.get(pair.from), b = pos.get(pair.to), said = told([pair]);- routes.push(group([pair], { d: path([[a.x + BW / 2, Y], [b.x - BW / 2 - 1, Y]]) }, text((a.x + b.x) / 2, Y - 8, said.words.join(' · '), tone(said))));+ const words = said.words.join(' · ');+ // A long label sits above the boxes when the gap cannot hold it with clearance.+ const labelY = wide(words, 12) + 8 > b.x - a.x - BW ? top - 8 : Y - 8;+ routes.push(group([pair], { d: path([[a.x + BW / 2, Y], [b.x - BW / 2 - 1, Y]]) }, text((a.x + b.x) / 2, labelY, words, tone(said))));}// Square, above the row.for (const up of ups) {const isBack = col(up.pair.to) < col(up.pair.from), y = top - rise[up.level];- routes.push(group([up.pair], { back: isBack, d: path([[up.start, top], [up.start, y], [up.end, y], [up.end, top - 1]]) }, lines((up.start + up.end) / 2, y - 7, up.lines, tone(up.said, isBack ? ' back' : ''))));+ routes.push(group([up.pair], { back: isBack, d: path([[up.start, top], [up.start, y], [up.end, y], [up.end, top - 1]]) }, lines(up.labelX, y - 7, up.lines, tone(up.said, isBack ? ' back' : ''))));}// Down from the row, joining into one route per state below, labelled once on the way in.for (const s of below) {- const t = pos.get(s.id), into = pairs.filter((pair) => pair.to === s.id && pos.has(pair.from) && pair.from !== s.id);+ const t = pos.get(s.id), into = pairs.filter((pair) => pair.to === s.id && col(pair.from) >= 0);const said = told(into), tTop = t.y - BH / 2;const xs = into.map((pair) => pos.get(pair.from).x).sort((a, b) => a - b);const left = xs.filter((x) => x < t.x - 0.5), right = xs.filter((x) => x > t.x + 0.5);@@ -658,6 +1174,16 @@ function flowSvg(p) {routes.push(group([pair], { d }, n === 0 ? label : ''));});}+ // A below-row state can move back into the row or on to another below-row state.+ outgoing.forEach((pair, index) => {+ const from = pos.get(pair.from), to = pos.get(pair.to);+ const lane = bottom + 80 + BH + 26 + index * 40;+ const side = to.x < from.x ? to.x + BW / 2 + 1 : to.x - BW / 2 - 1;+ const said = told([pair]);+ const room = Math.max(40, Math.abs(side - from.x) - 24);+ const label = lines((from.x + side) / 2, lane - 8, wrap(said.words, room, 12), tone(said));+ routes.push(group([pair], { d: path([[from.x, from.y + BH / 2], [from.x, lane], [side, lane], [side, to.y]]) }, label));+ });const boxes = FLOW.states.map((s) => {const { x, y } = pos.get(s.id), box = inside.get(s.id), left = x - BW / 2, boxTop = y - BH / 2;@@ -674,26 +1200,295 @@ function flowSvg(p) {/** Read or move through API v1, retaining the rule and repair guidance in a refusal. */async function api(path, body) {- if (body && (snapshot || readOnly)) throw new Error(snapshot ? 'This is a read-only snapshot.' : 'This is a read-only view.');- if (transportModule) {- if (transport) return transport.request(path, body);- if (transportLoadError) throw transportLoadError;- throw new Error('The browser transport is still loading.');+ path = snapshot ? path.split('?')[0].slice(1) + '.json' : path;+ if (snapshot) {+ if (body !== undefined && body !== null) throw new Error('This is a read-only snapshot.');+ return jsonRequest(path, undefined, '', {});+ }+ if (path === '/api/v1/boards') return starLine(await listedBoards());+ const boardId = /^\/api\/v1\/boards\/([0-9a-f]{32})(?:\/|$)/u.exec(path)?.[1];+ const source = boardId ? boardSources.get(boardId) : null;+ if (boardId && !source) throw new Error(transport+ ? 'Pair this browser to read that board, or refresh the board list if the board is local.'+ : 'This board is not available in the current view. Refresh the board list and retry.');+ if (boardId && source?.kind === 'relay') {+ if (body !== undefined && body !== null) throw new Error('This is a read-only view of relay boards.');+ if (!transport) throw transportLoadError || new Error('The relay transport is still loading.');+ const reply = await transport.request(path, body);+ if (path.includes('/state') && reply.state) return { ...reply, state: { ...reply.state, root: source.board.root } };+ return reply;+ }+ if (body && (hosted.local ? readOnly && source?.kind !== 'local' : pageReadOnly)) throw new Error('This is a read-only view.');+ const base = source?.kind === 'local' ? localReadBase : connection.base;+ const headers = source?.kind === 'local' ? localReadHeaders : connection.headers;+ return jsonRequest(path, body, base, headers);+}++/** Use one JSON request primitive, capturing its local route and session before awaiting a reply. */+async function jsonRequest(path, body, base, headers, cache, format = 'json') {+ const session = localSession;+ path = base + path;+ const res = await fetch(path, { method: body ? 'POST' : 'GET', headers: { ...headers, ...(body ? { 'content-type': 'application/json' } : {}) }, body: body ? JSON.stringify(body) : undefined, cache });+ const json = format === 'html' && res.ok ? await res.text() : await res.json();+ if (session && session === localSession && base === session.origin) {+ if (res.status === 401 || res.status === 403) localExpired();+ else if (res.ok && !localConfirmed) { localConfirmed = true; tabValue(LOCAL_TRIPS, null); }}- path = snapshot ? path.split('?')[0].slice(1) + '.json' : connection.base + path;- const res = await fetch(path, { method: body ? 'POST' : 'GET', headers: snapshot ? {} : { ...connection.headers, ...(body ? { 'content-type': 'application/json' } : {}) }, body: body ? JSON.stringify(body) : undefined });- const json = await res.json();if (!res.ok) {const refusal = json.error;const message = refusal && typeof refusal === 'object' ? '[' + refusal.code + '] ' + refusal.message : refusal || res.status;- throw new Error(message);+ const error = new Error(message);+ if (refusal && typeof refusal === 'object') error.code = refusal.code;+ throw error;}return json;}+/** Read only this machine's authenticated view, including when its page is hosted elsewhere. */+function sharingApi(body) {+ return jsonRequest('/api/v1/view-link', body, hosted.local ? localReadBase : connection.base,+ hosted.local ? localReadHeaders : connection.headers);+}++let sharingReady = null;+let sharingTask = Promise.resolve();+let sharing = { state: 'idle', intentId: null, popup: null, timer: null, closing: false, boards: [] };++/** Show the opt-in once after a real local read; quiet boards do not acquire another polling loop. */+async function sharingInvitation() {+ if (!$('share-note') || snapshot || (hosted.local ? !localSession : pageReadOnly || configuredTransportModule)) return;+ let available = false;+ try { available = Boolean((await sharingApi()).available); } catch { available = false; }+ const hiddenByPerson = keep('pb.share') === 'hidden';+ $('share-note').hidden = !available || hiddenByPerson;+ if ($('share-again')) $('share-again').hidden = !available || !hiddenByPerson;+}+$('share-hide')?.addEventListener('click', () => { keep('pb.share', 'hidden'); $('share-note').hidden = true; if ($('share-again')) $('share-again').hidden = false; });+$('share-again')?.addEventListener('click', () => { keep('pb.share', 'shown'); $('share-again').hidden = true; $('share-note').hidden = false; });++/** Render names and reasons as text, without exposing machine paths or private sign-in material. */+function sharingProgress(status) {+ sharing.state = status.state;+ sharing.boards = status.boards || [];+ const linked = sharing.boards.filter(board => board.outcome === 'linked');+ if (linked.length) {+ $('share-note').hidden = true;+ if ($('share-again')) $('share-again').hidden = true;+ }+ const lines = sharing.boards.map(board => board.outcome === 'linked' ? 'Linked ' + board.name + '.'+ : 'Did not link ' + board.name + ': ' + board.reason);+ if (status.error) lines.push(status.error.message);+ else if (['cancelled', 'declined', 'expired'].includes(status.state)) lines.push('No boards were linked. You can sign in again whenever you want.');+ else if (status.state === 'pairing') lines.push('Your boards are linked. Pair a device to open them there, or close this step; the links stay in place.');+ else if (status.state === 'pairing-stopped') lines.push('Phone pairing stopped. Your boards remain linked.');+ else if (status.state === 'linking') lines.push('Linking every registered board…');+ else if (status.state === 'done' && !linked.length && !lines.length) lines.push('No boards were linked.');+ if (lines.length) $('share-status').textContent = lines.join('\n');+ $('share-pair').hidden = status.state !== 'pairing';+ $('share-close').textContent = linked.length ? 'Close' : 'Cancel sign-in';+ if (status.state !== 'waiting') { sharing.popup?.close(); sharing.popup = null; }+}++/** Stop the one operation and await core cleanup; a linking batch is never described as rolled back. */+async function closeSharing() {+ clearTimeout(sharing.timer);+ sharing.closing = true;+ if (!sharing.intentId) return;+ try {+ const status = await sharingApi({ action: 'cancel', intentId: sharing.intentId });+ sharingProgress(status);+ sharing.popup?.close(); sharing.popup = null;+ $('share-start').disabled = false;+ sharingReady = sharingInvitation();+ } catch (error) {+ $('share-status').textContent = error.message;+ if (error.code === 'VIEW_SIGN_IN_LINKING') {+ sharing.closing = false;+ sharing.timer = setTimeout(() => { sharingTask = pollSharing(); }, 250);+ } else { sharing.popup?.close(); sharing.popup = null; $('share-start').disabled = false; }+ }+}++/** Poll public progress only while the person has an active sign-in or pairing step. */+async function pollSharing() {+ if (sharing.closing) return;+ if (sharing.state === 'waiting' && sharing.popup?.closed) { sharingTask = closeSharing(); return sharingTask; }+ try {+ const status = await sharingApi({ action: 'status', intentId: sharing.intentId });+ sharingProgress(status);+ if (['waiting', 'linking', 'pairing'].includes(status.state)) sharing.timer = setTimeout(() => { sharingTask = pollSharing(); }, 250);+ else { $('share-start').disabled = false; sharingReady = sharingInvitation(); }+ } catch (error) {+ $('share-status').textContent = error.message;+ $('share-start').disabled = false;+ }+}++/** Begin one existing all-board sign-in; open its browser window in the native click before awaiting the server. */+async function beginSharing(popup) {+ sharing = { state: 'waiting', intentId: null, popup, timer: null, closing: false, boards: [] };+ $('share-panel').hidden = false;+ $('share-start').disabled = true;+ $('share-status').textContent = 'Starting GitHub sign-in…';+ try {+ const instructions = await sharingApi({ action: 'start' });+ sharing.intentId = instructions.intentId;+ if (sharing.closing || popup?.closed) return await closeSharing();+ $('share-status').textContent = 'Enter ' + instructions.userCode + ' in the GitHub window. Closing this sign-in before linking leaves every board local.';+ popup.location.replace(instructions.verificationURL);+ sharing.timer = setTimeout(() => { sharingTask = pollSharing(); }, 250);+ } catch (error) {+ popup?.close();+ $('share-status').textContent = error.message;+ $('share-start').disabled = false;+ }+}++/** Open only core's transient device navigation in a separately authenticated HTML response, never a JSON URL. */+async function pairSharing(popup) {+ const base = hosted.local ? localReadBase : connection.base;+ const headers = hosted.local ? localReadHeaders : connection.headers;+ try {+ const html = await jsonRequest('/api/v1/view-link', { action: 'pairing', intentId: sharing.intentId }, base, headers, undefined, 'html');+ const destination = new DOMParser().parseFromString(html, 'text/html').querySelector('a')?.getAttribute('href');+ if (!destination) throw new Error('Phone pairing is no longer waiting. Read the sign-in status and start again if needed.');+ popup.location.replace(destination);+ } catch (error) { popup?.close(); $('share-status').textContent = error.message; }+}++$('share-start')?.addEventListener('click', () => {+ const popup = window.open('about:blank', '_blank');+ if (!popup) { $('share-panel').hidden = false; $('share-status').textContent = 'Allow this view to open the GitHub sign-in window, then try again.'; return; }+ popup.opener = null;+ sharingTask = beginSharing(popup);+});+$('share-close')?.addEventListener('click', () => { sharingTask = closeSharing(); });+$('share-pair')?.addEventListener('click', () => {+ const popup = window.open('about:blank', '_blank');+ if (!popup) { $('share-status').textContent = 'Allow this view to open the device-pairing window, then try again.'; return; }+ popup.opener = null;+ sharingTask = pairSharing(popup);+});++let relayEngine = null;+/** The account's linked boards: a same-origin read that declares the relay's engine, as every relay request does. */+// The account's last read and when it ended, answered or refused, for the star line, which reuses it rather than+// asking again (#817): a refusal is an answer too, "not linked", and is not asked again straight away.+let linkedSeen = null;+async function linkedList() {+ relayEngine ??= await import('/relay/engine.js').then((engine) => String(engine.ENGINE_VERSION), () => '');+ try {+ const reply = await jsonRequest('/api/v1/boards', undefined, '', relayEngine ? { 'x-pullboard-engine': relayEngine } : {}, 'no-store');+ linkedSeen = { at: Date.now(), reply };+ return reply;+ } catch (error) {+ linkedSeen = { at: Date.now(), reply: null };+ throw error;+ }+}++/**+ * Whether the signed-in person's linked boards name one this machine's list lacks: only then does the page need the+ * decrypting relay client. The metadata is a same-origin cookie-authenticated read, with none of this machine's local+ * credential.+ */+async function linkedBoardMissing(localIds) {+ const linked = await linkedList();+ return Boolean(linked.boards?.some(board => typeof board.id === 'string' && /^[0-9a-f]{32}$/.test(board.id) && typeof board.repository === 'string' && !localIds.has(board.id)));+}++/** Read this machine's API list and the signed-in relay list, preferring a local registration with the same id. */+async function listedBoards() {+ let local = { boards: [], warnings: [] };+ let relay = { boards: [], warnings: [] };+ const hasLocal = hosted.local ? Boolean(localReadBase) && Boolean(localSession) : transportModule === null;+ if (hasLocal) {+ try {+ local = await jsonRequest('/api/v1/boards', undefined, localReadBase, localReadHeaders, 'no-store');+ } catch (error) {+ // A local read that fails once, as while the view restarts, is no reason to load the relay client for a+ // person whose linked boards are all on this machine or who has none (#748).+ if (!transport && hosted.relaySession && configuredTransportModule) {+ try { if (await linkedBoardMissing(new Set())) await loadTransport(); } catch { /* Keep the local refusal when neither source can be read. */ }+ }+ if (!transport) throw error;+ localNote('local-failed', { detail: String(error.message || error) });+ }+ }+ if (hosted.local && hasLocal && hosted.relaySession && configuredTransportModule && !transport) {+ try {+ if (await linkedBoardMissing(new Set((local.boards || []).map(board => board.id)))) await loadTransport();+ } catch (error) { localNote('linked-failed', { detail: String(error.message || error) }); }+ }+ if (!hasLocal && transportModule && !transport) throw transportLoadError || new Error('The browser transport is still loading.');+ if (transport) {+ try { relay = await transport.request('/api/v1/boards'); }+ catch (error) {+ if (!hosted.local || !hasLocal) throw error;+ localNote('linked-failed', { detail: String(error.message || error) });+ }+ }+ boardSources.clear();+ localBoardIds.clear();+ const boards = [];+ for (const board of local.boards || []) {+ if (typeof board.id !== 'string') continue;+ const row = { ...board, source: 'local' };+ boardSources.set(row.id, { kind: 'local', board: row });+ localBoardIds.add(row.id);+ boards.push(row);+ }+ for (const board of relay.boards || []) {+ if (typeof board.id !== 'string' || boardSources.has(board.id)) continue;+ // A linked board reads by its own name, as it does locally, with its owner as a quiet prefix.+ const [owner, name] = String(board.name || '').includes('/') ? board.name.split('/') : ['', board.name];+ const row = { ...board, root: board.id, source: 'relay', name, owner };+ boardSources.set(row.id, { kind: 'relay', board: row });+ boards.push(row);+ }+ if (hosted.local) await hostedListed(boards);+ return { version: 1, boards, warnings: [...(local.warnings || []), ...(relay.warnings || [])] };+}++/** After a hosted board list: a list clears a state it stood in for, and a signed-in empty one says why it is empty. */+async function hostedListed(boards) {+ let shown = $('local-note').dataset.state || '';+ // A list that arrives after a failed read, once this computer's view answered, means the page recovered: the problem+ // it showed is over, and this list decides what shows now.+ if (shown === 'problem' && localReached) { localNote(null); shown = ''; }+ if (boards.length) { if (['looking', 'not-running', 'no-linked', 'unpaired', 'signed-out'].includes(shown)) localNote(null); return; }+ // Nobody signed in and no board on this computer yet: the page says how to make one, as the local view does.+ if (!hosted.relaySession) { if (shown === 'looking') localNote(null); return; }+ // An empty local view can still leave linked boards on another computer waiting for this browser to pair.+ if (!['', 'looking', 'not-running', 'no-linked', 'unpaired'].includes(shown)) return;+ let linked;+ try { linked = await linkedList(); } catch { return; /* the relay's banner says why */ }+ const names = (linked.boards || []).filter((board) => typeof board.repository === 'string').map((board) => board.repository);+ localNote(names.length ? 'unpaired' : 'no-linked', { linked: names });+}++/** Set presentation controls for the selected board; API routing still checks the target board independently. */+function syncBoardMode(root) {+ if (snapshot) return;+ const board = data?.projects.find((entry) => entry.root === root && entry.ok);+ const source = board && boardSources.get(board.id);+ const relay = source?.kind === 'relay';+ readOnly = hosted.local ? relay || (transportModule !== null && !source) : pageReadOnly;+ requests = hosted.local ? Boolean(relay && relayRequestsEnabled) : pageRequests;+ document.body.classList.toggle('read-only', readOnly);+ document.body.classList.toggle('requests', requests);+}++/** Whether a selected project is backed by the read-only relay transport. */+function relayProject(root = view.root) {+ const board = data?.projects.find((entry) => entry.root === root && entry.ok);+ return boardSources.get(board?.id)?.kind === 'relay';+}+/** 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 (!relayProject(root)) throw new Error('Person requests through the relay require a linked relay board.');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);@@ -747,22 +1542,28 @@ function renderPersonRequests(project) {/** A board's sidebar counts, derived from the same API state the page displays. */function boardSummary(board, state) {+ const needs = personNeeds(state);+ /** Count the calls, with draft rows retaining their individual count in the sidebar. */+ const calls = (kind) => needs.filter((row) => row.kind === kind).reduce((total, row) => total + (row.count ?? 1), 0);/** Count one item state for the sidebar. */const count = (test) => state.items.filter(test).length;return {...board, ok: true,+ releaseNotes: state.releaseNotes,building: count((item) => item.status === 'claimed'),awaiting: count((item) => item.status === 'submitted'),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' && !row.decision).length,- drafts: state.spec.filter((row) => row.status === 'draft' && !row.decision).length,- holds: state.holds.length,- decisions: state.decisions.length,+ pending: calls('pending'),+ drafts: calls('draft') + calls('rigor-draft'),+ holds: calls('hold'),+ laneHolds: state.holds,+ decisions: calls('decision'),// What each item's state reads from, so another repo's roadmap can show it as this board's// Items tab does, sent back included, and open it here.- items: state.items.map((item) => ({ id: item.id, title: item.title, status: item.status, merged: Boolean(item.merged), verdict: item.verdict && { decision: item.verdict.decision } })),+ items: state.items.map((item) => listFields(item)),+ agents: state.agents, events: state.events, milestones: state.milestones,};}@@ -776,6 +1577,11 @@ function flowMinutes(value) {return Math.floor(hours / 24) + ' d ' + hours % 24 + ' h';}+/** A queue's oldest item and how long it has waited, as the flow card reads it. */+function oldestLine(oldest) {+ return 'Oldest: ' + (oldest ? '#' + oldest.id + ' · ' + flowMinutes(oldest.ageMinutes) : 'none');+}+/** Render the four stages, live queues and single recommendation supplied by stats [N26]. */function proofFlowCard(flow) {if (!flow) return '';@@ -789,7 +1595,7 @@ function proofFlowCard(flow) {const queue = flow.queues[key];const oldest = queue.oldest;return '<div><span>' + label + ' queue</span><b data-queue="' + key + '" data-value="' + esc(queue.size) + '">' + esc(queue.size) + '</b>'- + '<small data-oldest="' + key + '" data-value="' + esc(oldest?.ageMinutes ?? '') + '">Oldest: ' + (oldest ? '#' + esc(oldest.id) + ' · ' + esc(flowMinutes(oldest.ageMinutes)) : 'none') + '</small></div>';+ + '<small data-oldest="' + key + '" data-value="' + esc(oldest?.ageMinutes ?? '') + '">' + esc(oldestLine(oldest)) + '</small></div>';}).join('');const bottleneck = flow.bottleneck;return '<div class="proof-stats-flow"><div class="proof-stats-grid">' + averages + waiting + '</div>'@@ -834,31 +1640,62 @@ function boardPath(root) {return '/api/v1/boards/' + encodeURIComponent(board.id);}-/** Compose the multi-repo page from the public board list and each board's public state. */-async function boardState(root, mark) {+/**+ * What the page last drew for a listed board, to stand in for it in a catch-up that does not read it: its sidebar+ * row, and its state when the page shows it. Nothing when the page has no such row, or shows the board without one.+ */+function lastRead(board, root) {+ const row = data?.projects.find((entry) => entry.root === board.root && entry.id === board.id && entry.ok);+ if (!row || row.loading) return null;+ const state = data.root === board.root ? data.project : data.group?.repos.find((repo) => repo.root === board.root)?.board ?? null;+ if (!state && (board.root === root || root === 'group:' + board.project)) return null;+ return { row: { ...row, ...board, ok: true }, state };+}++/** Group the listed repositories without waiting for their individual board states. */+function projectGroups(projects) {+ const grouped = new Map();+ for (const project of projects) {+ if (!project.project) continue;+ if (!grouped.has(project.project)) grouped.set(project.project, []);+ grouped.get(project.project).push(project);+ }+ // One repository shows once, without a heading that repeats its name.+ return [...grouped].filter(([, repos]) => repos.length > 1).map(([name, repos]) => ({ name, key: 'group:' + name, repos }));+}++/**+ * Compose the multi-repo page from the public board list and each board's public state. A catch-up names the boards+ * whose events arrived in fresh and reads only those; every other board keeps what the page last drew (#545).+ */+async function boardState(root, mark, fresh = null) {const listed = await api('/api/v1/boards');+ if (!data) {+ // Names are already known: a slow board must not leave the project picker blank.+ const projects = listed.boards.map((board) => ({ ...board, ok: true, loading: true }));+ projects.push(...(listed.warnings || []).map((warning) => ({ ...warning, ok: false, error: warning.error.error.message })));+ data = { root: null, project: null, group: null, projects, groups: projectGroups(projects) };+ renderSide();+ $('project-loading').hidden = projects.length === 0;+ }const states = new Map();const cursor = mark !== null && mark !== undefined && /^\d+$/.test(String(mark)) && Number.isSafeInteger(Number(mark)) ? Number(mark) : null;const projects = await Promise.all(listed.boards.map(async (board) => {+ const kept = fresh && !fresh.has(board.root) ? lastRead(board, root) : null;+ if (kept) {+ if (kept.state) states.set(board.root, kept.state);+ return kept.row;+ }try {- const query = board.root === root && cursor !== null ? '?seen=' + encodeURIComponent(cursor) : '';- const reply = await api('/api/v1/boards/' + encodeURIComponent(board.id) + '/state' + query);- states.set(board.root, reply.state);- return boardSummary(board, reply.state);+ const state = await boardRead(board, board.root === root ? cursor : null);+ states.set(board.root, state);+ return boardSummary(board, state);} catch (error) {return { ...board, ok: false, error: String(error.message || error) };}}));projects.push(...(listed.warnings || []).map((warning) => ({ ...warning, ok: false, error: warning.error.error.message })));- const grouped = new Map();- for (const project of projects) {- if (!project.project) continue;- if (!grouped.has(project.project)) grouped.set(project.project, []);- grouped.get(project.project).push(project);- }- // 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 groups = projectGroups(projects);const group = groups.find((entry) => entry.key === root);return {projects, groups, project: states.get(root) || null,@@ -866,13 +1703,105 @@ async function boardState(root, mark) {};}+// What each local board last sent this page, {state, sequence, version}: the base its next read asks to extend.+const sentStates = new Map();+// #552's delta applier, embedded as the server's own source, so the page applies a delta and recomputes nothing.+const applyStateDelta = (function applyStateDelta(state, delta) {+ const next = { ...state, ...delta.replace };+ for (const field of delta.remove ?? []) delete next[field];+ for (const [field, { key, set, ids }] of Object.entries(delta.merge)) {+ const entries = new Map((state[field] ?? []).map((entry) => [entry[key], entry]));+ for (const entry of set) entries.set(entry[key], entry);+ next[field] = (ids ?? (state[field] ?? []).map((entry) => entry[key])).map((id) => entries.get(id));+ }+ return next;+});++/**+ * Read one board's summary state. A local board the page read before asks only what changed since the state it holds+ * (#552) and applies that delta as sent; it loads a fresh snapshot only when the answer resets, as when the server no+ * longer keeps that base or the format changed (#555). Relay boards and snapshots have no deltas.+ */+async function boardRead(board, seen) {+ const path = '/api/v1/boards/' + encodeURIComponent(board.id) + '/state', mark = seen === null ? '' : 'seen=' + encodeURIComponent(seen);+ const local = !snapshot && localBoardIds.has(board.id), held = local ? sentStates.get(board.id) : null;+ if (held && Number.isSafeInteger(held.sequence)) {+ const reply = await api(path + '?since=' + held.sequence + (mark && '&' + mark) + (held.version === undefined ? '' : '&eventLogVersion=' + encodeURIComponent(held.version)));+ if (reply.delta) {+ const state = applyStateDelta(held.state, reply.delta);+ sentStates.set(board.id, { state, sequence: reply.sequence, version: reply.eventLogVersion });+ return state;+ }+ }+ const reply = await api(path + (mark && '?' + mark));+ if (local) sentStates.set(board.id, { state: reply.state, sequence: reply.state.sequence, version: reply.eventLogVersion });+ return reply.state;+}++/** Whether a board state already carries every item's detail, as exports and event replays do. */+const fullItems = (project) => project.items.every((item) => Array.isArray(item.history));++/** Text available locally for an item before the API searches criteria omitted from summaries. */+const searchedText = (item) => ('#' + item.id + ' ' + item.title + ' ' + item.lane + ' ' + item.specs.join(' ') + ' ' + (item.criterion || '')).toLowerCase();++/** Whether the board has a gap in its retained events or an item event newer than a detail read. */+function movedSince(project, id, cursor) {+ const events = project.events || [];+ if (!events.length || events[0].event_id <= cursor) return false;+ if (events.at(-1).event_id > cursor + 1) return true;+ return events.some((event) => event.event_id > cursor && event.item_id === id);+}++/** Load one opened item's omitted fields, retaining them only while its summary and event cursor stay current. */+function detailOf(project, item, ask, root = view.root) {+ if (Array.isArray(item.history)) return { item };+ const drawnRoot = view.root, key = root + '\n' + item.id, summary = JSON.stringify(item);+ const kept = itemDetails.get(key);+ /** Keep the prior detail visible during a refresh, or return the short initial loading state. */+ const waiting = (entry) => (entry?.shown ? { item: { ...item, ...entry.shown } } : { loading: true });+ if (kept?.loading) return waiting(kept);+ if (kept && kept.summary === summary && !movedSince(project, item.id, kept.cursor)) {+ return kept.error ? { error: kept.error } : { item: { ...item, ...kept.detail } };+ }+ if (!ask) return waiting(kept && { shown: kept.detail });+ const entry = { loading: true, summary, cursor: project.events?.[0]?.event_id ?? 0, detail: null, error: null, shown: kept?.detail ?? null };+ itemDetails.set(key, entry);+ detailRead = api(boardPath(root) + '/items/' + encodeURIComponent(String(item.id))).then((reply) => { entry.detail = reply.item; },+ (error) => { entry.error = String(error.message || error); }).finally(() => {+ entry.loading = false;+ if (view.root === drawnRoot && ((root === view.root && view.item === item.id) || view.tab === 'roadmap')) render();+ });+ return waiting(entry);+}++/** Search full snapshots locally and summary states through the API, once per query and board. */+function searchIds(project, words) {+ const query = words.trim().toLowerCase();+ const local = new Set(project.items.filter((item) => searchedText(item).includes(query)).map((item) => item.id));+ if (!query || fullItems(project) || data.root !== view.root) return local;+ const root = view.root, key = root + '\n' + query;+ const kept = itemSearches.get(key);+ if (kept) return kept.ids || local;+ const entry = { ids: null };+ itemSearches.set(key, entry);+ api(boardPath(root) + '/items?q=' + encodeURIComponent(query)).then((reply) => {+ entry.ids = new Set(reply.ids);+ if (view.root !== root || $('q').value.trim().toLowerCase() !== query) return;+ render();+ if (!$('find-results').hidden) showFound();+ }, () => {+ if (itemSearches.get(key) === entry) itemSearches.delete(key);+ });+ return local;+}+// 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);+ region.hidden = snapshot || readOnly;if (region.hidden) { region.innerHTML = ''; return; }const state = credentials.get(view.root);/** Render an inventory timestamp without shortening its date or timezone. */@@ -886,7 +1815,7 @@ function renderCredentials() {/** Load this board's public metadata on demand, without granting any person authority. */async function loadCredentials(root = view.root) {- if (snapshot || readOnly || transportModule) return;+ if (snapshot || relayProject(root) || (!hosted.local && pageReadOnly)) return;const state = credentials.get(root) || { tokens: [], message: '', busy: false };credentials.set(root, state);state.message = 'Loading agent credentials…';@@ -901,7 +1830,7 @@ async function loadCredentials(root = view.root) {/** 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;+ if (snapshot || relayProject(view.root) || (!hosted.local && pageReadOnly)) 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;@@ -918,13 +1847,44 @@ async function revokeCredential(id) {if (root === view.root) renderCredentials();}-/** Refresh from API v1 and discard a response for a project the person already left. */-async function refresh() {+/**+ * A board read as text with its clock readings blanked: the flow's observation time (asOf) and each queue's oldest age+ * (ageMinutes) are stamped afresh on every read, so two reads that differ only there show the same board (#644).+ * Matching whole JSON keys is safe: a quote inside any string value is escaped, so no title can look like one.+ */+function boardText(state) {+ return JSON.stringify(state).replace(/"(asOf|ageMinutes)":(?:"[^"]*"|[-+.0-9eE]+|null)/g, '"$1":null');+}++/** Show each queue's oldest age from the board on hand in place: the one thing on the page that moves with the clock alone. */+function showFlowAges() {+ const flow = data?.project?.proofStats?.flow;+ if (!flow) return;+ for (const node of document.querySelectorAll('#proof-stats [data-oldest]')) {+ const oldest = flow.queues[node.dataset.oldest]?.oldest;+ node.dataset.value = oldest?.ageMinutes ?? '';+ node.textContent = oldestLine(oldest);+ }+}++/** Refresh from API v1, every board or only those in fresh, and discard a response for a project the person left. */+async function refresh(fresh = null) {+ const generation = ++refreshStarted;const root = view.root;const mark = root ? view.seen['pb.seen.' + root] ?? keep('pb.seen.' + root) : null;- const next = await boardState(root, mark);+ const next = await boardState(root, mark, fresh);// The person switched projects while this answer was on its way: the switch's own refresh shows it.if (root !== view.root) return;+ // A board left and opened again: an answer that started before one already drawn is older than it, so it is not+ // drawn over it. When it read every board and the newer one read only some, the rest are read once more.+ if (generation < refreshDrawn.generation) {+ if (!fresh && !refreshDrawn.full) { catchEvery = true; catchUp(); }+ return;+ }+ // Only a read of every board can say the shown project is gone and choose another. A catch-up that could not read+ // the shown board, as while the view restarts, failed; it keeps the board and the page says it is offline.+ if (fresh && !next.project && !next.group) throw new Error('the board did not answer; is pullboard view still running?');+ refreshDrawn = { generation, full: !fresh };if (!next.project && !next.group && next.projects.some((p) => p.ok)) {view.root = next.projects.find((p) => p.ok).root;keep('pb.project', view.root);@@ -944,12 +1904,21 @@ async function refresh() {if (place) applyPlace(place, globalThis.history?.state);addressReady = true;}- const text = JSON.stringify(next);+ const text = boardText(next);const changed = text !== seen;if (text !== seen) {seen = text;data = next;+ syncBoardMode(view.root);+ itemSearches.clear();+ const reading = detailRead;render();+ if (detailRead !== reading) await detailRead;+ } else if (data !== next) {+ // The same board read again: keep its newest clock readings and show them in place, with no redraw (#644).+ data = next;+ showFlowAges();+ tickAges();}if (changed) {address(false);@@ -961,9 +1930,204 @@ async function refresh() {snapshotReplay.index = snapshotReplay.events.length;replayControls();}- $('live').textContent = snapshot ? 'read-only snapshot' : '';+ if (!snapshot) follow();+ $('live').textContent = snapshot ? 'read-only snapshot' : liveLine();+ sharingReady ??= sharingInvitation();+}++// The local view follows the shown boards' events instead of a timer (#545): it reads the board once, waits on its+// events after that read's latest one, and reads again only when an event or the stream's changed signal (#554)+// arrives, so a page whose boards are quiet makes no requests. The relay transport keeps its own stream.+// A page holds at most one stream: Chrome allows six connections per host, a held stream keeps one for good, and the+// catch-up read needs the rest. Six held streams, one per repo of a group, left none, and the page waited forever for+// its own read. So a group follows every repo it shows through one multiplexed stream (#600).+let stream = null;+let catching = null;+let catchAgain = false;+let catchWhenShown = false;+// The boards whose events arrived since the last catch-up, or every board when a message names none.+const catchRoots = new Set();+let catchEvery = false;+/** How often a page with no live stream reads its board instead, until the stream is back. */+const FALLBACK_MS = 15000;++/** Whether this browser reads a response as it arrives; one that cannot keeps only the fallback refresh. */+const canStream = () => typeof AbortController === 'function' && typeof ReadableStream === 'function' && typeof TextDecoderStream === 'function';++/** The latest event a board state already shows; its events are newest first. */+const latestEvent = (state) => Number(state?.events?.[0]?.event_id ?? 0);++/** Whether the page's stream is up or opening, so nothing needs a timed read. */+const connected = () => Boolean(stream) && stream.status !== 'down';++/** Say nothing while the page's stream is up, and why the page is not live while it is down. */+function liveLine() {+ if (!stream || stream.status !== 'down') return '';+ if (stream.offline) return 'offline: is pullboard view still running?';+ return (canStream() ? 'reconnecting' : 'no live stream in this browser') + ': refreshing every ' + FALLBACK_MS / 1000 + 's';+}++/** Stop following a board: close its stream and any retry waiting to reopen it. */+function unfollow() {+ if (!stream) return;+ stream.controller?.abort();+ clearTimeout(stream.retry);+ stream = null;}+/**+ * Follow every board the page shows, the board or each repo of a group, on one stream that starts each board after+ * the state just read. Every catch-up reads every board, so the sidebar's boards update with it and on a project+ * switch, without a stream of their own.+ */+function follow() {+ const repos = data.group ? data.group.repos.map((repo) => [repo.root, repo.board]) : data.project ? [[view.root, data.project]] : [];+ const boards = repos.flatMap(([root, state]) => {+ const board = data.projects.find((entry) => entry.root === root && entry.ok);+ return board && localBoardIds.has(board.id) ? [{ root, id: board.id, shown: latestEvent(state) }] : [];+ });+ const key = boards.map((board) => board.id).join(',');+ // A board's events after the latest one this page shows are what changed it since.+ if (stream && boards.length && stream.key === key) {+ for (const board of boards) { const kept = stream.boards.find((entry) => entry.id === board.id); kept.shown = Math.max(kept.shown, board.shown); }+ return;+ }+ unfollow();+ if (!boards.length) return;+ // One board's cursor is its latest event; a group's names each board's latest event, as #600 resumes them.+ const cursor = boards.length === 1 ? String(boards[0].shown) : boards.map((board) => board.id + ':' + board.shown).join(',');+ stream = { key, boards, cursor, status: 'opening', offline: false, failures: 0, controller: null, retry: 0 };+ void listen(stream);+}++/** Read one server-sent message: its event name, its data and its id, as sent. */+function streamMessage(block) {+ const message = { event: 'message', data: '', id: null };+ for (const line of block.split('\n')) {+ if (!line || line.startsWith(':')) continue;+ const colon = line.indexOf(':');+ const field = colon < 0 ? line : line.slice(0, colon);+ const value = colon < 0 ? '' : line.slice(colon + 1).replace(/^ /, '');+ if (field === 'event') message.event = value;+ else if (field === 'data') message.data += (message.data ? '\n' : '') + value;+ else if (field === 'id' && !value.includes('\0')) message.id = value;+ }+ return message;+}++/**+ * The board a message changed, by root: an event after the latest one that board shows, or its changed signal, sent+ * when the board changes without a move (#554). Undefined when the page already shows it, and null, for every board,+ * when a message names no board this stream follows, as a warning does. A group's stream names each event's board+ * (#600); a single board's stream is that board's.+ */+function streamChange(entry, message) {+ if (!message.data && message.event === 'message') return undefined;+ let body = null;+ try { body = JSON.parse(message.data); } catch { return null; }+ const board = entry.boards.length === 1 ? entry.boards[0] : entry.boards.find((candidate) => candidate.id === body?.board);+ if (!board || !body?.event) return null;+ const id = Number(body.event.event_id);+ if (!Number.isSafeInteger(id)) return board.root;+ return id > board.shown ? board.root : undefined;+}++/** The boards a shown board's milestones name, by root: its Roadmap reads their items, so its catch-up reads them. */+function namedBoards(root) {+ const state = data?.root === root ? data.project : data?.group?.repos.find((repo) => repo.root === root)?.board;+ const names = new Set((state?.milestones || []).flatMap((milestone) => milestone.items || []).map((entry) => /^(.+)#[1-9]\d*$/.exec(String(entry.id))?.[1]).filter(Boolean));+ return (data?.projects || []).filter((row) => names.has(row.name) || names.has(String(row.root).split('/').pop())).map((row) => row.root);+}++/** The rule and next step a stream's refusal carries. */+function streamRefusal(data) {+ try {+ const refusal = JSON.parse(data).error;+ return refusal && typeof refusal === 'object' ? '[' + refusal.code + '] ' + refusal.message : String(refusal || 'the board stream refused this view');+ } catch { return 'the board stream refused this view'; }+}++/**+ * Hold one board's event stream open, and read the board when its events say it changed. When the stream ends or+ * fails, try again with Last-Event-ID, waiting longer after each failure; the fallback refresh covers the gap.+ */+async function listen(entry) {+ const controller = canStream() ? new AbortController() : null;+ entry.controller = controller;+ try {+ if (!controller) throw new Error('this browser cannot read a stream');+ // Local board streams use the local view's base and credential, separate from the relay client's own streams.+ // One board has its own events; a group's local repos share one multiplexed stream (#600).+ const single = entry.boards.length === 1;+ const path = localReadBase + (single ? '/api/v1/boards/' + encodeURIComponent(entry.boards[0].id) + '/events'+ : '/api/v1/events?boards=' + entry.boards.map((board) => encodeURIComponent(board.id)).join(','));+ const res = await fetch(path, {+ headers: { ...localReadHeaders, accept: 'text/event-stream', 'last-event-id': entry.cursor }, cache: 'no-store', signal: controller.signal,+ });+ // This machine's view refused the hosted page's secret, as after a restart with a new one: go round again (#513).+ if ((res.status === 401 || res.status === 403) && localSession && localReadBase === localSession.origin) { localExpired(); return; }+ if (!res.ok || !res.body) throw new Error('the board stream answered ' + res.status);+ entry.status = 'up';+ entry.offline = false;+ entry.failures = 0;+ $('live').textContent = liveLine();+ // A change with no event made before the stream opened, such as a SPEC.md edit after the snapshot was read or+ // while a dropped stream was down, is not replayed by Last-Event-ID, and the stream's changed signal starts after+ // it. So each time the stream opens, the page reads its boards once.+ for (const board of entry.boards) catchRoots.add(board.root);+ catchUp();+ const reader = res.body.pipeThrough(new TextDecoderStream()).getReader();+ let buffer = '';+ for (;;) {+ const { value, done } = await reader.read();+ if (done) break;+ buffer += value;+ let moved = false;+ for (let end = buffer.indexOf('\n\n'); end >= 0; end = buffer.indexOf('\n\n')) {+ const message = streamMessage(buffer.slice(0, end));+ buffer = buffer.slice(end + 2);+ if (message.event === 'error') throw new Error(streamRefusal(message.data));+ if (message.id !== null) entry.cursor = message.id;+ const change = streamChange(entry, message);+ if (change === undefined) continue;+ if (change === null) catchEvery = true; else catchRoots.add(change);+ moved = true;+ }+ // One read covers every event that arrived together.+ if (moved) catchUp();+ }+ throw new Error('the board stream ended');+ } catch (error) {+ if (controller?.signal.aborted || stream !== entry) return;+ entry.status = 'down';+ // A request that never reached the view is a TypeError; a refusal or an ended stream is not.+ entry.offline = error instanceof TypeError;+ entry.failures += 1;+ $('live').textContent = liveLine();+ if (controller) entry.retry = setTimeout(() => { if (stream === entry) void listen(entry); }, Math.min(FALLBACK_MS, 1000 * 2 ** Math.min(entry.failures - 1, 4)));+ }+}++/**+ * The one catch-up function: bring the page up to date after the events that arrived, one read at a time, by reading+ * what changed in each board they named since the state it holds (#555, through boardRead). A hidden page catches up+ * when it is shown.+ */+function catchUp() {+ if (document.hidden) { catchWhenShown = true; return; }+ if (catching) { catchAgain = true; return; }+ if (!catchEvery && !catchRoots.size) return;+ const fresh = catchEvery ? null : new Set(catchRoots);+ for (const root of catchEvery ? [] : catchRoots) for (const named of namedBoards(root)) fresh.add(named);+ catchEvery = false;+ catchRoots.clear();+ catching = refresh(fresh).catch(() => { $('live').textContent = 'offline: is pullboard view still running?'; }).finally(() => {+ catching = null;+ if (catchAgain) { catchAgain = false; catchUp(); }+ });+}+document.addEventListener('visibilitychange', () => { if (!document.hidden && catchWhenShown) { catchWhenShown = false; catchUp(); } });+/** Display the current event and make the replay's play, pause and end states explicit. */function replayControls() {const r = snapshotReplay;@@ -1088,8 +2252,8 @@ function renderSide() {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;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 line = x.loading ? 'Loading…' : (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">' + (x.owner ? '<span class="owner">' + esc(x.owner) + '/</span>' : '') + esc(x.name) + '</span><small>' + (hosted.local && x.source ? '<span class="src">' + (x.source === 'relay' ? 'shared' : 'this computer') + '</span> · ' : '') + line + '</small></button>';};const groupedRoots = new Set(data.groups.flatMap((group) => group.repos.map((repo) => repo.root)));const grouped = data.groups.map((group) => {@@ -1102,7 +2266,8 @@ function renderSide() {$('proj-list').innerHTML = grouped || loose ? grouped + loose : '<div class="empty">None yet.</div>';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');+ const selectedRepo = data.projects.find((x) => x.root === view.root);+ $('proj-name').textContent = selectedGroup?.name || selectedRepo?.name || (p ? p.root.split('/').pop() : 'No project');// The browser tab says it too, for when the view sits behind other tabs.const needs = data.projects.reduce((n, x) => n + needCount(x), 0);document.title = p || selectedGroup ? (needs ? '(' + needs + ') ' : '') + $('proj-name').textContent + ' · Pullboard' : 'Pullboard';@@ -1111,21 +2276,22 @@ function renderSide() {/** Escape plain text while preserving safe item and code-preview links.* @param {string} text* @param {Map<string, string>} titles- * @param {boolean} allowLinks+ * @param {boolean|'in-place'} allowLinks* @returns {string}*/function linked(text, titles, allowLinks = true, root = view.root) { 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)) : codeChip(part);+ if (n % 2 && part[0] !== '#') return allowLinks === true ? codeRef(part, parts.slice(0, n).join('').split('\n').pop().slice(-2000)) : codeChip(part);const id = /^#\d+$/.test(part) ? String(Number(part.slice(1))) : '';+ if (id && allowLinks === 'in-place') return '<span class="ref"' + (titles.has(id) ? ' title="' + esc(titles.get(id)) + '"' : '') + '>' + esc(part) + '</span>';return id && allowLinks ? '<a class="ref" href="' + esc(itemAddress(id, root)) + '" data-go="item:' + id + '"' + (root === view.root ? '' : ' data-board="' + esc(root) + '"') + (titles.has(id) ? ' title="' + esc(titles.get(id)) + '"' : '') + '>' + esc(part) + '</a>' : esc(part);}).join(''); }/** Format inline code and recognized command tokens without interpreting markup.* @param {string} text* @param {Map<string, string>} titles- * @param {boolean} allowLinks+ * @param {boolean|'in-place'} allowLinks* @returns {string}*/- function inline(text, titles, allowLinks = true, root = view.root) { return String(text ?? '').split(/(`[^`]*`|(?:[^\s:@()[\]{}"'`]+)?:\d+(?:-\d+)?@[0-9a-f]{0,40}|pullboard (?:hook pre-merge-commit|join coordinator|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) => {+ function inline(text, titles, allowLinks = true, root = view.root) { return String(text ?? '').split(/(`[^`]*`|(?:[^\s:@()[\]{}"'`]+)?:\d+(?:-\d+)?@[0-9a-f]{0,40}|pullboard (?:hook pre-merge-commit|blueprint starters|join coordinator|milestone remove|prompt decompose|spec signers add|hook commit-msg|hook pre-commit|milestone items|milestone order|blueprint save|doctrine check|milestone edit|milestone move|milestone ship|prompt signoff|blueprint add|blueprint fit|hook pre-push|milestone add|prompt review|prompt verify|relay devices|relay recover|spec fit edit|check accept|relay revoke|relay status|relay tokens|spec approve|spec decline|spec signers|spec signoff|prompt plan|rigor draft|spec answer|view export|relay join|relay pair|runner add|spec apply|spec check|spec draft|spec unmet|blueprint|decisions|lifecycle|milestone|relay off|resources|spec show|spec view|doctrine|escalate|lane add|refreeze|relay on|settings|spec fit|takeover|withdraw|worktree|release|roadmap|version|answer|digest|doctor|export|forget|health|import|ledger|merged|prompt|reopen|resume|runner|skills|status|submit|verify|whoami|check|claim|hooks|inbox|lanes|relay|rigor|serve|shout|stats|sweep|watch|done|edit|fact|gate|help|hold|hook|init|join|land|lane|list|next|pass|show|spec|tour|view|add|log|mcp|run|why)(?![\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('');@@ -1139,10 +2305,10 @@ function renderSide() {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));+ if (allowLinks === true && validRef) return codeRef(part, textBefore.slice(-2000));return codeChip(part);}- if (/^(?:pullboard (?:hook pre-merge-commit|join coordinator|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 (/^(?:pullboard (?:hook pre-merge-commit|blueprint starters|join coordinator|milestone remove|prompt decompose|spec signers add|hook commit-msg|hook pre-commit|milestone items|milestone order|blueprint save|doctrine check|milestone edit|milestone move|milestone ship|prompt signoff|blueprint add|blueprint fit|hook pre-push|milestone add|prompt review|prompt verify|relay devices|relay recover|spec fit edit|check accept|relay revoke|relay status|relay tokens|spec approve|spec decline|spec signers|spec signoff|prompt plan|rigor draft|spec answer|view export|relay join|relay pair|runner add|spec apply|spec check|spec draft|spec unmet|blueprint|decisions|lifecycle|milestone|relay off|resources|spec show|spec view|doctrine|escalate|lane add|refreeze|relay on|settings|spec fit|takeover|withdraw|worktree|release|roadmap|version|answer|digest|doctor|export|forget|health|import|ledger|merged|prompt|reopen|resume|runner|skills|status|submit|verify|whoami|check|claim|hooks|inbox|lanes|relay|rigor|serve|shout|stats|sweep|watch|done|edit|fact|gate|help|hold|hook|init|join|land|lane|list|next|pass|show|spec|tour|view|add|log|mcp|run|why)(?![\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, root);@@ -1221,7 +2387,7 @@ function renderGroup(group) {$('group-needs').innerHTML = needs.length ? needs.map((row) => {const titles = new Map(row.repo.board.items.map((item) => [String(item.id), item.title]));const text = rich(row.text, titles, true, row.repo.root);- return '<div class="group-need"><b>' + esc(row.repo.name) + '</b><code>' + esc(row.ref) + '</code><span>' + text + '</span><button data-root="' + esc(row.repo.root) + '" type="button"><em>' + esc(row.what) + (row.at ? ', ' + age(row.at) : '') + ' →</em></button></div>';+ return '<div class="group-need"><b>' + esc(row.repo.name) + '</b><code>' + esc(row.ref) + '</code><span>' + text + '</span><button data-root="' + esc(row.repo.root) + '" type="button"><em>' + esc(row.kind === 'pending' ? 'answer ' + row.ref : row.what) + (row.at ? ', ' + age(row.at) : '') + ' →</em></button></div>';}).join('') : '<div class="empty">Nothing needs you across this project.</div>';const events = group.repos.flatMap((repo) => {const titles = new Map(repo.board.items.map((item) => [String(item.id), item.title]));@@ -1243,6 +2409,10 @@ function milestoneItem(entry, p) {const root = local ? view.root : named.length === 1 && named[0].ok ? named[0].root : null;const id = local ? entry.id : ref ? Number(ref[2]) : null;const item = (root === view.root ? p.items : root ? named[0].items : []).find((i) => i.id === id) || null;+ const source = root === view.root ? p : root ? named[0] : null;+ const label = local ? '#' + entry.id : String(entry.id);+ const expanded = view.tab === 'roadmap' && view.roadmapOpen.get(JSON.stringify([view.root, 'i:' + label])) === true;+ const detail = item && expanded ? detailOf(source, item, true, root) : null;// A status the lifecycle declares; the roadmap says unavailable or missing for an item it could not read.const read = item || (FLOW.states.some((state) => state.id === entry.status) ? { status: entry.status, verdict: null } : null);return {@@ -1251,7 +2421,14 @@ function milestoneItem(entry, p) {root,titles: new Map((root === view.root ? p.items : root ? named[0].items : []).map((i) => [String(i.id), i.title])),state: read ? stateOf(read) : null,- stage: item ? pipelineStage(item) : entry.status,+ stale: item ? staleChip(item) : '',+ block: item ? roadmapBlock(detail?.item || item, {+ holds: root === view.root ? source.holds : source.laneHolds, items: source.items, name: (id) => agentName(id, source), time: when, state: stateOf,+ address: (id) => itemAddress(id, root), board: root === view.root ? null : root,+ releases: (p.milestones || []).filter((milestone) => milestone.items.some((ref) => ref.id === entry.id)).map((milestone) => milestone.name),+ loading: detail?.loading, error: detail?.error,+ }) : null,+ stage: entry.state === 'landed' ? 'merged' : entry.state === 'accepted' ? 'accepted' : item ? pipelineStage(item) : entry.status,word: entry.status,open: item ? { root, id } : null,// Why an item does not open, short enough to read beside its id on a phone.@@ -1288,6 +2465,11 @@ function jumpToRoadmap(key) {}const target = $('roadmap-list')?.querySelector('[data-key="' + CSS.escape(key) + '"]');if (!target) return;+ const topbar = document.querySelector('.top');+ if (matchMedia('(max-width: 900px)').matches && topbar) {+ // The Roadmap scrolls in the document viewport; use the wrapped sticky bar's actual lower edge, not its minimum height.+ target.style.scrollMarginTop = Math.ceil(topbar.getBoundingClientRect().bottom + 16) + 'px';+ } else target.style.removeProperty('scroll-margin-top');target.scrollIntoView({ block: 'start', behavior: matchMedia('(prefers-reduced-motion: reduce)').matches ? 'instant' : 'smooth' });target.classList.remove('roadmap-arrival');void target.offsetWidth;@@ -1299,41 +2481,54 @@ function jumpToRoadmap(key) {/*** One item's row on the Roadmap, laid out as the Items list lays one out: the dot of its state, its* id and title on one line that ends in an ellipsis when cut, and the Items tab's chip. The whole- * title is the row's tooltip. An item that opens is a button; one that cannot says why instead.+ * title is the row's tooltip. Every row expands in place; its compact detail alone links over to Items.*/function milestoneRow(row, titles) {- const title = row.title ? inline(String(row.title).replace(/\s+/g, ' '), row.titles || titles, true, row.root) : '<span class="muted">' + esc(row.why) + '</span>';- const inner = '<span class="dot' + (row.state ? ' ' + row.state : '') + '"></span><span class="t"><span class="id">' + esc(row.label) + '</span>' + title + '</span>' + (row.state ? chip(row.state) : '<span class="chip">' + esc(row.word) + '</span>');- if (!row.open) return '<li><div class="milestone-item" title="' + esc(row.title ? row.title + ' (' + row.why + ')' : row.why) + '">' + inner + '</div></li>';- const attributes = 'class="milestone-item" data-go="item:' + row.open.id + '"' + (row.open.root === view.root ? '' : ' data-board="' + esc(row.open.root) + '"') + ' title="' + esc(row.title) + '"';- // A title with its own links needs a separate containing control, never a nested button.- return title.includes('class="ref"')- ? '<li><div ' + attributes + ' role="button" tabindex="0">' + inner + '</div></li>'- : '<li><button ' + attributes + ' type="button">' + inner + '</button></li>';+ const title = row.title ? inline(String(row.title).replace(/\s+/g, ' '), row.titles || titles, 'in-place', row.root) : '<span class="muted">' + esc(row.why) + '</span>';+ const label = '<span class="id">' + esc(row.label) + '</span>' + title;+ const text = row.block?.dot ? '<span class="milestone-title">' + label + '</span>' + row.block.dot : label;+ const key = 'i:' + row.label, open = view.roadmapOpen.get(JSON.stringify([view.root, key])) === true;+ const status = (open && row.block?.dot ? '<span class="chip warn roadmap-blocked"><svg aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6"><rect x="5" y="10" width="14" height="11" rx="2"/><path d="M8 10V7a4 4 0 0 1 8 0v3"/></svg>blocked</span>' : '') + (row.stage === 'merged' ? '<span class="chip ok roadmap-landed">verified</span>' : row.stage === 'accepted' ? '<span class="chip ok">accepted</span>' : row.state ? chip(row.state) : '<span class="chip">' + esc(row.word) + '</span>');+ const inner = '<span class="dot' + (row.state ? ' ' + row.state : '') + '"></span><span class="t">' + text + '</span>' + (row.stale || '') + '<span class="roadmap-status">' + status + '</span>';+ const board = row.open && row.open.root !== view.root ? ' data-board="' + esc(row.open.root) + '"' : '';+ const toggle = 'class="milestone-item' + (row.block?.dot ? ' blocked' : '') + '" data-roadmap-key="' + esc(key) + '" aria-expanded="' + open + '"' + board + ' title="' + esc(row.title ? row.title + (!row.open && row.why ? ' (' + row.why + ')' : '') : row.why) + '"';+ const detail = row.block ? row.block.detail : '<p>' + esc(row.why || row.word) + '</p>';+ // Every row stays on the Roadmap; only its explicit Open in Items link navigates (#605).+ return '<li><div ' + toggle + ' role="button" tabindex="0">' + inner + '</div>'+ + '<div class="milestone-why"' + (open ? '' : ' hidden') + '>' + detail + '</div></li>';}-/** Read a release once using the same terminal-item rule in the Roadmap and status bar. */+/** Read supplied landed counts and explicit shipments; keep old exports readable and omit withdrawn rows. */function readMilestone(milestone, p) {- const rows = milestone.items.map((entry) => milestoneItem(entry, p));- const done = rows.filter((row) => row.state === 'verified').length;- // A nonempty release has no work left when every item is verified or withdrawn.- return { milestone, rows, done, shipped: rows.length > 0 && rows.every((row) => row.state === 'verified' || row.state === 'withdrawn') };+ const visible = milestone.items.map((entry) => milestoneItem(entry, p)).filter((row) => row.state !== 'withdrawn');+ const verified = visible.filter((row) => row.state === 'verified');+ const rows = visible.filter((row) => row.state !== 'verified').concat(verified);+ // Current API milestones own their landed count and explicit shipment. Old exports retain their old count.+ /** Reject malformed snapshot counts before they reach numeric HTML attributes. */+ const numeric = value => Number.isInteger(value) && value >= 0 ? value : null;+ const done = numeric(milestone.summary?.landed) ?? numeric(milestone.landed) ?? verified.length;+ const total = numeric(milestone.summary?.total) ?? numeric(milestone.total) ?? rows.length;+ // Nothing left (every item landed or withdrawn) is finished and sits under Shipped, shipped or not (the person, 18 Oct).+ const left = numeric(milestone.summary?.left), finished = milestone.items.length > 0 && (left !== null ? left === 0 : rows.every((row) => row.stage === 'merged'));+ const shipped = finished || (milestone.shipped !== undefined ? Boolean(milestone.shipped) : rows.length > 0 && verified.length === rows.length);+ return { milestone, rows, done, total, shipped };}/** Pick the first release with remaining work in roadmap order; empty plans wait behind it. */function nextMilestone(p) {- return (p.milestones || []).find((milestone) => {+ const next = (p.milestones || []).find((milestone) => {const read = readMilestone(milestone, p);return read.rows.length > 0 && !read.shipped;});+ if (!next) return next;+ const read = readMilestone(next, p);+ return { ...next, done: read.done, total: read.total };}/**- * The Roadmap (N26, N38) leads with what ships next: every milestone with work still to verify, in the board's order,- * open by default; then one Shipped section, folded, holding nonempty milestones with only verified or withdrawn items, newest- * first, each a line with its name, its item count and its note's first line. A milestone opens to a card as before:- * how many of its items are verified as a count and a bar, a row for each, and the note to the person in its own- * highlighted line; one with no items says so. Each part stays open or closed as the person left it.+ * The Roadmap (N26, N38) opens releases with work left in board order and folds shipped or finished ones into Shipped.+ * Headers show the backend's summary; accepted and landed rows stay distinct; shipped history carries its commit; old+ * exports keep their legacy completion rule; each part keeps the person's disclosure choice for this visit.*/function roadmapCards(p, titles) {// Opened from the status bar's release, the Roadmap is that release alone, with a way back to all of them.@@ -1341,36 +2536,47 @@ function roadmapCards(p, titles) {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>' : '';const read = milestones.map((milestone) => readMilestone(milestone, p));- const coming = read.filter((m) => !m.shipped && m.rows.length).concat(read.filter((m) => !m.rows.length)), shipped = read.filter((m) => m.shipped).reverse();+ const coming = read.filter((m) => !m.shipped && m.rows.length).concat(read.filter((m) => !m.shipped && !m.rows.length)), shipped = read.filter((m) => m.shipped).reverse();/** Preserve each board's disclosure choices independently. */const isOpen = (key, first) => view.roadmapOpen.has(JSON.stringify([view.root, key])) ? view.roadmapOpen.get(JSON.stringify([view.root, key])) : first;- const caret = '<span class="caret" aria-hidden="true"></span>';+ const caret = '<svg class="caret" aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="m9 6 6 6-6 6"/></svg>'; // The view's stroke chevron, set inside the title to centre on its first line (#870).const next = coming.find((m) => m.rows.length) || null;- const stages = [['open', 'Open'], ['claimed', 'Building'], ['submitted', 'In review'], ['accepted', 'Accepted'], ['merged', 'Verified']];- const counts = Object.fromEntries(stages.map(([stage]) => [stage, next ? next.rows.filter((row) => row.stage === stage).length : 0]));- const shippingCounts = '<dl class="roadmap-stage-counts">' + stages.map(([stage, label]) => '<div data-shipping-stage="' + stage + '"><dt>' + label + '</dt><dd>' + counts[stage] + '</dd></div>').join('') + '</dl>';+ const headerFor = roadmapHeaders(roadmapSummary, { time: when, address: itemAddress, root: view.root });+ const stages = [['open', 'Open'], ['claimed', 'Building'], ['submitted', 'In review'], ['accepted', 'Accepted'], ['merged', 'Landed']];+ const counts = headerFor(next) ? null : Object.fromEntries(stages.map(([stage]) => [stage, next ? next.rows.filter((row) => row.stage === stage).length : 0]));+ const shippingCounts = headerFor(next)+ ? '<dl class="roadmap-stage-counts">' + [['landed','Landed'],['landing','Accepted, landing'],['review','In review'],['building','Building'],['waiting','Waiting'],['held','Held']].map(([key,label]) => '<div data-shipping-stage="' + key + '"><dt>' + label + '</dt><dd>' + next.milestone.summary[key] + '</dd></div>').join('') + '</dl>'+ : '<dl class="roadmap-stage-counts">' + stages.map(([stage, label]) => '<div data-shipping-stage="' + stage + '"><dt>' + label + '</dt><dd>' + counts[stage] + '</dd></div>').join('') + '</dl>';const lastShipped = '<p class="roadmap-last-shipped"><span>Last shipped</span><b>' + esc(shipped[0]?.milestone.name || 'None yet') + '</b>'+ (shipped[0]?.milestone.note ? '<small>' + esc(firstLine(shipped[0].milestone.note)) + '</small>' : '') + '</p>';const mobileShipping = '<section class="roadmap-shipping roadmap-mobile-shipping" aria-label="Shipping counts">' + shippingCounts + lastShipped + '</section>';- /** Keep the existing verified-item count beside an upcoming release. */- const count = (m) => m.rows.length ? '<span class="milestone-count">' + m.done + '/' + m.rows.length + ' done</span>' : '';+ const mobileHistory = '<section class="roadmap-shipping roadmap-mobile-shipping" aria-label="Last shipped release">' + lastShipped + '</section>';+ /** Keep supplied landed progress beside an upcoming release without a modern summary. */+ const count = (m) => m.total ? '<span class="milestone-count" aria-label="' + m.done + '/' + m.total + ' landed">' + m.done + '/' + m.total + ' landed</span>' : '';/** Render the existing milestone items, progress and complete note when opened. */- const body = ({ milestone, rows, done }) => (rows.length- ? '<svg class="milestone-progress" viewBox="0 0 100 1" preserveAspectRatio="none" role="progressbar" aria-label="' + esc(milestone.name) + ': ' + done + ' of ' + rows.length + ' done" aria-valuemin="0" aria-valuemax="' + rows.length + '" aria-valuenow="' + done + '"><rect width="' + Math.round((100 * done) / rows.length) + '" height="1"/></svg><ul>' + rows.map((row) => milestoneRow(row, titles)).join('') + '</ul>'- : '<p class="milestone-empty">No items yet.</p>')- + (milestone.note ? '<p class="milestone-note">' + rich(milestone.note, titles) + '</p>' : '');+ const body = (read) => {+ const { milestone, rows, done, total } = read;+ const progress = headerFor(read) ? '' : '<svg class="milestone-progress" viewBox="0 0 100 1" preserveAspectRatio="none" role="progressbar" aria-label="' + esc(milestone.name) + ': ' + done + ' of ' + total + ' landed" aria-valuemin="0" aria-valuemax="' + total + '" aria-valuenow="' + done + '"><rect width="' + (total ? (100 * done) / total : 0) + '" height="1"/></svg>';+ return (rows.length ? progress + '<ul>' + rows.map((row) => milestoneRow(row, titles)).join('') + '</ul>' : '<p class="milestone-empty">No items yet.</p>')+ + (milestone.note ? '<p class="milestone-note">' + rich(milestone.note, titles) + '</p>' : '');+ };/** Keep folding consistent with the View's other keyboard-accessible disclosure controls. */const wrap = (tag, classes, key, first, heading, contents, afterHead = '') => {const open = isOpen(key, first);- return '<' + tag + ' class="' + classes + '" data-key="' + esc(key) + '"><div class="milestone-head" data-roadmap-key="' + esc(key) + '" role="button" tabindex="0" aria-expanded="' + open + '">' + caret + heading + '</div>' + afterHead + '<div class="milestone-body"' + (open ? '' : ' hidden') + '>' + contents + '</div></' + tag + '>';+ return '<' + tag + ' class="' + classes + '" data-key="' + esc(key) + '"><div class="milestone-head" data-roadmap-key="' + esc(key) + '" role="button" tabindex="0" aria-expanded="' + open + '">' + heading.replace('<h2>', '<h2>' + caret) + '</div>' + afterHead + '<div class="milestone-body"' + (open ? '' : ' hidden') + '>' + contents + '</div></' + tag + '>';};/** Open every upcoming milestone by default; the person's current-page fold remains in the view map. */- const card = (m) => wrap('section', 'card-panel milestone', 'm:' + m.milestone.name, true, '<h2>' + linked(m.milestone.name, titles) + '</h2>' + count(m), body(m), m === next ? mobileShipping : '');+ const card = (m) => {+ const header = headerFor(m);+ const legacyTarget = m.milestone.target ? '<div class="milestone-targetline">Target <time datetime="' + esc(m.milestone.target) + '">' + when(m.milestone.target) + '</time>' + (m.milestone.pastTarget ? ' <span class="chip warn">past target</span>' : '') + '</div>' : '';+ return wrap('section', 'card-panel milestone' + (header ? ' roadmap-has-summary' : ''), 'm:' + m.milestone.name, true,+ '<h2>' + linked(m.milestone.name, titles) + '</h2>' + (header ? header.count : count(m)), body(m), header ? header.detail + (m === next ? mobileHistory : '') : legacyTarget + (m === next ? mobileShipping : ''));+ };/** Summarize one shipped milestone with its first note line and total count. */- const line = (m) => wrap('div', 'milestone shipped-one', 'm:' + m.milestone.name, false, '<h2>' + esc(m.milestone.name) + '</h2><small>' + esc(firstLine(m.milestone.note)) + '</small><span class="milestone-count">' + m.rows.length + (m.rows.length === 1 ? ' item' : ' items') + '</span>', body(m));+ const line = (m) => wrap('div', 'milestone shipped-one', 'm:' + m.milestone.name, false, '<h2>' + esc(m.milestone.name) + '</h2><small>' + esc(firstLine(m.milestone.note)) + '</small>' + (m.milestone.shipped?.commit ? '<code class="roadmap-shipped-commit" title="' + esc(m.milestone.shipped.commit) + '">' + esc(m.milestone.shipped.commit.slice(0, 12)) + '</code>' : '') + '<span class="milestone-count">' + m.total + (m.total === 1 ? ' item' : ' items') + '</span>', body(m));const releaseButtons = coming.map((m) => {const key = 'm:' + m.milestone.name;- return '<button class="roadmap-release" data-roadmap-jump="' + esc(key) + '" type="button"><span>' + esc(m.milestone.name) + '</span><b>' + m.done + '/' + m.rows.length + '</b></button>';+ return '<button class="roadmap-release" data-roadmap-jump="' + esc(key) + '" type="button"><span>' + esc(m.milestone.name) + '</span><b>' + m.done + '/' + m.total + '</b></button>';}).join('');const shippedButton = shipped.length? '<button class="roadmap-release" data-roadmap-jump="shipped" type="button"><span>Shipped</span><b>' + shipped.length + '</b></button>' : '';@@ -1417,14 +2623,58 @@ if (typeof MutationObserver === 'function') new MutationObserver((changes) => {}}).observe(document.body, { childList: true, subtree: true });+const releaseNotices = new Map();++/** Compare already parsed release versions without treating 0.8.10 as older than 0.8.9. */+function newerRelease(version, previous) {+ if (!/^[0-9]+[.][0-9]+[.][0-9]+$/.test(previous)) return false;+ const left = version.split('.').map(Number), right = previous.split('.').map(Number);+ for (let index = 0; index < 3; index += 1) if (left[index] !== right[index]) return left[index] > right[index];+ return false;+}++/** Remember one upgrade per board while retaining its card through this page's background refreshes. */+function renderReleaseNotes(project) {+ const region = $('upgrade-note');+ region.hidden = true;+ if (snapshot || !project?.releaseNotes) return;+ const info = project.releaseNotes;+ let notice = releaseNotices.get(project.root);+ if (notice?.version !== info.version) {+ const key = 'pb.release.' + project.root;+ const previous = keep(key);+ const releases = previous ? info.releases.filter((release) => newerRelease(release.version, previous)) : [];+ notice = { version: info.version, releases, notes: info.notes };+ releaseNotices.set(project.root, notice);+ keep(key, info.version);+ }+ if (!notice.releases.length) return;+ region.innerHTML = '<header><h2>New in ' + esc(notice.version) + '</h2><button class="ghost" type="button" data-upgrade-dismiss>Dismiss</button></header>'+ + notice.releases.slice(0, 3).map((release) => '<article><h3>' + esc(release.version) + ' · ' + esc(release.headline) + '</h3><p>' + esc(release.paragraph) + '</p></article>').join('')+ + '<footer>' + (notice.releases.length > 3 ? '<span>+' + (notice.releases.length - 3) + ' more</span> · ' : '')+ + '<a href="' + esc(notice.notes) + '" target="_blank" rel="noopener noreferrer">Full release notes</a></footer>';+ region.hidden = false;+}+/** Draw the board shown: the sidebar, then every tab's panes from the project's board. */function render() {+ // A refresh that moved the page to another board closes a confirmation opened on the last one.+ closeIfLeft();if (heldClickPointer !== null) { deferredClickRender = true; return; }deferredClickRender = false;const statsFocus = document.activeElement?.id === 'proof-stats-summary' ? document.activeElement.id : null;const p = data.project;const group = data.group;renderSide();+ $('project-loading').hidden = data.root === view.root;+ if (data.root !== view.root) {+ // Keep the cached picker available, but never label the last board's counts as the new one.+ document.querySelectorAll('[data-pane]').forEach((pane) => { pane.hidden = true; });+ for (const id of ['products', 'group-view', 'proof-stats', 'upgrade-note', 'person-requests', 'credentials', 'find-results']) $(id).hidden = true;+ $('status-board').innerHTML = '';+ $('live').textContent = 'Loading project…';+ return;+ }$('proof-stats').hidden = true;$('proof-stats').innerHTML = '';if (view.answering && view.answering.root !== view.root) answer(null);@@ -1436,6 +2686,8 @@ 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;+ renderReleaseNotes(group ? null : p);+ renderHostedReleaseNote(p);renderPersonRequests(p);renderCredentials();if (group) { renderGroup(group); return; }@@ -1466,21 +2718,24 @@ function render() {// What needs the person, first, and only the person's calls (B26): the decisions passed up to them,// 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, 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' && !r.decision).length;+ const personalNeeds = personNeeds(p);+ // Adapt display targets and the existing hold age without reimplementing which calls belong here.+ const needs = personalNeeds.filter((row) => !['draft', 'rigor-draft'].includes(row.kind)).map((row) => row.kind === 'decision'+ ? ['decide:' + row.id, row.ref, row.text, 'decide', row.at]+ : row.kind === 'pending' ? ['spec:' + row.id, row.ref, row.text, 'answer ' + row.ref] // the person's words; agents get the command (#875)+ : ['tab:shouts', row.ref, row.text, row.what, p.holds.find((hold) => hold.hold_lane === row.id)?.hold_at]);+ const drafts = personalNeeds.find((row) => row.kind === 'draft')?.count ?? 0;+ const rigorDrafts = personalNeeds.filter((row) => row.kind === 'rigor-draft');// 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);+ $('needs').hidden = (!needs.length && !drafts && !rigorDrafts.length) || 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('')+ + rigorDrafts.map(row => needRow([row.target, row.ref, row.text], 'a proved Rigor draft', 'Approve or Decline')).join('')+ (drafts ? needRow(['tab:spec', String(drafts), 'draft spec rows to approve or drop'], 'Spec rows waiting on you', 'review') : '');const lanes = p.lanes;@@ -1502,8 +2757,8 @@ function render() {$('pipeline').hidden = !pipeline;// Each Show choice counts what it would show under the lane and the search. A search looks through every// 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 found = searchIds(p, q);+ const matching = (q ? p.items : items).filter((item) => !q || found.has(item.id));// 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));@@ -1545,6 +2800,8 @@ function render() {$('filter-toggle').title = filterLabel;if (view.filterOpen && activeChoice) [...menu.querySelectorAll('[data-filter-choice]')].find((option) => option.dataset.filterChoice === activeChoice)?.focus({ preventScroll: true });const shown = inView.filter(inLane(view.lane)).sort((a, b) => b.updatedAt.localeCompare(a.updatedAt));+ const finishedUnderAll = !shown.length && p.items.length > 0 && p.items.every((item) => stateOf(item) === 'verified')+ && view.tab === 'items' && view.itemsView === 'list' && view.state === 'active' && !view.lane && !q && !snapshot;$('pipeline').innerHTML = pipeline ? pipelineCard(shown) : '';// 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.@@ -1558,24 +2815,31 @@ function render() {const waits = s === 'open' && i.blockedBy.length ? i.blockedBy : [];const gated = gatedOf(i);const pills = (waits.length ? '<span class="gate">' + waits.map((id, index) => '<span class="wait-unit">' + (index ? '' : 'waits on ') + '<a class="ref" href="' + esc(itemAddress(id)) + '" data-go="item:' + id + '">#' + id + '</a></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(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>'+ const holder = holderOf(i), reviewer = reviewerOf(i);+ const tag = s === 'building' && holder ? '<span class="chip busy" title="building, held by ' + esc(agentName(holder)) + '">' + esc(agentName(holder)) + '</span>'+ : s === 'verify' && reviewer ? '<span class="chip warn" title="reviewing until ' + esc(when(i.claim?.until ?? i.reviewUntil)) + '">' + esc(agentName(reviewer)) + ' reviewing</span>': s === 'open' ? openChip(i) : chip(s);return recordRow({ classes: (view.item === i.id ? 'on ' : '') + (gated ? 'gated ' : ''), attributes: 'data-item="' + i.id + '"', title: i.title, state: s,primary: '<span>#' + i.id + '</span>' + rich(i.title, titles), rightTop: age(i.updatedAt), rightBottom: tag,// A rejected row's second line is its verdict; any other row's is its lane and the spec ids it serves.secondary: (rejected(i) ? '<span class="why"><b>' + esc(i.verdict.reason) + '</b> ' + linked(firstLine(visibleVerdictNote(i.verdict.reason, 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 });- }).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>';+ : '<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 + staleChip(i) });+ }).join('') : '<li class="empty">' + (finishedUnderAll+ ? 'Finished work is under All. <button class="link" data-filter-choice="state:all" data-filter-kind="state" data-filter-value="all" type="button">Show all</button>'+ : 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);+ const selected = p.items.find((i) => i.id === view.item);// The form shows when asked for, or when the project has no item at all, withdrawn ones included.const adding = view.adding || (!p.items.length && !(view.tab === 'items' && view.addressDetail !== null && view.addressDetail !== 'pipeline'));$('add-form').hidden = !adding;$('add-cancel').hidden = !p.items.length;$('detail').hidden = adding;- if (!item) $('detail').innerHTML = '<div class="empty">' + (view.tab === 'items' && view.addressDetail !== null && view.addressDetail !== 'pipeline' ? 'No item #' + esc(view.addressDetail) + ' exists here.' : 'Pick an item to see its criterion, verdicts and history.') + '</div>';- if (item && !view.adding) {+ if (!selected) $('detail').innerHTML = '<div class="empty">' + (view.tab === 'items' && view.addressDetail !== null && view.addressDetail !== 'pipeline' ? 'No item #' + esc(view.addressDetail) + ' exists here.' : 'Pick an item to see its criterion, verdicts and history.') + '</div>';+ const opened = selected && !view.adding ? detailOf(p, selected, view.tab === 'items' && data.root === view.root) : null;+ if (opened && !opened.item) $('detail').innerHTML = '<div class="stack"><p class="detail-wait muted" role="status">'+ + (opened.error ? 'Could not load #' + selected.id + ': ' + esc(opened.error) : 'Loading #' + selected.id + '…') + '</p></div>';+ const item = opened?.item;+ if (item) {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;@@ -1600,7 +2864,7 @@ function render() {// 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">' + (s === 'open' ? openChip(item) : 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)) + staleChip(item) + '<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>'@@ -1611,7 +2875,7 @@ function render() {+ '<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"><a class="ref" href="' + esc(itemAddress(id)) + '" data-go="item:' + id + '">#' + id + '</a></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>';+ + '<div class="links"><button class="ghost" data-shout="' + esc(item.lane) + '" data-about="' + item.id + '" type="button">Shout the ' + esc(item.lane) + ' lane about #' + item.id + '</button><button class="go" data-new type="button">New item</button></div></div>';}// Every #id in a shout that names an item opens it, whatever stands next to it. The ids are found in@@ -1642,7 +2906,6 @@ function render() {const addressed = addressedShouts.get(JSON.stringify([view.root, view.shout]));const feedShouts = addressed?.shout && !p.shouts.some((entry) => entry.shout_id === view.shout) ? [...p.shouts, addressed.shout] : p.shouts;const heard = unread ? feedShouts.filter((x) => x.shout_id > unread.after) : view.agent ? feedShouts.filter((x) => x.shout_from === view.agent || x.shout_to === view.agent) : feedShouts;- if (view.tab === 'shouts' && view.shout !== null) openShouts.add(view.shout);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);@@ -1660,8 +2923,9 @@ function render() {};// 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.+ // The person's own shout is signed "you", plainly, never as the coordinator that ran it.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 && x.shout_id === view.shout ? ' found' : '') + '"' + (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">' + (inFeed && x.shout_id === view.shout ? '<h2>Shout #' + x.shout_id + '</h2>' : '') + '<header><b class="who">' + shoutAgentName(x.shout_from) + '</b><span class="to">→ ' + shoutAgentName(x.shout_to) + '</span>'+ + (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">' + (inFeed && x.shout_id === view.shout ? '<h2 class="visually-hidden">Shout #' + x.shout_id + '</h2>' : '') + '<header><b class="who">' + (x.shout_from === 'person' ? 'you' : 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 = (view.shout !== null && !feedShouts.some((entry) => entry.shout_id === view.shout) ? '<p class="empty" id="shout-address-status" role="status">' + esc(addressed?.error || 'Loading shout #' + view.shout + '…') + '</p>' : '') + 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>');@@ -1677,14 +2941,14 @@ function render() {// 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.+ // Each agent with what it holds: its claim, then its work sent back or with a stale verdict to redo, 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));+ const rank = (a, i) => i.status === 'claimed' ? 0 : reviewerOf(i) === a.agent_id ? 1 : stateOf(i) === 'back' || staleChip(i) ? 2 : 3;+ const holding = (a) => items.filter((i) => i.status === 'claimed' ? holderOf(i) === a.agent_id : reviewerOf(i) === a.agent_id || (i.builtBy === a.agent_id && (['back', 'verify'].includes(stateOf(i)) || staleChip(i)))).sort((x, y) => rank(a, x) - rank(a, y));// 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))+ const recent = (a) => p.items.some((i) => (i.status === 'claimed' && holderOf(i) === a.agent_id) || (i.status === 'submitted' && reviewerOf(i) === 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,@@ -1693,12 +2957,13 @@ function render() {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));+ // Beside the name there is room for one word, so a stale verdict says stale there; the opened rows say verified and stale.+ const state = (a, i, brief = false) => reviewerOf(i) === a.agent_id ? '<span class="chip warn">reviewing</span>' : (brief && staleChip(i)) || chip(stateOf(i)) + staleChip(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-who"><b>' + esc(agentName(a.agent_id)) + '</b>' + state(a, first, true) + (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>';};@@ -1729,12 +2994,13 @@ function render() {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' };- /** 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 };+ const defaults = kind === 'doctrine' ? rows.filter((r) => r.origin === 'standard') : [];+ const labels = { decide: 'Needs your decision', ...(defaults.length ? { defaults: 'Defaults to review' } : {}), all: 'All rows', approved: 'Approved' };+ /** Inherited defaults are reviewed in the repo's doctrine; only local proposals ask for a decision. */+ const undecided = (r) => (['pending', 'draft'].includes(r.status) && !r.decision || !!r.staleDecision) && !(kind === 'doctrine' && r.origin === 'standard');+ const n = { decide: rows.filter(undecided).length, defaults: defaults.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' ? undecided(r) : r.status === 'approved'));+ const shownRows = rows.filter((r) => filter === 'all' || (filter === 'decide' ? undecided(r) : filter === 'defaults' ? r.origin === 'standard' : r.status === 'approved'));// With no row picked, or the pick filtered out, the detail opens on the first row shown, as Items does.if (!(view.tab === kind && view.addressDetail !== null) && !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;@@ -1748,9 +3014,9 @@ function render() {const declined = kind === 'doctrine' && r.status === 'wont';const text = declined ? '<s>' + linked(r.standardText || r.text, titles) + '</s>' : linked(r.text, titles);const source = kind === 'doctrine' ? ruleSource(r) : 'this repo';- const reason = declined && r.reason ? '<span class="rule-reason" title="' + esc(r.reason) + '">Reason: ' + linked(r.reason, titles) + '</span>' : '';+ const reason = (declined || kind === 'spec' && r.status === 'wont') && r.reason ? '<span class="rule-reason" title="' + esc(r.reason) + '">Reason: ' + linked(r.reason, titles) + '</span>' : '';const secondary = '<span class="rule-source" title="' + esc(source) + '">' + esc(source) + '</span>' + reason + (r.gate ? '<span class="gate" title="' + esc(r.gate) + '">' + esc(r.gate) + '</span>' : '');- const statusShown = filter === 'all' || (filter === 'decide' && r.status !== 'draft');+ const statusShown = filter === 'all' || !!r.staleDecision || (filter === 'decide' && r.status !== 'draft');const badge = statusShown ? '<span class="chip ' + tone(r.status) + '">' + esc(r.stage || r.status) + '</span>' : r.tier ? '<span class="chip">' + esc(r.tier) + '</span>' : '';const citations = p.items.filter((item) => item.specs.includes(r.id)).length;return head + (feedback && feedbackId === r.id ? specFeedback(feedback) : '') + recordRow({ tag: 'div', classes: view.row[kind] === r.id ? 'on' : '', attributes: 'data-row="' + kind + ':' + esc(r.id) + '"', title: r.text,@@ -1763,13 +3029,14 @@ function render() {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" 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 DOCTRINE.md.' : 'Rows change in ' + (kind === 'spec' ? 'SPEC.md' : 'DOCTRINE.md') + ', and only you approve them.';+ const reason = (declined || kind === 'spec' && row?.status === 'wont') && row?.reason ? '<dt>reason</dt><dd>' + linked(row.reason, titles) + '</dd>' : '';+ // Only a standard rule gets a note; who approves rows is said once elsewhere, not in every detail (#822).+ const home = kind === 'doctrine' && row && row.origin === 'standard' ? 'Standard rules come with Pullboard as defaults to review; override or decline one in DOCTRINE.md.' : '';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 <kbd>A</kbd></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 <kbd>D</kbd></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">' + (view.tab === kind && view.addressDetail !== null ? 'No ' + (kind === 'spec' ? 'Spec' : 'Doctrine') + ' row ' + esc(view.addressDetail) + ' exists here.' : 'Pick a row to see it, and the items that cite it.') + '</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>' + (home ? '<div class="muted">' + home + '</div>' : '') + '</div>' : '<div class="empty">' + (view.tab === kind && view.addressDetail !== null ? 'No ' + (kind === 'spec' ? 'Spec' : 'Doctrine') + ' row ' + esc(view.addressDetail) + ' exists here.' : 'Pick a row to see it, and the items that cite it.') + '</div>';}if (keep('pb.flow') !== 'hidden') $('flow').innerHTML = flowSvg(p);@@ -1881,6 +3148,8 @@ function applyPlace(place, kept = null) {/** Restore the address on Back and Forward, with a scoped refresh when the repo changes. */function fromAddress(event) {if (!data) return;+ // Back and Forward close Approve all's confirmation and the decline dialog without recording, wherever they lead.+ leaveDialogs();// The configured relay transport owns pairing fragments and removes their secrets itself.if (transportModule) {const pairing = new URLSearchParams((location.hash || '').slice(1));@@ -1926,7 +3195,7 @@ async function loadAddressedShout() {entry.shout = reply.shout;} catch (error) {const message = String(error.message || error);- entry.error = transportModule && !message.includes('NO_SHOUT')+ entry.error = relayProject(root) && !message.includes('NO_SHOUT')? 'This shout is older than the relay holds. Open its address in the local project view.': 'No shout #' + id + ' exists here. ' + message;}@@ -2060,8 +3329,9 @@ 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) }));+ const ids = searchIds(p, q);+ const items = p.items.filter((item) => ids.has(item.id))+ .sort((a, b) => b.updatedAt.localeCompare(a.updatedAt)).map((item) => ({ go: 'item:' + item.id, id: '#' + item.id, text: item.title, note: stateLabel(item) }));// 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))@@ -2102,6 +3372,7 @@ function openFound(target) {function pick(id, root = view.root) {view.adding = false;if (root !== view.root) return switchTo(root, id);+ if (itemDetails.get(root + '\n' + id)?.error) itemDetails.delete(root + '\n' + id);view.tab = 'items';keep('pb.tab', view.tab);view.item = id;@@ -2147,7 +3418,7 @@ async function code(ref, before) {render();return;}- if (transportModule) {+ if (relayProject(view.root)) {c.error = 'Source code is unavailable in a relay view; open this reference in the local project view.';render();return;@@ -2167,7 +3438,7 @@ async function showAllCode(ref, before) {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 (relayProject(root)) { 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;@@ -2246,10 +3517,93 @@ function askDecline(kind, id, from) {view.declining = id;view.declineKind = kind;view.declineFrom = from;+ // The dialog belongs to the board it was opened on, as Approve all's confirmation does (#612).+ view.declineRoot = view.root;$('spec-decline-title').textContent = 'Decline ' + id;$('spec-decline-reason').value = '';- $('spec-decline-dialog').hidden = false;- $('spec-decline-reason').focus();+ openModal($('spec-decline-dialog'), $('spec-decline-reason'));+}++/**+ * Close the decline dialog and return what it asked about. Closed by the person, focus returns to the list it was asked+ * from; closed because the page left its board, focus stays where the person put it.+ */+function closeDecline(left = false) {+ const asked = view.declining ? { id: view.declining, kind: view.declineKind, root: view.declineRoot, from: view.declineFrom } : null;+ view.declining = null;+ closeModal($('spec-decline-dialog'));+ if (!left && asked?.from === 'list') $(asked.kind + '-list').focus({ preventScroll: true });+ return asked;+}++/**+ * Ask in the page before one press approves every undecided row of a Spec section (B26, N26). The browser's own confirm+ * dialog can be dismissed or never shown, and then the press recorded nothing and said nothing; this one is the page's.+ */+function askApproveAll(section) {+ const ids = data.project.spec.filter((row) => row.section === section && ['pending', 'draft'].includes(row.status) && !row.decision).map((row) => row.id);+ // Every row was decided after the last redraw; this one drops the stale control.+ if (!ids.length) { render(); return; }+ // The confirmation belongs to the board it was opened on: its rows are that board's, and only that board records them.+ view.approvingAll = { root: view.root, section, ids };+ $('spec-approve-title').textContent = 'Approve all ' + ids.length + (ids.length === 1 ? ' undecided row in “' : ' undecided rows in “') + section + '”?';+ $('spec-approve-rows').textContent = 'Rows: ' + ids.join(', ');+ $('spec-approve-submit').textContent = 'Approve ' + ids.length + (ids.length === 1 ? ' row' : ' rows');+ openModal($('spec-approve-dialog'), $('spec-approve-submit'));+}++/**+ * Close the Approve all confirmation. Cancelled, focus returns to the section control that opened it; approved, to the+ * list, since the section's control leaves once its rows are decided. Closed because the page left its board, focus+ * stays where the person put it.+ */+function closeApproveAll(approved = false, left = false) {+ const asked = view.approvingAll;+ view.approvingAll = null;+ closeModal($('spec-approve-dialog'));+ if (left) return asked;+ const control = !approved && asked && [...$('spec-list').querySelectorAll('[data-section-approve]')].find((button) => button.dataset.sectionApprove === asked.section);+ (control || $('spec-list')).focus({ preventScroll: true });+ return asked;+}++/** Close, recording nothing, a confirmation or decline opened on another board than the one the page now shows. */+function closeIfLeft() {+ if (view.approvingAll && view.approvingAll.root !== view.root) closeApproveAll(false, true);+ if (view.declining && view.declineRoot !== view.root) closeDecline(true);+}++/** Close every dialog bound to a board, recording nothing: the page is leaving the board it was asked on. */+function leaveDialogs() {+ if (view.approvingAll) closeApproveAll(false, true);+ if (view.declining) closeDecline(true);+}++/**+ * Show a page dialog over an inert page: nothing behind it takes a click or focus while it is open, so the person+ * cannot act on the page, or switch the board, under a question the page is asking.+ */+function openModal(dialog, focus) {+ dialog.hidden = false;+ for (const element of document.body.children || []) if (element !== dialog && element.tagName !== 'SCRIPT') element.inert = true;+ focus.focus();+}++/** Hide a page dialog and give the page back its clicks and focus. */+function closeModal(dialog) {+ dialog.hidden = true;+ for (const element of document.body.children || []) element.inert = false;+}++/** Keep Tab and Shift+Tab cycling through an open page dialog's own controls. */+function trapFocus(event) {+ if (event.key !== 'Tab') return;+ const controls = [...event.currentTarget.querySelectorAll('button, input, select, textarea, a[href]')].filter((control) => !control.disabled && control.offsetParent !== null);+ if (!controls.length) return;+ event.preventDefault();+ const at = controls.indexOf(document.activeElement);+ const next = at < 0 ? (event.shiftKey ? controls.length - 1 : 0) : (at + (event.shiftKey ? controls.length - 1 : 1)) % controls.length;+ controls[next].focus();}/**@@ -2258,6 +3612,7 @@ function askDecline(kind, id, from) {*/async function decideRow(kind, command, args, anchor) {if (snapshot || (readOnly && !requests)) return false;+ const requestMode = requests;const root = view.root, scroll = window.scrollY;const ids = String(args.ids).split(/s+/);const prefix = kind + ':';@@ -2267,15 +3622,16 @@ async function decideRow(kind, command, args, anchor) {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' });+ // A waiting request keeps its row; let browser anchoring follow growth above it.+ if (!requestMode) 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; }+ const result = requestMode ? await sendPersonRequest(root, move.body) : await api(boardPath(root) + '/moves', move.body);+ const request = requestMode && result?.result?.request;+ if (requestMode && (!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 = requestMode ? request.status === 'done' ? 'ok' : request.status === 'refused' ? 'no' : '' : 'ok';+ feedback.text = requestMode ? requestNotice(request) : moveMessage(move.body, result.result);+ if (requestMode) { 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;@@ -2286,7 +3642,7 @@ async function decideRow(kind, command, args, anchor) {}if (root === view.root && view.specFeedback === feedback) {render();- window.scrollTo({ top: scroll, behavior: 'instant' });+ if (!requestMode) window.scrollTo({ top: scroll, behavior: 'instant' });// A phone row click jumps to its detail. A later list-key decision returns the next pick to view,// instead of restoring that detail's scroll position with the focused list still offscreen.if (feedback.from === 'list' && feedback.tone === 'ok' && next && view.row[kind] === next) {@@ -2295,15 +3651,20 @@ async function decideRow(kind, command, args, anchor) {// Center an offscreen pick: nearest can round a half-pixel edge just outside the viewport.if (rect && (rect.top < 0 || rect.bottom > innerHeight)) picked.scrollIntoView({ block: 'center', behavior: 'instant' });}- if (!requests || feedback.status === 'done') setTimeout(() => { if (view.specFeedback === feedback) { view.specFeedback = null; render(); } }, 6000);+ if (!requestMode || feedback.status === 'done') setTimeout(() => { if (view.specFeedback === feedback) { view.specFeedback = null; render(); } }, 6000);}- return requests ? Boolean(feedback.requestId) && feedback.status !== 'refused' : feedback.tone === 'ok';+ return requestMode ? 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. */+/**+ * Run a public API move beside its action and let only the latest one own the console and timer. The move's own+ * reply is its outcome (#748): the board is read again afterwards, but that read covers every source on a hosted+ * page, and a slow or failing read of another board must neither hold back nor undo a move that went through.+ */async function act(command, args, anchor) {const out = $('console');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; }+ const requestMode = requests;// 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')@@ -2318,28 +3679,28 @@ async function act(command, args, anchor) {clearTimeout(view.closing);out.hidden = false;out.className = 'console';- out.textContent = requests ? 'Request waiting…' : 'running…';+ out.textContent = requestMode ? 'Request waiting…' : 'running…';out.scrollIntoView({ block: 'nearest' });try {// 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 asked = command === 'request' && !requestMode;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.');+ : requestMode ? await sendPersonRequest(root, move.body) : await api(boardPath(root) + '/moves', move.body);+ const request = requestMode && result?.result?.request;+ if (requestMode && (!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' + (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.className = 'console' + (requestMode ? request.status === 'done' ? ' ok' : request.status === 'refused' ? ' no' : '' : ' ok');+ out.textContent = requestMode ? requestNotice(request) : asked ? 'Sent to the coordinator.' : '$ pullboard ' + move.label + '\n' + moveMessage(move.body, result.result);+ if (requestMode) 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.- if (!requests || request.status === 'done') view.closing = setTimeout(() => { if (latest()) out.hidden = true; }, 6000);+ if (!requestMode || request.status === 'done') view.closing = setTimeout(() => { if (latest()) out.hidden = true; }, 6000);}- await refresh();- if (latest()) out.scrollIntoView({ block: 'center' });- return !requests || request.status !== 'refused';+ // The result was already revealed. A late refresh must not scroll after the person aims at the next action.+ refresh().catch((error) => { $('live').textContent = 'offline: ' + String(error.message || error); });+ return !requestMode || request.status !== 'refused';} catch (error) {if (latest()) {out.className = 'console no';@@ -2370,6 +3731,24 @@ function foldShouts() {function tickAges() {document.querySelectorAll('[data-ago]').forEach((node) => { node.textContent = node.classList.contains('long') ? agoLong(node.dataset.ago) : ago(node.dataset.ago); });+ tickDays();+}++/**+ * Once the clock has passed midnight since the page named its days, rename them in place with no redraw (#644): the+ * day that was Today and the one that was Yesterday get their names for now, and the shouts, which carry no rule above+ * today's, get one above what is no longer today. Every other day was named by its date and stays true.+ */+function tickDays() {+ const then = daysNamedAt, now = new Date();+ if (then.toDateString() === now.toDateString()) return;+ const before = new Date(then);+ before.setDate(then.getDate() - 1);+ const names = { Today: dayName(then.toISOString()), Yesterday: dayName(before.toISOString()) };+ document.querySelectorAll('.feed .day, #feed > .day-rule span').forEach((node) => { if (names[node.textContent]) node.textContent = names[node.textContent]; });+ const first = $('feed')?.querySelector?.('.shout');+ if (first && !first.previousElementSibling?.classList?.contains('day-rule')) first.insertAdjacentHTML('beforebegin', '<div class="day-rule" role="separator"><span>' + names.Today + '</span></div>');+ daysNamedAt = now;}/** Open or close the project list where the sidebar is folded into a top bar (under 900px). */@@ -2380,9 +3759,12 @@ function fold(open) {/** Show another project and its item; history restores keep the tab their entry named. */function switchTo(root, target = null, record = true) {+ // Switching board or project closes Approve all's confirmation and the decline dialog; neither records on either board.+ leaveDialogs();const generation = ++switchGeneration;answer(null);view.root = root;+ syncBoardMode(root);const item = typeof target === 'number' ? target : /^item:(\d+)$/.exec(target || '');const requestedItem = typeof item === 'number' ? item : item ? Number(item[1]) : null;view.item = requestedItem;@@ -2393,9 +3775,9 @@ function switchTo(root, target = null, record = true) {fold(false);// The board that arrives is drawn even if it matches the last one seen, so the pick is made from it.seen = '';- if (data) renderSide();+ if (data) render();document.body.classList.add('switching');- refresh().catch(() => { $('live').textContent = 'offline: is pullboard view still running?'; }).finally(() => {+ return refresh().catch(() => { $('live').textContent = 'offline: is pullboard view still running?'; }).finally(() => {if (generation === switchGeneration) document.body.classList.remove('switching');if (generation === switchGeneration && requestedItem !== null && view.item === requestedItem && view.root === root && view.tab === 'items') reveal();});@@ -2430,6 +3812,8 @@ $('shouts-pane').addEventListener('click', (event) => {// 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) => {+ // The open-board screens name their state in data-state and handle their own presses (#764).+ if (event.target.closest('#local-note')) return;if (view.filterOpen && !event.target.closest('.filter-control')) { view.filterOpen = false; render(); }const t = event.target.closest('[data-filter-toggle],[data-filter-choice],[data-status],[data-roadmap-jump],[data-shout-id],[data-roadmap-key],[data-roadmap-all],[data-root],[data-tab],[data-go],[data-item],[data-items-view],[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],[data-stats-toggle],#proj-switch,#console');if (!event.target.closest('.side')) fold(false);@@ -2484,11 +3868,7 @@ document.addEventListener('click', (event) => {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.sectionApprove) askApproveAll(t.dataset.sectionApprove);else if (t.dataset.shoutId && !event.target.closest('button,a,input,textarea,select')) { go('shout:' + t.dataset.shoutId); }else if (t.dataset.row) {const [kind, id] = t.dataset.row.split(':');@@ -2525,6 +3905,7 @@ document.addEventListener('keydown', (event) => {const row = event.target.closest('.milestone-item[role="button"]');if (event.target !== row) return;event.preventDefault();+ if (row.dataset.roadmapKey !== undefined) { row.click(); return; }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@@ -2549,18 +3930,33 @@ for (const kind of ['spec', 'doctrine']) $(kind + '-list').addEventListener('key});// 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(); });+$('upgrade-note').addEventListener('click', (event) => {+ if (!event.target.closest('[data-upgrade-dismiss]')) return;+ const notice = releaseNotices.get(data.project?.root);+ if (notice) notice.releases = [];+ renderReleaseNotes(data.project);+});$('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-cancel').addEventListener('click', () => { closeDecline(); });+$('spec-decline-form').addEventListener('keydown', trapFocus);+// The row the dialog named is declined, with its reason, on the board it was opened on and only there.$('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);+ if (!view.declining || !reason) return;+ const asked = closeDecline();+ if (asked.root !== view.root) return;+ const anchor = asked.from === 'detail' ? $(asked.kind + '-detail') : [...$(asked.kind + '-list').querySelectorAll('[data-row]')].find((row) => row.dataset.row === asked.kind + ':' + asked.id);+ decideRow(asked.kind, 'spec-decline', { ids: asked.id, reason }, anchor);+});+$('spec-approve-cancel').addEventListener('click', () => { closeApproveAll(); });+$('spec-approve-form').addEventListener('keydown', (event) => { if (event.key === 'Escape') { event.preventDefault(); closeApproveAll(); } else trapFocus(event); });+// The rows the confirmation named are the rows approved, on the board it was opened on and only there; the decision's+// note beside them says what the board did.+$('spec-approve-form').addEventListener('submit', (event) => {+ event.preventDefault();+ const asked = closeApproveAll(true);+ if (asked && asked.root === view.root) decideRow('spec', 'spec-approve', { ids: asked.ids.join(' ') });});$('answer-cancel').addEventListener('click', () => answer(null));$('flow-hide').addEventListener('click', () => showFlow(false));@@ -2576,11 +3972,14 @@ $('side-toggle').addEventListener('click', () => {fold(false);keep('pb.side', collapsed ? 'collapsed' : 'open');});-$('theme').addEventListener('click', () => {+/** Pick the scheme the page does not show now, and keep it. */+function flipTheme() {const next = document.documentElement.dataset.scheme === 'dark' ? 'light' : 'dark';keep('pb.theme', next);theme(next);-});+}+$('theme').addEventListener('click', flipTheme);+$('ob-theme').addEventListener('click', flipTheme);$('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.@@ -2628,7 +4027,12 @@ document.addEventListener('keydown', (event) => {});$('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)) {+ const root = view.root;+ const submitted = { lane: $('add-lane').value, title: $('add-title').value, criterion: $('add-criterion').value, specs: $('add-specs').value, brief: $('add-brief').value };+ if (await act('add', submitted, event.currentTarget) && view.root === root+ && $('add-lane').value === submitted.lane && $('add-title').value === submitted.title+ && $('add-criterion').value === submitted.criterion && $('add-specs').value === submitted.specs+ && $('add-brief').value === submitted.brief) {$('add-title').value = '';$('add-criterion').value = '';$('add-specs').value = '';@@ -2638,15 +4042,25 @@ $('add-form').addEventListener('submit', async (event) => {$('shout-form').addEventListener('submit', async (event) => {event.preventDefault();const text = $('shout-text').value;+ const root = view.root;const ask = view.answering;+ const answerRoot = ask?.root ?? null;+ const answerId = ask?.id ?? null;if (ask && ask.root !== view.root) return answer(null);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;+ const currentAnswer = view.answering;+ // An older completion must not erase a newer draft or answer selection.+ if (view.root !== root || $('shout-text').value !== text || (currentAnswer?.root ?? null) !== answerRoot+ || (currentAnswer?.id ?? null) !== answerId) return;$('shout-text').value = '';answer(null);});$('hold-form').addEventListener('submit', async (event) => {event.preventDefault();- if (await act('hold', { lane: $('hold-lane').value, reason: $('hold-reason').value }, event.currentTarget)) $('hold-reason').value = '';+ const root = view.root;+ const submitted = { lane: $('hold-lane').value, reason: $('hold-reason').value };+ if (await act('hold', submitted, event.currentTarget) && view.root === root+ && $('hold-lane').value === submitted.lane && $('hold-reason').value === submitted.reason) $('hold-reason').value = '';});// The first entry keeps the tab it opened on; Back and Forward show what each entry names.address(false);@@ -2659,24 +4073,108 @@ if (snapshot) {if (snapshotReplay.playing) { clearTimeout(snapshotReplay.timer); snapshotReplay.timer = setTimeout(advanceReplay, 1000 / Number($('replay-speed').value)); }});}-/** Load an explicitly configured transport before the first read; its updates refresh this page. */+/** Copy a screen's command or sentence; a browser without the clipboard API copies from a selected field. */+async function copyWords(text) {+ try { await navigator.clipboard.writeText(text); return true; }+ catch { /* Older and embedded browsers refuse the clipboard API: copy from a selected field below. */ }+ const field = document.createElement('textarea');+ field.value = text;+ field.setAttribute('readonly', '');+ field.style.position = 'fixed';+ field.style.opacity = '0';+ document.body.append(field);+ field.select();+ const copied = document.execCommand('copy');+ field.remove();+ return copied;+}+$('local-note').addEventListener('click', async (event) => {+ const button = event.target instanceof Element ? event.target.closest('button[data-copy]') : null;+ if (!button || !button.dataset.copy) return;+ button.textContent = await copyWords(button.dataset.copy) ? 'Copied' : 'Select and copy';+});+/**+ * Look for this machine's view again, by itself, while a screen waits on it or a signed-in person waits for a board:+ * the moment the view answers, the page opens the board, with no Try again (#764). Over a relay stream, a reload+ * starts both sources together.+ */+let relisting = false;+function lookAgain() {+ // This computer's view answered, then a read failed, as a busy view's can: read again every two seconds, so the+ // board shows the moment a list arrives (hostedListed clears the problem), never only on the slower fallback timer.+ if (hosted.local && localReached && !document.hidden && $('local-note').dataset.state === 'problem') {+ if (!relisting) { relisting = true; refresh().catch(() => {}).finally(() => { relisting = false; }); }+ return;+ }+ if (!hosted.local || relayPairing || localReached || localProblem || document.hidden) return;+ if (![...LOCAL_STATES, 'no-linked', 'unpaired'].includes($('local-note').dataset.state || '') || $('local-note').dataset.state === 'looking') return;+ connectLocal(true).then((local) => {+ if (local !== 'local') return;+ if (transport) { location.reload(); return; }+ transportModule = null;+ return refresh();+ }).catch((error) => localNote('problem', { detail: error.message }));+}+if (hosted.local && !snapshot) setInterval(lookAgain, 2000);++/** Open a newly approved board's Items view after its real list entry arrives. */+async function openApprovedBoard(boardId) {+ await refresh();+ const board = data?.projects.find(entry => entry.id === boardId && entry.ok);+ if (!board) throw new Error('The approved board did not load. Refresh the board list and try again.');+ view.tab = 'items';+ keep('pb.tab', view.tab);+ return switchTo(board.root);+}++/** Load the configured decrypting transport once, only when relay reads or pairing need it. */+let transportLoading = null;+async function loadTransport() {+ if (transport) return transport;+ if (!transportLoading) transportLoading = (async () => {+ const module = await import(configuredTransportModule);+ if (typeof module.createTransport !== 'function') throw new Error('The browser transport must export createTransport({ onUpdate }).');+ const configured = await module.createTransport({+ onUpdate: () => transport ? refresh().catch((error) => { $('live').textContent = 'offline: ' + error.message; }) : Promise.resolve(),+ onOpenBoard: openApprovedBoard,+ });+ if (!configured || typeof configured.request !== 'function') throw new Error('The browser transport must provide request(path, body).');+ transportModule = configuredTransportModule;+ transport = configured;+ return transport;+ })();+ try { return await transportLoading; }+ catch (error) { transportLoadError = error; throw error; }+ finally { transportLoading = null; }+}++/** Read local boards first; relay-only pages and pairing still load their configured client directly. */async function startPage() {- if (transportModule) {- try {- const module = await import(transportModule);- if (typeof module.createTransport !== 'function') throw new Error('The browser transport must export createTransport({ onUpdate }).');- const configured = await module.createTransport({ onUpdate: () => transport ? refresh().catch((error) => { $('live').textContent = 'offline: ' + error.message; }) : Promise.resolve() });- if (!configured || typeof configured.request !== 'function') throw new Error('The browser transport must provide request(path, body).');- transport = configured;- } catch (error) {- transportLoadError = error;- throw error;- }+ let local = 'unreachable';+ if (hosted.local && !relayPairing) {+ if (localProblem) localNote('problem', { detail: localProblem });+ else local = await connectLocal();+ if (local === 'away') return;+ if (local === 'unreachable' && !hosted.relaySession) { hideRelayNotice(); return; }+ }+ if (hosted.local && local === 'local') transportModule = null;+ else if (configuredTransportModule) {+ // Signed out, a pairing link waits for sign-in, which its own state asks for.+ try { await loadTransport(); } catch (error) { if (!hosted.local || hosted.relaySession) throw error; localNote('signed-out'); return; }}await refresh();}-startPage().catch((error) => { document.body.classList.remove('loading'); $('live').textContent = 'cannot reach the view: ' + error.message; });-if (!snapshot) setInterval(() => { if (!document.hidden && (!transportModule || transport)) refresh().catch(() => { $('live').textContent = 'offline: is pullboard view still running?'; }); }, 3000);+startPage().catch((error) => {+ document.body.classList.remove('loading');+ $('live').textContent = 'cannot reach the view: ' + error.message;+ // Finding your boards never stays on a page that has stopped looking.+ if (hosted.local && $('local-note').dataset.state === 'looking') localNote('problem', { detail: 'Pullboard on this computer did not answer: ' + error.message });+});+// The relay transport keeps its own stream and timer. The local view reads on a timer only while it has no live+// stream, and its live line says so (#545). Each timer asks which the page uses as it fires: the hosted page starts+// out on the relay and turns to this machine's view once it reaches it (#513).+if (!snapshot) setInterval(() => { if (!document.hidden && (transport || (hosted.local && hosted.relaySession && configuredTransportModule))) refresh().catch(() => { $('live').textContent = 'offline: is pullboard view still running?'; }); }, 3000);+if (!snapshot) setInterval(() => { if (!document.hidden && !transport && !(hosted.local && hosted.relaySession && configuredTransportModule) && !connected()) refresh().catch(() => { $('live').textContent = 'offline: is pullboard view still running?'; }); }, FALLBACK_MS);setInterval(tickAges, 60000);</script></body>diff --git a/docs/demo/view.css b/docs/demo/view.cssindex 6c2cd93f..6fd99756 100644--- a/docs/demo/view.css+++ b/docs/demo/view.css@@ -22,6 +22,7 @@body { margin: 0; background: var(--ground); color: var(--ink); font: 14px/1.5 var(--sans); }button, input, select, textarea { font: inherit; color: inherit; }[hidden] { display: none !important; }+.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); clip-path: inset(50%); white-space: nowrap; border: 0; }:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }.shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; }@@ -134,6 +135,97 @@ main { padding: 16px 18px 56px; }.first code { font: 600 13px var(--mono); color: var(--ink); }.boardless .first { display: block; }.loading .top, .loading [data-pane], .boardless .top, .boardless [data-pane] { display: none; }+a { color: var(--accent-strong); text-underline-offset: 2px; }+a.go, a.ghost { display: inline-flex; align-items: center; text-decoration: none; }+a.ghost { color: var(--ink); }+.proj small .src { color: var(--ink-muted); }+.proj .pname .owner { color: var(--ink-faint); font-weight: 400; }+/* Opening your board at app.pullboard.dev (#764): one screen at a time stands alone on the page, centred, with the+ * theme toggle in its own header; the sidebar, tabs and status line wait until there is a board to list. A note over+ * a list is one quiet card. Every big button, command box and "or" box is 60 px tall; the GitHub button is dark. */+.open-board .shell, .hosted-page.boardless .shell { display: block; }+/* A request waiting for the person on this device (relay/browser-devices.js #phone-approvals) is never hidden behind a screen. */+.open-board .side, .open-board .top, .open-board .status, .open-board main > :not(#local-note):not(#phone-approvals), .hosted-page.boardless .side { display: none !important; }+.open-board main { padding: 0; }+.open-board #local-note { display: grid; grid-template-rows: auto 1fr; min-height: 100vh; min-height: 100dvh; }+.ob-top { display: flex; justify-content: flex-end; padding: 12px 16px 0; }+.ob-panel { align-self: center; justify-self: center; box-sizing: border-box; width: 100%; max-width: 520px; padding: 24px 20px 64px; text-align: center; font-size: 16px; }+#local-note.wide .ob-panel { max-width: 900px; }+.ob-mark { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; }+.ob-mark svg { width: 28px; height: 28px; }+.ob-panel h1 { margin: 22px 0 0; font-size: 30px; line-height: 1.15; letter-spacing: -.025em; text-wrap: balance; }+.ob-say { margin: 12px auto 0; max-width: 440px; color: var(--ink-muted); font-size: 17px; text-wrap: balance; }+.ob-act { margin: 28px auto 0; max-width: 400px; text-align: left; }+.ob-big { display: flex; align-items: center; justify-content: center; gap: 12px; box-sizing: border-box; width: 100%; height: 60px; border-radius: 14px; font-weight: 600; font-size: 18px; text-decoration: none; cursor: pointer; }+.ob-big svg { width: 22px; height: 22px; }+.ob-gh, .ob-gh:hover { background: #1f2328; color: #fff; }+:root[data-scheme="dark"] .ob-gh { border: 1px solid var(--line-strong); }+.ob-go, .ob-go:hover { background: var(--accent); color: var(--on-accent); }+.ob-cmd, .ob-agent { display: flex; align-items: center; justify-content: space-between; gap: 10px; box-sizing: border-box; height: 60px; padding: 0 0 0 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }+.ob-cmd code { overflow: hidden; color: var(--ink); font: 600 17px var(--mono); white-space: nowrap; text-overflow: ellipsis; }+.ob-p { margin-right: 8px; color: var(--ink-faint); }+.ob-agent > span { flex: 1; min-width: 0; font-weight: 600; line-height: 1.3; }+.ob-agent small { display: block; color: var(--ink-muted); font-weight: 400; font-size: 13px; }+.ob-agent svg, .ob-help svg { flex: none; width: 22px; height: 22px; color: var(--accent); }+/* Inside a 60 px box the Copy button takes the box's own right edge, so box and button are both 60 px. */+.ob-cmd button, .ob-agent button, .ob-help button { flex: none; box-sizing: border-box; height: 60px; padding: 0 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); color: var(--ink); font-weight: 600; font-size: 15px; cursor: pointer; }+.ob-cmd button, .ob-agent button { margin: -1px -1px -1px 0; border-radius: 0 14px 14px 0; }+.ob-cmd button:hover, .ob-agent button:hover, .ob-help button:hover { background: var(--accent-soft); }+.ob-or { display: flex; align-items: center; gap: 12px; margin: 14px 0; color: var(--ink-faint); font-size: 13.5px; }+.ob-or::before, .ob-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }+.ob-small { margin: 12px auto 0; max-width: 400px; color: var(--ink-muted); font-size: 14.5px; text-wrap: balance; }+.ob-live { display: inline-flex; align-items: center; gap: 10px; margin: 22px 0 0; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink-muted); font-size: 14.5px; }+.ob-live i { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); animation: ob-pulse 1.4s ease-in-out infinite; }+@keyframes ob-pulse { 50% { opacity: .25; transform: scale(.8); } }+/* The spinner is a ring with one dot going round it, so no edge of any box takes the accent colour. */+.ob-spin { position: relative; width: 36px; height: 36px; margin: 28px auto 0; box-sizing: border-box; border-radius: 50%; border: 3px solid var(--line); animation: ob-turn .9s linear infinite; }+.ob-spin::after { content: ""; position: absolute; top: -5.5px; left: 50%; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; background: var(--accent); }+@keyframes ob-turn { to { transform: rotate(1turn); } }+@media (prefers-reduced-motion: reduce) { .ob-live i, .ob-spin { animation: none; } }+.ob-help { display: flex; align-items: center; gap: 12px; max-width: 500px; margin: 26px auto 0; padding: 10px 10px 10px 14px; border: 1px dashed var(--line-strong); border-radius: 14px; text-align: left; color: var(--ink-muted); font-size: 14.5px; }+.ob-help > span { flex: 1; min-width: 0; }+.ob-help small { display: block; color: var(--ink); font-size: 15px; font-weight: 600; }+/* The help strip's Copy is the mockup's 40 px button, so on a computer its sentence keeps to one line. */+.ob-help button { height: 40px; padding: 0 14px; border-radius: 10px; font-size: 14.5px; }+/* On a computer the sentence keeps to one line whatever fonts are installed (#829): the strip keeps the mockup's+ width and grows only as far as a wider font needs, centred, into the panel's own padding. Linux's DejaVu needs+ 513px for the longest sentence where the panel's box gives 520px. */+@media (width >= 760px) { .ob-help { position: relative; left: 50%; transform: translateX(-50%); width: max-content; min-width: min(500px, 100%); max-width: calc(100vw - 32px); margin: 26px 0 0; } .ob-help small { white-space: nowrap; } }+/* The browser's own permission prompt, drawn so people know what to click. */+.ob-ask { position: relative; margin: 28px auto 0; max-width: 380px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); text-align: left; }+.ob-ask .t { font-weight: 600; }+.ob-ask .d { margin-top: 4px; color: var(--ink-muted); font-size: 14.5px; }+.ob-ask .b { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }+.ob-ask .b span { padding: 7px 16px; border: 1px solid var(--line); border-radius: 999px; font-size: 14.5px; }+.ob-ask .b .yes { border-color: #1a73e8; background: #1a73e8; color: #fff; outline: 3px solid color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: 3px; }+.ob-ask .arrow { position: absolute; right: 4px; bottom: -30px; color: var(--accent-strong); font-weight: 700; font-size: 14px; }+.ob-steps { margin: 24px auto 0; max-width: 420px; padding: 0; list-style: none; text-align: left; counter-reset: ob-step; }+.ob-steps li { counter-increment: ob-step; display: grid; grid-template-columns: 32px 1fr; gap: 10px; align-items: start; padding: 10px 0; border-top: 1px solid var(--line); color: var(--ink-muted); }+.ob-steps li:first-child { border-top: 0; }+.ob-steps li::before { content: counter(ob-step); display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-strong); font: 600 13px var(--mono); }+.ob-steps b { color: var(--ink); font-weight: 600; }+/* The one place two paths exist: two equal cards that say plainly how they differ. */+.ob-two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 30px; text-align: left; }+.ob-card { display: grid; grid-template-rows: auto auto 1fr auto auto; gap: 8px; padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }+.ob-k { color: var(--accent-strong); font: 700 12.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; }+.ob-card h2 { margin: 0; font-size: 20px; letter-spacing: -.01em; }+.ob-card p { margin: 0; color: var(--ink-muted); }+.ob-card .ob-act { margin: 10px 0 0; max-width: none; }+.ob-card .ob-small { margin: 10px 0 0; max-width: none; text-align: left; }+.ob-two.signed-in { grid-template-columns: minmax(0, 440px); justify-content: center; }+.ob-two.signed-in .ob-card + .ob-card { display: none; }+@media (width < 760px) { .ob-two { grid-template-columns: 1fr; } .ob-cmd code { font-size: 15px; } }+#local-note[data-kind="note"] { display: grid; gap: 4px; margin: 0 0 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }+#local-note[data-kind="note"] .ob-top, #local-note[data-kind="note"] .ob-mark { display: none; }+#local-note[data-kind="note"] .ob-panel { max-width: none; padding: 0; text-align: left; font-size: 14px; }+#local-note[data-kind="note"] h1 { margin: 0; font-size: 15px; }+#local-note[data-kind="note"] .ob-say { margin: 2px 0 0; max-width: none; font-size: 14px; }+/* The relay's banner, filled by its client: the same quiet card. */+#relay-notice { display: grid; gap: 6px; margin: 0 0 14px; padding: 14px 16px; }+#relay-notice p { margin: 0; color: var(--ink-muted); }+#relay-notice a { justify-self: start; font-weight: 600; }+.loading #relay-notice, .boardless #relay-notice { max-width: 560px; margin: 10vh auto 14px; }+#pairing-storage-notice { margin: 0 0 14px; padding: 12px 16px; color: var(--ink-muted); }.two { display: grid; grid-template-columns: minmax(0, 1fr) clamp(300px, 42%, 600px); gap: 16px; align-items: start; }.two.narrow { grid-template-columns: minmax(0, 1fr) var(--agents-w); }.roadmap-layout { display: grid; grid-template-columns: minmax(0, 1fr) clamp(260px, 30%, 360px); gap: 16px; align-items: start; }@@ -166,8 +258,9 @@ main { padding: 16px 18px 56px; }.milestone-head { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; border-radius: 8px; }.milestone-head .milestone-count { margin-left: auto; }/* A small triangle that turns down when its part is open. */-.roadmap-layout .caret { flex: none; width: 7px; height: 9px; background: var(--ink-faint); clip-path: polygon(0 0, 100% 50%, 0 100%); transition: transform .15s; }-.milestone-head[aria-expanded="true"] > .caret { transform: rotate(90deg); }+.roadmap-layout .caret { display: inline-block; flex: none; width: 16px; height: 16px; margin: calc((1lh - 16px) / 2) 8px 0 0; vertical-align: top; color: var(--ink-muted); transition: transform .15s, color .15s; }+.milestone-head:hover .caret { color: var(--ink); }+.milestone-head[aria-expanded="true"] .caret { transform: rotate(90deg); }.shipped { padding: 4px 16px; }.shipped > .milestone-head h2 { margin: 0; font-size: 15px; color: var(--ink-muted); }.shipped-one { border-top: 1px solid var(--line); }@@ -183,6 +276,13 @@ main { padding: 16px 18px 56px; }.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.blocked { cursor: pointer; }+.milestone-item.blocked:hover { background: var(--surface-2); }+.milestone-item.blocked .t { display: flex; align-items: center; }+.milestone-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; }+.block-dot { display: inline-block; flex: none; width: 7px; height: 7px; margin-left: 6px; border-radius: 50%; background: var(--reject); vertical-align: middle; }+.milestone-why { margin: 2px 9px 8px 31px; font-size: 13px; }+.milestone-why .kv { margin: 0 0 6px; }.milestone-item .t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.milestone-item .t code { white-space: nowrap; }.milestone-item .id { margin-right: 6px; color: var(--ink-faint); font: 500 12px var(--mono); }@@ -243,6 +343,21 @@ main { padding: 16px 18px 56px; }.pipeline-item > span:first-child { color: var(--ink-faint); font-family: var(--mono); }.pipeline-item > span:last-child { overflow-wrap: anywhere; }.card-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); min-width: 0; }+/* Upgrade details scroll within one card so the first item remains in the viewport. */+.upgrade-note { padding: 12px; max-height: min(24vh, 190px); overflow-y: auto; overflow-wrap: anywhere; }+.upgrade-note header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }+.upgrade-note h2 { margin: 0; font-size: 16px; }+.upgrade-note h3 { margin: 10px 0 4px; font-size: 13px; }+.upgrade-note p, .upgrade-note footer { margin: 4px 0; font-size: 12px; }+.upgrade-note button { flex: none; min-height: var(--tap); }+/* On a phone the link invitation above can wrap a line taller with Linux fonts (199px, not 179px), so the card keeps+ 20px less and scrolls inside; it says the same and the first item stays above the fold (#871). */+@media (width < 600px) { .upgrade-note { max-height: min(21vh, 170px); } }+.release-note { padding: 0 2px 12px; }+.release-note p { margin: 0; font-size: 13px; line-height: 1.6; color: var(--ink-muted); overflow-wrap: anywhere; }+.release-note code { font: 12px var(--mono); color: var(--ink); white-space: nowrap; }+.release-note a { color: var(--ink); margin-left: 4px; white-space: nowrap; }+.release-note button { margin-left: 6px; min-height: var(--tap); padding: 2px 10px; font-size: 12px; }/* The Items toolbar keeps its view, filters, and creation action together on one line. */.toolbar { display: flex; flex-wrap: nowrap; gap: 6px; align-items: center; min-width: 0; padding: 10px; }.toolbar .go { flex: none; margin-left: auto; }@@ -330,6 +445,12 @@ 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; }+/* A stale verdict (#726) is a quiet word with a small dot beside the verified chip; its title says what main moved. */+.chip.stale { background: none; color: var(--ink-muted); padding-inline: 0; }+.chip.stale::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 4px; border-radius: 50%; background: var(--warn); vertical-align: 1px; }+.row .meta > .stale { margin-left: auto; }+.milestone-item:has(> .stale) { grid-template-columns: 12px minmax(0, 1fr) auto auto; }+.agent-work:has(> .stale) { grid-template-columns: minmax(0, 1fr) auto auto; }.meta .gate { color: var(--ink-muted); }.meta .gate .wait-unit, .kv dd.waits-on .wait-unit { white-space: nowrap; }.meta .gate button.ref, .meta .gate a.ref { min-height: 0; }@@ -388,6 +509,7 @@ input:disabled { background: var(--surface-2); color: var(--ink-muted); }.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 > button { min-height: var(--tap); }.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; }@@ -575,11 +697,22 @@ code.inline.long { white-space: break-spaces; overflow-wrap: anywhere; }.flow g:hover > .box, .flow g:hover > .edge { stroke-width: 2.2; }.console { position: static; width: min(560px, calc(100% - 32px)); margin: 8px auto; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: var(--shadow); padding: 10px 12px; font: 12px/1.5 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 38vh; overflow: auto; cursor: pointer; }.console.ok { border-color: var(--accent); } .console.no { border-color: var(--reject); }-.snapshot-controls:not([hidden]) { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; padding: 12px 16px; }-.snapshot-controls > span { font-weight: 600; }-#replay-play { min-inline-size: 12em; }-.snapshot-controls label { display: flex; align-items: center; gap: 6px; }-.snapshot-controls output { color: var(--ink-muted); font: 12px/1.5 var(--mono); }+/* Keep the replay viewport width fixed when its event list grows a classic scrollbar. */+:root:has(body.snapshot) { overflow-y: scroll; }+/* Changing Play and event labels occupy their own tracks, so they cannot rewrap a tap target. */+.snapshot-controls:not([hidden]) { display: grid; grid-template-columns: minmax(0, 18rem) max-content max-content; align-items: center; gap: 10px; margin-bottom: 16px; padding: 12px 16px; }+.snapshot-controls > span { grid-column: 1 / -1; font-weight: 600; }+#replay-play { grid-column: 1; min-inline-size: 0; }+/* Reserve Pause's tap box as replay ends, independently of its intrinsic text width. */+#replay-pause { grid-column: 2; inline-size: 5rem; }+.snapshot-controls label { grid-column: 3; display: flex; align-items: center; gap: 6px; }+.snapshot-controls output { grid-column: 1 / -1; min-width: 0; overflow-wrap: anywhere; color: var(--ink-muted); font: 12px/1.5 var(--mono); }+@media (width < 600px) {+ .snapshot-controls:not([hidden]) { grid-template-columns: minmax(0, 1fr) max-content; }+ #replay-play { grid-column: 1 / -1; }+ #replay-pause { grid-column: 1; justify-self: start; }+ .snapshot-controls label { grid-column: 2; }+}.snapshot #new-item, .snapshot form, .snapshot [data-new], .snapshot [data-release], .snapshot [data-shout], .snapshot [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; }@@ -779,3 +912,89 @@ code.inline.long { white-space: break-spaces; overflow-wrap: anywhere; }@media (width < 480px) { .proof-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }.milestone-head:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }++/* The hosted page's one star line (#727): a quiet sentence under the board, with a small way to dismiss it. */+.star-line { display: flex; align-items: center; justify-content: center; gap: 4px; margin: 18px 0 0; color: var(--ink-faint); font-size: 12.5px; }+.star-line[hidden] { display: none; }+.star-line a { color: var(--ink-muted); text-decoration: none; }+.star-line a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }+.star-dismiss { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--ink-faint); font: inherit; font-size: 15px; cursor: pointer; }+.star-dismiss:hover { background: color-mix(in srgb, var(--ink) 7%, transparent); color: var(--ink); }+.star-dismiss:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }+@media (pointer: coarse) { .star-dismiss { width: 44px; height: 44px; } }++.milestone-targetline { margin: 0 14px 10px; color: var(--ink-muted); font-size: 13px; }+.roadmap-shipped-commit { flex: none; color: var(--ink-muted); font: 11px var(--mono); }++/* Approved milestone summary: all quantities are supplied by the roadmap API [N26]. */+.roadmap-has-summary > .milestone-head { align-items: flex-start; }+.roadmap-has-summary > .milestone-head h2 { flex: 1; min-width: 0; font-size: 18px; line-height: 1.35; }+.roadmap-left { flex: none; display: grid; gap: 4px; margin-left: auto; text-align: right; white-space: nowrap; }+.roadmap-left > b { font-size: 19px; font-weight: 600; line-height: 1.1; }+.roadmap-left > span { color: var(--ink-muted); font: 12px var(--mono); }+.roadmap-summary { margin: 0 14px 14px; min-width: 0; }+.roadmap-summary-bar { display: block; height: 10px; margin: 10px 0; border-radius: 5px; }+.roadmap-summary-swatch { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; }+.roadmap-summary .landed { background: var(--accent); fill: var(--accent); }+.roadmap-summary .landing { background: var(--accent-strong); fill: var(--accent-strong); }+.roadmap-summary .review { background: var(--violet); fill: var(--violet); }+.roadmap-summary .building { background: var(--blue); fill: var(--blue); }+.roadmap-summary .waiting { background: var(--ink-faint); fill: var(--ink-faint); }+.roadmap-summary .held { background: var(--warn); fill: var(--warn); }+.roadmap-summary-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--ink-muted); font-size: 13px; }+.roadmap-summary-legend b { font-weight: 600; color: var(--ink); }+.roadmap-summary-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--ink-muted); font-size: 13px; }+.roadmap-summary-needs { margin-top: 12px; padding: 8px 12px; border-radius: 8px; background: var(--warn-soft); color: var(--warn); font-size: 13px; overflow-wrap: anywhere; }+.roadmap-summary-needs a { color: inherit; }+.shipped-one > .milestone-head h2 { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }++/* Roadmap title references keep their colour and tooltip while the whole row expands in place. */+.milestone-item span.ref { color: var(--accent-strong); display: inline-block; line-height: inherit; font: inherit; }++/* The approved dense Roadmap detail uses the view's own light/dark tokens [N26]. */+.milestone-item[role="button"] { cursor: pointer; }+.milestone-item[role="button"]:hover { background: var(--surface-2); }+.roadmap-status { display: inline-flex; align-items: center; gap: 6px; }+.roadmap-blocked svg, .roadmap-landed svg, .roadmap-items svg { width: 12px; height: 12px; flex: none; }+.roadmap-detail { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 5px 12px; margin: 10px 0 0; font-size: 12.5px; line-height: 1.55; }+.roadmap-detail dt { display: flex; align-self: start; align-items: flex-start; gap: 6px; color: var(--ink-muted); white-space: nowrap; }+.roadmap-detail dt svg { flex: none; width: 14px; height: 14px; margin-top: 3px; color: var(--ink-faint); }+.roadmap-detail dd { min-width: 0; margin: 0; overflow-wrap: anywhere; }+.roadmap-detail b { font-weight: 600; }+.roadmap-detail .roadmap-criterion { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }+.roadmap-ref { display: inline; padding: 1px 5px; border-radius: 4px; font-size: 11px; white-space: nowrap; }+.roadmap-return { padding: 5px 7px; border-radius: 5px; background: var(--reject-soft); color: var(--reject); }+.roadmap-event { display: inline; white-space: nowrap; }+.roadmap-step { display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; background: var(--ink-faint); }+.roadmap-step.busy { background: var(--blue); }+.roadmap-step.warn { background: var(--warn); }+.roadmap-step.ok { background: var(--accent); }+.roadmap-step.no { background: var(--reject); }+.roadmap-step.free { background: var(--violet); }+.roadmap-arrow { color: var(--ink-faint); }+.roadmap-items { display: inline-flex; align-items: center; gap: 5px; margin-top: 8px; font-size: 12.5px; }++/* Prototype (18 Oct): the link-to-pullboard.dev invitation as a calm, closable card. */+.share-card { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 10px 10px 14px; margin: 0 0 14px; }+.share-card[hidden], .share-again[hidden] { display: none; }+.share-ic { width: 30px; height: 30px; border-radius: 8px; background: var(--accent-soft); color: var(--accent-strong); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }+.share-txt { flex: 1; min-width: 0; font-size: 13px; line-height: 1.45; color: var(--ink-muted); }+.share-txt b { display: block; color: var(--ink); font-weight: 600; font-size: 13.5px; }+.share-gh { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; padding: 7px 11px; border-radius: 8px; white-space: nowrap; border: 0; cursor: pointer; }+.share-x { width: 28px; height: 28px; border: 0; background: none; color: var(--ink-faint); border-radius: 6px; cursor: pointer; font-size: 18px; line-height: 1; flex-shrink: 0; }+.share-x:hover { background: var(--shade); color: var(--ink); }+.share-again { display: block; margin: 10px 12px 0; padding: 6px 8px; border: 0; background: none; color: var(--accent-strong); font-size: 12.5px; cursor: pointer; text-align: left; border-radius: 6px; }+.share-again:hover { background: var(--shade); }++/* Keep the approved invitation readable and its controls reachable at phone widths. */+.share-gh, .share-again { min-height: var(--tap); }+.share-x { min-width: var(--tap); min-height: var(--tap); }+@media (pointer: coarse) { .share-txt a { display: inline-flex; align-items: center; min-height: var(--tap); } }+@media (width < 600px) {+ .share-card { display: grid; grid-template-columns: 30px minmax(0, 1fr) var(--tap); align-items: start; }+ .share-ic { margin-top: 4px; }+ .share-txt { grid-column: 2; }+ .share-txt a { display: flex; align-items: center; width: fit-content; min-height: var(--tap); }+ .share-x { grid-column: 3; grid-row: 1; }+ .share-gh { grid-column: 2 / 4; justify-self: start; }+}diff --git a/docs/img/roadmap-dark.png b/docs/img/roadmap-dark.pngnew file mode 100644index 00000000..62696fb4Binary files /dev/null and b/docs/img/roadmap-dark.png differdiff --git a/docs/img/roadmap-light.png b/docs/img/roadmap-light.pngnew file mode 100644index 00000000..06862ac3Binary files /dev/null and b/docs/img/roadmap-light.png differdiff --git a/docs/shots/demo.mjs b/docs/shots/demo.mjsindex 5e5de118..c5ca1894 100644--- a/docs/shots/demo.mjs+++ b/docs/shots/demo.mjs@@ -212,6 +212,7 @@ async function buildBoard(base, env) {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.');+ pb(repo, 'milestone', 'add', 'Demo release', '--items', '1,2,3,4,5', '--note', 'A demo release with reviewed, active and future work.');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'));if (item.item_builder_family !== 'codex' || item.verdicts.at(-1)?.verdict_verifier_family !== 'claude') {@@ -243,8 +244,62 @@ async function recordTour(env) {await writeFile(join(OUTPUT, 'tour.svg'), renderTour(lines));}+/** Capture the real demo release and one expanded item, with data and geometry checks before each image. */+async function captureRoadmap(view, repo, observation) {+ const output = join(ROOT, 'docs', 'img');+ await mkdir(output, { recursive: true });+ await view.viewport(1440, 1000);+ await view.evaluate("document.querySelector('[data-tab=roadmap]').click()");+ await view.waitFor(`view.tab === 'roadmap' && data.project.root === ${JSON.stringify(repo)} && document.querySelector('[data-key="m:Demo release"]')`, 'the isolated demo release');+ await view.evaluate(`(() => {+ const release = document.querySelector('[data-key="m:Demo release"]');+ const head = release.querySelector('.milestone-head');+ if (head.getAttribute('aria-expanded') !== 'true') head.click();+ return true;+ })()`);+ await view.waitFor("document.querySelector('[data-key=\"m:Demo release\"] .milestone-item[data-roadmap-key=\"i:#1\"]')", 'the demo release items');+ await view.evaluate(`(() => {+ const release = document.querySelector('[data-key="m:Demo release"]');+ for (const row of release.querySelectorAll('.milestone-item[aria-expanded="true"]')) row.click();+ release.querySelector('.milestone-item[data-roadmap-key="i:#1"]').click();+ return true;+ })()`);+ await view.waitFor(`(() => {+ const release = document.querySelector('[data-key="m:Demo release"]');+ const row = release?.querySelector('.milestone-item[data-roadmap-key="i:#1"]');+ const fields = [...(row?.parentElement.querySelectorAll('.roadmap-detail dt') || [])].map(node => node.textContent.trim());+ return row?.getAttribute('aria-expanded') === 'true' && ['Criterion', 'Agents', 'History', 'Release'].every(name => fields.includes(name))+ && !!release.querySelector('.roadmap-estimate')?.textContent;+ })()`, 'the expanded item fields and current time feedback');+ const readings = [];+ for (const theme of ['light', 'dark']) {+ await view.evaluate(`document.documentElement.dataset.theme = ${JSON.stringify(theme)}; localStorage.setItem('pb.theme', ${JSON.stringify(theme)})`);+ await view.evaluate('document.fonts.ready.then(() => new Promise(resolve => requestAnimationFrame(() => requestAnimationFrame(resolve))))');+ const reading = JSON.parse(await view.evaluate(`JSON.stringify((() => {+ const release = document.querySelector('[data-key="m:Demo release"]');+ const row = release.querySelector('.milestone-item[data-roadmap-key="i:#1"]');+ const rect = row.parentElement.getBoundingClientRect();+ return { theme: document.documentElement.dataset.theme, width: innerWidth, height: innerHeight,+ count: release.querySelector('.roadmap-left')?.textContent, legend: release.querySelectorAll('[data-summary-state]').length,+ rows: release.querySelectorAll('.milestone-item').length, expanded: release.querySelectorAll('.milestone-item[aria-expanded="true"]').length,+ fields: [...row.parentElement.querySelectorAll('.roadmap-detail dt')].map(node => node.textContent.trim()),+ history: row.parentElement.querySelector('.roadmap-history')?.textContent, time: release.querySelector('.roadmap-estimate')?.textContent,+ itemTop: rect.top, itemBottom: rect.bottom, pageWidth: document.documentElement.scrollWidth };+ })())`));+ if (reading.theme !== theme || !/4 remaining.*1 of 5 landed/u.test(reading.count) || reading.legend !== 6 || reading.rows !== 5 || reading.expanded !== 1+ || !reading.history?.includes('sent back') || !reading.history?.includes('accepted') || !reading.time+ || reading.itemTop < 0 || reading.itemBottom > reading.height || reading.pageWidth > reading.width) {+ throw new Error('The demo Roadmap capture is incomplete: ' + JSON.stringify(reading));+ }+ readings.push(reading);+ await view.screenshot(join(output, 'roadmap-' + theme + '.png'));+ }+ if (observation) observation.roadmap = readings;+}+const boardOnly = process.argv.includes('--board-only');const screenshotsOnly = process.argv.includes('--screenshots-only');+const roadmapOnly = process.argv.includes('--roadmap-only');const tourOnly = process.argv.includes('--tour-only');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; }@@ -320,28 +375,31 @@ else {}view = await browser(chrome, join(base, 'chrome-profile'), url);await waitForDemoBoard(view, repo);- await view.viewport(1440, 900);- await view.evaluate("document.querySelector('#filter-toggle').click(); document.querySelector('#filter-menu [data-filter-choice=\"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('#filter-toggle').click(); document.querySelector('#filter-menu [data-filter-choice=\"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'));+ if (!roadmapOnly) {+ await view.viewport(1440, 900);+ await view.evaluate("document.querySelector('#filter-toggle').click(); document.querySelector('#filter-menu [data-filter-choice=\"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('#filter-toggle').click(); document.querySelector('#filter-menu [data-filter-choice=\"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 captureRoadmap(view, repo, observation);await view.close(); view = null;recordBeforeViewStop(observation);await stop(server); server = null;await recordAfterViewStop(observation);- if (!screenshotsOnly) await recordTour(env);+ if (!screenshotsOnly && !roadmapOnly) await recordTour(env);if (observation) observation.outcome = 'completed';}}diff --git a/test/readme.test.js b/test/readme.test.jsindex 8f4d4370..7370fefa 100644--- a/test/readme.test.js+++ b/test/readme.test.js@@ -386,6 +386,26 @@ test('README is concise and skimmable without removing its instructions or figur}});+test('the README shows a demo Roadmap with an expanded item in both themes [I10,I13]', () => {+ const light = 'docs/img/roadmap-light.png', dark = 'docs/img/roadmap-dark.png';+ for (const name of [light, dark]) {+ const png = readFileSync(join(ROOT, name));+ assert.deepEqual(png.subarray(0, 8), Buffer.from([137, 80, 78, 71, 13, 10, 26, 10]), name + ' is a real PNG screenshot');+ }+ const picture = [...README.matchAll(/<picture>[\s\S]*?<\/picture>/gu)].map(match => match[0])+ .find(block => block.includes(light) && block.includes(dark));+ assert.ok(picture, 'one picture references both Roadmap screenshots');+ const darkSource = [...picture.matchAll(/<source\b[^>]*>/gu)].map(match => match[0]).find(tag => tag.includes(dark));+ assert.match(darkSource ?? '', /media="\(prefers-color-scheme:\s*dark\)"/u, 'the dark image follows the reader theme');+ assert.match(picture, /<img\b[^>]*src="docs\/img\/roadmap-light\.png"/u, 'light is the fallback image');+ const alt = /<img\b[^>]*alt="([^"]+)"/u.exec(picture)?.[1] ?? '';+ for (const word of ['demo', 'roadmap', 'expanded', 'criterion', 'agents', 'history', 'release']) {+ assert.ok(alt.toLowerCase().includes(word), 'alt text describes ' + word);+ }+ assert.ok(README.indexOf(picture) < README.indexOf('The full plan lives in the Roadmap tab'),+ 'the picture sits beside the Roadmap explanation');+});+test("what's next lists only unbuilt work [I11]", () => {const spec = readFileSync(join(ROOT, 'SPEC.md'), 'utf8');const sectionStart = README.indexOf("### What's next\n");