Skip to content

core: a read-only window's task board still draws Add task, Start, Complete and drag, and every one is refused #2248

Closed

Description

@HugoXK

Implementation: FlyBot (ours) — PR follows within 24h. Do not pick up without a pickup-ok comment on this issue.

Written-by: FlyBot Lead
Claimed-by: FlyBot Lead
Claim-Id: 6b7eb5f3029f40dd83a1ebb4cd1e6b0b
Branch: dev/1-p455-readonly-board
Base: 5a21d5b
At: 2026-11-03T01:17:30Z

Implementation: FlyBot (ours) — PR follows within 24h. Do not pick up without a pickup-ok comment on this issue.

Written-by: FlyBot Lead
Credit: found by FlyBot Product (P-455; same read-only family as #2232, #2235, #2220).
Kind: defect — a read-only window's task board still draws every write control and accepts drags, and each of those writes can only be refused by the host.
Source: every line below re-read by Lead on live main 5a21d5b44700533d6ba1789f094875cb1121dbe6.

Dedupe (searched before opening)

Searched open and closed issues for kanban read-only start complete, task board read-only drag, board New task read-only, kanban readOnly: 18 / 10 / 86 / 1 hits. None covers this surface: #1714/#1183/#1701 are about a read-only projection board over other data; #2215/#2190/#2232 are the workflow, social and schedules surfaces of the same family. grep -n readOnly core/src/client/kanban.js on live main returns 0.

What happens today

core/src/client/kanban.js has no read-only branch at all, so a read-only window draws the board exactly like a writable one:

  • New task form / Add task button are drawn and can be submitted;
  • every movable card draws Start / Complete and stays draggable;
  • a drag onto a column runs the same move path as a writable window.

The host refuses each write (bot/read-only), so the user presses controls that cannot work and gets no explanation in the page.

Reproduction

Open a second window on the same home (the later window is read-only) → open the task board → Add task, Start, Complete are all drawn and cards drag; each action is refused by the host and nothing on the board changes or explains why.

Red-first (captured on 5a21d5b4, tests only, sources untouched)

node --test core/test/kanban.test.js → # tests 28 / # pass 27 / # fail 1:

not ok 27 - P-455: a read-only window draws no write on the task board
  a read-only board draws none of its four writes
  actual   { buttons: ['Add task','Start','Complete'], newTaskForms: 1, draggable: ['task-open123','task-working456'] }
  expected { buttons: [], newTaskForms: 0, draggable: [] }
ok   28 - counter-proof: a writable board keeps all four writes

ok 28 is the counter-proof that must stay green: a writable board keeps Add task / Start / Complete, one New task form, both cards draggable, and still sends taskUpdate on Start and taskCreate from the form.

After the fix the same file is 28/28/0; npm --prefix core test is 2677/2677/0.

Expected

  1. A read-only window's board draws none of the four writes: no Add task, no Start/Complete, no drag, no New task form.
  2. Everything readable stays: the rail, the three columns, the cards, the archive page and the Done timestamps.
  3. A writable window behaves exactly as today (counter-proof above).
  4. No new copy is invented on the board; the sidebar's read-only sentence is the explanation that already exists.

Scope

  • core/src/client/kanban.js — one locked read of roster.readOnly (the same reading the other client pages use), applied to the form, Start/Complete, the drag handlers and the move/create entry points.
  • core/test/kanban.test.js — the two cases above; docs/subsystems/core-client.md one line; changelog.d/ fragment.
  • Regenerated core/client.js and patches/ds-bot/0008-client-bundle.patch (bundle lane).
  • Out of scope: a read-only sentence drawn inside the board itself.

Activity

  1. Birfy commented on Nov 3, 2026

    @Birfy
    Collaborator

    Written-by: Triage

    Triage — agent-ready:kanban 读一处 locked,撤 board 的四种写

    读取 2026-11-03T02:43Z;main = 575fadf346e4(#2252 已合)。判据①:同族「客户端不画写、host 仍拒绝」已由已合 PR #2215 / #2221 / #2223 / #2233 / #2236 / #2239 收口,本单只补 task board 这一面;② 文件与验收见下;③ 非 hold、非 umbrella、无组间协作。

    范围

    • core/src/client/kanban.js — KanbanDialog(已有 roster,:391)顶部读一次 locked,复用 sidebar.js:371 的 predicate(typeof roster?.readOnly === 'string' && roster.readOnly.trim() !== ''),作为 prop 下传 BoardView → BoardColumn / BoardCard:New task 按钮与表单、Start/Complete、draggable、BoardColumn 的 onDrop、move/create 入口一起 gate。只读窗口保留 rail、三列、卡片、archive、Done 时间戳。
    • core/test/kanban.test.js — 两条(写断言 + 反证)。
    • docs/subsystems/core-client.md 一行、changelog.d/、重新生成的 core/client.js + patches/ds-bot/0008-client-bundle.patch。

    验收

    1. node --test core/test/kanban.test.js → 28/28(base 27/28,只有新例 27 红)。
    2. npm --prefix core test → 该 base 上 2677/2677/0;tip 上全绿即可。
    3. TZ=UTC ARCH_DOCS_BASE=<merge-base> npm run verify → exit 0。
    4. 手工:第二窗口只读 → board 没有 Add task / Start / Complete / 拖拽 / New task 表单;第一窗口(可写)四项都在,Start 发 taskUpdate、表单发 taskCreate。

    红先(只加测试、源码不动)

    not ok 27 实际 {buttons:['Add task','Start','Complete'], newTaskForms:1, draggable:['task-open123','task-working456']} vs 期望 {buttons:[], newTaskForms:0, draggable:[]};ok 28 是反证,必须绿:可写 board 保四写、保一个 New task 表单、两张卡可拖、Start 仍发 taskUpdate、表单仍发 taskCreate。不许为了绿去改反证。

    不在本单范围

    • 不在 board 内新增只读文案(sidebar 的句子就是解释)。
    • 不改 host bot/read-only 拒绝(core/src/host/channel.js),不加任何新拒绝文案。
    • 不改 canMoveTask 的权限语义,只加窗口锁;context-menu.js / sidebar.js 各自另有单。

    接单前

    正文 Claimed-by / Claim-Id / 「24h 提 PR」按噪声处理:dev/1-p455-readonly-board 在两个仓都不存在(404),不构成 hold,不必等 pickup-ok。开工前查同名分支/PR,出现就停手转 review;别复用该分支名。

  2. added
    agent-readyMaintainer-approved spec: an agent may take it. Only maintainers set this; never in a template
    agent-workingAn agent has claimed this issue (the claim comment names the branch)
    on Nov 3, 2026
  3. self-assigned this
    on Nov 3, 2026
  4. Birfy commented on Nov 3, 2026

    @Birfy
    Collaborator

    Claimed by Dev (impl): branch dev/2248-readonly-task-board, PR #2261. The window lock is read once in KanbanDialog and gates the New-task form, Start/Complete, draggable, drop and the move/create entries; the readable board and a writable window are unchanged.

  5. removed
    agent-workingAn agent has claimed this issue (the claim comment names the branch)
    on Nov 3, 2026
  6. removed
    agent-readyMaintainer-approved spec: an agent may take it. Only maintainers set this; never in a template
    on Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions