Skip to content

Revert "Remove source control group order preference (#12785)" - #12955

Merged
AmethystLiang merged 1 commit into
mainfrom
revert-pr-12785
Aug 6, 2026
Merged

AmethystLiang merged 1 commit into
mainfrom
revert-pr-12785

Conversation

@AmethystLiang

Copy link
Copy Markdown
Contributor

Summary

Why

#12785 was merged before CI and automated review completed. The E2E build check subsequently failed, and post-merge review identified an empty test plus localization-dependent destructive-action UI behavior. Revert to the previous known state so any narrower redesign can be reviewed separately.

Validation

  • pnpm run lint
  • pnpm run typecheck
  • pnpm --dir mobile run typecheck
  • 546 focused desktop tests
  • 8 focused mobile tests
  • git diff origin/main --check

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Adds a persisted sourceControlGroupOrder setting with changes-first, staged-first, and untracked-first options. Normalizes invalid values during loading and updates. Source Control and mobile views now keep unstaged, staged, and untracked entries in separate sections. Discard flows no longer merge untracked files with unstaged changes. Git settings UI, search metadata, translations, and tests support the new setting.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description includes the summary and validation, but it omits the required Screenshots, AI Review Report, Security Audit, and Notes sections. Add all required template sections, including screenshot status, test checklist, AI review findings with cross-platform checks, security audit, and notes.
Docstring Coverage ⚠️ Warning Docstring coverage is 7.69% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the primary change: reverting the Source Control group order preference pull request.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
mobile/src/source-control/mobile-git-status.test.ts (1)

29-36: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Assert the entries in each section.

This test checks only section titles. A regression could place new.ts in Changes while still creating an Untracked Files section. Assert each section’s area and file paths.

Proposed test assertion
     expect(sections.map((section) => section.title)).toEqual([
       'Changes',
       'Untracked Files',
       'Staged Changes'
     ])
+    expect(
+      sections.map((section) => ({
+        area: section.area,
+        paths: section.data.map((entry) => entry.path)
+      }))
+    ).toEqual([
+      { area: 'unstaged', paths: ['a.ts'] },
+      { area: 'untracked', paths: ['new.ts'] },
+      { area: 'staged', paths: ['b.ts'] }
+    ])

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 24ea1b49-eed2-4e63-b111-a216d2808fb0

📥 Commits

Reviewing files that changed from the base of the PR and between b9e9811 and 1f67d72.

📒 Files selected for processing (33)
  • .oxlintrc.json
  • config/scripts/relay-watcher-fault-harness.mjs
  • mobile/src/source-control/mobile-git-status.test.ts
  • mobile/src/source-control/mobile-git-status.ts
  • src/main/codex-accounts/runtime-home-service.test.ts
  • src/main/codex-accounts/service.test.ts
  • src/main/persistence.test.ts
  • src/main/persistence.ts
  • src/main/runtime/orca-runtime.ts
  • src/renderer/src/components/editor/CombinedDiffFileTree.tsx
  • src/renderer/src/components/github/GitHubMarkdownComposerEditorPane.tsx
  • src/renderer/src/components/right-sidebar/SourceControl.tsx
  • src/renderer/src/components/right-sidebar/discard-all-sequence.test.ts
  • src/renderer/src/components/right-sidebar/discard-all-sequence.ts
  • src/renderer/src/components/right-sidebar/source-control-discard-confirmation.test.ts
  • src/renderer/src/components/right-sidebar/source-control-discard-confirmation.ts
  • src/renderer/src/components/right-sidebar/source-control-discard-dialog.tsx
  • src/renderer/src/components/right-sidebar/source-control-section-order.test.ts
  • src/renderer/src/components/right-sidebar/source-control-section-order.ts
  • src/renderer/src/components/settings/GitPane.test.ts
  • src/renderer/src/components/settings/GitPane.tsx
  • src/renderer/src/components/settings/git-search.ts
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/zh.json
  • src/shared/constants.test.ts
  • src/shared/constants.ts
  • src/shared/source-control-group-order.test.ts
  • src/shared/source-control-group-order.ts
  • src/shared/types.ts
  • tests/e2e/setup-script-prompt-unreadable-orca-yaml.spec.ts
💤 Files with no reviewable changes (2)
  • src/renderer/src/components/right-sidebar/discard-all-sequence.test.ts
  • src/renderer/src/components/right-sidebar/source-control-discard-confirmation.test.ts

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