Repository navigation
Feature: workshops with several templates, workshop-only participant access - #64
Merged
Merged
Conversation
Draft specification for workshops that offer several templates (pinned or newest revision), a workshop overview, read-only closed workshops and the removal of anonymous browser workspaces and template access. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds WorkshopTemplate (SPEC-0022/FR-001): a workshop references its templates as ordered entries, each pinned to a revision or following the template's current revision. The migration backfills every existing workshop's pinned revision as entry 0 and makes the legacy Workshop columns optional; they are no longer read or written. - WorkshopService.resolve no longer rejects a workshop whose template was unpublished; pinned entries survive that (FR-002), following entries become unavailable (FR-003). - Readiness reports template, node-type and model checks per entry and fails the workshop only when no entry is ready (FR-016). - Deleting the current revision of a template a workshop follows is refused with revision_current_in_use (FR-018); pinned entries count as references. - The debug seed writes entries instead of the legacy columns. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
SPEC-0022/FR-011, FR-012. A workspace whose workshop is CLOSED or past its expiry keeps its reads and loses every write: - WorkspaceService resolves the workshop state with the token, and the WorkspaceGuard refuses state-changing requests with 403 workshop_closed, so a new write route cannot forget the rule. - GraphHandlerService re-reads the workshop on every run request and refuses it with workshop_closed; a socket authenticates once at connect time and must not outlive the workshop. - GET /workspaces/me returns the workshop (code, title, readOnly). - The editor shows a read-only banner, stops autosaving, hides edit and run actions, and switches to read-only when a save or run is refused. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
SPEC-0022/FR-006 to FR-010, FR-015, FR-017. Backend: - WorkshopParticipantService owns the join: a re-join returns the workspace whatever it holds, a new workspace is admitted through the per-address throttle (default raised to 100 per hour), and a single-entry workshop opens its copy instead of the overview. A failed start keeps the token. - GET /workshops/current lists the workshop's entries in order with availability and the participant's copy; /entries/:id/structure previews one; POST /entries/:id/start opens the existing copy or creates it. Two racing starts converge on the oldest copy and the loser deletes its own. - Entries are looked up through the caller's own workshop only. - Readiness exposes startable(): revision resolves and node types load. Model availability no longer makes an entry unavailable. Frontend: - /workshop/:code joins or, with a stored token, shows the overview directly, which stays readable after the workshop closed. - The overview shows template cards (Start / Continue / Preview structure) and "My workflows"; TemplateCard holds the shared card pieces. - The editor's Templates button becomes Workshop, back to the overview. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
SPEC-0022/FR-005, FR-016. - POST /admin/workshops takes an ordered list of templates, each pinned to a revision or following the newest one; PUT /admin/workshops/:id/templates replaces them on a DRAFT or PUBLISHED workshop, updating entries in place so entry ids in open participant overviews stay valid. Duplicates, blocks, deleted templates and revisions of another template are refused. - WorkshopAdmin moves out of AdminPage into its own file with an entries editor (template, newest or pinned revision, reorder, remove), a warning for unpublished templates that follow the newest revision, error reporting and readiness grouped per template. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
SPEC-0022/FR-013, FR-014. BREAKING: anonymous browser workspaces and the public template gallery are gone. Backend: - POST /workspaces is removed; WorkspaceService resolves no BROWSER token any more, so tokens issued for one open nothing (HTTP and socket). Retention still sweeps the old rows. - POST /workflows/from-template and createFromTemplateSlug are removed: workflow templates reach participants only as workshop entries. - GET /templates and /templates/:slug are workspace-scoped and serve block templates only; /templates/revisions/:id is removed. - The debug seed no longer creates a browser workspace. Frontend: - The start page offers the workshop code, a way back to the workshop last joined in this browser, and the facilitator link. It makes no request. - TemplatesPage, WorkflowListPage and the browser bootstrap are removed; /templates and /workflows lead to the active workshop's overview. - The editor without a workshop session (outside LTI) goes to the start page, and the block palette sends the workspace token. - A browser session stored before this change is dropped on first read. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- SPEC-0022 is implemented. Superseded requirements in SPEC-0001, -0002, -0003, -0004, -0007, -0008 and -0014 are rewritten to point at it (no anonymous browser workspace, no public gallery, several templates per workshop, read-only closed workshops). - CLAUDE.md, architecture, module map, debugging notes, frontend rules, README and .env_template describe the workshop as the only participant entry, the overview, the entries editor and read-only enforcement. - e2e: a workshop with two templates (pinned and newest) through overview, start, continue and preview; closing leaves the participant read-only and saves fail with workshop_closed; the start page offers only a code and the anonymous endpoints answer 401/404. Helpers publish workshops through the facilitator API. The template lifecycle test reads publication from the facilitator listing, since there is no public gallery any more. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
SPEC-0022: workshops offer several templates (pinned or newest revision), the workshop code is the only participant entry, and closed workshops are read-only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
Implements SPEC-0022 (ADR-0010). Before this, joining a workshop gave a participant almost nothing that opening a template from the gallery did not, and anyone could create an anonymous workspace, read every workflow template and run graphs against the deployment's provider keys.
WorkshopTemplatetable; the migration backfills every existing workshop as one pinned entry. Facilitators edit entries in/admin/workshops(add, reorder, pin or follow newest), also after publishing. Readiness is reported per template.POST /api/workspaces,POST /api/workflows/from-template, the public gallery (/templates) and the workflow list page are removed./api/templatesneeds a workspace token and serves blocks only (editor palette). Joining is rate-limited per address (WORKSPACE_CREATE_MAX, default now 100/h).WorkspaceGuardrefuses every non-GET request with403 workshop_closed; runs are re-checked on every request, so an open socket cannot keep running. The editor shows a banner and hides edit and run actions; the overview stays readable.Breaking changes
Workshop.templateId/templateRevisionIdare nullable and unused; a follow-up migration drops them.Verification
yarn typecheck,yarn lint:check,yarn lint:specsgreen.yarn test:int) green, including the newworkshop-templates.int-spec.ts; migration and backfill checked on a scratch database.e2e/workshop-templates.spec.ts. Firefox not run locally.🤖 Generated with Claude Code