Repository navigation
Conversation
…(Phase 3, Step 5) - CollabScriptEditor.vue: wire REQUEST_SCRIPT_CUTS for collab-mode cut mode (D11), reusing the shared scriptConfigStore.cutMode flag and ScriptLineViewer's existing cut UI (which already gates on it) exactly as the classic editor does — no server changes needed, REQUEST_SCRIPT_CUTS and the cuts REST save/exclusivity guards were already fully implemented. Proactively disables Cuts with a reason (someone else cutting, an editor present, or an unsaved draft) rather than waiting on a round trip. - ScriptRevisions.vue: surfaces per-revision `has_draft` (already returned by the API, unused until now) to block Load/New Revision/Edit/Delete with a tooltip while the relevant revision has an active collaborative draft, mirroring the server's own `_revision_is_locked` check exactly. Adds a Discard Draft banner + action for the current revision, using the same "other editors will lose their work too" warning as the in-editor Discard (D9) — discard is room-wide regardless of entry point. - settings.py: un-hides `collaborative_script_editing` now the editor is complete. - docs/pages/script_config.md: rewrites the Editing/Saving sections for both modes (the old "only one person can edit" wording was legacy-only); documents cut mode and the Revisions page's draft gating. - The one open design question carried since Step 1's review (the cue editor's edit lock needing its own announce path in collab mode) turned out to be based on dead code in both clients — corrected in the plan doc, no action needed. - Two items from PR #1480's review explicitly deferred as follow-up issues (#1482, #1483), kept out of this step's scope per Tim's direction. Tests: 22 new/updated Vitest (cut-mode wiring, ScriptRevisions.vue from scratch — it had none), each mutation-tested; 1 backend test updated for the un-hidden setting. New/updated E2E in spec 15: full cut-mode flow (request, toggle, Save Cuts, Stop Cutting), cut/edit mutual exclusion from a third session, the Revisions page's gating + Discard Draft banner, and the admin toggle now driven through the real Settings UI rather than the API directly. Backend 1281/1281, frontend Vitest 397/397, typecheck/lint clean, full Playwright suite 246/246 both chromium and firefox. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TjTnfchFvvQvKZUZv2jpT8
Client Test Results102 tests 102 ✅ 0s ⏱️ Results for commit fa4291e. |
Client V3 Test Results397 tests 397 ✅ 4s ⏱️ Results for commit fa4291e. |
|
Python Test Results 1 files 1 suites 1m 18s ⏱️ Results for commit fa4291e. |
Playwright E2E Results (chromium)246 tests 246 ✅ 2m 30s ⏱️ Results for commit fa4291e. |
Playwright E2E Results (firefox)246 tests 246 ✅ 2m 34s ⏱️ Results for commit fa4291e. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
Phase 3, Step 5 of the collaborative script editing rebuild (#889) — the final step before the phase's exit criteria ("an admin can switch a show between the legacy and collaborative experience with the setting; both are tested; the collaborative one has full single-user parity").
Most of the backend for this step already existed from earlier phases (
REQUEST_SCRIPT_CUTS,has_draftper-revision annotation, the 409 guards) — this step is primarily client wiring plus docs.CollabScriptEditor.vue's Cuts button now sendsREQUEST_SCRIPT_CUTSinstead of being permanently disabled, reusing the sharedscriptConfigStore.cutModeflag andScriptLineViewer's existing cut UI exactly as the classic editor does. Proactively disables Cuts with a specific reason (someone else cutting, an editor present, or an unsaved draft) rather than waiting on a round trip to find out.has_draftflag (already returned by the API, unused until now) to block Load/New Revision/Edit/Delete — with a tooltip explaining why — while the relevant revision has an active collaborative draft, mirroring the server's own_revision_is_lockedcheck. Adds a Discard Draft banner + action, reusing the same "other editors will lose their work too" warning as the in-editor Discard (D9), since discard is room-wide regardless of entry point.collaborative_script_editingis no longerhide_from_uinow the editor is complete.docs/pages/script_config.md's Editing/Saving sections rewritten for both modes (the old "only one person can edit" wording was legacy-only); documents cut mode and the Revisions page's draft gating.Test plan
ruff check/ruff format --checkclean (1 test updated for the un-hidden setting)CollabScriptEditor.test.ts, and a full newScriptRevisions.test.ts, which had zero prior coverage), each significant fix mutation-tested;tsc --noEmit/eslintclean🤖 Generated with Claude Code
https://claude.ai/code/session_01TjTnfchFvvQvKZUZv2jpT8