mirror of
https://github.com/stablyai/orca.git
synced 2026-11-19 04:23:57 +00:00
wip
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { useEffect } from 'react'
|
||||
import { getWorktreeCardStyle } from '../../../shared/worktree/card-style'
|
||||
import { useAppStore } from '@/store/index'
|
||||
import { isWindowVisible } from '@/lib/window-activity/window-visibility-interval'
|
||||
import { isWebClientLocation } from '@/app-shell/platform/web-client-location'
|
||||
@@ -19,7 +20,10 @@ export function useVisibleHostedReviewRefresh({ enabled }: { enabled: boolean })
|
||||
const state = useAppStore.getState()
|
||||
const selectedOnly = isWebClientLocation()
|
||||
scheduler.update([
|
||||
...getVisibleHostedReviewRefreshTargets(state, useAppStore.getState, { selectedOnly }),
|
||||
// Collapsed review rollups also need background reads on paired clients; this shared queue bounds them.
|
||||
...getVisibleHostedReviewRefreshTargets(state, useAppStore.getState, {
|
||||
selectedOnly: selectedOnly && getWorktreeCardStyle(state.settings) !== 'experimental-2'
|
||||
}),
|
||||
...getWorkspaceReferenceRefreshTargets(state, { selectedOnly })
|
||||
])
|
||||
}
|
||||
|
||||
@@ -161,8 +161,9 @@ export function WorktreeCardPrRollup({
|
||||
closed: { ...hidden.closed }
|
||||
}
|
||||
const hasHidden = STATE_ORDER.some((key) => hidden[key].count > 0)
|
||||
const showOwn = !ownRepresentsDescendant || !hasHidden
|
||||
if (showOwn) {
|
||||
if (ownRepresentsDescendant && own?.state && hidden[own.state].count > 0) {
|
||||
merge(states[own.state], { count: 0, review: own })
|
||||
} else {
|
||||
add(states, own)
|
||||
}
|
||||
const shown = STATE_ORDER.filter((key) => states[key].count > 0)
|
||||
@@ -186,9 +187,7 @@ export function WorktreeCardPrRollup({
|
||||
) : null}
|
||||
</span>
|
||||
))}
|
||||
{showOwn && own && !own.state ? (
|
||||
<ReviewIcon review={own} className="size-3 shrink-0" />
|
||||
) : null}
|
||||
{own && !own.state ? <ReviewIcon review={own} className="size-3 shrink-0" /> : null}
|
||||
</>
|
||||
)
|
||||
const buttonClass =
|
||||
@@ -239,7 +238,7 @@ export function WorktreeCardPrRollup({
|
||||
</button>
|
||||
</DropdownMenuTrigger>
|
||||
<DropdownMenuContent onClick={(event) => event.stopPropagation()} align="end">
|
||||
{showOwn && own ? (
|
||||
{own ? (
|
||||
<DropdownMenuItem onClick={onOpenOwn}>
|
||||
<ReviewIcon review={own} className="size-3" />
|
||||
{getReviewLabel(own)} #{own.number}: {own.title}
|
||||
|
||||
Reference in New Issue
Block a user