Repository navigation
Every page the server serves names the resolved language - #3262
Merged
FlexOr2 merged 12 commits intoNov 17, 2026
Merged
Conversation
The shell, the failed sign-in page and the sign-out page took a fixed `en`, the sign-in start sent no `ui_locales`, and the page loaded its words for the source language whatever `<html lang>` said. One module, `page_language.py`, now decides a request's language with webauth's resolver (the session's account tag, then Accept-Language, then the source language) and writes it into the built page: the shell is read once at start, which fails unless it holds exactly one bare `<html>`, and both shell answers carry no ETag, `no-cache` and `Vary: Accept-Language, Cookie`. A failing session store logs and leaves the header to decide. The sign-out label is a songmaker catalog key; the page reads its language back through `pageLanguage()`, which fails loud on a language the app does not offer. Work-Item: #3259 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…atching the store class The session-store outage reaches request_language through the existing request.app.state.ctx.db boundary, so the test supplies the failure there and no longer replaces production behaviour on an imported class. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…hell English and free of their markup Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ge resolver's read-only session read The refused sign-in's shell sends no-cache, which the sign-in policy replaces with no-store on the callback path; the test pins the final header. The Logout bullet names the catalog label logoutPage.logOut, and the account_language bullet says request_language reads the column without renewing the session. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ts page literally Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ine; the sign-out test names its source-language proof
… disposes its engine The review's delta request required very long values at the HTTP boundary; the outage test now disposes the unreachable engine it creates. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… server writes over Web:S5254 flags an html element without lang. The template now holds lang="%page-language%"; PageShell requires exactly one placeholder and replaces it with the resolved language, so app.html still fixes no language. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…the-r Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
FlexOr2
deleted the
claude/issue-3259-every-page-the-server-serves-names-the-r
branch
November 17, 2026 23:08
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.



Work-Item: #3259
Closes #3259
Routing: build sonnet/high; fix sonnet/high; review opus/medium; test sonnet/high; gate gpt-6-astra/high; land sonnet/medium
Follow-ups: outage 500s of /auth/logout and /api/auth/me -> #3178; test_server.py built-shell fixture duplication -> #2232.
Slice A of #2976. The shell, the failed sign-in page and the sign-out page now carry the language the server resolved, instead of a fixed
en.src/songmaker_cli/page_language.pyownsAPP_LANGUAGES,request_language(session account tag viaaccount_language_of_session, elseAccept-Language, else the source language) andPageShell.PageShellreadsfrontend/build/index.htmlonce atcreate_appand refuses to start unless it holds exactly one%page-language%(the value ofapp.html's<html lang>).spa_fallback(now a sync def) and the sign-in refusal both answer it with the resolved language in<html lang>, no ETag or Last-Modified andVary: Accept-Language, Cookie; the shell sendsCache-Control: no-cache, and on the callback path the sign-in policy replaces it withno-store, so the refusal's final header isno-store(security.md says so; the test pins it).ui_locales; the sign-out page carries the resolved lang and the catalog labellogoutPage.logOut.app.htmlholds<html lang="%page-language%">, a placeholder and no fixed language;pageLanguage()returnsLanguageand fails loud on an unoffered tag;+layout.tsloads words for it.Also adapted: the built-shell literal of
tests/support/web_app.py(BUILT_SHELL) and the test files that write anindex.html, which now carry the placeholder.Tests written first at the HTTP boundary (
tests/songmaker_cli/test_page_language.py, red run: 16 failed, 1 passed before the wiring);test_auth_api_sign_in.pyadapted.Also adapted:
scripts/dead-symbols.allow(theLANGUAGESentry now suppresses nothing),scripts/dead-exports.allow(sourceLanguageis test-only now, generated),frontend/src/lib/utils/format.test.tsandrecency.test.ts(they set<html lang>to a language the catalogs do not offer and now mock the offered list).Static checks:
bash scripts/static_checks.shpasses after merging main.Deferred with owners: proof that the shell and the sign-out page (its
<html lang>and itslogoutPage.logOutlabel) follow the account tag or Accept-Language in a second language goes to the German slice's render pass (onlyenis offered, sotext('de', ...)has no words yet; the HTTP tests here prove the shell and sign-in wiring with a patched offer, and the sign-out page only in the source language); a readable page for an empty lang, the offline service-worker shell keeping its install-time lang, and the vite dev server (its page carries the unreplaced%page-language%, sopageLanguage()fails loud there) are gaps on #2976.🤖 Generated with Claude Code