Skip to content

feat(web): commit and PR generation failures name the model and offer Settings - #13860

Open
ScottN-PV wants to merge 4 commits into
pingdotgg:mainfrom
ScottN-PV:fix/12653-text-generation-errors
Open

ScottN-PV wants to merge 4 commits into
pingdotgg:mainfrom
ScottN-PV:fix/12653-text-generation-errors

Conversation

@ScottN-PV

@ScottN-PV ScottN-PV commented Sep 26, 2026 •

Copy link
Copy Markdown

What Changed

A failed commit or PR text generation now names the attempted model and provider instance. On web and desktop, the error toast gains a Settings button.

  • The button opens the picker for the setting that ran: General's text-generation model, or Source Control's writer model when a writer override was available.
  • It targets the acting environment and checkout. An unset, unavailable, or disabled writer falls back to the general selection, and the error names that model.
  • If the acting project no longer exists, Settings shows "Select a project to choose one of its checkouts" with no setting editors. The scope bar still reads All projects, which is existing Settings behavior.
  • The button is hidden when there is no active environment or git cwd.
  • The original diagnostic and cause are preserved. TextGenerationError gains two optional fields, so errors from older servers still decode.
  • Mobile shows the richer message and has no Settings button.

The diff also adds doc comments to functions in the touched files. They change no behavior.

Why

Refs #12653. This is the smaller slice the maintainer suggested there. Fallback-origin explanations and failures of automatic titles and branches stay separate.

The toast showed the provider's diagnostic with no reliable model context and no direct way to change the model. The user had to guess which setting ran and find it in Settings.

UI Changes

Before
After

Before video and After video, both at 2 fps. Supplemental: Settings opened, writer Settings opened.

Removed project:

Before: editable environment defaults After: unavailable checkout, no editors
Before After

Before video · After video

The videos show the toast-to-Settings transition. The before screenshot revisits the recorded destination. The after screenshot shows the blocked destination. Native captures have visible compression.

Verification

  • Backend tests cover commit failures with an unset, available, unavailable, and disabled writer, plus a PR failure that creates no PR. They check the typed model context, the message, the preserved cause, and that no commit or PR lands. Contract tests cover the RPC round-trip and errors from older servers. Five of these fail on the baseline.
  • 80 focused logic and settings tests pass. They cover removed, replaced, and cross-environment projects, and a target that disappears before Settings loads.
  • Server and web typechecks, targeted lint, and git diff --check pass. Two React warnings in GitActionsControl predate this change and sit outside the edited lines.
  • Agent-operated browser check on a local Windows app: an invalid model produces the named error, Settings opens the General picker, and a valid model then commits on retry. An invalid writer override routes to the Source Control writer row.
  • Agent-operated check of the removed-project case: a real failed generation, then project deletion, in an isolated app.

Not tested: native desktop and mobile UI. PR failure has backend coverage only. No person ran these checks.

Checklist

  • This PR is small and focused (one concern, across server, contracts, and web)
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

Model: gpt-6-astra (reasoning medium). Harness: OpenAI Codex in T3 Code. Integration and version were not exposed. Codex did the implementation, tests, browser verification, review responses, and doc comments.

Model: claude-fable-5-1 (effort high). Harness: Claude Code CLI 2.1.283 and 2.1.284, invoked by Codex through PowerShell. Independently reviewed the code and drafts, and drafted this description.

Human involvement: selected the issue and scope, authorized verification, and reviewed and approved the first review and draft and the first doc-comment update. Requested and authorized the removed-project fix and its independent review, and did not perform the agent-operated checks.

Summary by CodeRabbit

  • Bug Fixes
    • Commit-message and pull-request content generation errors now identify the selected model and provider instance, and specify which model setting was used.
    • Failed generation does not create a commit or pull request.
  • New Features
    • Generation error notifications include a Settings action when the active environment and Git working directory are available. It opens the relevant model settings while retaining the environment and, when available, the associated project and checkout.

Name the attempted model and provider instance on commit/PR generation errors.
Route Settings to the model picker used by the acting environment and checkout.
Cover writer selection failures, RPC serialization, and legacy error decoding.

Part of pingdotgg#12653.

Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Claude <noreply@anthropic.com>
AI-Tool: OpenAI Codex
AI-Harness: Codex harness (integration/version not exposed)
AI-Host: T3 Code
AI-Model: gpt-6-astra
AI-Reasoning: medium
AI-Contribution: Implementation, test execution, browser verification, review response, and draft preparation
AI-Tool: Claude Code
AI-Harness: Claude Code CLI 2.1.283 invoked by Codex harness
AI-Host: T3 Code via PowerShell
AI-Model: claude-fable-5-1
AI-Reasoning: high
AI-Contribution: Independent code and draft review and final drafting
@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Sep 26, 2026
@ScottN-PV
ScottN-PV marked this pull request as ready for review September 26, 2026 19:53
@coderabbitai

coderabbitai Bot commented Sep 26, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: pingdotgg/t3code/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 8b5bab6d-45a4-4c95-8d91-9d6e527f564f

📥 Commits

Reviewing files that changed from the base of the PR and between b6dc056 and 7728ea1.

📒 Files selected for processing (5)
  • apps/server/src/git/GitManager.test.ts
  • apps/server/src/git/GitManager.ts
  • apps/web/src/components/GitActionsControl.logic.test.ts
  • apps/web/src/components/GitActionsControl.logic.ts
  • apps/web/src/components/GitActionsControl.tsx
🚧 Files skipped from review as they are similar to previous changes (2)
  • apps/server/src/git/GitManager.ts
  • apps/server/src/git/GitManager.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

Git commit-message and pull-request-content generation errors now include model and setting context. The error contract carries this context through RPC encoding. Text-generation error toasts provide a Settings action that navigates to the relevant settings page.

Changes

Text-generation error context

Layer / File(s) Summary
Attach model context to generation errors
packages/contracts/src/git.ts, apps/server/src/git/GitManager.ts, apps/server/src/git/GitManager.test.ts, packages/contracts/src/git.test.ts
TextGenerationError carries optional model and setting details. Git operations attach the selected model, provider instance, and setting source to generation failures. Tests cover model-selection cases, RPC serialization, and cases where failed generation does not create a commit or pull request.
Resolve settings scope for Git actions
apps/web/src/components/GitActionsControl.logic.ts, apps/web/src/components/GitActionsControl.logic.test.ts
The settings-scope helper resolves environment, project, and checkout context. Tests cover missing, replaced, and cross-environment projects.
Navigate from generation error to settings
apps/web/src/components/GitActionsControl.tsx
Text-generation error toasts add a Settings action when the environment and Git directory are available. The action navigates to Source Control or General settings with the resolved scope.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant GitManager
  participant TextGenerationError
  participant GitActionsControl
  participant Settings
  GitManager->>TextGenerationError: Attach model and setting context
  TextGenerationError->>GitActionsControl: Provide error details
  GitActionsControl->>Settings: Navigate to matching settings with environment and checkout context
Loading

Merge Risk: ⚪ Minimal · up to 7728e

Generation-error toasts now name the model and link to the relevant Settings page, and the link points at the settings actually used. No merge-blocking issues remain.

Security Architecture Review

Security architecture risk: 🔵 Low · up to 7728e

The new recovery link appears to keep users in the acting environment and checkout rather than directing them to another project's settings. No new security issue was identified, but coverage of the change is incomplete.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • observed — The error can now expose the attempted model and provider instance to the recipient of a Git-action failure. Those values appear in the message, but are not used to construct the Settings destination.

Trust Boundaries and Controls

  • observed — Server-originated diagnostic text remains presentation data. Navigation uses a schema-restricted setting identifier and an environment, project, and checkout scope resolved from the action and local state.

Resilience and Maintainability Implications

  • observed — An unavailable Settings scope has no matching members; checkout-scoped server writes iterate only resolved members, limiting the effect of a stale selection.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 81.82% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 11 functions across 7 files.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly identifies the main changes: model context in commit and PR generation failures and a Settings action.
Description check ✅ Passed The description covers the required What Changed, Why, UI Changes, and Checklist sections. It includes screenshots, videos, verification details, limitations, and scope. The small-and-focused checklis…
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR

Comment @coderabbitai help to get the list of available commands.

ScottN-PV and others added 3 commits September 26, 2026 19:49
Document the existing behavior without changing executable code.

Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Claude <noreply@anthropic.com>
AI-Tool: OpenAI Codex
AI-Harness: Codex harness (integration/version not exposed)
AI-Host: T3 Code
AI-Model: gpt-6-astra
AI-Reasoning: medium
AI-Contribution: JSDoc drafting, source-equivalence checks, targeted lint, diff checks, and PR update preparation
AI-Tool: Claude Code
AI-Harness: Claude Code CLI 2.1.283 invoked by Codex harness
AI-Host: T3 Code via PowerShell
AI-Model: claude-fable-5-1
AI-Reasoning: high
AI-Contribution: Independent review, docstring wording improvements, and follow-up drafting
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Claude <noreply@anthropic.com>
AI-Tool: OpenAI Codex
AI-Harness: Codex harness (integration/version not exposed)
AI-Host: T3 Code
AI-Model: gpt-6-astra
AI-Reasoning: medium
AI-Contribution: Implementation, regression tests, UI verification, docstrings, and publishing preparation
AI-Tool: Claude Code
AI-Harness: Claude Code CLI 2.1.283 invoked by Codex harness
AI-Host: T3 Code via PowerShell
AI-Model: claude-fable-5-1
AI-Reasoning: high
AI-Contribution: Independent implementation and docstring review, follow-up drafting
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Claude <noreply@anthropic.com>
AI-Tool: OpenAI Codex
AI-Harness: Codex harness (integration/version not exposed)
AI-Host: T3 Code
AI-Model: gpt-6-astra
AI-Reasoning: medium
AI-Contribution: Docstring drafting, source-equivalence checks, formatting, targeted lint, and publishing preparation
AI-Tool: Claude Code
AI-Harness: Claude Code CLI 2.1.283 invoked by Codex harness
AI-Host: T3 Code via PowerShell
AI-Model: claude-fable-5-1
AI-Reasoning: high
AI-Contribution: Independent implementation and docstring review, follow-up drafting

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant