diff --git a/frontend/src/components/navigation/ToolSidePanel.test.tsx b/frontend/src/components/navigation/ToolSidePanel.test.tsx
index e8e4edd6..4c2a292b 100644
--- a/frontend/src/components/navigation/ToolSidePanel.test.tsx
+++ b/frontend/src/components/navigation/ToolSidePanel.test.tsx
@@ -27,6 +27,7 @@ vi.mock('@/components/session/ChangesWalkthroughSheet', () => ({
ChangesWalkthroughProvider: ({ children }: { children: ReactNode }) => <>{children}>,
ChangesWalkthroughNav: () => null,
ChangesWalkthroughRegenerate: () => null,
+ ChangesWalkthroughSourcePicker: () => null,
ChangesWalkthroughView: () =>
-
+ )
+})
- {sourceKind === 'branch' || sourceKind === 'pullRequest' ? (
-
setBaseInput(event.target.value)}
- onBlur={commitInputs}
- onKeyDown={(event) => {
- if (event.key === 'Enter') commitInputs()
- }}
- />
- ) : null}
+/** Collects the base branch or pull request number for git-backed walkthrough sources. */
+const WalkthroughSourceInputs = memo(function WalkthroughSourceInputs() {
+ const { sourceKind, baseInput, setBaseInput, numberInput, setNumberInput, setSource } =
+ useChangesWalkthrough()
+
+ const commitInputs = useCallback(() => {
+ const next = toWalkthroughSource({ kind: sourceKind, base: baseInput, number: Number(numberInput) })
+ if (next) setSource(next)
+ }, [sourceKind, baseInput, numberInput, setSource])
+
+ if (sourceKind !== 'branch' && sourceKind !== 'pullRequest') return null
+
+ return (
+
)
@@ -429,7 +429,7 @@ export const ChangesWalkthroughView = memo(function ChangesWalkthroughView() {
return (
-
+
{error ? (
@@ -569,6 +569,7 @@ export function ChangesWalkthroughSheet({ sessionId, open, onOpenChange }: Chang
onClose={close}
actions={
<>
+
>