Repository navigation
Shared sessions: owner-left notice, a timed link with End session, language and terminal fixes, no built-in Firebase config - #143
Merged
Merged
Conversation
…ith End session, and fixes for the language and the terminal of a joining collaborator - A collaborator is told, in a popup and a bar, when the owner left, was never there or the session ended; Run and sharing of their own edits are off, and "Copy it to my own editor" makes a code link of what is on the page. - Share has a time (guest 30 minutes or 1 hour, signed in up to 7 days, admin limits), a countdown, Add time and End session; the link is the same through reloads; when it ends or runs out everything of the session is deleted from Firebase. - A collaborator joining or reloading no longer moves both pages to Assembly or restarts the owner's REPL, and sees what the owner's terminal already holds. - The home page opens in the language chosen last; a stale language record of the session no longer replaces it. - /config.js has no built-in Firebase project any more: without OPENREPL_FIREBASE_CONFIG it says so. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…over sessions in Firebase from the server - When a shared session ends or expires, a collaborator's page can only read: the editor is read-only, every Firebase write from the page is dropped (except the cleanup), the terminal and peer chat send nothing, the file browser and uploads are refused. The cleanup also removes chat-list/<id>. - A server job removes, every so many hours (admin setting, default 24), the sessions whose link ended or ran out and the sessions left with no owner, from openrepl, editor_values, chat-list and file-browser. It signs in to the Realtime Database as the service account of OPENREPL_FIREBASE_ADMIN (or OPENREPL_FIRESTORE_CREDENTIALS); the Health page shows its last run. - .env.example and README: OPENREPL_FIREBASE_ADMIN, and no built-in Firebase project any more. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… admin, a weekly cleanup - Creating a code link takes the last day it works (a date input from tomorrow up to the admin's most, a month ahead picked for you); the server checks the range and keeps the end as 23:59:59 UTC of that day. - An ended link answers 410 with no code, and /s/<id> says it has expired. - Links made before they had an end are given one a month from the first start with this, once; the server removes ended links every week (Health shows the last run). - Admin: "Longest a code link works" (1 to 365 days, default 30) and an Expires column in the list of shared code. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…al record behind, and the editor's mode could replace a file's picture or PDF - The wipe of a session called a function that is not on the page, so openrepl/<id> was never removed; it removes it by its path now. - The owner's page stops writing to Firebase when it ends the session (its terminal wrote the record again), and a collaborator's page that finds a session gone wipes what it wrote before it knew. - The editor's mode follows the picker only while the list is still on its first entry, and a later change of the picker does not replace "Image" or "PDF" that a file set. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… file chosen a moment after another, and a collaborator that started in C - The editor's language list has C and C++ as two entries that follow the picker's C and CPP one to one; Ace colours both with its one mode, a file by its extension picks one of them, and a record of an older page that says c_cpp is read as the language the picker is on. - Choosing a file of one language 2.5 to 3.5 seconds after a file of another left the first language: the page's late look at the editor's language put the picker's language back. A selected code file now decides it. - A collaborator's page starts its terminal in the owner's language, and says nothing about its own until it has it, so the owner's page no longer restarts in C. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ner's language late no longer moves the owner's page On a slow runner the collaborator's page started in the picker's first choice (C) and then wrote that language to the session, so the owner's page followed it. A collaborator now says nothing of its language (to the session or to the owner's terminal) until the first record of the session is read and applied. A test holds the collaborator's messages back to show it: it failed before and passes now. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ns B2 keeps of a snapshot, and let the snapshot interval be saved - The Object storage box of the live map says how much the bucket holds, counted from the store's own listing (objects and the older versions a versioned bucket keeps), in the background and kept for 30 minutes. - After each snapshot of a home the older versions of its files are removed from the bucket for good, keeping the newest and the last of each of the last 6 clock hours; a bad snapshot cannot replace the only good copy of the day. It needs a key that may delete files. - The "Minutes between snapshots" field of the admin settings did not turn Save on when it was edited; a test now checks that every field of the form does. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…guage instead of reading it once Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…cks over the editor An address typed in the bar loads in the tab that is shown (Back returns); a name is counted from the home folder, a port goes to the workspace's program, other sites are refused and a missing file says so. + opens an empty tab with suggestions. The pane can be dragged by its grip over the editor or the terminal, or out of the window to pop out. The sandbox bar above the page is removed. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…e a note of their own (a note is at most 220 words) Co-Authored-By: Claude Sonnet 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.
What changes
/config.jsno longer has a built-in (production) project. WithoutOPENREPL_FIREBASE_CONFIGit servesnulland a console error, the log saysfirebase: NOT SET, and the admin health page fails the Firebase line.Before deploying
OPENREPL_FIREBASE_CONFIGmust be set in production, or sign-in and shared sessions stop working.Tests
shared-owner-left,shared-link-time,shared-language,shared-terminal,remember-language(run locally against a Firebase Realtime Database emulator), plus Go tests for the limits, the Genie notes and the Firebase config. Page tests 186 pass.🤖 Generated with Claude Code