Repository navigation
Development - #74
Merged
Merged
Development#74
Conversation
Any hash made the page a viewer of a session that did not exist, so the home
page's own links (#languages, #repl, #workspace, #request) broke the terminal
("master terminal is not available") and gave the chat a wrong id.
A hash is a share id only if it has the shape of a Firebase push key (a - and
12 to 30 of A-Za-z0-9_-; the SDK's keys are 20 long). The page script, the
terminal client and the Genie widget read it once, when they load, so clicking
an anchor later changes neither a master nor a viewer; a different share link
pasted into an open page loads that session. The widget keeps its own copy of
the pattern; a test compares the two.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…eaves
Everybody in a peer chat is user-xxxxx, kept per browser (localStorage), so a
reload or another tab is the same person; each tab has its own id so that two
tabs of one browser still show each other's messages.
What is on screen depends on who looks: your own messages are the light bubble
on the right ("You . user-xxxxx"), everybody else's are on the left under
their name. Before, the owner's messages were plain text and viewers' were
bubbles, so with three people nobody could tell who said what.
Small notes say who joined, left or turned peer chat on. A viewer writes a
join event when it opens a share link and a leave event on pagehide (best
effort); the owner writes none, so a page nobody shares leaves nothing in the
database. The messages Genie mirrors to viewers are shown as before.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d the home page says what it is The 312 titles of js/dsa.json (301 distinct) are put in a visitor's list the first time a practice page loads: ordinary questions with the id s-<name>, sorted after what the visitor generated, not counted in the 100 generated questions a visitor keeps, not sent to the account until opened (their done marks and deletions are), and not brought back once deleted. The editor waits for them, so a link to a starter works on a first visit. The list shows 10, 20, 40 or 100 rows to a page, with the range and page buttons under it; a search, a filter, the sort or the size goes back to page 1. The menu link is Practice DSA, and the home card says what the page is: 300+ problems and a coach that gives hints and never just the answer. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…hen it cannot A question that is not generated yet is written by Genie when it is first opened. A card over the editor says so from the moment the page loads (Getting your question ready, then what Genie is writing and how long it usually takes, then that it is still working), with Cancel throughout. The request is dropped after 60 seconds (the proxy's own limit is 90). Whatever goes wrong, the card turns into an error card with the reason and Try again or Close: it took too long, the connection failed, the request limit was reached (429), the page was refused (401, 403), Genie or the model is switched off (the server's own words), the answer could not be used, or the service failed (with the HTTP status). Before, a failure only wrote to the console. The model's answer is read more forgivingly: the template under c for C, one level down, or the only one in the answer (never another language's); missing comment marks get the language's own; the error says which keys the answer had. The description Genie writes is now saved, so a starter question no longer opens as Problem Description: null. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… names the model OpenRouter can answer 200 with no answer: an error in the body, no choices, or a message whose content is empty (a free model that is busy, or one that spent its whole budget thinking). The proxy now reads a whole reply and answers 502 model_empty with which model and why (it used its whole answer budget, it wrote nothing, it stopped, its host reported an error). The host's own words stay in the log, the request is not charged and an agent step is given back; a real answer passes byte for byte. The practice editor's card says Genie (<model>) is writing ..., names the model that did not answer in time, and has its own text for an empty answer instead of "couldn't be used". 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.
No description provided.