Skip to content

fix: let curl upload follow the pencil, and ask before either changes the other - #25

Merged
xinshoutw merged 3 commits into
mainfrom
dev
Oct 12, 2026
Merged

xinshoutw merged 3 commits into
mainfrom
dev

Conversation

@xinshoutw

Copy link
Copy Markdown
Collaborator

Brings dev to 2.2.1 with 3 commits: curl upload now works only while everyone may edit, and the host is asked before either switch takes the other with it.

Backend

  • /session/toggle_curl refuses to switch curl on while editing is kept to the host (409), since a curl upload carries nobody's token.
  • /session/toggle_edit switches curl off when it closes editing, and broadcasts curl_permission_changed with it.
  • Sessions saved with curl on and editing kept to the host, which 2.2.0 allowed, load with curl off.

Frontend

  • Ticking Curl upload with the pencil off asks "Let everyone edit" first; agreeing opens editing and then curl, declining leaves curl off. In 2.2.0 the box ticked but no commands appeared and uploads were refused.
  • Turning the pencil off while curl is on warns that curl will be turned off too; Cancel leaves both as they were.

Checks

  • Backend: 46 tests, ruff clean; the curl tests now cover the rule.
  • Frontend: 9 unit tests; eslint at its existing 6 errors, none added; production build.
  • Headless Chromium at 1280 px and 375 px: both questions, Cancel and agree paths, curl uploads landing and refused, no overflow.

Test plan

  • In a new room, tick Curl upload: the question appears; Cancel leaves it off
  • Agree: the pencil turns green, the commands show, and a curl upload lands
  • Turn the pencil off: the warning appears; Turn off closes both

…editing

- A curl upload carries nobody's token, so curl may be on only while everyone may edit; the server refuses it otherwise (409) and switches it off when editing is closed
- Ticking Curl upload with the pencil off now asks "Let everyone edit" first; agreeing opens editing and then curl, declining leaves curl off
- Before, the box ticked but no commands appeared and uploads were refused, since every new room keeps editing to its host
- Sessions saved with curl on and editing kept to the host load with curl off
- Turning the pencil off while curl upload is on now asks first, saying curl will be turned off too
- Turn off closes both; Cancel leaves editing and curl as they were
- With curl off the pencil still switches without a question
- Patch: curl upload needs everyone to be able to edit, and the pencil warns before taking curl with it

- pyproject, app.py, package.json, both lockfiles and both README badges agree
@xinshoutw
xinshoutw merged commit 2360439 into main Oct 12, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant