@@ -44,7 +44,7 @@ import {
4444 useDragDropContext ,
4545} from "@thisbeyond/solid-dnd"
4646import type { DragEvent , Transformer } from "@thisbeyond/solid-dnd"
47- import type { JSX } from "solid-js"
47+ import type { JSX , ParentProps } from "solid-js"
4848import { useSync } from "@/context/sync"
4949import { type AssistantMessage as AssistantMessageType } from "@opencode-ai/sdk"
5050import { Markdown } from "@opencode-ai/ui"
@@ -477,7 +477,7 @@ export default function Page() {
477477 class = "flex flex-col items-start self-stretch gap-8 pb-20"
478478 >
479479 { /* Title */ }
480- < div class = "flex flex-col items-start gap-2 self-stretch sticky top-0 bg-background-stronger z-10 pb-1" >
480+ < div class = "flex flex-col items-start gap-2 self-stretch sticky top-0 bg-background-stronger z-20 pb-1" >
481481 < div class = "w-full text-14-medium text-text-strong" >
482482 < Show
483483 when = { titled ( ) }
@@ -524,7 +524,7 @@ export default function Page() {
524524 < For each = { message . summary ?. diffs ?? [ ] } >
525525 { ( diff ) => (
526526 < Accordion . Item value = { diff . file } >
527- < Accordion . Header >
527+ < StickyAccordionHeader class = "top-10 data-expanded:before:-top-10 " >
528528 < Accordion . Trigger >
529529 < div class = "flex items-center justify-between w-full gap-5" >
530530 < div class = "grow flex items-center gap-5 min-w-0" >
@@ -549,8 +549,8 @@ export default function Page() {
549549 </ div >
550550 </ div >
551551 </ Accordion . Trigger >
552- </ Accordion . Header >
553- < Accordion . Content class = "max-h-[360px] overflow-y-auto no-scrollbar" >
552+ </ StickyAccordionHeader >
553+ < Accordion . Content class = "max-h-60 overflow-y-auto no-scrollbar" >
554554 < Diff
555555 before = { {
556556 name : diff . file ! ,
@@ -682,7 +682,7 @@ export default function Page() {
682682 < For each = { session . diffs ( ) } >
683683 { ( diff ) => (
684684 < Accordion . Item value = { diff . file } defaultOpen >
685- < Accordion . Header >
685+ < StickyAccordionHeader >
686686 < Accordion . Trigger >
687687 < div class = "flex items-center justify-between w-full gap-5" >
688688 < div class = "grow flex items-center gap-5 min-w-0" >
@@ -702,7 +702,7 @@ export default function Page() {
702702 </ div >
703703 </ div >
704704 </ Accordion . Trigger >
705- </ Accordion . Header >
705+ </ StickyAccordionHeader >
706706 < Accordion . Content >
707707 < Diff
708708 before = { {
@@ -725,19 +725,19 @@ export default function Page() {
725725 </ div >
726726 </ Tabs . Content >
727727 < Show when = { local . layout . review . state ( ) === "tab" && session . diffs ( ) . length } >
728- < Tabs . Content value = "review" class = "select-text mt-8" >
728+ < Tabs . Content value = "review" class = "select-text flex flex-col h-full overflow-hidden mt-8" >
729729 < div
730730 classList = { {
731- "relative px-6 py-2 w-full flex flex-col gap-6 flex-1 min-h-0" : true ,
731+ "relative px-6 py-2 w-full flex flex-col gap-6 flex-1 min-h-0 overflow-hidden " : true ,
732732 } }
733733 >
734- < div class = "text-14-medium text-text-strong" > All changes</ div >
735- < div class = "h-full pb-40 overflow-y-auto no-scrollbar" >
734+ < div class = "text-14-medium text-text-strong shrink-0 " > All changes</ div >
735+ < div class = "flex-1 min-h-0 pb-40 overflow-y-auto no-scrollbar" >
736736 < Accordion class = "w-full" multiple >
737737 < For each = { session . diffs ( ) } >
738738 { ( diff ) => (
739739 < Accordion . Item value = { diff . file } defaultOpen >
740- < Accordion . Header >
740+ < StickyAccordionHeader >
741741 < Accordion . Trigger >
742742 < div class = "flex items-center justify-between w-full gap-5" >
743743 < div class = "grow flex items-center gap-5 min-w-0" >
@@ -755,7 +755,7 @@ export default function Page() {
755755 </ div >
756756 </ div >
757757 </ Accordion . Trigger >
758- </ Accordion . Header >
758+ </ StickyAccordionHeader >
759759 < Accordion . Content >
760760 < Diff
761761 diffStyle = "split"
@@ -895,3 +895,18 @@ export default function Page() {
895895 </ div >
896896 )
897897}
898+
899+ function StickyAccordionHeader ( props : ParentProps < { class ?: string } > ) {
900+ return (
901+ < Accordion . Header
902+ classList = { {
903+ "sticky top-0 data-expanded:z-10" : true ,
904+ "data-expanded:before:content-[''] data-expanded:before:z-[-10]" : true ,
905+ "data-expanded:before:absolute data-expanded:before:inset-0 data-expanded:before:bg-background-stronger" : true ,
906+ [ props . class ?? "" ] : ! ! props . class ,
907+ } }
908+ >
909+ { props . children }
910+ </ Accordion . Header >
911+ )
912+ }
0 commit comments