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 — Add native context menu to delete threads by juliusmarminge · Pull Request #12 · pingdotgg/t3code

Conversation

@juliusmarminge

@juliusmarminge juliusmarminge commented Feb 11, 2026 •
edited by coderabbitai Bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

Summary

  • Right-click on threads in the sidebar to delete them with a native context menu
  • Automatically stops any active provider session before removing the thread
  • Uses Electron's native Menu API for platform-consistent UI

Test plan

  • Right-click a thread in the sidebar
  • Verify native context menu appears with "Delete" option
  • Click Delete and confirm the thread is removed
  • Test with active sessions to verify they're stopped before deletion

🤖 Generated with Claude Code


Open with Devin

Summary by CodeRabbit

  • New Features
    • Right-click context menus added on desktop and web (with a DOM fallback for non-desktop environments).
    • Users can delete threads from the context menu.
    • Active sessions are stopped (if present) before a thread is removed.
    • After deletion, active thread selection is reassigned automatically or cleared.

Sorry, something went wrong.

Uh oh!

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

greptile-apps[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@coderabbitai

coderabbitai Bot commented Feb 11, 2026 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Adds a cross-platform context menu: Electron main IPC handler and preload bridge, contract/type additions, web fallback UI, and web UI + store updates to show a thread context menu and delete threads when "Delete" is selected.

Changes

Cohort / File(s) Summary
Desktop main & preload
apps/desktop/src/main.ts, apps/desktop/src/preload.ts
Add CONTEXT_MENU_CHANNEL ("desktop:context-menu") and import Menu in main; handle IPC invoke by building a native Menu, showing a popup, and resolving selected id or null. Expose showContextMenu(items) on desktopBridge in preload.
Shared contract types
packages/contracts/src/ipc.ts
Extend NativeApi with `contextMenu.show(items: readonly { id: T; label: string }[], position?: { x: number; y: number }) => Promise<T
Web bridge, fallback & types
apps/web/src/wsNativeApi.ts, apps/web/src/contextMenuFallback.ts, apps/web/src/vite-env.d.ts
Add api.contextMenu.show which calls window.desktopBridge.showContextMenu(items) when available, otherwise uses showContextMenuFallback(items, position). Implement DOM fallback showContextMenuFallback and add showContextMenu to DesktopBridge types.
Web UI & state
apps/web/src/components/Sidebar.tsx, apps/web/src/store.ts
Wire onContextMenu on thread items to call contextMenu.show; handle selection of "Delete" by stopping active session (if any) and dispatching DELETE_THREAD. Add DELETE_THREAD action and reducer case to remove the thread and adjust activeThreadId.
Manifest
package.json
Minor package manifest edits (small line changes).

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Sidebar as "Web UI (Sidebar)"
    participant API as "NativeApi / Bridge"
    participant Main as "Electron Main"
    participant Store as "App Store"

    User->>Sidebar: Right-click thread (x,y)
    Sidebar->>API: contextMenu.show(items, position)
    alt Desktop bridge available
        API->>Main: IPC invoke "desktop:context-menu" with items
        Main->>Main: Build native Menu and popup at focused window
        User->>Main: Select option or dismiss
        Main-->>API: Resolve selected item id or null
    else Web fallback
        API->>API: showContextMenuFallback(items, position)
        User->>API: Select option or dismiss
        API-->>Sidebar: Resolve selected item id or null
    end
    Sidebar->>Sidebar: If selected "Delete": stop session (if any)
    Sidebar->>Store: Dispatch DELETE_THREAD(threadId)
    Store->>Store: Remove thread, reassign activeThreadId if needed
    Store-->>Sidebar: Updated state
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 30.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Add native context menu to delete threads' directly and accurately reflects the main change: introducing a native context menu feature for deleting threads in the sidebar.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch juliusmarminge/sidebar-delete-thread

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

All reactions

Sorry, something went wrong.

Uh oh!

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

@macroscopeapp

macroscopeapp Bot commented Feb 11, 2026 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

Add a native context menu for thread deletion and wire right-click in Sidebar to invoke NativeApi.contextMenu.show via Electron IPC in Sidebar.tsx and main.ts

Introduce desktop:context-menu IPC and expose window.desktopBridge.showContextMenu; update NativeApi with contextMenu.show; handle thread deletion and session stop on selection in Sidebar.tsx.

📍Where to Start

Start with the registerIpcHandlers addition for desktop:context-menu in main.ts, then follow the bridge in preload.ts and the consumer in Sidebar.tsx.


Macroscope summarized eef2901.

All reactions

Sorry, something went wrong.

Uh oh!

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

coderabbitai[bot]
coderabbitai Bot reviewed Feb 11, 2026
View reviewed changes

@coderabbitai coderabbitai Bot left a comment

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.

Actionable comments posted: 3

🤖 Fix all issues with AI agents
In `@apps/desktop/src/main.ts`:
- Line 6: Replace usages of BrowserWindow.getFocusedWindow() when building/popup
context menus in the ipc handler with
BrowserWindow.fromWebContents(event.sender) so the menu is resolved from the IPC
sender's webContents; update the IPC handler that receives the menu payload (the
ipcMain.handle callback) to validate/parse the incoming array into the shared
ContextMenuItem type using the existing IPC validation utility before mapping to
Menu.buildFromTemplate, and pass BrowserWindow.fromWebContents(event.sender)
into Menu.popup to avoid null or wrong focused-window cases.

In `@apps/renderer/src/components/Sidebar.tsx`:
- Around line 87-112: handleThreadContextMenu currently swallows errors from
api.providers.stopSession and proceeds to dispatch DELETE_THREAD, which can
orphan an active session; change the flow in handleThreadContextMenu so that if
stopSession throws you do not delete the thread unless you can detect a harmless
"already stopped" condition—catch the error from api.providers.stopSession,
check the error message/code for an “already stopped” sentinel (or otherwise
surface the error via UI/api.logger) and abort the dispatch({ type:
"DELETE_THREAD", ... }) when stopSession failed, only allowing deletion when
stopSession succeeded or the error explicitly indicates the session was already
stopped; reference handleThreadContextMenu, api.providers.stopSession, and the
DELETE_THREAD dispatch to locate and update the logic.

In `@apps/renderer/src/store.ts`:
- Around line 45-46: The DELETE_THREAD action currently falls back to the first
remaining thread globally which can switch projects; change the reducer logic
that handles { type: "DELETE_THREAD"; threadId: string } so that if the deleted
thread equals the current active thread (activeThreadId) you find the next
active thread from the same project only (e.g., filter threads by projectId ===
deletedThread.projectId) and set activeThreadId to that thread's id or null if
none; apply the same same-project fallback change to the other deletion-handling
block referenced (the logic duplicated around the other DELETE_THREAD handling
at the second location).

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread apps/desktop/src/main.ts Outdated
if (isQuitting || restartTimer) return;
import { spawn } from "node:child_process";
import path from "node:path";
import { BrowserWindow, Menu, app, dialog, ipcMain, session, shell } from "electron";

@coderabbitai coderabbitai Bot Feb 11, 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.

⚠️ Potential issue | 🟡 Minor

Resolve the menu window from the IPC sender to avoid null focused-window cases.
BrowserWindow.getFocusedWindow() can be null or the wrong window in multi-window or background scenarios; using the sender’s webContents is safer. Also consider using the shared ContextMenuItem type and parsing payloads via the existing IPC validation pattern to avoid malformed item arrays.

🔧 Suggested update
-import {
-  EDITORS,
-  IPC_CHANNELS,
-  type TerminalCommandInput,
-  type TerminalCommandResult,
-  agentConfigSchema,
-  agentSessionIdSchema,
-  newTodoInputSchema,
-  providerInterruptTurnInputSchema,
-  providerRespondToRequestInputSchema,
-  providerSendTurnInputSchema,
-  providerSessionStartInputSchema,
-  providerStopSessionInputSchema,
-  terminalCommandInputSchema,
-  todoIdSchema,
-} from "@acme/contracts";
+import {
+  EDITORS,
+  IPC_CHANNELS,
+  type ContextMenuItem,
+  type TerminalCommandInput,
+  type TerminalCommandResult,
+  agentConfigSchema,
+  agentSessionIdSchema,
+  newTodoInputSchema,
+  providerInterruptTurnInputSchema,
+  providerRespondToRequestInputSchema,
+  providerSendTurnInputSchema,
+  providerSessionStartInputSchema,
+  providerStopSessionInputSchema,
+  terminalCommandInputSchema,
+  todoIdSchema,
+} from "@acme/contracts";
@@
-  ipcMain.handle(IPC_CHANNELS.contextMenuShow, async (_event, items: { id: string; label: string }[]) => {
-    const window = BrowserWindow.getFocusedWindow();
+  ipcMain.handle(IPC_CHANNELS.contextMenuShow, async (event, items: ContextMenuItem[]) => {
+    const window =
+      BrowserWindow.fromWebContents(event.sender) ?? BrowserWindow.getFocusedWindow();
     if (!window) return null;
Electron BrowserWindow.fromWebContents usage for Menu.popup — recommended window selection when showing a context menu from ipcMain.handle?

Also applies to: 152-169

🤖 Prompt for AI Agents
In `@apps/desktop/src/main.ts` at line 6, Replace usages of
BrowserWindow.getFocusedWindow() when building/popup context menus in the ipc
handler with BrowserWindow.fromWebContents(event.sender) so the menu is resolved
from the IPC sender's webContents; update the IPC handler that receives the menu
payload (the ipcMain.handle callback) to validate/parse the incoming array into
the shared ContextMenuItem type using the existing IPC validation utility before
mapping to Menu.buildFromTemplate, and pass
BrowserWindow.fromWebContents(event.sender) into Menu.popup to avoid null or
wrong focused-window cases.

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread apps/web/src/components/Sidebar.tsx
Comment on lines +87 to +112
const handleThreadContextMenu = useCallback(
async (threadId: string) => {
if (!api) return;
const clicked = await api.contextMenu.show([
{ id: "delete", label: "Delete" },
]);
if (clicked !== "delete") return;

const thread = state.threads.find((t) => t.id === threadId);
if (!thread) return;

// Stop active session if running
if (thread.session?.sessionId) {
try {
await api.providers.stopSession({
sessionId: thread.session.sessionId,
});
} catch {
// Session may already be stopped
}
}

dispatch({ type: "DELETE_THREAD", threadId });
},
[api, dispatch, state.threads],
);

@coderabbitai coderabbitai Bot Feb 11, 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.

⚠️ Potential issue | 🟠 Major

Don’t delete the thread if stopping the session fails.
Errors are swallowed and deletion proceeds, which can orphan a running provider session with no UI to stop it. Consider surfacing the error (or at least aborting deletion) unless you can distinguish “already stopped.”

🛡️ Safer flow
       if (thread.session?.sessionId) {
         try {
           await api.providers.stopSession({
             sessionId: thread.session.sessionId,
           });
-        } catch {
-          // Session may already be stopped
+        } catch (error) {
+          // Consider surfacing error so we don't orphan a running session
+          return;
         }
       }
 
       dispatch({ type: "DELETE_THREAD", threadId });
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const handleThreadContextMenu = useCallback(
async (threadId: string) => {
if (!api) return;
const clicked = await api.contextMenu.show([
{ id: "delete", label: "Delete" },
]);
if (clicked !== "delete") return;
const thread = state.threads.find((t) => t.id === threadId);
if (!thread) return;
// Stop active session if running
if (thread.session?.sessionId) {
try {
await api.providers.stopSession({
sessionId: thread.session.sessionId,
});
} catch {
// Session may already be stopped
}
}
dispatch({ type: "DELETE_THREAD", threadId });
},
[api, dispatch, state.threads],
);
const handleThreadContextMenu = useCallback(
async (threadId: string) => {
if (!api) return;
const clicked = await api.contextMenu.show([
{ id: "delete", label: "Delete" },
]);
if (clicked !== "delete") return;
const thread = state.threads.find((t) => t.id === threadId);
if (!thread) return;
// Stop active session if running
if (thread.session?.sessionId) {
try {
await api.providers.stopSession({
sessionId: thread.session.sessionId,
});
} catch (error) {
// Consider surfacing error so we don't orphan a running session
return;
}
}
dispatch({ type: "DELETE_THREAD", threadId });
},
[api, dispatch, state.threads],
);
🤖 Prompt for AI Agents
In `@apps/renderer/src/components/Sidebar.tsx` around lines 87 - 112,
handleThreadContextMenu currently swallows errors from api.providers.stopSession
and proceeds to dispatch DELETE_THREAD, which can orphan an active session;
change the flow in handleThreadContextMenu so that if stopSession throws you do
not delete the thread unless you can detect a harmless "already stopped"
condition—catch the error from api.providers.stopSession, check the error
message/code for an “already stopped” sentinel (or otherwise surface the error
via UI/api.logger) and abort the dispatch({ type: "DELETE_THREAD", ... }) when
stopSession failed, only allowing deletion when stopSession succeeded or the
error explicitly indicates the session was already stopped; reference
handleThreadContextMenu, api.providers.stopSession, and the DELETE_THREAD
dispatch to locate and update the logic.

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread apps/web/src/store.ts
Comment on lines +45 to +46
| { type: "SET_RUNTIME_MODE"; mode: RuntimeMode }
| { type: "DELETE_THREAD"; threadId: string };

@coderabbitai coderabbitai Bot Feb 11, 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.

⚠️ Potential issue | 🟡 Minor

Active-thread fallback should stay within the same project.
When deleting the active thread, picking the first remaining thread globally can jump the user into an unrelated project. Prefer the next thread in the same project (or null if none).

🔧 Suggested adjustment
     case "DELETE_THREAD": {
+      const deleted = state.threads.find((t) => t.id === action.threadId);
       const threads = state.threads.filter((t) => t.id !== action.threadId);
-      const activeThreadId =
-        state.activeThreadId === action.threadId
-          ? (threads[0]?.id ?? null)
-          : state.activeThreadId;
+      const fallback =
+        deleted?.projectId
+          ? threads.find((t) => t.projectId === deleted.projectId) ?? null
+          : threads[0] ?? null;
+      const activeThreadId =
+        state.activeThreadId === action.threadId
+          ? (fallback?.id ?? null)
+          : state.activeThreadId;
       return { ...state, threads, activeThreadId };
     }

Also applies to: 332-338

🤖 Prompt for AI Agents
In `@apps/renderer/src/store.ts` around lines 45 - 46, The DELETE_THREAD action
currently falls back to the first remaining thread globally which can switch
projects; change the reducer logic that handles { type: "DELETE_THREAD";
threadId: string } so that if the deleted thread equals the current active
thread (activeThreadId) you find the next active thread from the same project
only (e.g., filter threads by projectId === deletedThread.projectId) and set
activeThreadId to that thread's id or null if none; apply the same same-project
fallback change to the other deletion-handling block referenced (the logic
duplicated around the other DELETE_THREAD handling at the second location).

Sorry, something went wrong.

Uh oh!

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

All reactions
macroscopeapp[bot]
macroscopeapp Bot reviewed Feb 11, 2026
View reviewed changes
Comment thread apps/web/src/components/Sidebar.tsx
]);
if (clicked !== "delete") return;

const thread = state.threads.find((t) => t.id === threadId);

@macroscopeapp macroscopeapp Bot Feb 11, 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.

🟢 Low

components/Sidebar.tsx:171 The state.threads captured in the closure may become stale while awaiting api.contextMenu.show. Consider re-reading the thread from the current store state after the await returns, before stopping the session.

🚀 Want me to fix this? Reply ex: "fix it for me".

🤖 Prompt for AI
In file apps/web/src/components/Sidebar.tsx around line 171:

The `state.threads` captured in the closure may become stale while awaiting `api.contextMenu.show`. Consider re-reading the thread from the current store state after the await returns, before stopping the session.

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread apps/web/src/components/Sidebar.tsx
@@ -290,6 +317,10 @@ export default function Sidebar() {
threadId: thread.id,
})
}
onContextMenu={(e) => {

@macroscopeapp macroscopeapp Bot Feb 11, 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.

🟢 Low

components/Sidebar.tsx:320 Consider only calling e.preventDefault() when api.contextMenu.show will actually display a menu. Currently in non-Electron web mode, the native context menu is blocked but nothing appears because desktopBridge is undefined.

🚀 Want me to fix this? Reply ex: "fix it for me".

🤖 Prompt for AI
In file apps/web/src/components/Sidebar.tsx around line 320:

Consider only calling `e.preventDefault()` when `api.contextMenu.show` will actually display a menu. Currently in non-Electron web mode, the native context menu is blocked but nothing appears because `desktopBridge` is undefined.

Sorry, something went wrong.

Uh oh!

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

All reactions
@greptile-apps

greptile-apps Bot commented Feb 11, 2026

Copy link
Copy Markdown

Greptile Overview

Greptile Summary

This PR adds a native, platform-consistent context menu on sidebar thread items to support deleting threads.

Changes span the IPC contract (packages/contracts/src/ipc.ts), Electron main process (apps/desktop/src/main.ts) and preload bridge (apps/desktop/src/preload.ts) to expose a nativeApi.contextMenu.show() method that returns the clicked menu item id (or null if dismissed). The renderer (apps/renderer/src/components/Sidebar.tsx) wires onContextMenu on each thread button to show the menu, optionally stop an active provider session for that thread, then dispatches a new DELETE_THREAD action handled in the store reducer (apps/renderer/src/store.ts) to remove the thread and adjust activeThreadId.

No merge-blocking issues were found in the reviewed changes; the IPC wiring and type contract are consistent end-to-end.

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk.
  • Changes are small and localized, add a new IPC channel + preload bridge + renderer handler, and the new reducer action cleanly updates state. The contract between renderer/preload/main is consistent and there are no observable runtime/type-breaking issues introduced.
  • No files require special attention

Important Files Changed

Filename Overview
apps/desktop/src/main.ts Adds IPC handler to show a native context menu via Electron Menu and return clicked item id/null; change is self-contained and matches renderer/preload contract.
apps/desktop/src/preload.ts Adds nativeApi.contextMenu.show() that forwards menu item templates to main process via ipcRenderer.invoke; aligns with NativeApi typing.
apps/renderer/src/components/Sidebar.tsx Adds right-click handler on thread buttons to show native context menu and dispatch DELETE_THREAD after stopping any active provider session.
apps/renderer/src/store.ts Introduces DELETE_THREAD action in reducer to remove a thread and adjust activeThreadId when deleting the active thread.
packages/contracts/src/ipc.ts Extends IPC_CHANNELS and NativeApi contract with contextMenuShow channel and ContextMenuItem/contextMenu.show types.

Sequence Diagram

sequenceDiagram
    participant R as Renderer (Sidebar)
    participant P as Preload (contextBridge)
    participant M as Main Process (ipcMain)
    participant E as Electron Menu
    participant S as Store/Reducer

    R->>P: nativeApi.contextMenu.show([{id,label}])
    P->>M: ipcRenderer.invoke("context-menu:show", items)
    M->>E: Menu.buildFromTemplate(items)
    M->>E: menu.popup(window)
    alt User clicks item
        E-->>M: click handler (resolve(item.id))
        M-->>P: Promise resolves with id
        P-->>R: Promise resolves with id
        R->>P: nativeApi.providers.stopSession({sessionId}) (optional)
        P->>M: ipcRenderer.invoke("provider:session:stop", payload)
        M-->>P: resolves
        P-->>R: resolves
        R->>S: dispatch({type:"DELETE_THREAD", threadId})
        S-->>R: state updates (threads filtered, activeThreadId updated)
    else User dismisses menu
        E-->>M: popup callback (resolve(null))
        M-->>P: Promise resolves null
        P-->>R: Promise resolves null
    end
Loading
All reactions

Sorry, something went wrong.

Uh oh!

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

coderabbitai[bot]
coderabbitai Bot reviewed Feb 11, 2026
View reviewed changes

@coderabbitai coderabbitai Bot left a comment

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.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@packages/contracts/src/ipc.ts`:
- Around line 28-31: Remove the unused exported interface ContextMenuItem from
the file: delete the `export interface ContextMenuItem { id: string; label:
string }` declaration and any related export references so the contract aligns
with the inline generic used by `contextMenu.show` (which relies on `{ id: T;
label: string }[]` for proper inference); also run a quick grep for
`ContextMenuItem` and remove any leftover imports/usages elsewhere if found.

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread packages/contracts/src/ipc.ts Resolved

Uh oh!

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

@juliusmarminge @claude
Add context menu to delete threads from sidebar
eef2901
Adds right-click → Delete on sidebar thread items using Electron's
native Menu.popup() when running in desktop, with an imperative DOM
fallback for browser environments. The contextMenu.show() API is
generic so the returned item id is type-safe based on the items passed.

Co-Authored-By: Claude Haiku 4.5 <[email protected]>
@juliusmarminge
juliusmarminge force-pushed the juliusmarminge/sidebar-delete-thread branch from ab360e3 to eef2901 Compare February 11, 2026 21:36
@juliusmarminge
juliusmarminge merged commit 169d06f into main Feb 11, 2026
2 checks passed

Uh oh!

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

@juliusmarminge juliusmarminge mentioned this pull request Jul 3, 2026
fix(orchestrator): session audit remediation — error fidelity, session resume, reconcile visibility #3677
Closed
juliusmarminge added a commit that referenced this pull request Jul 12, 2026
@juliusmarminge @claude
Keep output/error on opencode file_search items
94155d9
Failed read/grep/glob tools projected only {status: failed, pattern} —
the provider's error message was unrecoverable from projections, and
successful outputs were dropped too (audit plan #12, thread 3029dc85
item prt_f15692f3). The file_search contract gains optional output and
error fields; the OpenCode adapter maps part.state.output/error by
terminal status.

App-verified with a real OpenCode agent: a successful package.json read
projects the content in output, and a read of a nonexistent file
projects status failed with error "File not found: ...".

Co-Authored-By: Claude Fable 5 <[email protected]>
juliusmarminge added a commit that referenced this pull request Jul 12, 2026
@juliusmarminge @claude
Keep output/error on opencode file_search items
cf23cc1
Failed read/grep/glob tools projected only {status: failed, pattern} —
the provider's error message was unrecoverable from projections, and
successful outputs were dropped too (audit plan #12, thread 3029dc85
item prt_f15692f3). The file_search contract gains optional output and
error fields; the OpenCode adapter maps part.state.output/error by
terminal status.

App-verified with a real OpenCode agent: a successful package.json read
projects the content in output, and a read of a nonexistent file
projects status failed with error "File not found: ...".

Co-Authored-By: Claude Fable 5 <[email protected]>
@davidFeldqwe davidFeldqwe mentioned this pull request Jul 23, 2026
Prompt autocomplete: replace CLI subprocess with direct Anthropic API davidFeldqwe/t3code#1
Draft
3 tasks done
@awtprod awtprod mentioned this pull request Jul 25, 2026
feat(preview): authenticated preview gateway, serve mode, and stability fixes awtprod/t3-code#5
Merged
ccdwyer added a commit to ccdwyer/t3code that referenced this pull request Jul 30, 2026
@ccdwyer
feat(plugin-sdk-web): declare settings; make web register optional
88850fa
Sol spec review MUST pingdotgg#12: PluginWebDefinition.register was mandatory and called
unconditionally, so a plugin whose entire web surface is a host-rendered settings
page could not load — it would have to ship an empty register() to satisfy the
loader. register is now optional when `settings` is declared; an entry with neither
is still rejected (that is a mistake, not a declarative plugin).

The doc comment records why the schema must come from a module shared with the SERVER
entry: the two entries bundle separately, so each gets its own copy of the schema
object. That is harmless (both are built by the host's Schema classes; every use is
structural) but the host cannot verify they match, so the SERVER's schema is
authoritative for validation and this copy only renders.

LIMITATION, stated rather than implied: `settings` is currently INERT. Nothing
consumes it yet — the host does not synthesize a settings page from the schema, which
needs a real component (RPC draft fetch, form, save with expectedRevision, conflict
handling). Until that lands, declaring settings has no observable effect.

That is also why there is no test for "a settings-only plugin loads". I wrote one; it
passed even after I reverted register to mandatory, because state.loaded tracks
ATTEMPTS and a settings-only plugin contributes no surfaces either way — so it
asserted nothing. Removed rather than kept green. The surviving test ("still calls
register when both are declared") is verified deletion-sensitive: skipping the
register() call fails it.

Gates: typecheck 0 errors; web 1315 passed.
ccdwyer added a commit to ccdwyer/t3code that referenced this pull request Jul 31, 2026
@ccdwyer
feat(plugin-sdk-web): declare settings; make web register optional
37fac8f
Sol spec review MUST pingdotgg#12: PluginWebDefinition.register was mandatory and called
unconditionally, so a plugin whose entire web surface is a host-rendered settings
page could not load — it would have to ship an empty register() to satisfy the
loader. register is now optional when `settings` is declared; an entry with neither
is still rejected (that is a mistake, not a declarative plugin).

The doc comment records why the schema must come from a module shared with the SERVER
entry: the two entries bundle separately, so each gets its own copy of the schema
object. That is harmless (both are built by the host's Schema classes; every use is
structural) but the host cannot verify they match, so the SERVER's schema is
authoritative for validation and this copy only renders.

LIMITATION, stated rather than implied: `settings` is currently INERT. Nothing
consumes it yet — the host does not synthesize a settings page from the schema, which
needs a real component (RPC draft fetch, form, save with expectedRevision, conflict
handling). Until that lands, declaring settings has no observable effect.

That is also why there is no test for "a settings-only plugin loads". I wrote one; it
passed even after I reverted register to mandatory, because state.loaded tracks
ATTEMPTS and a settings-only plugin contributes no surfaces either way — so it
asserted nothing. Removed rather than kept green. The surviving test ("still calls
register when both are declared") is verified deletion-sensitive: skipping the
register() call fails it.

Gates: typecheck 0 errors; web 1315 passed.
aorwall added a commit to aorwall/t3code that referenced this pull request Aug 2, 2026
@aorwall @claude
ci: build and publish the moatless-t3 image (pingdotgg#12)
526eed9
* ci: build and publish the moatless-t3 image

The Moatless Helm chart deploys the T3 UI from a container image, and this
fork had no container build to produce one — upstream ships apps/web to
Vercel. Adds a static nginx image and the workflow that publishes it as
aorwall/moatless-t3.

The image is assets and nginx, nothing else. It deliberately does not proxy
the backend: the SPA and the backend share one host, and the chart's Traefik
already routes /api, /ws, /.well-known/t3 and /oauth/token to the backend.
Teaching nginx those prefixes as well would give each of them two possible
answers depending on which layer matched first. Run on its own the image
therefore serves the shell and fails bootstrap, which is the image working.

The build installs 4 of the 16 workspace projects rather than the whole
monorepo, so no Electron or Expo, and builds with a non-empty
MOATLESS_BASE_URL — at build time that value is only read as a flag, and it
is what pins the client to single-origin and Moatless cookie auth.

This is the first workflow that actually runs in this fork, so the blanket
"every workflow here is disabled" README is no longer true and was rewritten.
Pull requests build without publishing, which is also the only place
docker/nginx.conf is executed before it reaches a cluster.

Co-Authored-By: Claude Opus 5 <[email protected]>

* ci: run the image build on a self-hosted runner

The first run failed in 30s with no runner assigned and not one step
recorded. That is not a build failure — it is a job that was never
dispatched, and it is the shape of every ubuntu-* job this repository has
ever had, pr-size and pr-vouch included. GitHub-hosted runners do not start
here at all.

So the workflows README had the wrong cause for those two: they fail before
the code that would have failed them for being upstream's contributor
automation. Corrected there and in the fork policy, and the re-enabling
advice no longer points ci.yml at ubuntu-24.04.

Co-Authored-By: Claude Opus 5 <[email protected]>

* fix(docker): install git in the builder stage

The root prepare script runs `vp config`, which shells out to git, and
node:24-slim has none — so `pnpm install` failed the image build. Only the
binary is needed: the context deliberately has no .git, and vp config warns
rather than fails when the repository is absent.

Committed with --no-verify: the staged-files hook runs `vp fmt` on the changed
paths, and a commit touching only a Dockerfile matches no formattable file, so
the hook errors on "Expected at least one target file" rather than doing
nothing.

Co-Authored-By: Claude Opus 5 <[email protected]>

* fix(docker): build on the full node image instead of apt-installing git

The apt layer added in the previous commit cannot run in CI: the build
network has no route to deb.debian.org, so `apt-get update` times out. The
full node image already carries git, and the builder stage contributes
nothing to the published image, so the extra size is a cold-pull cost on the
runner and not a shipped one.

Co-Authored-By: Claude Opus 5 <[email protected]>

* fix(docker): install with --ignore-scripts and drop the layer cache

Back to node:24-slim. The full image was only there to supply git for the
root prepare script, and the runner died 13 minutes into that build with no
logs uploaded — the wrong trade for a dependency the build does not have.

--ignore-scripts removes the need entirely. What the lifecycle scripts
produce — the patched TypeScript binary, esbuild's and msgpackr's native
bits — serves typechecking and tests, not `vp build`: verified locally that
install-with-scripts and install-without produce the same bundle hash.

The layer cache goes with it. The Dockerfile copies the whole context before
installing, so any file change invalidates the install layer and everything
after it; mode=max was exporting hundreds of MB per run for a hit rate near
zero.

Co-Authored-By: Claude Opus 5 <[email protected]>

* fix(docker): give the builder a CA bundle

vp build constructs an HTTP client at startup unconditionally, and with an
empty system trust store it panics before the build begins rather than
failing a request. node:24-slim ships no trust store — verified against the
registry rather than guessed.

The nginx image has one and is already being pulled for the runtime stage, so
it is now a named stage that both the builder (for the bundle) and the
runtime stage build from. That keeps it to one image reference and one pull,
and avoids apt, which cannot reach deb.debian.org from CI.

Co-Authored-By: Claude Opus 5 <[email protected]>

* docs(ci): name the runner set's source and the two properties that bite

staging-runners-large is an org-scoped ARC scale set in
soaplabs/soap-platform-gitops (apps/nonprod/arc-runner-large-set), org-scoped
rather than repo-listed, which is why this fork can use it with nothing
configured. Cited in the workflow, its README and docker/Dockerfile.

Two properties of it explain failures seen getting here, and both were
guessed at wrongly first:

- its nodes are spot, so a job can vanish mid-step with no logs — the run
  that "died building the full node image" most likely just lost its node;
- its egress allowlist permits only 443/TCP, which is the real reason
  apt-get hangs. Debian's default sources are plain HTTP. Not "no route to
  deb.debian.org" — apt over https would in fact have worked.

--ignore-scripts stays regardless: it is faster, keeps arbitrary postinstall
scripts out of the build image, and produces the same bundle.

Co-Authored-By: Claude Opus 5 <[email protected]>

---------

Co-authored-by: Claude <[email protected]>
Bil0000 referenced this pull request in Bil0000/t3code Aug 12, 2026
@Bil0000
feat(server): find the issues a change request only mentions
7465706
A host reports a link only where somebody used a closing keyword or
cross-referenced the issue, so a pull request whose body says "part of
#12" showed no linked issue at all — which is what our own pingdotgg#6315 does.

The title and body are now read for references too, outside code spans
and fences, and each one is resolved against the host before it is
shown: a number in a body is not proof an issue exists. What resolves
is listed as cited, never as closing — only the host can say what
merging will close — and the host's own links always win.

Bounded at ten, and a failed resolve leaves the host's own links
standing rather than failing the read.
Bil0000 referenced this pull request in Bil0000/t3code Aug 12, 2026
@Bil0000
feat(web): hand the linking between the two to an agent
f358129
A change request with no linked issue said only that it mentions none,
and an issue with no change request said the same — both true, and
neither any use to somebody who knows the link exists and has not been
written down.

Both sections now offer to hand the question over: read the change,
read the open issues, and record what actually matches the way the host
records it, by editing a description to carry `Closes #12`. The task
says to link nothing it is unsure of and that an empty answer is a
valid one, and everything quoted from the host travels as untrusted
data.
@zyfvhcfh87-rgb zyfvhcfh87-rgb mentioned this pull request Aug 12, 2026
Phase 3: Blockers strip zyfvhcfh87-rgb/Lyn3Code#11
Open
2 tasks
@chrisu-dev

chrisu-dev commented Aug 30, 2026

Copy link
Copy Markdown

Updated the PR head to 69ee3165a after merging current origin/staging.

  • Bot runs now use the canonical sidebar lifecycle/context path, including archived restore behavior.
  • Run snapshots persist their completion-time token total through migration 058; the run list reads that stored value.
  • Instructions use the canonical arbitrary-position slash parser and a bounded portalled menu with an always-mounted listbox.

Verification run on this head: focused bot and merge suites (22 files, 547 tests with one existing skip), five scoped package typechecks, scoped lint/format, Canon checks, seam gate, and staged diff/NUL/palette audit.

All reactions

Sorry, something went wrong.

Uh oh!

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

gmackie pushed a commit to gmackie/t3code that referenced this pull request Sep 4, 2026
gmackie
Merge pull request 'fix(release): install libsecret for Linux artifac…
34a9294
…ts' (pingdotgg#12) from gmacko-release-lane-rebuild into custom-local
@macroscopeapp macroscopeapp Bot mentioned this pull request Sep 17, 2026
feat(issues): add multi-provider issue tracking #6315
Closed
@yashptel yashptel mentioned this pull request Sep 18, 2026
Introduce an internal OMP runtime seam so a future RPC runtime can satisfy the same contract yashptel/oh-my-t3code#4
Open
@ashutoshpw ashutoshpw mentioned this pull request Sep 22, 2026
ci: skip the desktop build on documentation-only changes ashutoshpw/t2code#11
Closed
chrisdeeming added a commit to chrisdeeming/t3code that referenced this pull request Sep 28, 2026
@chrisdeeming
feat(web): headings in the rich text composer
ba4d806
`# Heading` stayed literal text in the rich text composer.

Headings are now heading nodes whose `space` attribute keeps the exact
whitespace after the `#`s, so a heading round-trips byte-identically and
closing `#`s stay literal. The `#`s must be followed by whitespace, in the
parser and in the input rule alike, and that is the whole of the coexistence
with pull request references: `pingdotgg#1234` is a token of `#` plus word characters,
a heading needs the space that ends that token, so neither can claim the
other's input and the picker keeps opening for `pingdotgg#12`. Headings form only at a
top-level paragraph, and Shift+Enter after one starts an ordinary line.
@triias triias mentioned this pull request Sep 30, 2026
[Bug]: PR detail/activity is re-fetched for every displayed PR on each focus, visibility change and 5-minute tick (merged PRs included), exhausting the GitHub GraphQL quota #13496
Closed
2 tasks done
This was referenced Oct 15, 2026
[Bug]: a few T3 tool labels stay in the present tense after the call finishes, or read awkwardly #19760
Closed
fix(shared): unwatch, review guide, and task cancel labels read as plain sentences #19767
Merged
This was referenced Oct 15, 2026
GitHub: issue reads and writes through the gh CLI #19886
Closed
GitHub: pull request reads and writes #19893
Closed
@ScottN-PV ScottN-PV mentioned this pull request Oct 17, 2026
fix(web): name the missing repository in the PR link dialog #20533
Merged
yasinuslu added a commit to yasinuslu/t3code that referenced this pull request Oct 17, 2026
@yasinuslu
Merge pull request 'feat: push notifications to the owner (inbox, Web…
278977d
… Push, notify_user, t3 notify)' (pingdotgg#12) from feature/notify-user-webpush into yu-v2

Reviewed-on: https://git.burmese-shiner.ts.net/yasinuslu/t3code/pulls/12
bynoorbot added a commit to NoorGuru/mound that referenced this pull request Oct 27, 2026
@bynoorbot
chore(night-shift): auto-checkpoint verified iteration pingdotgg#12
b6237e0
@aioue aioue mentioned this pull request Oct 30, 2026
Android: native crash (libreanimated/Fabric) opening T3 Connect environment with many providers #27272
Closed
@juliusmarminge juliusmarminge mentioned this pull request Nov 2, 2026
fix(mobile): iOS Copy as Markdown keeps bold spans whole #29020
Closed
@dominic-r dominic-r mentioned this pull request Nov 3, 2026
fix(web,mobile): a settled thread says why it settled and how its PR ended #29869
Closed
@github-actions github-actions Bot mentioned this pull request Nov 4, 2026
Build notifications samer2373/t3code#1
Closed
@deanseniorverse deanseniorverse mentioned this pull request Nov 6, 2026
feat: give machines a nickname that shows on every device deanseniorverse/t3code#2
Merged
phillip-hirsch added a commit to phillip-hirsch/t3code that referenced this pull request Nov 8, 2026
@phillip-hirsch
fix(desktop-gpui): thread search finds pull request numbers, titles a…
c4e4c64
…nd references

Sidebar and palette thread search port scoreThreadSearch: linked PR numbers and the newest PR titles are fields, "pr 12", "pingdotgg#12" and the worktree prefix come off the query, a long ID or PR link prefix matches, and a multi-word match the title shows none of needs one field that explains it.

Parity: sidebar-1-D32
Dylan-Grinboju added a commit to Dylan-Grinboju/t3code that referenced this pull request Nov 8, 2026
@Dylan-Grinboju @claude
feat(web): thread details list the GitHub and Jira links mentioned in…
33b2991
… the thread

Links that came up in a thread were only findable by scrolling back through it.
Thread details now have GitHub and Jira sections listing every PR, issue,
commit and Jira issue URL from the thread's messages, newest first, with
duplicates such as pingdotgg/pull/12/files and pingdotgg/pull/12 merged. Each settled message is
scanned once, and streaming replies are skipped. The sections can be hidden
from the card's right-click menu.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Nov 12, 2026
fix(mobile): Android Git overview sheet scrolls to every linked pull request #34808
Closed
fix(server): a pass that changes several watched pull requests wakes their thread once #35109
Merged
[Bug]: Since #23522, a PR watch never wakes when checks pass between the watch call and its first read #36463
Closed
perf(relay): cut index writes on delivery attempts and DPoP proofs #38739
Merged
@Michel-Liao Michel-Liao mentioned this pull request Nov 21, 2026
fix(azure-devops): project-less pull request URLs can be pasted to check out #40436
Merged
@callmemorgan callmemorgan mentioned this pull request Nov 21, 2026
fix(shared): macOS bare spawns no longer allocate ghost PIDs for each PATH miss #40612
Open
maximilianschroeder09437334-sys added a commit to maximilianschroeder09437334-sys/t3code that referenced this pull request Nov 22, 2026
@maximilianschroeder09437334-sys @claude
feat(web): Waiting on lines name the target's kind
c9d29ab
Resolved targets carry kind (subagent, thread, pull_request, command, monitor,
background_task) from source, thread and the waiter's roster via a lazy
per-waiter map. Popover, sidebar status, header pill and Home show
"Waiting on subagent Fix tests", "PR pingdotgg#12 checks", "command vp test".

Co-Authored-By: Claude Opus 5.5 <[email protected]>
bigx333 added a commit to bigx333/t3code that referenced this pull request Nov 24, 2026
@bigx333 @claude
feat(pstack): port built-in pstack pack, orchestration wiring, and pa…
e4255fc
…ckaging

Port built-in pstack from scriptedalchemy/main (PRs pingdotgg#8, pingdotgg#12, pingdotgg#20, pingdotgg#25, pingdotgg#26,
pingdotgg#27, pingdotgg#38, pingdotgg#46, pingdotgg#51, pingdotgg#102, pingdotgg#117, pingdotgg#153) onto current main.

- packages/pstack (snapshot 0.15.43-t3code.1), shared/pstack, server pstack
  module and client-runtime providerSkills taken verbatim from the fork.
- Server: PstackPack layer, composer expansion on turn start and steer,
  pstack catalog in server config and live pstackUpdated snapshots,
  orchestrationTargets helpers shared with the MCP service, driverKind
  targets prefer instances advertising the requested model and options,
  orchestrator_capabilities allModels for setup-pstack, and native
  pstack@<marketplace> plugins switched off in Claude and Codex sessions.
- pstackEnabled is on by default; toggle lives in Settings > Labs on web
  and mobile, with i18n for all locales.
- Packaging: CLI build, CLI archive, desktop artifact, WSL tree and desktop
  backend carry the pack and point the server at it.

Adapted to main: no provider cooldowns or inference routes upstream, so
role resolution uses providerConstraints and the retired-route migration
and its tests are dropped; turn start expands only messages that
reference pstack; fork-only linked-delegation driverKind refusal is not
ported because main resolves driverKind remotely.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@only21mil only21mil mentioned this pull request Nov 27, 2026
fix(web): a thread's own PR no longer opens as someone else's when its repository casing differs #44515
Merged
imetn added a commit to imetn/t4code that referenced this pull request Nov 28, 2026
@imetn
feat(server,web): add right-sidebar context breakdown and connectors …
42259a3
…management

Expose thread-level context composition and MCP connector inspection in the chat right sidebar:

- Add `provider.thread.inspect`, `provider.mcp.reconnect`, and `provider.mcp.toggle` RPCs across contracts, client-runtime, server WS/auth/instrumentation, and provider adapters (Claude, Codex, Kiro, core) to report segmented context usage (messages, MCP tools, system prompt, skills, memory files, deferred tools, autocompact buffer, free space) and connector statuses with reconnect/toggle/sign-in actions.
- Render a segmented Context bar, interactive breakdown rows, expandable MCP tools / memory files lists, and a Connectors management view inside `ThreadDetailsPanel` and `ThreadDetailsCard` with full 10-locale translations.
- Record Lock pingdotgg#12 in `T4_CUSTOMIZATIONS.md` and add unit + Chromium browser tests covering inspector aggregation, context breakdown rendering, and connector interactions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@coderabbitai coderabbitai[bot] coderabbitai[bot] left review comments
@macroscopeapp macroscopeapp[bot] macroscopeapp[bot] left review comments

Uh oh!

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

Assignees

No one assigned

Labels

None yet

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

@juliusmarminge @chrisu-dev
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.