Desktop app cannot change keys after the first Setup

未关闭
#564 0 条评论 0 个 reaction 已指派 1 人 在 GitHub 查看

维护者通常 1 天内回复

@Patriciaath999 已经在做这个了。

开始于 2026年10月31日。

  • #569 来自 @Patriciaath999 —— 未关闭

评估

难度
5/5
预计耗时
一周以上
新手友好度
35/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
rust
领域
desktop, security

调研方向

Start by reading src/main.rs:446-454, desktop/src/server.rs:118,235, and desktop/src/main.rs:294-330 to trace Setup, the launch save code, child shutdown, and exit handling. Decide how the shell securely obtains or generates the save code, then distinguish an intentional restart from a crash and preserve the refusal while an interview is running or reporting. Done means the desktop Setup page can change keys, restart the child successfully, and retain the web half’s interview-safety behavior.

由索引模型根据 Issue 内容生成。

描述

The desktop app still offers no way to change keys after the first Setup. #528 reopens Setup from the lobby for a standalone loopback web server and leaves the desktop app's child server out on purpose: run_web passes !launched_as_child when it builds the Setup context (src/main.rs:446), and the shell launches its child with CODETRIAL_EXIT_WITH_STDIN (desktop/src/server.rs:118), so the lobby there never shows Change keys. A desktop user who skipped the Google key still has to find codetrial.env.local under %LOCALAPPDATA%\org.sysprog21.codetrial, edit it by hand and restart the app.

This is the desktop half split out of #513. It needs three things:

  1. Change keys in the child server. #528 requires a save code generated at each launch and printed only to the terminal that started the server (src/main.rs:454). The desktop app has no terminal, so the shell has to obtain that code and supply it to the page, or the child needs another proof only the shell holds.
  2. A restart that is not a failure. After Setup writes the file, the shell has to stop the child with Server::stop (desktop/src/server.rs:235) and call launch again (desktop/src/main.rs:294). Today any child exit reaches Status::Exited, which shows the failure page unless the app is quitting (desktop/src/main.rs:330), so the restart has to be told apart from a crash.
  3. The same refusal as the web half. #528 refuses a save while a local interview is running or still writing its report; the desktop restart must keep that, so it never ends an interview in progress.

Which should carry the save code to the desktop page: the shell reading it from the child's output, or the shell generating it and passing it to the child at launch?

主要语言
Rust
星标
223
派生
148
平均合并
1 天 10 小时
30 天内合并 PR
230

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

sysprog21/codetrial 的其他 Issue

查看 sysprog21/codetrial 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。