Skip to content

Update header Git dropdown review flow#156

Open
friuns2 wants to merge 16 commits into
mainfrom
codex/header-git-commit-dropdown
Open

Update header Git dropdown review flow#156
friuns2 wants to merge 16 commits into
mainfrom
codex/header-git-commit-dropdown

Conversation

@friuns2
Copy link
Copy Markdown
Owner

@friuns2 friuns2 commented May 11, 2026

Updates the header Git dropdown review flow after PR #121, including commit file review mode, worktree change counts, and Review pane layering.

@friuns2 friuns2 marked this pull request as ready for review May 11, 2026 03:14
@qodo-free-for-open-source-projects
Copy link
Copy Markdown

Review Summary by Qodo

Add commit file browser and review mode to Git dropdown

✨ Enhancement

Grey Divider

Walkthroughs

Description
• Add commit file browser to Git dropdown with per-file line counts
• Support commit review mode in Review pane with diff display
• Preserve untracked files during checkout/reset operations
• Implement worktree change summary in dropdown header
• Remove findings tab and run review button from Review pane
• Layer Review pane above Git dropdown and app chrome
Diagram
flowchart LR
  A["Git Dropdown"] -->|select commit| B["Commit Files Panel"]
  B -->|click file| C["Review Pane"]
  C -->|commit mode| D["Commit Diff Display"]
  A -->|worktree changes| E["Review Pane"]
  E -->|workspace mode| F["Workspace Diff"]
  G["Untracked Files"] -->|preserve| H["Backup Directory"]
  I["Reset/Checkout"] -->|before| H
Loading

Grey Divider

File Changes

1. src/server/codexAppServerBridge.ts ✨ Enhancement +120/-12

Add commit file API and untracked file preservation

src/server/codexAppServerBridge.ts


2. src/api/codexGateway.ts ✨ Enhancement +50/-3

Add commit file type and API functions

src/api/codexGateway.ts


3. src/server/reviewGit.ts ✨ Enhancement +32/-5

Add commit diff building and review scope support

src/server/reviewGit.ts


View more (10)
4. src/composables/useUiLanguage.ts 📝 Documentation +1/-6

Add commit label and remove review button strings

src/composables/useUiLanguage.ts


5. src/types/codex.ts ✨ Enhancement +2/-2

Add commit scope and remove findings tab type

src/types/codex.ts


6. src/components/content/ReviewPane.vue ✨ Enhancement +68/-271

Remove findings tab and run review button

src/components/content/ReviewPane.vue


7. src/components/content/HeaderGitBranchDropdown.vue ✨ Enhancement +443/-98

Redesign dropdown with commit browser and file panel

src/components/content/HeaderGitBranchDropdown.vue


8. src/App.vue ✨ Enhancement +106/-7

Add commit file loading and review mode state management

src/App.vue


9. src/components/layout/DesktopLayout.vue ✨ Enhancement +3/-3

Add z-index layering for stacking context

src/components/layout/DesktopLayout.vue


10. src/components/content/ContentHeader.vue ✨ Enhancement +1/-1

Increase z-index for header layering

src/components/content/ContentHeader.vue


11. src/style.css ✨ Enhancement +46/-6

Add dark theme styles for new dropdown elements

src/style.css


12. tests.md 📝 Documentation +46/-20

Update test steps for commit browser feature

tests.md


13. AGENTS.md 📝 Documentation +2/-0

Document persistent dev server handling

AGENTS.md


Grey Divider

Qodo Logo

@qodo-free-for-open-source-projects
Copy link
Copy Markdown

qodo-free-for-open-source-projects Bot commented May 11, 2026

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (0)

Grey Divider


Remediation recommended

1. Reset-history toggle drops reload 🐞 Bug ≡ Correctness
Description
loadThreadBranchCommits dedupes in-flight requests using only the branch name, even though caching
is keyed by (branch, includeResetHistory). If the user toggles “Reset-history refs” while commits
are loading for the same branch, the second request is dropped and the UI can remain on the wrong
commit set.
Code

src/App.vue[R3050-3056]

+function loadThreadBranchCommits(payload: string | { branch: string; includeResetHistory?: boolean }): void {
+  const targetBranch = (typeof payload === 'string' ? payload : payload.branch).trim()
+  const includeResetHistory = typeof payload === 'string' ? true : payload.includeResetHistory !== false
  const cwd = composerCwd.value.trim()
  if (!targetBranch || !cwd || threadBranchCommitsLoadingFor.value === targetBranch) return
-  if (threadBranchCommitsByBranch.value[targetBranch]) return
+  const cacheKey = toThreadBranchCommitsKey(targetBranch, includeResetHistory)
+  if (threadBranchCommitsByBranch.value[cacheKey]) return
Evidence
App.vue blocks new loads when threadBranchCommitsLoadingFor matches the branch name, but also uses a
cacheKey that includes includeResetHistory. The dropdown emits loadCommits when the Reset-history
checkbox changes, so a toggle during an in-flight load for the same branch can be ignored by
App.vue’s dedupe guard.

src/App.vue[3050-3061]
src/components/content/HeaderGitBranchDropdown.vue[100-107]
src/components/content/HeaderGitBranchDropdown.vue[298-307]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
`loadThreadBranchCommits` dedupes requests using `threadBranchCommitsLoadingFor === targetBranch`, but the cache is keyed by `toThreadBranchCommitsKey(targetBranch, includeResetHistory)`. This means a request for the same branch with a different `includeResetHistory` value can be dropped while the first is in-flight.

### Issue Context
The Header Git dropdown emits `loadCommits` whenever the user toggles the “Reset-history refs” checkbox. If that happens while commits are loading, the second request may be ignored.

### Fix Focus Areas
- src/App.vue[3050-3076]
- src/components/content/HeaderGitBranchDropdown.vue[100-107]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Qodo Logo

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.

2 participants