Skip to content

Conversation

@yuvalyacoby
Copy link
Contributor

@yuvalyacoby yuvalyacoby commented Dec 24, 2025

Generated description

Below is a concise technical summary of the changes proposed in this PR:

graph LR
PullRequestSelectorContainer_("PullRequestSelectorContainer"):::modified
usePullRequests_("usePullRequests"):::modified
PullRequestSelector_("PullRequestSelector"):::modified
PullRequestCard_("PullRequestCard"):::added
useFetchUser_("useFetchUser"):::added
MergeConfirmationPrompt_("MergeConfirmationPrompt"):::added
appMode_mode_dataProvider_("appMode.mode.dataProvider"):::added
PullRequestSelectorContainer_ -- "Added updateData to manage pull request data updates." --> usePullRequests_
PullRequestSelectorContainer_ -- "Passes updateData prop to PullRequestSelector for data updates." --> PullRequestSelector_
PullRequestSelector_ -- "Uses PullRequestCard to render detailed pull request info." --> PullRequestCard_
PullRequestSelector_ -- "Fetches current user data for display and logic." --> useFetchUser_
PullRequestSelector_ -- "Adds merge confirmation UI and logic." --> MergeConfirmationPrompt_
MergeConfirmationPrompt_ -- "Uses dataProvider to fetch merge status and merge PR." --> appMode_mode_dataProvider_
usePullRequests_ -- "Uses dataProvider to fetch pull requests list." --> appMode_mode_dataProvider_
classDef added stroke:#15AA7A
classDef removed stroke:#CD5270
classDef modified stroke:#EDAC4C
linkStyle default stroke:#CBD5E1,font-size:13px
Loading

Enhance the pull request data model and fetching mechanisms to include CI run statuses and code review information, refactoring github.ts to use GraphQL for richer data. Introduce new UI components, PullRequestCard and MergeConfirmationPrompt, to display this detailed information and enable direct merging of pull requests from the PullRequestSelector.

TopicDetails
PR UI & Merging Implement a new PullRequestCard component to display detailed CI and review statuses, and introduce an interactive MergeConfirmationPrompt to allow users to merge pull requests directly from the PullRequestSelector.
Modified files (6)
  • src/theme/colors.ts
  • src/pages/PRSelector/PullRequestSelectorContainer.tsx
  • src/pages/PRSelector/PullRequestSelector.tsx
  • src/pages/PRSelector/PullRequestCard.tsx
  • src/pages/PRSelector/MergeConfirmationPrompt.tsx
  • src/hooks/usePullRequests.ts
Latest Contributors(2)
UserCommitDate
yuvalyacobyfeat-Support-tokens-mo...December 08, 2025
nimrod@baz.cofeat-Skip-repo-selecti...November 24, 2025
Enhance PR Data Update the PullRequest data model to include CI run statuses and code review information, and refactor data providers in github.ts and baz.ts to fetch this enriched data using GraphQL for GitHub.
Modified files (4)
  • src/lib/providers/types.ts
  • src/lib/clients/github.ts
  • src/lib/clients/baz.ts
  • src/hooks/usePullRequests.ts
Latest Contributors(2)
UserCommitDate
yuvalyacobyfeat-Migrate-conversat...December 24, 2025
ofir@baz.cofeat-stop-agent-after-...December 23, 2025
This pull request is reviewed by Baz. Review like a pro on (Baz).

@yuvalyacoby yuvalyacoby requested a review from a team December 25, 2025 10:23
@yuvalyacoby yuvalyacoby merged commit 722b13a into main Dec 28, 2025
6 checks passed
@yuvalyacoby yuvalyacoby deleted the ready-to-merge branch December 28, 2025 07:56
Comment on lines +79 to +82
if (hasApprovals) {
return "approved";
}
return "reviewed";
Copy link
Contributor

Choose a reason for hiding this comment

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

getReviewStatus collapses every non-approved state into reviewed (lines 79‑82), yet GitHub's PullRequestReviewState enum includes pending, commented, changes_requested, dismissed, etc. When a reviewer requests changes the backend says the PR is blocked, but the CLI now shows ◐ Reviewed (yellow) and implies the review is done. Please expose the actual state (e.g. “changes requested” or “awaiting review”) instead of lumping them into this catch‑all so the label still matches the backend semantics.


Finding type: Breaking Changes

Comment on lines +121 to +139
<Text bold={isSelected} color={titleColor}>
{isSelected ? ITEM_SELECTOR : ITEM_SELECTION_GAP}#{pr.prNumber}{" "}
{pr.title} <Text color="gray">[{pr.repositoryName}]</Text>{" "}
{ciIcon?.icon && (
<Text bold color={ciIcon.color}>
{ciIcon.icon}
</Text>
)}
</Text>
</Box>
<Text dimColor={!isSelected} color={metadataColor}>
{" "}by {pr.authorName}
{" • "}
{updatedTime}
{" • "}
<Text dimColor={!isSelected} color={reviewDisplay.color}>
{reviewDisplay.text}
</Text>
{ciIcon?.text && <Text> • CI {ciIcon.text}</Text>}
Copy link
Contributor

Choose a reason for hiding this comment

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

Pull request metadata (title, repository, author) is rendered directly inside Ink components without stripping ANSI/escape sequences. Since these fields come straight from the Baz/GitHub APIs (see src/lib/clients/{baz,github}.ts where they’re mapped 1:1), a malicious PR title/author/repo name can inject terminal control codes, so the CLI now mirrors untrusted text which is a security risk.


Finding type: Basic Security Patterns

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.

3 participants