Skip to content

feat(t3code): PP-409 launch settings for starting tickets in T3 Code - #693

Merged
Atchferox merged 8 commits into
mainfrom
feat/PP-409-t3code-launch-settings
Nov 30, 2026
Merged

Atchferox merged 8 commits into
mainfrom
feat/PP-409-t3code-launch-settings

Conversation

@Atchferox

Copy link
Copy Markdown
Collaborator

Stacked on #692 (PP-413), which is on #691 (PP-408).

What

On a member's T3 Code account page, the settings for what ProjectProject sends when they start a ticket:

  • Prompt: a template edited with field chips (type /), each with a tooltip saying what it fills in, plus $skill badges. "Preview" fills it in for an example ticket, and ⌘↵ saves. The default prompt tells the agent to read the ticket by its ID through the ProjectProject MCP tools or pp tickets get, not to open a link.
  • Model and effort: a command menu with a tab per provider, models grouped by provider (favorites first), and an effort pane beside the list that works like a submenu: → enters it, ↑↓ move, ↵ picks, ← goes back. Nothing is saved until you pick. The model's default effort is labeled "Default", and picking it isn't stored, so it follows T3 Code's default.
  • Permission mode and working copy each ticket's thread starts with.
  • Where tickets open: for each project, the T3 Code project its tickets open in, suggested from a matching GitHub repository.

Stored as user_settings columns and the user_t3code_project_link table (migration 20261130150116_t3code_launch_settings). Starting the work itself is PP-410 to PP-412.

@pp/ui changes (documented in the gallery)

  • CommandMenuTabs: the active tab takes the menu highlight, so it shows inside popups.
  • CommandMenuItem: new checked prop for a picker's current choice.
  • Select items take a description line.
  • The slash menu can size to its content (size="fit").
  • Tooltips with a max width now wrap their text, which used to be cut off.
  • TextSwap crossfades values longer than 48 characters instead of rolling every glyph, which stuttered on long tooltips.

Checks

  • bun run check: format, lint and typecheck pass.
  • bun run test: 4,712 pass, 1 skipped, 0 failed.
  • Checked by hand in the agent dev environment: the prompt editor and preview, the model menu by keyboard and pointer, the effort pane highlight, the wrapping and crossfading tooltips, and the project picker.

🤖 Generated with Claude Code

Atchferox and others added 3 commits November 30, 2026 15:50
Members connect their own T3 Code from profile connections by pasting its
MCP URL. ProjectProject signs in to it as an OAuth client (PKCE, dynamic
client registration), checks the token with t3_environment_read and keeps it
sealed per user. Groundwork for starting tickets in T3 Code (PP-407).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ount

Connected accounts uses the organization integrations' card grid: a card per
account with a status badge, leading to the account's own page in the
integration detail layout. OAuth sign-ins and links return to that page.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Members choose what their T3 Code receives when they start a ticket:

- A prompt template edited with field chips (typed with /) and $skill
  badges, a preview with an example ticket, and save with Cmd+Enter. The
  default reads the ticket by its ID through the MCP tools or the pp CLI.
- The model and effort, picked from a command menu with a tab per
  provider and an effort pane beside the list that works like a submenu.
- The permission mode and working copy each ticket's thread starts with.
- Per project, the T3 Code project its tickets open in, suggested from a
  matching GitHub repository.

Stored as user_settings columns and the user_t3code_project_link table.

Primitive changes in @pp/ui:
- CommandMenuTabs: the active tab takes the menu highlight, visible in
  popups too; CommandMenuItem gets `checked` for a picker's current choice.
- Select items take a description line.
- The slash menu can size to its content.
- Tooltips with a max width wrap their rolling text, and TextSwap
  crossfades values past 48 characters instead of rolling every glyph,
  which stuttered on long hints.

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

coderabbitai Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 39 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3d15ae74-28f9-4c1e-bb52-1741290fce93
Commits

Reviewing files that changed from the base of the PR and between 422bc81 and 42f7660.

Files selected for processing: 69

  • .changeset/command-menu-tabs-visible.md
  • .changeset/long-tooltips-smooth.md
  • .changeset/menu-numbers-long-lists.md
  • .changeset/t3code-launch-settings.md
  • apps/backend/src/runtime.ts
  • apps/backend/src/t3code/Handlers.ts
  • apps/frontend/messages/en/t3code.json
  • apps/frontend/src/api/keys.ts
  • apps/frontend/src/features/command-menu/components/CommandFrame.tsx
  • apps/frontend/src/features/integrations/components/IntegrationLogo.tsx
  • apps/frontend/src/features/profile/components/AccountDetail.tsx
  • apps/frontend/src/features/t3code/atoms/t3code.ts
  • apps/frontend/src/features/t3code/components/EffortPane.tsx
  • apps/frontend/src/features/t3code/components/ModelCombobox.tsx
  • apps/frontend/src/features/t3code/components/PromptPreview.tsx
  • apps/frontend/src/features/t3code/components/PromptSettingsRow.tsx
  • apps/frontend/src/features/t3code/components/SearchPicker.tsx
  • apps/frontend/src/features/t3code/components/T3CodeAccountPage.tsx
  • apps/frontend/src/features/t3code/components/T3CodeLaunchSettings.tsx
  • apps/frontend/src/features/t3code/components/T3CodeProjects.tsx
  • apps/frontend/src/features/t3code/components/prompt-editor/PromptEditor.tsx
  • apps/frontend/src/features/t3code/components/prompt-editor/PromptFieldNode.tsx
  • apps/frontend/src/features/t3code/components/prompt-editor/SkillNode.ts
  • apps/frontend/src/features/t3code/lib/launchOptions.test.ts
  • apps/frontend/src/features/t3code/lib/launchOptions.ts
  • apps/frontend/src/features/t3code/lib/promptFields.ts
  • apps/frontend/src/features/t3code/lib/promptParts.test.ts
  • apps/frontend/src/features/t3code/lib/promptParts.ts
  • apps/frontend/src/features/t3code/lib/promptSample.ts
  • apps/frontend/src/lib/errorMessage.ts
  • docs/PROJECTPROJECT.md
  • packages/db/src/migrations/20261130150116_t3code_launch_settings/migration.sql
  • packages/db/src/migrations/20261130150116_t3code_launch_settings/snapshot.json
  • packages/db/src/schema.ts
  • packages/integration-t3code/README.md
  • packages/integration-t3code/src/Connections.ts
  • packages/integration-t3code/src/LaunchSettings.ts
  • packages/integration-t3code/src/Services.ts
  • packages/integration-t3code/src/suggestion.test.ts
  • packages/integration-t3code/src/suggestion.ts
  • packages/shared/src/errors.ts
  • packages/shared/src/index.ts
  • packages/shared/src/t3code/T3Code.ts
  • packages/shared/src/t3code/T3CodeApi.ts
  • packages/shared/src/t3code/promptTemplate.test.ts
  • packages/shared/src/t3code/promptTemplate.ts
  • packages/ui/docs/components/command-menu/page.mdx
  • packages/ui/docs/components/segmented-tabs/page.mdx
  • packages/ui/docs/components/select/page.mdx
  • packages/ui/docs/components/text-swap/page.mdx
  • packages/ui/docs/components/tooltip/page.mdx
  • packages/ui/docs/editor/slash-menu/demos/own-entries.tsx
  • packages/ui/docs/editor/slash-menu/page.mdx
  • packages/ui/package.json
  • packages/ui/src/components/command-menu.tsx
  • packages/ui/src/components/dropdown-menu.tsx
  • packages/ui/src/components/icons.tsx
  • packages/ui/src/components/kbd.tsx
  • packages/ui/src/components/segmented-tabs.tsx
  • packages/ui/src/components/select.tsx
  • packages/ui/src/components/text-swap.tsx
  • packages/ui/src/components/tooltip.tsx
  • packages/ui/src/editor/inline-chip-keys.ts
  • packages/ui/src/editor/mentions/mentions-plugin.tsx
  • packages/ui/src/editor/slash-menu/slash-command-plugin.tsx
  • packages/ui/src/editor/slash-menu/slash-menu-panel.tsx
  • packages/ui/src/editor/slash-menu/slash-menu-plugin.tsx
  • packages/ui/src/editor/slash-menu/slash-menu-view.tsx
  • packages/ui/src/editor/slash-menu/slash-menu.tsx
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-30T21:19:43.045896Z 42f7660 New commits
🔒 Security Review ✅ Completed 2026-11-30T21:23:48.813656Z 42f7660 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 328b96bf2f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/db/src/schema.ts Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 310ff1c21b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +138 to +140
{
label: m.t3code_projects_group_all(),
items: others.map(pickerItem)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Allow clearing an explicit T3 Code project choice

Once a member selects a project, this picker offers only concrete T3 Code projects, so they cannot clear the override and return to repository-based suggestions. Selecting the suggested project also stores an explicit override rather than restoring automatic matching. The API explicitly supports clearing with t3ProjectId: null (T3CodeLaunchSettings.setProject), but a repo-wide search found no frontend action that sends it. Add a reset/default choice wired to that path so members can undo a selection, including one pointing to a subsequently deleted project.

Useful? React with 👍 / 👎.

Comment on lines +77 to +78
export const t3codeCapabilitiesAtom = query("t3code", "capabilities", {
reactivityKeys: [Keys.t3codeProfile()]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Refresh launch reads after a successful connection check

If this page loads while T3 Code is unreachable, bringing it online and pressing Check successfully updates the profile but leaves the model picker disabled and the project settings in their failed state. Both new reads subscribe to Keys.t3codeProfile(), but neither profile mutation publishes that key, and the OAuth completion listener in T3CodeProfileSettings only refreshes t3codeProfileAtom; refreshing that wrapper does not invalidate other queries sharing its reactivity key. Invalidate the dependent reads after a successful check or reconnect so recovery does not require an unrelated focus/remount revalidation.

Useful? React with 👍 / 👎.

Base automatically changed from feat/PP-413-connected-accounts to main November 30, 2026 21:16
@Atchferox
Atchferox merged commit 88adbce into main Nov 30, 2026
10 checks passed
@Atchferox
Atchferox deleted the feat/PP-409-t3code-launch-settings branch November 30, 2026 21:18
Atchferox added a commit that referenced this pull request Nov 30, 2026
Stacked on #693 (PP-409), which is on #692 and #691.

## What

`POST /orgs/:org/projects/:slug/tickets/:id/t3code/start` starts a
ticket in the caller's own T3 Code. This is the single start that the
start menu (PP-411) and the T3 Code assignee (PP-412) will both use.

1. Fills the member's prompt with the ticket. The branch is the ticket's
linked one, or a suggested name.
2. Calls `t3_thread_launch` in the T3 Code project the member picked, or
the one whose repository matches, with their model, effort and
permission mode. In a worktree, the ticket's branch starts from
`origin/HEAD`, or continues from the ticket's own branch.
3. Stores the start in `t3code_ticket_start` (migration
`20261130193023_t3code_ticket_start`).
4. Records a `t3code_started` entry in the ticket's activity: "started a
T3 Code thread in **vite-react-template** ↗", linking to the thread.

The ticket's status and assignees are not changed.

**Retries.** The member's `clientRequestId` keys both the stored start
and T3 Code's own launch, so a retry returns the same thread. If the
activity can't be recorded, the start is removed, so the next retry
records it.

**Clear reasons.** These fail before anything is sent to T3 Code:
- not connected
- sign-in expired or revoked
- read-only approval (`T3CodeCannotStartThreads`)
- no T3 Code project chosen (`T3CodeProjectNotChosen`)

An unreachable machine gets its own message. When T3 Code itself refuses
a start, its explanation travels as `T3CodeError.detail` and is shown to
the member.

**Permission mode.** A thread runs at most at the mode the member
approved ProjectProject for, which `orchestrator_capabilities` reports.
- The picker shows "What you approved (Supervised)" and disables broader
modes.
- A start leaves out a saved mode above the approved one, instead of
being refused.
- The T3 Code page shows the approved access, and a **Change access**
button approves again using the saved address, without disconnecting.

## How it's built

- `T3CodeLauncher` in `integration-t3code` handles the launch.
- `T3CodeTicketStarts`, a new backend service, ties it to the ticket and
its activity.
- `TicketActivity.record` is called with an unchanged write, since a
start doesn't touch the ticket file.

## Checks

- `bun run check` passes, and `bun run test` gives 4,724 pass, 1 skip, 0
fail.
- New Postgres tests cover the launcher (project choice, arguments sent,
permission limit, each failure) and the start service (storing and
recording, retries, nothing left behind on failure).
- Tested once end to end against a real T3 Code: the thread was created,
the activity line links to it, and a retry returned the same thread.


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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant