diff --git a/packages/app/src/components/prompt-input.tsx b/packages/app/src/components/prompt-input.tsx index 8fb6155fa..53cffe75e 100644 --- a/packages/app/src/components/prompt-input.tsx +++ b/packages/app/src/components/prompt-input.tsx @@ -184,6 +184,7 @@ export const PromptInput: Component = (props) => { if (!item.commentID) return comments.setFocus({ file: item.path, id: item.commentID }) + comments.setActive({ file: item.path, id: item.commentID }) view().reviewPanel.open() if (item.commentOrigin === "review") { @@ -1711,6 +1712,10 @@ export const PromptInput: Component = (props) => {
{(item) => { + const active = () => { + const a = comments.active() + return !!item.commentID && item.commentID === a?.id && item.path === a?.file + } return ( = (props) => { >
{ openComment(item) diff --git a/packages/app/src/context/comments.tsx b/packages/app/src/context/comments.tsx index 12ee977e9..41123042d 100644 --- a/packages/app/src/context/comments.tsx +++ b/packages/app/src/context/comments.tsx @@ -38,6 +38,7 @@ function createCommentSession(dir: string, id: string | undefined) { ) const [focus, setFocus] = createSignal(null) + const [active, setActive] = createSignal(null) const list = (file: string) => store.comments[file] ?? [] @@ -76,6 +77,9 @@ function createCommentSession(dir: string, id: string | undefined) { focus: createMemo(() => focus()), setFocus, clearFocus: () => setFocus(null), + active: createMemo(() => active()), + setActive, + clearActive: () => setActive(null), } } @@ -135,6 +139,9 @@ export const { use: useComments, provider: CommentsProvider } = createSimpleCont focus: () => session().focus(), setFocus: (focus: CommentFocus | null) => session().setFocus(focus), clearFocus: () => session().clearFocus(), + active: () => session().active(), + setActive: (active: CommentFocus | null) => session().setActive(active), + clearActive: () => session().clearActive(), } }, }) diff --git a/packages/ui/src/components/session-review.css b/packages/ui/src/components/session-review.css index b61248fec..7c77c0e35 100644 --- a/packages/ui/src/components/session-review.css +++ b/packages/ui/src/components/session-review.css @@ -267,6 +267,6 @@ position: relative; overflow: hidden; --line-comment-z: 5; - --line-comment-popover-z: 6; + --line-comment-popover-z: 30; } } diff --git a/packages/ui/src/theme/themes/oc-1.json b/packages/ui/src/theme/themes/oc-1.json index 608895a93..7dfad9ec3 100644 --- a/packages/ui/src/theme/themes/oc-1.json +++ b/packages/ui/src/theme/themes/oc-1.json @@ -46,7 +46,7 @@ "surface-brand-base": "var(--yuzu-light-9)", "surface-brand-hover": "var(--yuzu-light-10)", "surface-interactive-base": "var(--cobalt-light-3)", - "surface-interactive-hover": "#0A1D4D", + "surface-interactive-hover": "#E5F0FF", "surface-interactive-weak": "var(--cobalt-light-2)", "surface-interactive-weak-hover": "var(--cobalt-light-3)", "surface-success-base": "var(--apple-light-3)", @@ -312,7 +312,7 @@ "surface-brand-base": "var(--yuzu-light-9)", "surface-brand-hover": "var(--yuzu-light-10)", "surface-interactive-base": "var(--cobalt-dark-3)", - "surface-interactive-hover": "#E5F0FF", + "surface-interactive-hover": "#0A1D4D", "surface-interactive-weak": "var(--cobalt-dark-2)", "surface-interactive-weak-hover": "var(--cobalt-light-3)", "surface-success-base": "var(--apple-dark-3)",