Repository navigation
🤖 fix: show the field and rule for oRPC input validation errors - #7826
Conversation
Saving an invalid branch or subdirectory runs the real backup.saveSettings input validation, then expects the shown error to name the field and the schema's rule. It fails today: the section shows only "Input validation failed". --- _Generated with `xum` • Model: `anthropic:claude-opus-5-5` • Thinking: `high` • Cost: `$`_ <!-- mux-attribution: model=anthropic:claude-opus-5-5 thinking=high costs= -->
oRPC rejects schema-invalid input with "Input validation failed" and puts each schema issue in data.issues, which reaches the client. getErrorMessage read only error.message, so every form that showed it lost the field and rule. It now appends each issue as "<path>: <message>". The issue-path formatter moves from the server's formatOrpcError to src/common/utils/errors/formatValidationIssues.ts so both share it. --- _Generated with `xum` • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_ <!-- mux-attribution: model=anthropic:claude-opus-5-5 thinking=high -->
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
@codex review |
🛡️ Codex Security Review · Automatically triggeredSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dadb32fc20
ℹ️ 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".
🟢 e2e stories (Haiku): 14 passed22 agent steps · 7 replayed from cache · 15 model calls · 46.2k tokens (28% cached) All 14 tests in 9 files
e2e 0.20.0 · 1m 21s · web · run artifacts 🟢 e2e Electron stories (Haiku): 3 passed3 agent steps · 3 model calls · 8.0k tokens (32% cached) All 3 tests in 3 files
e2e 0.20.0 · 19.0s · electron · run artifacts 🟢 e2e agent repros (Haiku): no tests selectedSpend: $0.00 of the $1.00 cap (proxy ledger) e2e 0.20.0 · 5.4s · 2 targets (web, phone) · run artifacts |
|
Independent UI verification: PASS+NOTES at dadb32f I did not write this code. I compared main and this PR in two isolated dev servers. Each server had its own temp Steps
Settings > Backup, parent vs head
Other settings routes (real oRPC wire errors through
|
| Call | Parent | Head |
|---|---|---|
agentResourceLimits.set({cpuCores: 0, memoryGiB: 99999}) |
Input validation failed |
Input validation failed: cpuCores: Too small: expected number to be >=0.1; memoryGiB: Too big: expected number to be <=16384 |
server.setApiServerSettings({bindHost: null, port: 70000}) |
Input validation failed |
Input validation failed: port: Too big: expected number to be <=65535 |
providers.setModels({provider: "openai", models: [42]}) |
Input validation failed |
Input validation failed: models[0]: Invalid input |
None of the messages were garbled. Each one used the <field>: <rule> shape the PR describes, joined with ; , and the array index rendered as models[0].
Notes
- I found no other settings form that sends a zod-invalid value from its UI. Agent resource limits, the API server port, task limits and heartbeat intervals all check or clamp the value in the client first. MCP and Secrets show
err.messageinstead ofgetErrorMessage. A haiku explore pass agreed. So in the UI the change is visible only on the Backup form today. The other routes in the table above prove the formatting on real wire errors, but no user reaches them from those forms. - At 390px the long message wraps inside the card with no overflow (screenshots below).
- The message keeps the zod field key (
repoUrl,path), not the UI label ("Repository URL", "Subdirectory"). It is readable, butpathfor the Subdirectory field is a small mismatch. This is a possible follow-up, not a blocker. bun test src/common/utils/errors.test.ts src/common/utils/errors/formatValidationIssues.test.tson head passed 25 tests with 0 failures. I did not test a thrown non-validationORPCErrorin the UI. The unit test "keeps the message of an oRPC error whose data has no issues" covers that case.
Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high • Cost: $1.91
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9815ff5e11
ℹ️ 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".
🛡️ Codex Security Review · Automatically triggeredSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
|
@codex review Please take another look. The limits moved to src/constants/errors.ts. |
|
Codex Review: Didn't find any major issues. 🚀 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
🛡️ Codex Security Review · Automatically triggeredSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |




Why
Fixes #7771. When a settings form sends input that the oRPC schema rejects, the app shows only "Input validation failed", so the user cannot tell which field is wrong. In Settings > Backup, an invalid branch or subdirectory hit this.
What changed
getErrorMessagenow appends each schema issue from the oRPC error'sdata.issuesas<field>: <rule>. Example:Input validation failed: branch: Enter a valid Git branch name.Scope
getErrorMessage, not only Backup.path, and the rule text names it.Blast Radius
Only errors that carry
data.issueschange, so other error messages stay the same. The existing message clamp still limits length.Verification
backup.saveSettingsschema. It failed with only the generic message and now shows the field and rule. Its expected text comes from the schema.Generated with
xum• Model:anthropic:claude-opus-5-5• Thinking:high• Cost:$13.47