Skip to main content

Product decisions

Learn exposes hosted playgrounds inside Programming. The first version uses platform-managed runners explicitly enabled by Infrastructure operators. Registered customer devboxes are not selected automatically. Supported language templates are Python, JavaScript, TypeScript, C, C++, Java, Rust, Go, Ruby, PHP and shell. Creation only offers languages reported ready by the managed pool. Normal access requires a paid personal-workspace subscription or the active feature.learn.playgrounds account benefit. Workspace membership or somebody else’s paid team subscription does not confer personal playground access. Owners may invite named accounts as editors or viewers. Invited accounts must also have playground access. Only owners manage collaborators. Meet is an intentional exception: a current, confirmed @tuturuuu.com room admin elevates programming and playground access for all admitted participants in that room. The server checks the host’s auth identity. This does not grant a permanent benefit, expose workspace archives or bypass the waiting room. Closing the meeting prevents fresh coding tickets; outstanding tickets expire shortly. The host selects a Learn problem or owner-controlled playground for the room. Learn problem execution uses public tests; hidden test data is never shared.

Workbench layout

Learn and Meet share the editor, file tabs, and execution controls in packages/programming-ui. Learn keeps the collapsible output panel. Meet shows Tests, Console, and Web Preview in a separate pane. Public Learn problems show individual case results and failure details. Hosted playgrounds support console runs and a sandboxed web preview on a valid port. Hosts can switch a Learn problem’s runtime without replacing that runtime’s collaborative document. Hosted playgrounds use the runtime chosen when the project was created. The Meet file tabs show collaborators’ current files. On wider stages, the file tree also shows the current session’s editors. The Checkpoints control saves a playground to its owner’s Drive or persists a Learn problem’s shared room document. Only the host can save an interactive checkpoint. Other editors run the latest saved playground revision, and collaboration continues to save edits automatically. The preview honors the room’s access rules. The workbench follows the app’s theme and reduces motion when requested.

Mira in a Meet coding room

An admitted host with edit access can ask Mira to explain selected lines or suggest a fix. Chat requires the host’s current Private Mira choice, workspace and account eligibility, and available credits. Voice Live uses the host’s active private session. The host shares a bounded code selection with that session and then reviews the result before sharing it back to the meeting. Other participants can see shared explanations and proposals after their programming access is checked. Mira identifies the file and lines under review and shows proposed changes as a diff. The host can accept or dismiss a proposal. Acceptance compares the proposal to the current shared file and applies it only if the baseline still matches. A changed file requires a new proposal. Accepted changes identify Mira’s source and the host who accepted them. If the host selected a failed public test when asking for a fix, the same test result can jump to the linked line. Run the tests again to check the outcome after accepting a fix. Regression coverage includes room-programming.test.ts, programming-mira-fix.test.ts, programming.test.ts, workbench-output.test.tsx, workbench-files.test.tsx, and programming-panel.test.tsx.

Files and environments

Project files live in the owner’s personal workspace Tuturuuu Drive, including when the project is opened from an organization education workspace or meeting. Server metadata points to immutable file objects. Each successful checkpoint advances an optimistic revision. Unchanged file objects are reused; stale writers must retry after reconciling their state. Editing is collaborative through Yjs documents. Remote cursors identify the active file and position; pointers are normalized to the coding pane. Presence is transient and never written to Drive. Learn and Meet reuse the same workbench and realtime protocol. Background saves coalesce changes and send changed text plus a path inventory. No-change snapshots and ticket refreshes avoid file transfers. Runner-created files are exported at bounded intervals and after commands complete. Dependencies and caches are kept in the warm isolated environment, not copied to Drive. Only regular UTF-8 text files are saved: at most 128 files, 256 KiB per file and 2 MiB per project. Symlinks, binary files, node_modules, .git, __pycache__, target and .venv are excluded. Oversized files report a save failure. Managed containers use gVisor, pinned images, non-root users, resource limits and no host mounts or credentials. Warm environments retain installed dependencies until they sleep after 15 minutes idle or reach a two-hour lifetime. Drive files persist across sleeps; templates and project commands rebuild dependencies when needed. Network access is disabled unless operators configure a dedicated, restricted managed network.

Previews and recovery

Private app previews require current project or admitted meeting authorization. The preview document executes in a sandboxed iframe with an opaque origin. It cannot read Tuturuuu cookies or expose a public runner port. Web module and CSS assets use a 60-second capability limited to one project and port; native assets use a separate loopback capability and authenticated proxy. Reload the preview after capability expiry. GET documents, modules, stylesheets and binary assets are supported; runtime API requests, WebSockets and form submission are disabled. Unsupported preview behaviors must remain explicit rather than weakening the application origin. Offline programming rooms reserve at most three automatic checkpoint attempts within two minutes of the first offline attempt, at least 30 seconds apart. The reservation is persisted before the provider call, so duplicate alarms and object restarts cannot replenish it. At exhaustion or expiry, the room retains its unsaved document and revision without scheduling more offline retries. A current authorized owner may explicitly checkpoint the retained document; a confirmed save clears the retry budget. Viewer requests cannot recover or overwrite it. Active signed connections retain their existing checkpoint and ticket-expiry behavior; this offline bound is not a platform spending cap. Regression coverage: collaboration-retry-budget.test.ts counts provider/storage operations through failures, duplicates, restarts, deadlines and owner recovery. The isolated Worker/SQLite fixture reconstructs handlers against real persistence and invokes alarm logic explicitly; hosted alarm delivery and Drive remain separate acceptance evidence. Keep the room open when Drive reports a save failure. Durable room state and Drive confirmation are distinct. A busy project or conflicting revision must not be silently overwritten. Stopping an environment terminates its processes; only files already checkpointed to Drive survive. Regression evidence belongs in apps/database/supabase/tests/hosted-playgrounds.sql, packages/realtime/src/collaboration, Meet admission tests and SDK sandbox tests. See the runbook for rollout gates and operational diagnostics.

Runner exports and collaborative edits

Runner exports first commit against the current database run lease and Drive revision, then join the durable Yjs document and participant broadcasts. A previously issued runner ticket cannot admit files after cancellation or a newer run takes over; a rejected commit leaves the live room unchanged. Ordinary room edits may clear terminal run metadata and continue saving after a run finishes. If an editor changes a runner-touched file while its Drive commit is awaiting a response, the newer editor content or deletion is preserved in the room and checkpointed separately. A lost HTTP acknowledgement after a successful database commit can leave the room’s revision behind Drive; later saves fail with a conflict rather than overwriting it. Automatic lost-response reconciliation is not implemented, and reconnecting alone is not a recovery guarantee. The same fail-closed revision conflict can occur if the committed candidate and newer editor changes exceed the combined room budget; valid peer edits stay in the room, while the committed Drive revision remains authoritative. The runner sends its complete path inventory and only changed bytes. A file changed only in the editor is retained; files created by the runner appear in every participant’s editor. If both sides change the same file, or the runner deletes a file edited by a participant, the export is rejected with a visible save conflict. Retrying an acknowledged export does not upload unchanged bytes. This applies to personal Learn projects and admitted Meet programming rooms. Failed initial template saves release only an unpublished project’s quota; existing projects are retained. Regression evidence: runner-files.test.ts, the local programming Worker probe, playground-service.test.ts, programming-collaboration.test.ts, and the hosted-playgrounds pgTAP suite. The framework-independent @tuturuuu/realtime/core/retry-budget planner owns finite attempt/deadline decisions; the Worker persists reservations before I/O and retains authorization and recovery. Invalid durable retry state stops without resetting the job or deleting documents. See apps/docs/build/devops/programming-realtime-runbook.mdx#portable-offline-retry-planning for the adapter contract and planner, counted-handler and SQLite regressions.