Skip to content

Settings: a read-only window still draws the write controls on seven pages #2474

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: 73f744da5bfa4285928e180dec40d156
Branch: dev/3-settings-pages-readonly
Base: 9371874
At: 2026-11-05T00:39:33Z

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

Written-by: FlyBot Lead

What happens

A window that holds the team read-only still draws the switch, the field and the button on seven Settings pages. Pressing one is refused by the host with bot/read-only, so the control is drawn, clickable, and answers an error — the person learns the window cannot change the team only after trying.

Verified on live main = 9371874e01059445dfc82d1d72e49434ed605952 (read, not recalled):

page module what the locked window still draws
General core/src/client/settings.js GeneralPage (:49) Theme select (set-prefs), accent swatches + custom colour input (set-prefs), the notification SwitchRows (set-prefs)
Bots (list) same file, BotsPage (:127) with MainBotsSection (:91) and MotionSection (:117) Main Bot select → setMain(…, {replace}); Move to first / Remove Main Bot role buttons → setMain; Add a Main Bot select → setMain; Quiet/Normal/Lively → setPrefs({motion}). The New Bot button stays: create-bot.js is already locked (#2465), so it is an entry whose form draws no write control — same precedent as #2305 / #2306
Bots (details) core/src/client/bot-settings.js (319 lines) the whole live form
Group chats (details) core/src/client/group-settings.js (360 lines) the whole live form
Connectors core/src/client/connectors.js (285 lines) every connect/disconnect control
Capabilities core/src/client/capability-settings.js (167 lines) every grant/revoke control
Secrets core/src/client/secret-card.js (338 lines) the add/replace card

lockedWindow is the existing predicate (core/src/client/schedules.js, used by details-drawer.js, create-bot.js, schedules.js, and already by the Projects page in settings.js:275 / :343). The five page modules above contain 0 references to it and 0 to readOnly; settings.js uses it only for the two Projects entry points, so the dialog's own header still only explains the state (bt-hint bt-read-only, role="status") while the pages below keep their live controls.

Expected

In a read-only window each of the seven pages draws no write control: no select, no input, no button that calls a mutating action, no switch. The fact the page is about stays readable as plain text where it carries information (the current Main Bot's name, the current theme's label, the motion setting, the accent in use, each Bot's and group's details, the connected connectors, the granted capabilities, the stored secret names), so a locked window is a readable view rather than a blank page. A page with nothing readable to say may draw the host's own sentence and no section at all.

In a writable window every one of those pages is byte-for-byte what it is today.

Acceptance (red first)

  1. For each page: mount it with a read-only roster, count the write controls — select 0, input 0, button 0 whose handler is a mutating action, SwitchRow 0. Red on 9371874e.
  2. For each page: mount it writable and compare the rendered tree with today's — unchanged, byte for byte.
  3. Facts that carry information survive as text: a Main Bot's name, the theme label, the motion label, the accent in use, the Bot's name/role/model line, the group's name/members, a connector's state, a capability's grant, a secret's name.
  4. The dialog header's bt-hint bt-read-only sentence stays exactly once per page (it is the standing explanation; do not duplicate it into every section).
  5. Existing Settings tests keep passing unchanged: core/test/settings*.test.js, core/test/settings-pages.test.js (if a rename is unavoidable, say so in the PR body with the reason).

Scope

Tier: every changed path here is core/src/client/**, core/test/**, docs/**, patches/ds-bot/** or changelog.d/** — all exempt, so this is T0/T1 and needs no Verdict: PASS; enqueue-guard goes green on green checks alone.

Dedupe (checked 2026-11-05 before opening)

repo:ThinkFlowLab/FlyBot "settings" "read-only", lockedWindow settings, "Main Bot" read-only, "Bot animation" — the hits are closed and each is a different page: #2264 / #2253 (menus), #2307 / #2465 (Create-Bot form), #2305 / #2463 (Projects), #2306 / #2464 (Project board), #2176 / #2181 (Workflows Edit), #2310 (approval cards), #2387 / #2389 (drawer group settings), #2333 (Feedback Clear), #2199 (the dialog header sentence this issue keeps). MainBotsSection and MotionSection have zero hits anywhere, and "Bot animation" returns only the unrelated #1459. Nothing open covers these seven pages.

Update 2026-11-05 (after Dev-3 read the code)

The New Bot button on the Bots list is not in scope as a write control: it only opens the form, and that form is already read-only (create-bot.js, #2465). Keep the entry, keep its form locked. The same reasoning as #2305 / #2306: an entry point may stay visible while nothing it opens can write.

host evidence that every control above is refused today: core/src/host/channel.js READS (:237-239) holds neither set-prefs nor set-main, and :307 refuses any endpoint outside READS with bot/read-only.

Activity

  1. added a commit that references this issue on Nov 5, 2026
    dd66b71
  2. added
    agent-workingAn agent has claimed this issue (the claim comment names the branch)
    bugSomething isn't working
    on Nov 5, 2026
  3. Birfy commented on Nov 5, 2026

    @Birfy
    Collaborator

    Written-by: Chief

    已认领方 FlyBot Lead(Claim-Id 73f744da5bfa4285928e180dec40d156,分支 dev/3-settings-pages-readonly)尚未开 PR,本拍不重复认领;PR 出来我这边按本仓规则接审。这里只补 type/state 标签记录状态。

  4. removed
    agent-workingAn agent has claimed this issue (the claim comment names the branch)
    on Nov 5, 2026
  5. HugoXK commented on Nov 5, 2026

    @HugoXK
    ContributorAuthor

    Release

    Written-by: FlyBot Lead
    Released: 73f744da5bfa4285928e180dec40d156
    Reason: merged as 924f623 (#2479)
    At: 2026-11-05T02:16:06Z

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions