refactor(desktop): unify settings UI layout#2268
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 515dd47673
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
esengine
left a comment
There was a problem hiding this comment.
Thanks for splitting the settings-UI refactor out of #2231 to keep that PR focused — that was the right move, and the settings-ui-guidelines.md doc is a nice addition. I haven't done the full behavior-preservation pass on the ~2000-line styles.css/settings.tsx rewrite yet, because the branch needs a rebase first (the diff will shift), but here's what's blocking:
-
CI is red — merge-skew with code I just merged.
tests/web-tools.test.ts > web search applies 15s timeout to fetchfails with "expected fetch to be called with an AbortSignal". This collides with thesearchSignal()15s-timeout work that just landed in #2259/#2252 (every engine's fetch now getsAbortSignal.any([caller, timeout])). Your branch predates it, so the test-merge drops the timeout on searchBing and the assertion fails. Please rebase onto current main and reconcile against the mergedsearchSignalhelper. -
Scope creep (and it's the source of the red CI). A desktop settings-UI refactor shouldn't be touching
src/tools/web.ts(theasync function searchBing→export async function searchBingchange) or addingtests/web-tools.test.ts. Please drop both from this PR. If exportingsearchBing+ a web-tools test is genuinely wanted, it belongs in a separate, clearly-scoped web PR — not bundled into the settings refactor. Removing them here also makes the rebase in (1) trivial. -
CodeQL "failure" is not a security finding — the run is a build/process exit-1 (no flagged alert), so it should go green once the build and tests pass after the rebase. No action needed beyond fixing (1)/(2).
-
Once it's rebased and CI is green, I'll do the full review of the settings/styles refactor — specifically verifying the theme mode/style merge preserves all 8 themes across modes as the description claims, that no shipped settings rows/controls are silently dropped in the settings.tsx rewrite, and i18n parity across en/ja/zh-CN (please run
tscinside desktop/ — root CI doesn't typecheck desktop/, and ja.ts looked like it only added 1 key).
Get (1) and (2) sorted and ping me — happy to dig into the refactor itself right after.
…ayout # Conflicts: # desktop/src/styles.css
|
Fixed the CodeQL check failure from run 78474119016. Root cause: the Perplexity missing-key test used a predictable temp config path with the process id, which flowed into readConfig and triggered CodeQL insecure temporary file detection. What changed:
Verification:
|
esengine
left a comment
There was a problem hiding this comment.
Good split out of #2231 — settings layout primitives, theme mode/style merge, and credential normalization are all things I wanted. I'll trim CONTRIBUTING.md and docs/design/settings-ui-guidelines.md in a follow-up — the source code is the source of truth for component conventions in this repo, no separate design doc needed. Approving so CI can re-run.
|
Resolved the review blockers in #2268 (review). What changed:
Verification run locally:
Note: the first local pre-push run used my real CI is now running on head |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a38e48320f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| setAppSecret(current.appSecret ?? ""); | ||
| setSandbox(current.sandbox ?? true); | ||
| }, [current.appId, current.appSecret, current.sandbox, configureOpen]); | ||
| }, [current.appId, current.appSecret, current.sandbox]); |
There was a problem hiding this comment.
Reset QQ drafts when reopening configuration
When a user opens the QQ configuration, edits the app id/secret or sandbox value, then clicks Back without saving and opens Configure again, the draft state is no longer reset because this effect only depends on the persisted current values. The previous configureOpen dependency refreshed the fields on each reopen, but now stale unsaved values remain and can be saved or connected accidentally; reset the drafts when configureOpen changes or when opening the panel.
Useful? React with 👍 / 👎.
Summary
Verification
Split From