mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-10-08 03:07:53 +00:00
fix(chat): address PR review issues for checkpoint navigation
- Revert out-of-scope esbuild.mjs retry logic (separate concern) - Add "checkpoint-nav" to ScrollFollowDisengageSource union type - Guard onJumpToPreviousCheckpoint render behind prop check in CheckpointMenu - Replace arbitrary Tailwind values (mr-[6px]/ml-[6px]) with standard mr-1.5/ml-1.5
This commit is contained in:
parent
00630edd51
commit
7be8c0f4db
3 changed files with 21 additions and 14 deletions
|
|
@ -1426,7 +1426,7 @@ const ChatViewComponent: React.ForwardRefRenderFunction<ChatViewRef, ChatViewPro
|
|||
const nextCheckpointIndex = checkpointIndices[nextCursor]
|
||||
checkpointJumpCursorRef.current = nextCursor
|
||||
|
||||
enterUserBrowsingHistory("keyboard-nav-up")
|
||||
enterUserBrowsingHistory("checkpoint-nav")
|
||||
virtuosoRef.current?.scrollToIndex({
|
||||
index: nextCheckpointIndex,
|
||||
align: "center",
|
||||
|
|
@ -1687,7 +1687,7 @@ const ChatViewComponent: React.ForwardRefRenderFunction<ChatViewRef, ChatViewPro
|
|||
<StandardTooltip content={t("chat:scrollToBottom")}>
|
||||
<Button
|
||||
variant="secondary"
|
||||
className={hasLatestCheckpoint ? "flex-1 mr-[6px]" : "flex-[2]"}
|
||||
className={hasLatestCheckpoint ? "flex-1 mr-1.5" : "flex-[2]"}
|
||||
onClick={handleScrollToBottomAndResetCheckpointCursor}>
|
||||
<span className="codicon codicon-chevron-down"></span>
|
||||
</Button>
|
||||
|
|
@ -1696,7 +1696,7 @@ const ChatViewComponent: React.ForwardRefRenderFunction<ChatViewRef, ChatViewPro
|
|||
<StandardTooltip content={t("chat:scrollToLatestCheckpoint")}>
|
||||
<Button
|
||||
variant="secondary"
|
||||
className="flex-1 ml-[6px]"
|
||||
className="flex-1 ml-1.5"
|
||||
onClick={handleScrollToLatestCheckpoint}
|
||||
aria-label={t("chat:scrollToLatestCheckpoint")}>
|
||||
<span className="codicon codicon-history"></span>
|
||||
|
|
|
|||
|
|
@ -172,16 +172,18 @@ export const CheckpointMenu = ({
|
|||
</div>
|
||||
</PopoverContent>
|
||||
</Popover>
|
||||
<StandardTooltip content={t("chat:scrollToLatestCheckpoint")}>
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="icon"
|
||||
onClick={onJumpToPreviousCheckpoint}
|
||||
data-testid="jump-previous-checkpoint-btn"
|
||||
aria-label={t("chat:scrollToLatestCheckpoint")}>
|
||||
<span className="codicon codicon-chevron-up" />
|
||||
</Button>
|
||||
</StandardTooltip>
|
||||
{onJumpToPreviousCheckpoint && (
|
||||
<StandardTooltip content={t("chat:scrollToLatestCheckpoint")}>
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="icon"
|
||||
onClick={onJumpToPreviousCheckpoint}
|
||||
data-testid="jump-previous-checkpoint-btn"
|
||||
aria-label={t("chat:scrollToLatestCheckpoint")}>
|
||||
<span className="codicon codicon-chevron-up" />
|
||||
</Button>
|
||||
</StandardTooltip>
|
||||
)}
|
||||
<Popover open={moreOpen} onOpenChange={(open) => setMoreOpen(open)} data-testid="more-popover">
|
||||
<StandardTooltip content={t("chat:task.seeMore")}>
|
||||
<PopoverTrigger asChild>
|
||||
|
|
|
|||
|
|
@ -25,7 +25,12 @@ const HYDRATION_RETRY_WINDOW_MS = 160
|
|||
|
||||
export type ScrollPhase = "HYDRATING_PINNED_TO_BOTTOM" | "ANCHORED_FOLLOWING" | "USER_BROWSING_HISTORY"
|
||||
|
||||
export type ScrollFollowDisengageSource = "wheel-up" | "row-expansion" | "keyboard-nav-up" | "pointer-scroll-up"
|
||||
export type ScrollFollowDisengageSource =
|
||||
| "wheel-up"
|
||||
| "row-expansion"
|
||||
| "keyboard-nav-up"
|
||||
| "pointer-scroll-up"
|
||||
| "checkpoint-nav"
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Helpers
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue