Skip to content

Commit fe9876c

Browse files
engineerCopilot
andcommitted
fix: restore QueryClientProvider and session sweep flag
- Add QueryProvider wrapper in AppBaseProviders (tanstack/solid-query useMutation crashed without it) - Add OPENCODE_SESSION_IDLE_MS to Flag namespace - Update AGENTS.md with mandatory pre-push verification steps Co-authored-by: Copilot <[email protected]>
1 parent 09f7b03 commit fe9876c

5 files changed

Lines changed: 259 additions & 0 deletions

File tree

‎AGENTS.md‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,3 +158,14 @@ Do not generate repeated snapshots blindly. Retention keeps only the newest `2`
158158
## Type Checking
159159

160160
- Always run `bun typecheck` from package directories (e.g., `packages/opencode`), never `tsc` directly.
161+
162+
## Pre-Push Verification (mandatory)
163+
164+
Before considering any task complete and before pushing code, you **must** verify all of the following pass:
165+
166+
1. **Typecheck**: `cd packages/opencode && bun typecheck` — must report 0 errors
167+
2. **App build**: `cd packages/app && bun run build` — must succeed
168+
3. **Local install**: `bun run install:local` (from repo root) — must succeed end-to-end
169+
4. **Tests**: `cd packages/opencode && bun test` — must pass
170+
171+
If any step fails, fix the issue before pushing. Do not push broken code.

‎packages/app/src/app.tsx‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { Splash } from "@opencode-ai/ui/logo"
99
import { ThemeProvider } from "@opencode-ai/ui/theme/context"
1010
import { MetaProvider } from "@solidjs/meta"
1111
import { type BaseRouterProps, Navigate, Route, Router } from "@solidjs/router"
12+
import { QueryClient, QueryClientProvider } from "@tanstack/solid-query"
1213
import { type Duration, Effect } from "effect"
1314
import {
1415
type Component,
@@ -96,6 +97,11 @@ function MarkedProviderWithNativeParser(props: ParentProps) {
9697
return <MarkedProvider nativeParser={platform.parseMarkdown}>{props.children}</MarkedProvider>
9798
}
9899

100+
function QueryProvider(props: ParentProps) {
101+
const client = new QueryClient()
102+
return <QueryClientProvider client={client}>{props.children}</QueryClientProvider>
103+
}
104+
99105
function AppShellProviders(props: ParentProps) {
100106
return (
101107
<SettingsProvider>
@@ -149,11 +155,13 @@ export function AppBaseProviders(props: ParentProps<{ locale?: Locale }>) {
149155
<LanguageProvider locale={props.locale}>
150156
<UiI18nBridge>
151157
<ErrorBoundary fallback={(error) => <ErrorPage error={error} />}>
158+
<QueryProvider>
152159
<DialogProvider>
153160
<MarkedProviderWithNativeParser>
154161
<FileComponentProvider component={File}>{props.children}</FileComponentProvider>
155162
</MarkedProviderWithNativeParser>
156163
</DialogProvider>
164+
</QueryProvider>
157165
</ErrorBoundary>
158166
</UiI18nBridge>
159167
</LanguageProvider>
Lines changed: 237 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,237 @@
1+
{
2+
"cmd": [
3+
"bun",
4+
"run",
5+
"--conditions=browser",
6+
"./src/index.ts",
7+
"debug",
8+
"wait"
9+
],
10+
"pid": 14529,
11+
"started_at": "2026-03-31T15:09:28.961Z",
12+
"ended_at": "2026-03-31T15:09:44.877Z",
13+
"config": {
14+
"duration": 15,
15+
"interval": 1000,
16+
"warmup": 2,
17+
"out": ""
18+
},
19+
"summary": {
20+
"start_rss_mb": 216.328125,
21+
"end_rss_mb": 317.25,
22+
"peak_rss_mb": 416.3125,
23+
"delta_rss_mb": 100.921875,
24+
"slope_mb_per_s": 6.363697269689135,
25+
"samples": 16
26+
},
27+
"samples": [
28+
{
29+
"at": "2026-03-31T15:09:29.004Z",
30+
"elapsed_ms": 43,
31+
"total_rss_kb": 221520,
32+
"proc": [
33+
{
34+
"pid": 14529,
35+
"ppid": 14508,
36+
"rss_kb": 221520,
37+
"cmd": "bun run --conditions=browser ./src/index.ts debug wait"
38+
}
39+
]
40+
},
41+
{
42+
"at": "2026-03-31T15:09:30.039Z",
43+
"elapsed_ms": 1078,
44+
"total_rss_kb": 404704,
45+
"proc": [
46+
{
47+
"pid": 14529,
48+
"ppid": 14508,
49+
"rss_kb": 404704,
50+
"cmd": "bun run --conditions=browser ./src/index.ts debug wait"
51+
}
52+
]
53+
},
54+
{
55+
"at": "2026-03-31T15:09:31.084Z",
56+
"elapsed_ms": 2123,
57+
"total_rss_kb": 426304,
58+
"proc": [
59+
{
60+
"pid": 14529,
61+
"ppid": 14508,
62+
"rss_kb": 426304,
63+
"cmd": "bun run --conditions=browser ./src/index.ts debug wait"
64+
}
65+
]
66+
},
67+
{
68+
"at": "2026-03-31T15:09:32.149Z",
69+
"elapsed_ms": 3188,
70+
"total_rss_kb": 426304,
71+
"proc": [
72+
{
73+
"pid": 14529,
74+
"ppid": 14508,
75+
"rss_kb": 426304,
76+
"cmd": "bun run --conditions=browser ./src/index.ts debug wait"
77+
}
78+
]
79+
},
80+
{
81+
"at": "2026-03-31T15:09:33.205Z",
82+
"elapsed_ms": 4244,
83+
"total_rss_kb": 426304,
84+
"proc": [
85+
{
86+
"pid": 14529,
87+
"ppid": 14508,
88+
"rss_kb": 426304,
89+
"cmd": "bun run --conditions=browser ./src/index.ts debug wait"
90+
}
91+
]
92+
},
93+
{
94+
"at": "2026-03-31T15:09:34.279Z",
95+
"elapsed_ms": 5318,
96+
"total_rss_kb": 426304,
97+
"proc": [
98+
{
99+
"pid": 14529,
100+
"ppid": 14508,
101+
"rss_kb": 426304,
102+
"cmd": "bun run --conditions=browser ./src/index.ts debug wait"
103+
}
104+
]
105+
},
106+
{
107+
"at": "2026-03-31T15:09:35.352Z",
108+
"elapsed_ms": 6391,
109+
"total_rss_kb": 426304,
110+
"proc": [
111+
{
112+
"pid": 14529,
113+
"ppid": 14508,
114+
"rss_kb": 426304,
115+
"cmd": "bun run --conditions=browser ./src/index.ts debug wait"
116+
}
117+
]
118+
},
119+
{
120+
"at": "2026-03-31T15:09:36.424Z",
121+
"elapsed_ms": 7463,
122+
"total_rss_kb": 426304,
123+
"proc": [
124+
{
125+
"pid": 14529,
126+
"ppid": 14508,
127+
"rss_kb": 426304,
128+
"cmd": "bun run --conditions=browser ./src/index.ts debug wait"
129+
}
130+
]
131+
},
132+
{
133+
"at": "2026-03-31T15:09:37.500Z",
134+
"elapsed_ms": 8539,
135+
"total_rss_kb": 426304,
136+
"proc": [
137+
{
138+
"pid": 14529,
139+
"ppid": 14508,
140+
"rss_kb": 426304,
141+
"cmd": "bun run --conditions=browser ./src/index.ts debug wait"
142+
}
143+
]
144+
},
145+
{
146+
"at": "2026-03-31T15:09:38.561Z",
147+
"elapsed_ms": 9600,
148+
"total_rss_kb": 426304,
149+
"proc": [
150+
{
151+
"pid": 14529,
152+
"ppid": 14508,
153+
"rss_kb": 426304,
154+
"cmd": "bun run --conditions=browser ./src/index.ts debug wait"
155+
}
156+
]
157+
},
158+
{
159+
"at": "2026-03-31T15:09:39.621Z",
160+
"elapsed_ms": 10660,
161+
"total_rss_kb": 426304,
162+
"proc": [
163+
{
164+
"pid": 14529,
165+
"ppid": 14508,
166+
"rss_kb": 426304,
167+
"cmd": "bun run --conditions=browser ./src/index.ts debug wait"
168+
}
169+
]
170+
},
171+
{
172+
"at": "2026-03-31T15:09:40.671Z",
173+
"elapsed_ms": 11710,
174+
"total_rss_kb": 425872,
175+
"proc": [
176+
{
177+
"pid": 14529,
178+
"ppid": 14508,
179+
"rss_kb": 425872,
180+
"cmd": "bun run --conditions=browser ./src/index.ts debug wait"
181+
}
182+
]
183+
},
184+
{
185+
"at": "2026-03-31T15:09:41.729Z",
186+
"elapsed_ms": 12768,
187+
"total_rss_kb": 425792,
188+
"proc": [
189+
{
190+
"pid": 14529,
191+
"ppid": 14508,
192+
"rss_kb": 425792,
193+
"cmd": "bun run --conditions=browser ./src/index.ts debug wait"
194+
}
195+
]
196+
},
197+
{
198+
"at": "2026-03-31T15:09:42.767Z",
199+
"elapsed_ms": 13806,
200+
"total_rss_kb": 425792,
201+
"proc": [
202+
{
203+
"pid": 14529,
204+
"ppid": 14508,
205+
"rss_kb": 425792,
206+
"cmd": "bun run --conditions=browser ./src/index.ts debug wait"
207+
}
208+
]
209+
},
210+
{
211+
"at": "2026-03-31T15:09:43.825Z",
212+
"elapsed_ms": 14864,
213+
"total_rss_kb": 324864,
214+
"proc": [
215+
{
216+
"pid": 14529,
217+
"ppid": 14508,
218+
"rss_kb": 324864,
219+
"cmd": "bun run --conditions=browser ./src/index.ts debug wait"
220+
}
221+
]
222+
},
223+
{
224+
"at": "2026-03-31T15:09:44.863Z",
225+
"elapsed_ms": 15902,
226+
"total_rss_kb": 324864,
227+
"proc": [
228+
{
229+
"pid": 14529,
230+
"ppid": 14508,
231+
"rss_kb": 324864,
232+
"cmd": "bun run --conditions=browser ./src/index.ts debug wait"
233+
}
234+
]
235+
}
236+
]
237+
}

‎packages/opencode/src/flag/flag.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ export namespace Flag {
7373
export const OPENCODE_EXPERIMENTAL_WORKSPACES = OPENCODE_EXPERIMENTAL || truthy("OPENCODE_EXPERIMENTAL_WORKSPACES")
7474
export const OPENCODE_EXPERIMENTAL_MARKDOWN = !falsy("OPENCODE_EXPERIMENTAL_MARKDOWN")
7575
export const OPENCODE_MCP_IDLE_MS = number("OPENCODE_MCP_IDLE_MS")
76+
export const OPENCODE_SESSION_IDLE_MS = number("OPENCODE_SESSION_IDLE_MS")
7677
export const OPENCODE_MODELS_URL = process.env["OPENCODE_MODELS_URL"]
7778
export const OPENCODE_MODELS_PATH = process.env["OPENCODE_MODELS_PATH"]
7879
export const OPENCODE_DISABLE_EMBEDDED_WEB_UI = truthy("OPENCODE_DISABLE_EMBEDDED_WEB_UI")

‎packages/opencode/src/provider/models-snapshot.ts‎

Lines changed: 2 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)