Repository navigation
Copilot/resolve conflicts - #2
Conversation
…u can specify one without both being required (anomalyco#29268) Co-authored-by: Robert Poschenrieder <Robert_Poschenrieder@epdeberw000f.fritz.box>
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
…30167) Co-authored-by: LukeParkerDev <10430890+Hona@users.noreply.github.com>
Direct run mode previously made submitted follow-up prompts irrevocable while a response was still running. Let users edit or remove queued prompts before dispatch without interrupting the active turn.
…o#30145) Co-authored-by: Shoubhit Dash <shoubhit2005@gmail.com>
…anomalyco#29710) Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com> Co-authored-by: Simon Klee <hello@simonklee.dk>
|
Hey! Your PR title Please update it to start with one of:
Where See CONTRIBUTING.md for details. |
There was a problem hiding this comment.
Code Review
This pull request introduces significant updates across the codebase, including transitioning the desktop application from Tauri to Electron, adding comprehensive localization glossaries, implementing an AWS S3 Tables-based data lake with Athena querying, and adding a SolidJS TUI smoke test plugin. Additionally, project configuration, CI/CD workflows, and app dialogs were refined, and a performance monitoring DebugBar was introduced. Key feedback from the review highlights reactivity issues in app.tsx where createResource needs a source function to track server changes, potential TypeErrors in dialog-select-directory.tsx from unsafe array indexing, and opportunities to improve header normalization and shell script path expansion robustness.
| const [startupHealthCheck, healthCheckActions] = createResource(() => | ||
| props.disableHealthCheck | ||
| ? true | ||
| : Effect.gen(function* () { | ||
| if (!server.current) return true | ||
| const { http, type } = server.current | ||
|
|
||
| while (true) { | ||
| const res = yield* Effect.promise(() => checkServerHealth(http)) | ||
| if (res.healthy) return true | ||
| if (checkMode() === "background" || type === "http") return false | ||
| } | ||
| }).pipe( | ||
| Effect.timeoutOrElse({ duration: "10 seconds", orElse: () => Effect.succeed(false) }), | ||
| Effect.ensuring(Effect.sync(() => setCheckMode("background"))), | ||
| Effect.runPromise, | ||
| ), | ||
| ) |
There was a problem hiding this comment.
In SolidJS, createResource only tracks reactive dependencies read inside its first argument (the source function). Since server.current is read inside the fetcher function (the single argument form of createResource), changes to server.current will not trigger a refetch when the user switches servers. Pass a source function as the first argument to correctly track these dependencies.
const [startupHealthCheck, healthCheckActions] = createResource(
() => ({
disable: props.disableHealthCheck,
current: server.current,
}),
({ disable, current }) => {
if (disable) return Promise.resolve(true)
return Effect.gen(function* () {
if (!current) return true
const { http, type } = current
while (true) {
const res = yield* Effect.promise(() => checkServerHealth(http))
if (res.healthy) return true
if (checkMode() === "background" || type === "http") return false
}
}).pipe(
Effect.timeoutOrElse({ duration: "10 seconds", orElse: () => Effect.succeed(false) }),
Effect.ensuring(Effect.sync(() => setCheckMode("background"))),
Effect.runPromise,
)
}
)
| const response = await fetch(`https://api.github.com${endpoint}`, { | ||
| ...options, | ||
| headers: { | ||
| Authorization: `Bearer ${process.env.GITHUB_TOKEN}`, | ||
| Accept: "application/vnd.github+json", | ||
| "Content-Type": "application/json", | ||
| ...options.headers, | ||
| ...(options.headers instanceof Headers ? Object.fromEntries(options.headers.entries()) : options.headers), | ||
| }, | ||
| }) |
There was a problem hiding this comment.
Instead of manually checking if options.headers is an instance of Headers and spreading it, you can use the standard Headers constructor. This automatically and robustly handles all valid HeadersInit types (including Headers, Record<string, string>, and [string, string][] arrays) without potential runtime errors or incorrect object spreading.
| const response = await fetch(`https://api.github.com${endpoint}`, { | |
| ...options, | |
| headers: { | |
| Authorization: `Bearer ${process.env.GITHUB_TOKEN}`, | |
| Accept: "application/vnd.github+json", | |
| "Content-Type": "application/json", | |
| ...options.headers, | |
| ...(options.headers instanceof Headers ? Object.fromEntries(options.headers.entries()) : options.headers), | |
| }, | |
| }) | |
| const headers = new Headers(options.headers) | |
| headers.set("Authorization", `Bearer ${process.env.GITHUB_TOKEN}`) | |
| headers.set("Accept", "application/vnd.github+json") | |
| headers.set("Content-Type", "application/json") | |
| const response = await fetch(`https://api.github.com${endpoint}`, { | |
| ...options, | |
| headers, | |
| }) |
| Accept: "application/vnd.github+json", | ||
| "Content-Type": "application/json", | ||
| ...options.headers, | ||
| ...(options.headers instanceof Headers ? Object.fromEntries(options.headers.entries()) : options.headers), |
There was a problem hiding this comment.
To safely support all valid HeadersInit types (including [string, string][] arrays) without manual type checking or incorrect object spreading, use the standard Headers constructor to normalize the headers before converting them to an object.
| ...(options.headers instanceof Headers ? Object.fromEntries(options.headers.entries()) : options.headers), | |
| ...(options.headers ? Object.fromEntries(new Headers(options.headers).entries()) : {}), |
| config_files="${ZDOTDIR:-$HOME}/.zshrc ${ZDOTDIR:-$HOME}/.zshenv $XDG_CONFIG_HOME/zsh/.zshrc $XDG_CONFIG_HOME/zsh/.zshenv" | ||
| ;; | ||
| bash) | ||
| config_files="$HOME/.bashrc $HOME/.bash_profile $HOME/.profile $XDG_CONFIG_HOME/bash/.bashrc $XDG_CONFIG_HOME/bash/.bash_profile" |
There was a problem hiding this comment.
If XDG_CONFIG_HOME is unset or empty, $XDG_CONFIG_HOME/zsh/.zshrc and $XDG_CONFIG_HOME/bash/.bashrc will expand to /zsh/.zshrc and /bash/.zshrc respectively, which are invalid paths. Use parameter expansion with a fallback to $HOME/.config to handle this case safely.
config_files="${ZDOTDIR:-$HOME}/.zshrc ${ZDOTDIR:-$HOME}/.zshenv ${XDG_CONFIG_HOME:-$HOME/.config}/zsh/.zshrc ${XDG_CONFIG_HOME:-$HOME/.config}/zsh/.zshenv"
;;
bash)
config_files="$HOME/.bashrc $HOME/.bash_profile $HOME/.profile ${XDG_CONFIG_HOME:-$HOME/.config}/bash/.bashrc ${XDG_CONFIG_HOME:-$HOME/.config}/bash/.bash_profile"
| const dirs = [project.worktree, ...(project.sandboxes ?? [])] | ||
| for (const directory of dirs) { | ||
| const sessions = sync.child(directory, { bootstrap: false })[0].session | ||
| for (const session of sessions) { |
There was a problem hiding this comment.
What does this PR do?
How did you verify your code works?