Skip to content

feat(branches): add Repo column to branches view#196

Merged
hashedone merged 4 commits into
mainfrom
feat/branch-repo-column
May 26, 2026
Merged

feat(branches): add Repo column to branches view#196
hashedone merged 4 commits into
mainfrom
feat/branch-repo-column

Conversation

@hashedone
Copy link
Copy Markdown
Contributor

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:

  • SQL: add r.name AS repo_name to SELECT and GROUP BY
  • Rust: add repo_name: String to BranchItem
  • Frontend: add 'Repo' column as first column in the table

Comment on lines +36 to +37
} catch {
// non-critical
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Suggested change
} 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()`. */
Copy link
Copy Markdown

@aikido-pr-checks aikido-pr-checks Bot May 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
/** 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

Comment on lines +36 to +37
} catch {
console.warn("Failed to fetch repos for filter:", err);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fetchRepos catch block references err without binding it, so failures trigger a new ReferenceError and the original fetch error is not logged.

Suggested change
} 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

hashedone added 3 commits May 26, 2026 11:08
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.
@hashedone hashedone force-pushed the feat/branch-repo-column branch from 9cac5c3 to 19d1340 Compare May 26, 2026 09:08
@hashedone hashedone merged commit 76def79 into main May 26, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant