summaryrefslogtreecommitdiffhomepage
path: root/packages/app/src/components
diff options
context:
space:
mode:
authoradamelmore <[email protected]>2026-01-25 07:58:24 -0600
committeradamelmore <[email protected]>2026-01-25 10:30:10 -0600
commit2b07291e17856a2b014537542f79cc8c059487c9 (patch)
tree8fdcc4be0692245c634dc0c8f61ef8bc4a8fa169 /packages/app/src/components
parentd25120680dea60b4231f12b266dc733089f3e181 (diff)
downloadopencode-2b07291e17856a2b014537542f79cc8c059487c9.tar.gz
opencode-2b07291e17856a2b014537542f79cc8c059487c9.zip
fix(app): scroll to comment on click
Diffstat (limited to 'packages/app/src/components')
-rw-r--r--packages/app/src/components/prompt-input.tsx7
1 files changed, 5 insertions, 2 deletions
diff --git a/packages/app/src/components/prompt-input.tsx b/packages/app/src/components/prompt-input.tsx
index ccff04efe..5ec0eb1ea 100644
--- a/packages/app/src/components/prompt-input.tsx
+++ b/packages/app/src/components/prompt-input.tsx
@@ -185,23 +185,26 @@ export const PromptInput: Component<PromptInputProps> = (props) => {
const openComment = (item: { path: string; commentID?: string; commentOrigin?: "review" | "file" }) => {
if (!item.commentID) return
- comments.setFocus({ file: item.path, id: item.commentID })
- comments.setActive({ file: item.path, id: item.commentID })
+ const focus = { file: item.path, id: item.commentID }
+ comments.setActive(focus)
view().reviewPanel.open()
if (item.commentOrigin === "review") {
tabs().open("review")
+ requestAnimationFrame(() => comments.setFocus(focus))
return
}
if (item.commentOrigin !== "file" && commentInReview(item.path)) {
tabs().open("review")
+ requestAnimationFrame(() => comments.setFocus(focus))
return
}
const tab = files.tab(item.path)
tabs().open(tab)
files.load(item.path)
+ requestAnimationFrame(() => comments.setFocus(focus))
}
const recent = createMemo(() => {