Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): unblock OpenCode approvals and stop #9653

Mergedt3dotgg(GitHub profile, opens in a new tab)merged 3 commits intomain fromrefs/pull/9653/headmerged by t3dotgg(GitHub profile, opens in a new tab) View on GitHub

Showing 17 changed files with 151 additions and 3 deletions (loading 14).

x
0 of 17 viewed, 17 left
62 additions and 0 deletionsapps/mobile/src/lib/threadActivity.test.tsModified
View file
@@ -263,6 +263,68 @@
});
​
describe("pending approvals", () => {
+ it.each([{}, { requestType: "unknown" }])(
+ "exposes legacy OpenCode approvals without a known request kind: %j",
+ (legacyPayload) => {
+ const requested = makeActivity({
+ id: EventId.make("approval-legacy"),
+ kind: "approval.requested",
+ summary: "Approval requested",
+ createdAt: "2026-08-24T00:00:00.000Z",
+ payload: { requestId: "per-legacy", detail: "*", ...legacyPayload },
+ });
+​
+ expect(derivePendingApprovals([requested])).toEqual([
+ {
+ requestId: "per-legacy",
+ requestKind: "command",
+ createdAt: requested.createdAt,
+ detail: "*",
+ },
+ ]);
+ },
+ );
+​
+ it.each(["tool_user_input", "auth_tokens_refresh"])(
+ "does not turn %s into an approval",
+ (requestType) => {
+ const activity = makeActivity({