Skip to content

feat: name new threads from linked tickets - #8344

Closed
matheustimbo wants to merge 19 commits into
pingdotgg:mainfrom
matheustimbo:feat/ticket-thread-titles
Closed

matheustimbo wants to merge 19 commits into
pingdotgg:mainfrom
matheustimbo:feat/ticket-thread-titles

Conversation

@matheustimbo

@matheustimbo matheustimbo commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

What Changed

New threads can adopt the title and identifier of a ticket linked in their first user message. Resolution runs asynchronously after the existing provisional title, and compare-and-set metadata updates ensure that a manual rename always wins.

The server supports GitHub Issues, GitLab Issues, Azure DevOps work items, Bitbucket Cloud issues, Jira Cloud/Data Center, and ClickUp tasks. It prefers local CLIs where available, supports explicit per-project account bindings, stores sensitive credentials outside settings.json, and falls back silently on ambiguous links or lookup failures.

Web/desktop and mobile settings expose the global policy, project overrides, account configuration, custom templates, and connection tests. User and internal documentation are included.

Why

Ticket-driven threads are difficult to scan when the generated title paraphrases the prompt instead of preserving the ticket identifier and canonical title. Resolving metadata at the server boundary keeps local CLI authentication and credentials with the environment while providing consistent behavior to every client.

Proposal and design discussion: #8334

This is intentionally submitted despite being an XXL external feature PR so maintainers can evaluate the complete behavior. I am happy to split it along the boundaries proposed in the discussion.

UI Changes

Before: no ticket-title policy, ticket account management, project binding, or connection-test controls.

After: these controls are available under Settings → Integrations → Ticket providers and in project settings on web/desktop, with a dedicated Ticket providers route on mobile. The full flow was manually verified against the fork from a remote Mac. Automated screenshot capture was unavailable in the collaborative preview, so this PR does not claim the screenshot checklist item.

Validation

  • Typecheck passed in contracts, shared, client-runtime, server, web, and mobile.
  • 232 focused tests passed across parsing, provider routing, account selection, in-flight deduplication, title precedence, settings secrets, migrations, projections, and server settings.
  • Modified-file lint passed with two pre-existing prefer-set-has warnings in ProjectionSnapshotQuery.test.ts.

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for UI changes
  • No animation or motion was added

Generated with GPT-5.6-sol through the T3 Code Codex harness.


Note

Medium Risk
Touches orchestration title races, secret persistence for external integrations, and new operate-scoped RPC probes; behavior is heavily tested but the surface area is large.

Overview
Adds ticket-driven thread naming: on a thread’s first turn, the server can look up a single supported ticket link in the user message and asynchronously replace the generated title using environment/project ticket title policy and provider account bindings, with optimistic concurrency (expectedTitle / titleRevision) so manual renames win over late lookups.

Introduces TicketProviderRegistry (resolve + probe), wires it into ProviderCommandReactor and server startup, and authorizes serverProbeTicketProvider. Server settings now persist ticket-provider secrets outside settings.json, support revision-guarded instance updates, and roll back secret writes on failure. Projections gain ticketTitlePolicy, ticketProviderBindings, and thread titleRevision (migrations 44–45).

Mobile gets a Ticket Providers settings route and a large configuration screen (policies, accounts, add/probe/default/disable, per-project overrides) aligned with existing web/desktop controls; main settings adds navigation rows and sheet targets.

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

Note

Name new threads from linked tickets via provider registry and title policy

  • Adds a TicketProviderRegistry service that resolves ticket metadata from URLs using VCS process and HTTP clients, with structured errors for no-instance, ambiguous-instance, unsupported-driver, etc.
  • On the first user turn, ProviderCommandReactor may asynchronously replace the generated thread title with a ticket-derived title, gated by optimistic concurrency (expectedTitle, expectedTitleRevision) to avoid clobbering manual renames.
  • Server settings now store ticketTitlePolicy, ticketProviderInstances (with secrets kept outside settings.json), and a ticketProviderInstancesRevision for compare-and-set updates; applyServerSettingsPatch increments the revision on whole-map replacement.
  • Migrations 44 and 45 add ticket_title_policy_json and ticket_provider_bindings_json to projection_projects, and title_revision to projection_threads; projector and snapshot query layers read/write these fields.
  • New web (TicketProviderSettings, ProjectSettingsPanel) and mobile (SettingsTicketProvidersRouteScreen) UI lets users configure ticket title policy and per-provider account bindings; a server.probeTicketProvider RPC checks instance availability.
  • Behavioral Change: thread.meta.update now omits the title field when expectedTitle mismatches the current title or expectedTitleRevision is stale; titleRegeneration is cleared only when a new non-equal title is provided and a regeneration is in progress. Projects and threads in the read model now include the new ticket fields, which may require out-of-tree consumers to update their schemas.

Macroscope summarized 1ea3f7a.

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

Labels

size:XXL 1,000+ changed lines (additions + deletions). vouch:unvouched Author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants