fix(web): preserve panel state across workspace refreshes #8968
github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:L
- @@ -172,0 +210,21 @@210+ append(hunk.additionCount);211+ append(hunk.additionLines);212+ append(hunk.additionLineIndex);213+ append(hunk.deletionStart);214+ append(hunk.deletionCount);215+ append(hunk.deletionLines);216+ append(hunk.deletionLineIndex);217+ append(hunk.hunkContext);218+ append(hunk.hunkSpecs);219+ append(hunk.splitLineStart);220+ append(hunk.splitLineCount);221+ append(hunk.unifiedLineStart);222+ append(hunk.unifiedLineCount);223+ append(hunk.noEOFCRAdditions);224+ append(hunk.noEOFCRDeletions);225+ for (const content of hunk.hunkContent) {226+ append(content.type);227+ append(content.additionLineIndex);228+ append(content.deletionLineIndex);229+ append(content.type === "change" ? content.additions : content.lines);230+ append(content.type === "change" ? content.deletions : undefined);
- @@ -320,3 +321,12 @@320321 selectedGitSource,321322 selectedTurnId,322323 ]);324+ const loadDiffFilesRef = useRef(currentLoadDiffFiles);325+ useEffect(() => {326+ loadDiffFilesRef.current = currentLoadDiffFiles;327+ }, [currentLoadDiffFiles]);328+ const loadDiffFiles = useCallback<FileDiffContentsLoader>(async (fileDiff) => {329+ const loader = loadDiffFilesRef.current;330+ if (!loader) throw new Error("Diff file contents are unavailable for this selection.");331+ return loader(fileDiff);332+ }, []);
macroscopeapp[bot](GitHub profile, opens in a new tab) approved these changes
maria-rcks merged thisf2a914b
maria-rcks closed this
Sign in to join this conversation.




macroscopeapp[bot](GitHub profile, opens in a new tab) reviewed