mirror of
https://github.com/andrewyng/openworker.git
synced 2026-09-11 14:50:14 +00:00
Progress rail section starts collapsed; auto-opens once when a live turn has todos
This commit is contained in:
@@ -86,12 +86,21 @@ export function RightRail({
|
|||||||
board,
|
board,
|
||||||
onExpandBoard,
|
onExpandBoard,
|
||||||
}: Props) {
|
}: Props) {
|
||||||
|
// Progress starts collapsed (owner call 2026-08-16 — rail space goes to the
|
||||||
|
// board/artifacts); it still auto-opens the first time a live turn has todos.
|
||||||
const [open, setOpen] = useState<Record<Panel, boolean>>({
|
const [open, setOpen] = useState<Record<Panel, boolean>>({
|
||||||
progress: true,
|
progress: false,
|
||||||
artifacts: true,
|
artifacts: true,
|
||||||
board: true,
|
board: true,
|
||||||
journal: false,
|
journal: false,
|
||||||
});
|
});
|
||||||
|
const autoOpenedProgress = useRef(false);
|
||||||
|
useEffect(() => {
|
||||||
|
if (running && todo.length > 0 && !autoOpenedProgress.current) {
|
||||||
|
autoOpenedProgress.current = true;
|
||||||
|
setOpen((prev) => ({ ...prev, progress: true }));
|
||||||
|
}
|
||||||
|
}, [running, todo.length]);
|
||||||
const [artifacts, setArtifacts] = useState<ArtifactInfo[]>([]);
|
const [artifacts, setArtifacts] = useState<ArtifactInfo[]>([]);
|
||||||
const [journal, setJournal] = useState<JournalCase[]>([]);
|
const [journal, setJournal] = useState<JournalCase[]>([]);
|
||||||
const [selected, setSelected] = useState<ArtifactInfo | null>(null);
|
const [selected, setSelected] = useState<ArtifactInfo | null>(null);
|
||||||
|
|||||||
Reference in New Issue
Block a user