Skip to content

feat(web): regenerate thread titles from sidebar - #4810

Merged
t3dotgg merged 13 commits into
mainfrom
t3code/regenerate-thread-title
Jul 30, 2026
Merged

feat(web): regenerate thread titles from sidebar#4810
t3dotgg merged 13 commits into
mainfrom
t3code/regenerate-thread-title

Conversation

@t3dotgg

@t3dotgg t3dotgg commented Jul 29, 2026

Copy link
Copy Markdown
Member

Thread titles can stop reflecting the conversation as work evolves, while Sidebar v2 only supports replacing them manually.

This adds a Regenerate title action that sends recent thread context and the previous title through the configured text-generation model. The server keeps the work off the provider command queue, preserves manual renames made while generation is running, and capability-gates the action for version-skewed environments.

Testing

  • 96 focused contract, prompt, environment, and reactor tests
  • Typechecked contracts, client-runtime, server, and web
  • Targeted lint and formatting checks

Generated by gpt-5.6-sol with the Codex harness in T3 Code.


Note

Medium Risk
Touches orchestration events, projection schema, and async reactor behavior with race handling; changes are well-tested but span server read models and UI state sync.

Overview
Adds thread title regeneration so sidebar titles can be refreshed from recent conversation context instead of only manual renames.

Client: Sidebar v2 exposes Regenerate title (single and bulk) when threadTitleRegeneration is advertised; rows dim and show busy state while titleRegeneration is pending. Commands use thread.meta.update with regenerateTitle: true (not combined with an explicit title).

Server orchestration: The decider records pending regeneration on meta-update and applies thread.title.regeneration.complete only when requestId still matches; archiving clears pending state. SQLite migration 035 stores title_regeneration_request_id / title_regeneration_started_at on projection_threads, wired through projections, snapshots, and the client thread reducer.

ProviderCommandReactor: Handles thread.meta-updated with regenerateTitle on a dedicated worker: builds bounded conversation context (8k chars, up to 4 attachments), calls text generation with previousTitle, then dispatches completion. Manual renames and superseded requests are not overwritten; stale completions after archive/unarchive are ignored. On startup, interrupted pending regenerations are cleared via correlated completion dispatches.

Contracts / text generation: New capability flag, ThreadTitleRegeneration on threads, and regeneration-aware title prompts across providers.

Reviewed by Cursor Bugbot for commit 74d120a. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Add thread title regeneration from the sidebar context menu

  • Adds 'Regenerate title' to per-thread and multi-select sidebar context menus; the item shows a disabled 'Regenerating…' state when a regeneration is in progress.
  • Introduces a thread.meta.update command flag regenerateTitle and a new internal thread.title.regeneration.complete command to drive the full regeneration lifecycle through the orchestration layer.
  • The ProviderCommandReactor processes thread.meta-updated events with regenerateTitle=true, formats bounded conversation context, calls generateThreadTitle, and handles supersession (concurrent renames or newer requests) and retry on dispatch failure.
  • On startup, the reactor clears any pending titleRegeneration state left over from a previous session. Archiving a thread also clears pending state.
  • Adds DB migration 035 to add title_regeneration_request_id and title_regeneration_started_at columns to projection_threads, and exposes a threadTitleRegeneration capability flag in the server environment descriptor.
  • buildThreadTitlePrompt gains a previousTitle path that adjusts instructions and uses tail-preserving truncation to keep the most recent conversation content.

Macroscope summarized 74d120a.

@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 658b5f30-41cc-4fd5-a783-62ee9fc3e478

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@github-actions github-actions Bot added size:L 100-499 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. labels Jul 29, 2026
@t3dotgg
t3dotgg force-pushed the t3code/regenerate-thread-title branch from 63add75 to 3a36a86 Compare July 29, 2026 03:14
Comment thread apps/server/src/orchestration/Layers/ProviderCommandReactor.ts Outdated
@macroscopeapp

macroscopeapp Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Needs human review

This PR introduces a new user-facing feature (thread title regeneration) with database schema changes, new async worker logic, and complex state management for handling concurrent operations. The scope and new runtime behavior warrant human review.

You can customize Macroscope's approvability policy. Learn more.

@t3dotgg
t3dotgg force-pushed the t3code/regenerate-thread-title branch from 3a36a86 to f5de384 Compare July 29, 2026 03:25
Comment thread apps/server/src/orchestration/Layers/ProviderCommandReactor.ts
Comment thread apps/server/src/orchestration/Layers/ProviderCommandReactor.ts
@t3dotgg
t3dotgg force-pushed the t3code/regenerate-thread-title branch from f5de384 to a3ba2e0 Compare July 29, 2026 03:36
Comment thread apps/server/src/textGeneration/TextGenerationPrompts.ts
@t3dotgg
t3dotgg force-pushed the t3code/regenerate-thread-title branch from a3ba2e0 to 8316ef2 Compare July 29, 2026 03:47
Comment thread apps/server/src/orchestration/decider.ts
@t3dotgg
t3dotgg force-pushed the t3code/regenerate-thread-title branch from 8316ef2 to ea1c1d9 Compare July 29, 2026 03:54
Comment thread apps/server/src/orchestration/Layers/ProviderCommandReactor.ts
@t3dotgg
t3dotgg force-pushed the t3code/regenerate-thread-title branch from ea1c1d9 to 55673e2 Compare July 29, 2026 04:03
Comment thread apps/server/src/orchestration/Layers/ProviderCommandReactor.ts
Comment thread apps/server/src/orchestration/Layers/ProviderCommandReactor.ts
@github-actions github-actions Bot added size:XL 500-999 changed lines (additions + deletions). and removed size:L 100-499 changed lines (additions + deletions). labels Jul 29, 2026
@t3dotgg
t3dotgg force-pushed the t3code/regenerate-thread-title branch from 88b3bd1 to 575de60 Compare July 30, 2026 09:17
Comment thread apps/server/src/orchestration/decider.ts
@t3dotgg
t3dotgg force-pushed the t3code/regenerate-thread-title branch 2 times, most recently from 7259156 to bcf848f Compare July 30, 2026 10:09
Comment thread apps/server/src/orchestration/Layers/ProviderCommandReactor.ts
Comment thread apps/server/src/orchestration/Layers/ProviderCommandReactor.ts Outdated
Comment thread apps/server/src/orchestration/Layers/ProviderCommandReactor.ts
Comment thread apps/server/src/orchestration/Layers/ProviderCommandReactor.ts
Comment thread apps/server/src/orchestration/Layers/ProviderCommandReactor.ts
@t3dotgg
t3dotgg force-pushed the t3code/regenerate-thread-title branch from cb42fba to a4d16a9 Compare July 30, 2026 11:04

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit a4d16a9. Configure here.

Comment thread packages/client-runtime/src/state/threadReducer.ts
@t3dotgg
t3dotgg merged commit 5c9358a into main Jul 30, 2026
17 checks passed
@t3dotgg
t3dotgg deleted the t3code/regenerate-thread-title branch July 30, 2026 11:39
tarik02 added a commit to tarik02-org/t3code that referenced this pull request Jul 30, 2026
* fix(desktop): restore T3 Connect sign-in (pingdotgg#4809)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>

* Simplify files panel header (pingdotgg#4828)

* build(desktop): reduce installed app size by ~300MB (pingdotgg#4824)

* Update model version from claude-opus-4-8 to claude-opus-5 (pingdotgg#4832)

* Preserve the thread shell while detail loads (pingdotgg#4830)

* Reduce idle work and disk churn with native resource diagnostics (pingdotgg#2679)

Co-authored-by: codex <codex@users.noreply.github.com>

* fix(server): detect repositories after initialization (pingdotgg#4848)

* perf(server): merge separate staged/unstaged numstat calls into single diff HEAD --numstat (pingdotgg#4843)

* fix(git): disable external diff for review diff previews (pingdotgg#4854)

* Fix editable file focus and live syntax highlighting (pingdotgg#3979)

* fix(web): remember the rendered-markdown choice across threads (pingdotgg#4853)

Co-authored-by: Simon Doba <simon.doba@orbit.de>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>

* chore(release): prepare v0.0.31

* fix(mobile): reduce thread feed scroll jank (pingdotgg#4874)

* fix(web): restore sidebar v2 thread actions and terminal icon (pingdotgg#4712)

* fix(web): settle button now works on hover, not just right-click (pingdotgg#4905)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>

* fix(clients): disable add project while disconnected (pingdotgg#4834)

* fix(composer): hide default Codex service tier (pingdotgg#4784)

* docs: link iOS and Android app store downloads (pingdotgg#4902)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>

* fix(web): align remote server update action (pingdotgg#4731)

* fix(connect): suggest a serve command that matches how you ran connect (pingdotgg#4897)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>

* fix(mobile): stop shared content errors in Personal Team builds (pingdotgg#4943)

* perf(mobile): sends respond instantly, thread opens stop freezing (pingdotgg#4882)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>

* fix(web): show Codex fast mode as a bolt (pingdotgg#4947)

* docs: seed worktrees with a copy of real userdata instead of banning it (pingdotgg#4949)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>

* fix(mobile): support dragged images in the composer (pingdotgg#4953)

* fix(mobile): stop long iOS threads from jumping while scrolling up (pingdotgg#4867)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>

* fix(web): keep worktree default when switching a draft's machine (pingdotgg#4964)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>

* perf(mobile): reconnect environments immediately on resume (pingdotgg#4878)

* feat(web): pasting a huge screenshot now compresses it instead of erroring (pingdotgg#4967)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>

* feat(web): regenerate thread titles from sidebar (pingdotgg#4810)

* fix(web): show server update progress through reconnect (pingdotgg#4903)

---------

Co-authored-by: Alex <me@pixp.cc>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: wukko <me@wukko.me>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: Wout Stiens <71498452+StiensWout@users.noreply.github.com>
Co-authored-by: Utkarsh Patil <73941998+UtkarshUsername@users.noreply.github.com>
Co-authored-by: ohbentos <72638975+ohbentos@users.noreply.github.com>
Co-authored-by: Jake Leventhal <jakeleventhal@me.com>
Co-authored-by: Simon Doba <simon.doba@hotmail.de>
Co-authored-by: Simon Doba <simon.doba@orbit.de>
Co-authored-by: t3-code[bot] <269035359+t3-code[bot]@users.noreply.github.com>
Co-authored-by: Gabriel De Andrade <30420087+gabrielelpidio@users.noreply.github.com>
Co-authored-by: Jono Kemball <Noojuno@users.noreply.github.com>
Co-authored-by: Theo Browne <me@t3.gg>
Co-authored-by: Max Katz <me@maxkatz.me>
github-actions Bot added a commit to omarcresp/t3code-flake that referenced this pull request Jul 30, 2026
## What's Changed
* fix(mobile): support dragged images in the composer by @t3dotgg in pingdotgg/t3code#4953
* fix(mobile): stop long iOS threads from jumping while scrolling up by @t3dotgg in pingdotgg/t3code#4867
* fix(web): keep worktree default when switching a draft's machine by @t3dotgg in pingdotgg/t3code#4964
* perf(mobile): reconnect environments immediately on resume by @t3dotgg in pingdotgg/t3code#4878
* feat(web): pasting a huge screenshot now compresses it instead of erroring by @t3dotgg in pingdotgg/t3code#4967
* feat(web): regenerate thread titles from sidebar by @t3dotgg in pingdotgg/t3code#4810
* fix(web): show server update progress through reconnect by @t3dotgg in pingdotgg/t3code#4903
* feat(search): find threads by conversation content by @t3dotgg in pingdotgg/t3code#4959
* fix: marketing site Vercel builds no longer die after ~100 deploys by @t3dotgg in pingdotgg/t3code#4975


**Full Changelog**: pingdotgg/t3code@v0.0.32-nightly.20260730.955...v0.0.32-nightly.20260730.956

Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.32-nightly.20260730.956
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL 500-999 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant