= {}): PRInfo {
+ return {
+ number: 42,
+ title: 'Conflicting PR',
+ state: 'open',
+ url: 'https://github.com/acme/widgets/pull/42',
+ checksStatus: 'pending',
+ updatedAt: '2026-05-14T00:00:00Z',
+ mergeable: 'CONFLICTING',
+ ...overrides
+ }
+}
+
+function renderNotice(pr: PRInfo, isRefreshingConflictDetails = false): string {
+ return renderToStaticMarkup(
+ React.createElement(MergeConflictNotice, { pr, isRefreshingConflictDetails })
+ )
+}
+
+describe('MergeConflictNotice', () => {
+ it('does not claim conflict details are refreshing after the refresh has settled', () => {
+ const markup = renderNotice(makePR())
+
+ expect(markup).toContain('Conflict file details are unavailable')
+ expect(markup).not.toContain('Refreshing conflict details')
+ })
+
+ it('shows refreshing copy while conflict details are actively refreshing', () => {
+ const markup = renderNotice(makePR(), true)
+
+ expect(markup).toContain('Refreshing conflict details')
+ })
+
+ it('hides when the conflicting file list is available', () => {
+ const markup = renderNotice(
+ makePR({
+ conflictSummary: {
+ baseRef: 'main',
+ baseCommit: 'abc1234',
+ commitsBehind: 2,
+ files: ['src/conflict.ts']
+ }
+ })
+ )
+
+ expect(markup).toBe('')
+ })
+})
diff --git a/src/renderer/src/components/right-sidebar/checks-helpers.tsx b/src/renderer/src/components/right-sidebar/checks-panel-content.tsx
similarity index 98%
rename from src/renderer/src/components/right-sidebar/checks-helpers.tsx
rename to src/renderer/src/components/right-sidebar/checks-panel-content.tsx
index b907dd7df..8dce02260 100644
--- a/src/renderer/src/components/right-sidebar/checks-helpers.tsx
+++ b/src/renderer/src/components/right-sidebar/checks-panel-content.tsx
@@ -101,7 +101,13 @@ export function ConflictingFilesSection({ pr }: { pr: PRInfo }): React.JSX.Eleme
}
/** Fallback shown when GitHub reports merge conflicts but no file list is available yet. */
-export function MergeConflictNotice({ pr }: { pr: PRInfo }): React.JSX.Element | null {
+export function MergeConflictNotice({
+ pr,
+ isRefreshingConflictDetails
+}: {
+ pr: PRInfo
+ isRefreshingConflictDetails: boolean
+}): React.JSX.Element | null {
if (pr.mergeable !== 'CONFLICTING' || (pr.conflictSummary?.files.length ?? 0) > 0) {
return null
}
@@ -111,7 +117,11 @@ export function MergeConflictNotice({ pr }: { pr: PRInfo }): React.JSX.Element |
This branch has conflicts that must be resolved
- Refreshing conflict details…
+
+ {isRefreshingConflictDetails
+ ? 'Refreshing conflict details…'
+ : 'Conflict file details are unavailable'}
+
)
}