feat: allow disabling AI-generated thread titles - #12980
nullStack65 wants to merge 2 commits into
Conversation
RESULTStatus: PASS PR: #12980 Branch: Base: Head: Implemented
Zero-LLM-title proof
Tests
Files changed
Scope / deviations
Environment caveats (this checkout, not the PR)
Review notes
|
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — This PR adds an environment-wide production setting, enabled by default, that gates three AI title-generation paths and hides the regeneration action when disabled. Human review is also warranted for the unresolved restore-defaults omission, which can leave the setting disabled despite reporting success. Not approved because:
Adjust the Minimum Blocking Severity for this repo — including turning it Off — in Settings. You can add or adjust custom eligibility rules. Learn more. |
|
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 configurationConfiguration used: Repository: pingdotgg/t3code/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughAdds the ChangesThread title generation setting
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Feature Sequence Diagram(s)sequenceDiagram
participant SettingsPanel
participant ServerSettings
participant ProviderCommandReactor
participant textGeneration
SettingsPanel->>ServerSettings: update generateThreadTitles
ProviderCommandReactor->>ServerSettings: read generateThreadTitles
alt setting enabled
ProviderCommandReactor->>textGeneration: generate or refine title
else setting disabled
ProviderCommandReactor-->>ProviderCommandReactor: retain deterministic title or complete without generation
end
Suggested reviewers: Merge Risk: ⚪ Minimal · up to Users can disable AI thread-title generation while retaining deterministic titles, and the setting is exposed consistently across server behavior and web controls. The change is ready to merge. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Add an environment-wide generateThreadTitles server setting, default on. When off, T3 makes no title-generation LLM call: the first-turn generation, refinement, and manual regeneration paths all return early, leaving the deterministic first-prompt title in place. Manual regeneration still completes through the existing path so no spinner or titleRegeneration state is left pending. The setting is surfaced in Settings > General > Text generation, is searchable, and hides the per-thread Regenerate title action when off. Conversation inference and provider/agent rename behavior are untouched.
Global "Restore default settings" omitted generateThreadTitles, so turning AI thread titles off and then restoring defaults reported success while leaving the setting false. Its default is true. Add it to the changed-setting labels, the changed-setting memo dependencies, and the restore updateSettings patch, matching the other server settings. Cover the hook with a focused regression test proving the false -> true reset and the changed label.
5beb546 to
b3bd003
Compare
RESULT — restore-default repairStatus: PASS Prior head: Final head: Current upstream main: Repair
Re-inspected the whole hook: the changed-label list, its memo deps, and the restore patch are the only three places server settings participate, and the global flow in Confirmation: after turning Generate thread titles with AI off, global Restore default settings now applies a patch containing Regression proof Added
Negative control: running the same test against the pre-fix head fails with Original feature guarantees (unchanged; covered by
Validation Run in the rebased tree (upstream
All existing tests from the original implementation are retained. Review state
Diff scope
No unrelated changes were introduced. The branch was rebased onto current upstream Base/head receipts
|
|
This PR was opened against upstream by mistake. The change is a fork-only customization and is not intended for upstream submission. Canonical PR: nullStack65#3 Final feature head remains |
Problem
T3 always asks a model to name a thread. On the first turn it calls
textGeneration.generateThreadTitle, then may refine that title, and the per-thread Regenerate title action calls the model again. Users who do not want any title-generation inference have no way to turn it off.What changed
Add an environment-wide server setting,
generateThreadTitles, on by default.packages/contracts/src/settings.ts): new boolean onServerSettingsdecoding totrue(Schema.Boolean.pipe(Schema.withDecodingDefault(Effect.succeed(true)))) and an optional boolean onServerSettingsPatch. Not added toPROJECT_SCOPED_SERVER_SETTING_KEYS; no DB migration (settings are JSON).ProviderCommandReactor.ts): all three title paths return before anygenerateThreadTitlecall when the setting is off.maybeGenerateThreadTitleForFirstTurn— returns before generation; the deterministic client-derived seed title is left untouched.maybeRefineThreadTitle— returns before dispatchingthread.title.refine.regenerateThreadTitle— returns{ _tag: "Completed", title: undefined }, using the existing completion path sotitleRegenerationis cleared instead of leaving a spinner.SettingsPanels.tsx,settingsSearch.ts): row in Settings → General → Text generation titled Generate thread titles with AI, with the standardSettingsRow/ScopedSwitch/reset mechanics, plus a search entry.useThreadActionMenu.ts): hides the per-thread Regenerate title item when the environment has the setting off.Behavior guarantees
generateThreadTitleis still called on the first turn.ProviderRuntimeIngestion.tsis not modified). The thread keeps the deterministic title derived from the first prompt.Tests run
vp test run apps/server/src/orchestration/Layers/ProviderCommandReactor.test.ts— 73 passed (adds default-ON first turn, OFF first turn keeps seeded title with zero calls, OFF manual regenerate clears state with zero calls, OFF refinement with zero calls).vp test run packages/contracts/src/settings.test.ts— 145 passed (addsDEFAULT_SERVER_SETTINGS.generateThreadTitles === trueand decode/patch coverage).vp test run apps/web/src/components/settings/settingsSearch.test.ts— 58 passed.@t3tools/contracts,@t3tools/web,t3— exit 0.vp fmt --checkon all touched files — clean.Model/harness:
deepseek/deepseek-v4.1-flashvia OpenCode.Summary by CodeRabbit
New Features
Bug Fixes