Skip to content

diagram: readOnlyMode still permits most local model mutations #935

Description

@bpowers

Problem

readOnlyMode disables persistence, project deletion, and a few delete actions, but most editor mutation controls and handlers remain active. Users can make substantial local changes that are guaranteed not to save.

Evidence / repro

  • HostedWebEditor makes save/delete no-ops in read-only mode.
  • Editor includes readOnlyMode in selected delete guards, but its shared canvas/control read-only predicates cover embedded/stdlib modes rather than readOnlyMode.
  • Open another user's public project and use available variable/equation/layout controls. The UI mutates locally while persistence is disabled.

Impact

High confusion and perceived data loss: the interface looks editable and accepts work, then discards it.

Suggested fix/tests

Define one read-only capability used by every mutation affordance and handler while retaining selection, pan/zoom, and inspection. Add interaction tests across keyboard, canvas, details drawer, toolbar, and undo/redo asserting model state cannot change in read-only mode.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingfrontendInvolved the React-based Typescript frontendusability

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions