GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(web): add an unbound keybinding to regenerate the thread title by Adeophan · Pull Request #18577 · pingdotgg/t3code

Conversation

@Adeophan

@Adeophan Adeophan commented Oct 12, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Problem

Regenerating a thread's auto-generated title is only reachable from the thread menus (header title menu and sidebar row menu). There is no keybinding command or command palette entry for it, so keyboard-driven users can't trigger it. Requested in #15322: a thread.regenerateTitle command, unbound by default, that does nothing while a regeneration is already running and is unavailable when the environment can't regenerate titles.

Also, nothing stopped two quick triggers from sending two requests before the "Regenerating…" marker reaches the client. The server accepts both and queues a second generation; the existing menus already have this race.

Change

  • New thread.regenerateTitle keybinding command. It ships unbound: DEFAULT_KEYBINDINGS is untouched, so no existing shortcut changes. Users bind it in Settings → Keybindings or keybindings.json, where it appears as "Thread: Regenerate Title".
  • A Regenerate thread title command palette action shows the bound shortcut, using the same disabled "Regenerating thread title…" state as the menus.
  • Availability is the same as the menu item: a server-backed thread, operate permission, and the environment's threadTitleRegeneration capability. When unavailable, the shortcut leaves the key alone. When available, it always consumes the key, so a binding such as mod+r can't fall through to browser reload while a regeneration runs. It also ignores auto-repeat.
  • Duplicate protection lives in client-runtime's updateMetadata, so every caller gets it: shortcut, palette, both menus, and mobile.
    • A regenerate request is skipped when the shell already shows titleRegeneration, or when a request for the same thread is still awaiting its reply.
    • The in-flight mark is cleared when the command settles, so it can't get stuck.
    • Known limitation: a press in the short gap after the server replies but before the batched shell update arrives can still send a second request. The server supersedes the earlier request, so the worst case is one extra generation. Closing that gap would mean changing shell publication on the server, which was judged not worth it.
  • useThreadActions gains a thin shared regenerateThreadTitle action. The header menu and the sidebar row menu now use it instead of their own copies; behaviour is unchanged apart from the new guard.

Not changed: server and providers (the regeneration flow already exists); desktop, which inherits the web behaviour; mobile UI, which already has regenerate as a thread list action and only picks up the shared guard.

Scope and approval

This implements Ideas #15322 as described there: unbound, a no-op while running, unavailable without the capability. I couldn't find an explicit maintainer approval comment on it. I believe it's a focused configuration of an established capability: title regeneration already exists in both thread menus, and this only exposes it as a bindable command and a palette entry. It ships without a default binding, so nothing changes for anyone who doesn't opt in. The duplicate-request guard is part of the same problem: a keyboard trigger makes the existing double-dispatch race easy to hit.

Verification

Focused tests, 268 passing across:

  • packages/client-runtime/src/state/threadCommands.test.ts. New cases use deferred replies, no sleeps:
    • a second call while one awaits its reply sends nothing;
    • after success with no shell update, the next call sends (proving nothing stays stuck);
    • a failure allows a retry;
    • a shell marker skips the request;
    • other fields sent with a skipped regeneration still go out (title, branch, model selection and so on).
  • apps/web/src/hooks/useThreadActions*.test.ts, useThreadActionMenu.test.ts, apps/web/src/keybindings.test.ts, KeybindingsSettings.logic.test.ts, packages/contracts/src/keybindings.test.ts.
  • vp run typecheck in apps/web, packages/client-runtime and packages/contracts; vp lint and vp fmt on touched files. Tests and typechecks rerun after rebasing onto current main, plus a live shortcut check on the rebased build.

Manual end-to-end in a real browser against a dev server with seeded real data and Codex as the text-generation provider:

  1. In Settings → Keybindings → Add keybinding, picked "Thread: Regenerate Title", recorded Ctrl+Alt+R, set when to !terminalFocus, and saved.
  2. In a thread titled "Align on Development Orchestrator Role", pressed Ctrl+Alt+R twice in quick succession. The title changed to "Redesign Admin Model Routing" about 4s later. The thread's event log shows exactly one regenerate command and its completion (963c85aa… and 963c85aa…:title-complete), so the second press was deduplicated.
  3. Ctrl+K, typed "regenerate": the action showed Ctrl+Alt+R. Ran it, then reopened the palette at once: it showed "Regenerating thread title…", disabled. The regeneration completed; the model returned the same title, which is a valid result. Reopening the palette then showed the action enabled again, so nothing stuck.

Recording (sped up, idle time removed): thread.regenerateTitle end-to-end
MP4: compact · full-length original

Before (main): no regenerate action in the palette After: action with its bound shortcut After: while regenerating
before after regenerating

Not checked:

  • A browser-reserved binding like mod+r pressed live during a regeneration; the reordered handler is covered by code review only.
  • The draft, no-operate-permission and no-capability negative cases live.
  • Desktop (Electron) and mobile clients were not run, and the mobile typecheck was not run (the updateMetadata type is unchanged).

This touches some of the same files as #18562 (the thread.rename keybinding). Whichever merges second needs a trivial rebase.

Implemented with Claude Opus 5.5 in Claude Code (running inside T3 Code); code and architecture review by GPT-6.1 Sol.

🤖 Generated with Claude Code

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@github-actions github-actions Bot added vouch:unvouched Author is not yet trusted in the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Oct 12, 2026
macroscopeapp[bot]
macroscopeapp Bot reviewed Oct 12, 2026
View reviewed changes
Comment thread packages/client-runtime/src/state/threadCommands.ts
const thread = registry
.get(optimistic.snapshotAtom(target.environmentId))
?.threads.find((candidate) => candidate.id === target.input.threadId);
if (titleRegenerationsInFlight.has(key) || thread?.titleRegeneration != null) {

@macroscopeapp macroscopeapp Bot Oct 12, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

🟡 Medium state/threadCommands.ts:424

When regeneration is already pending, updateMetadata reports success without applying any other metadata fields in the same request, so updates such as branch or modelSelection are silently lost. The guard returns before dispatching the whole input; suppress only regenerateTitle and still dispatch the remaining fields.

🤖 Copy this AI Prompt to have your agent fix this:
In file @packages/client-runtime/src/state/threadCommands.ts around line 424:

When regeneration is already pending, `updateMetadata` reports success without applying any other metadata fields in the same request, so updates such as `branch` or `modelSelection` are silently lost. The guard returns before dispatching the whole input; suppress only `regenerateTitle` and still dispatch the remaining fields.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@Adeophan Adeophan Oct 12, 2026

Copy link
Copy Markdown
Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Fixed in 4b04a2e: a skipped regeneration now strips only regenerateTitle and still dispatches any other metadata changes in the same request (title, branch, worktreePath, modelSelection, linkedPullRequest, limitRecovery). Covered by the new test "still applies other changes sent with a skipped regeneration" in threadCommands.test.ts.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

macroscopeapp[bot] reacted with eyes emoji
All reactions
  • 👀 1 reaction

@macroscopeapp macroscopeapp Bot Oct 12, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Sorry, I'm unable to act on this request because you do not have permissions within this repository.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@macroscopeapp

macroscopeapp Bot commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Not approved

Macroscope's review found this PR not approvable — This adds a new palette/keybinding entry and a shared deduplication gate that changes the behavior of existing metadata-update callers, rather than being limited to an unbound command declaration. The shared gate also has an unresolved Medium-severity concern about silently dropping other metadata fields, so the runtime impact warrants human review.

Not approved because:

  • 1 blocking correctness issue found at or above your repo's Minimum Blocking Severity

Adjust the Minimum Blocking Severity for this repo — including turning it Off — in Settings. You can add or adjust custom eligibility rules. Learn more.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Adeophan @claude
feat(web): add bindable thread.regenerateTitle keybinding command
4b04a2e
Regenerating a thread's title was only reachable from the thread menu, so
users who rely on the keyboard had no way to trigger it (Ideas pingdotgg#15322).

Add a `thread.regenerateTitle` keybinding command that ships unbound. The
chat view only claims the key when the active server thread's environment
supports title regeneration and the connection can operate threads, so an
unavailable command leaves the key to anything else. Once claimed, key
repeats and presses during a running regeneration send nothing, and
failures show the same toast as the menu. The command palette gains a
"Regenerate thread title" action that shows the bound shortcut and is
disabled while one is in flight.

Every surface (shortcut, palette, chat header menu, sidebar row menu) now
goes through a shared `regenerateThreadTitle` thread action. The shell's
in-flight marker arrives after the command's reply, so two quick requests
could each queue a generation on the server. The thread metadata command
now skips a regenerate request while one for the same thread awaits its
reply or the shell shows a regeneration, and always releases the guard
when the request settles.

User docs mention the command and the palette entry.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@coderabbitai

coderabbitai Bot commented Oct 12, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Path: .coderabbit.config.ts
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a966065d-37a2-49d1-b7e4-9c50071387e7

📥 Commits

Reviewing files that changed from the base of the PR and between 79980c084cfc62a5b78179faa98c7769a3008e62 and 4b04a2e.


📒 Files selected for processing (2)
  • packages/client-runtime/src/state/threadCommands.test.ts
  • packages/client-runtime/src/state/threadCommands.ts

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



📝 Walkthrough
📝 Walkthrough

Walkthrough

The change adds thread.regenerateTitle as a keybinding command and routes title-regeneration requests through a shared thread action. The client runtime suppresses duplicate requests. The chat shortcut and command palette expose regeneration when capability and scope checks pass.

Changes

Thread title regeneration

Layer / File(s) Summary
Register the regeneration command
packages/contracts/src/keybindings.ts, packages/contracts/src/keybindings.test.ts, apps/web/src/keybindings.test.ts, apps/web/src/components/settings/KeybindingsSettings.logic.test.ts, docs/user/keybindings.md
The keybinding command set and parsing tests include thread.regenerateTitle. Settings tests cover its label and lack of a default binding. The keybinding documentation describes the command and its availability conditions.
Centralize regeneration and deduplicate requests
apps/web/src/hooks/useThreadActions.ts, packages/client-runtime/src/state/threadCommands.ts, packages/client-runtime/src/state/threadCommands.test.ts, apps/web/src/hooks/useThreadActionMenu.ts, apps/web/src/hooks/useThreadActionMenu.test.ts, apps/web/src/components/Sidebar.tsx
useThreadActions exposes title regeneration through a metadata update. The client runtime suppresses duplicate requests while one is pending or shell state marks regeneration. The sidebar and thread action menu use the shared action. Runtime tests cover duplicate requests, retries, and an existing regeneration marker.
Expose regeneration in chat and command palette
apps/web/src/components/ChatView.tsx, apps/web/src/components/CommandPalette.tsx, docs/user/thread-sidebar.md
The chat shortcut and command-palette action check server capability and orchestration-operate scope before invoking regeneration. The palette displays an in-progress label and disables the action during regeneration. Sidebar documentation lists the available entry points.

Priority: ⬇️ Low

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

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  actor User
  participant CommandPalette
  participant useThreadActions
  participant threadCommands
  participant updateMetadata
  User->>CommandPalette: Select title regeneration
  CommandPalette->>useThreadActions: Call regenerateThreadTitle
  useThreadActions->>threadCommands: Request title regeneration
  alt Regeneration is pending or marked in shell state
    threadCommands-->>useThreadActions: Suppress duplicate request
  else No duplicate is detected
    threadCommands->>updateMetadata: Send metadata update
    updateMetadata-->>threadCommands: Return result
    threadCommands-->>useThreadActions: Return result
  end
Loading

Suggested reviewers: juliusmarminge


Merge Risk: ⚪ Minimal · up to 4b04a

This adds an unbound shortcut and palette action for regenerating thread titles, with duplicate-request protection. No actionable merge-blocking risk was found.

Security Architecture Review

Security architecture risk: 🔵 Low · up to 4b04a

The new entrypoints retain existing permission checks, and shared duplicate suppression limits repeated work. No new security issue was established, but recovery after an interrupted connection was not fully verified.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The added reachability is through authenticated orchestration operation authority rather than a new privileged endpoint. Local coalescing is isolated by environment and thread, but is not distributed abuse prevention. Per-thread ownership isolation beyond the existing environment/session authorization was not independently established.

Trust Boundaries and Controls

  • observed — The shortcut requires a server-backed thread, an active reference, title-regeneration capability, and operate permission. The palette similarly checks capability and operate permission. Server RPC authorization remains the authoritative permission boundary; client availability checks do not replace it.

Resilience and Maintainability Implications

  • inferred — The existing server service completes ordinary generation failures without a title, allowing the matching marker to clear, but propagates interruption before completion. That branch alone does not establish permanent stranding because surrounding recovery was not fully inspected. Marker-based retry blocking predates this PR in web menus, bulk actions, and mobile; it is not established as a newly introduced recovery failure.

Pre-merge checks | Passed 4
✅ Passed checks (4 passed)
Check name Status Explanation
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 and concisely describes the primary change: adding an unbound keybinding to regenerate thread titles.
Description check Passed The description includes complete Problem, Change, Scope and approval, and Verification sections. It explains the behavior, implementation, testing, manual evidence, limitations, and agent usage. It a…

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

coderabbitai[bot]
coderabbitai Bot approved these changes Oct 12, 2026
View reviewed changes
@Adeophan
Adeophan force-pushed the feat/thread-regenerate-title-keybinding branch from 79980c0 to 4b04a2e Compare October 12, 2026 08:07
@maria-rcks

maria-rcks commented Oct 14, 2026

Copy link
Copy Markdown
Collaborator

Note

Written by gpt-6.1-sol on behalf of Maria

Thanks for working on title regeneration. This PR combines new shortcut and palette access with a duplicate-request guard that independently fixes existing menu and mobile callers, contrary to one problem per PR. Please submit the focused duplicate-request fix separately for reconsideration. Keep the keyboard-access proposal in the linked Ideas discussion so maintainers can consider its scope.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@maria-rcks maria-rcks closed this Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@macroscopeapp macroscopeapp[bot] macroscopeapp[bot] left review comments
@coderabbitai coderabbitai[bot] coderabbitai[bot] approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

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

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@Adeophan @maria-rcks
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.