feat(branches): add Repo column to branches view#196
Conversation
| } catch { | ||
| // non-critical |
There was a problem hiding this comment.
fetchRepos() has a catch that only contains a comment and silently swallows errors; add logging or explicit handling (e.g., console.error or propagate) so failures aren't hidden.
Show fix
| } catch { | |
| // non-critical | |
| } catch (err) { | |
| // non-critical: repo filter is optional | |
| console.warn('Failed to fetch repos for filter:', err); |
Details
✨ AI Reasoning
A new fetchRepos function was added that calls an API inside a try/catch. The catch block contains only a short comment and no logging, rethrowing, or other handling. This silently swallows errors, making debugging and observability harder and hiding potential failures in repo fetching. The issue is limited to the newly added fetchRepos catch; other error handling in the file is unchanged.
Reply @AikidoSec feedback: [FEEDBACK] to get better review comments in the future.
Reply @AikidoSec ignore: [REASON] to ignore this issue.
More info
| email: string; | ||
| } | ||
|
|
||
| /** Returns the platform-appropriate config directory, matching the Rust `dirs::config_dir()`. */ |
There was a problem hiding this comment.
configDir() claims to match Rust dirs::config_dir(), but non-darwin platforms are forced to Linux/XDG logic, so the stated behavior is false for platforms like win32.
| /** Returns the platform-appropriate config directory, matching the Rust `dirs::config_dir()`. */ | |
| /** Returns the platform-appropriate config directory, matching the Rust `dirs::config_dir()`. */ | |
| if (process.platform === "win32") { | |
| return process.env.APPDATA ?? join(homedir(), "AppData", "Roaming"); | |
| } |
Details
✨ AI Reasoning
The new configuration-directory helper is meant to mirror another implementation, but the platform branching does not support that claim. The branch handles macOS separately, then treats every other platform as Linux-style XDG/home config. That means at least one non-Linux platform will always follow a path strategy that does not match the stated intent. This is a concrete logic/documentation contradiction introduced by the change and can mislead maintainers about runtime behavior.
Reply @AikidoSec feedback: [FEEDBACK] to get better review comments in the future.
Reply @AikidoSec ignore: [REASON] to ignore this issue.
More info
| } catch { | ||
| console.warn("Failed to fetch repos for filter:", err); |
There was a problem hiding this comment.
fetchRepos catch block references err without binding it, so failures trigger a new ReferenceError and the original fetch error is not logged.
| } catch { | |
| console.warn("Failed to fetch repos for filter:", err); | |
| } catch (err) { | |
| console.warn("Failed to fetch repos for filter:", err); |
Details
✨ AI Reasoning
The new error-handling path intends to log repository fetch failures. However, the catch block does not bind an error object, while the logging statement uses err. On any failure in fetchRepos, control enters this block and tries to read an undefined variable, so the handler itself throws instead of logging the original failure.
Reply @AikidoSec feedback: [FEEDBACK] to get better review comments in the future.
Reply @AikidoSec ignore: [REASON] to ignore this issue.
More info
Each branch now shows which repository it belongs to. The query groups by (branch, repo_name) so branches from different repos with the same name appear as separate rows.
9cac5c3 to
19d1340
Compare
The branches view was org-wide with no indication of which repo a branch belongs to. Branches from different repos with the same name (e.g. 'main') were indistinguishable.
Changes:
r.name AS repo_nameto SELECT and GROUP BYrepo_name: StringtoBranchItem