Web lobby cannot reopen Setup after configuration
Maintainers usually reply within 1 day
Assessment
This issue has not been assessed yet.
Description
After initial configuration, the local web lobby provides no way to reopen Setup and update service credentials. This proposal covers editing those credentials through the web interface and applying them after a server restart.
Reproduction
Tested on Linux using the upstream CI binary reporting codetrial 0.1.0 (ce2c50a) and Chromium, with isolated local service fixtures.
- Start
codetrial webon a loopback address with an empty data directory. - Complete Setup with LiveKit credentials, leaving the optional Google key empty.
- Sign in through the local GitHub-username form and look for a way to change the service keys.
- Open
/setupmanually. - Stop and restart the server using the same data directory.
The lobby has no entry back to Setup. /setup returns HTTP 200 with the same HTML as the lobby, without a Setup form. Subsequent launches skip Setup because the configuration file exists. All three independent browser runs reproduced this behavior.
A local user should be able to reopen credential settings from the lobby, including adding a Google key after initially leaving it empty. The current workaround is to edit codetrial.env.local manually and restart.
Impact on the existing implementation
Restarting reuses credential loading, provider-pool construction and dispatcher creation in run_web. An unmanaged web server needs a manual restart. Local interviewer tasks stop with the process, so applying changes requires an idle check and admission control.
Reloading in place requires consistent updates to runtime configuration, the provider pool, quota refresh and dispatcher availability; changing the LiveKit URL also affects CSP. Updating only the file leaves existing consumers using old settings. See web_router.
Both approaches need an editing path because the cold-start Setup writer refuses an existing file.
Proposed web-server change
- Add a "Change keys" entry for locally reachable deployments, retaining the loopback-listener, proxy and Host restrictions on the editing routes.
- Show the current endpoint and key-presence indicators without returning secrets. Preserve keys left unchanged and unrelated settings, including
SESSION_SECRETand database paths. - Reuse field validation and credential probes before safely updating the configuration file this launch actually reads. A failed validation or write must preserve the original file.
- Use the restart approach: accept changes while idle, show a restart-required notice and block new interview admission until restart. Keep the process running until explicitly restarted, so an unmanaged web launch can be restarted manually.
I would like to work on the web-server change described here.
Validation and limits
Three-run checks confirmed that retaining the database and SESSION_SECRET preserves local sign-in across restart, while changing the secret invalidates the session. The 286 existing Setup, account and lobby browser tests passed after restoring their checksum-pinned vendor resources. Additional HTTP and protocol-fixture checks covered file updates, failed probes, file permissions and local-access restrictions.
These results cover the original Linux web implementation. Actual interviews, GitHub OAuth, Windows restart and a new reload implementation were not tested.
- Dominant language
- Rust
- Stars
- 215
- Forks
- 141
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 228
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from sysprog21/codetrial
-
Audio output can be confirmed without playing a test soundPossibly taken @ChenYingHan1121 claimed this 10 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
sysprog21/codetrial#359 · 6 comments · 1 assignee ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
Maintainers usually reply within 1 day
-
Add update notifications for the prebuilt Windows binary ProblemPossibly taken @Yu-Ming-Chang claimed this today. Open
sysprog21/codetrial#547 · 2 comments · 1 assignee ·
Maintainers usually reply within 1 day
-
Tell macOS binary users when a newer release is availablePossibly taken @LJY2000-max claimed this today. Open
sysprog21/codetrial#543 · 2 comments · 1 assignee ·
Maintainers usually reply within 1 day
-
An abandoned start holds its interviewer slot for five minutesPossibly taken @matthiola0 claimed this today. Open
Difficulty 4/5 3-5 days Newbie friendliness 43/100
sysprog21/codetrial#539 · 3 comments · 1 assignee ·
Maintainers usually reply within 1 day
All issues in sysprog21/codetrial
Similar issues
-
area:cli bug dotnet good first issue priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
delta-io/delta-kernel-rs#3757 ·
Maintainers usually reply within 3 days
-
area: library data-loss type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
alplabai/signex#1740 · 1 comment ·
Maintainers usually reply within 1 day
-
test(fslc): the unreadable mutate catalog test pins the Unix I/O error text and fails on WindowsPossibly taken @rizumita claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 69/100
Maintainers usually reply within 1 day