Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(web): preserve panel state across workspace refreshes #8968

Mergedmaria-rcksmerged 1 commit intomain fromrefs/pull/8968/headmerged by maria-rcks View on GitHub

Showing 7 changed files with 45 additions and 5 deletions (loading 4).

x
0 of 7 viewed, 7 left
3 additions and 2 deletionsapps/web/src/components/diffs/AnnotatableCodeView.tsxModified
View file
@@ -77,6 +77,7 @@
fileDiff: FileDiffMetadata;
filePath: string;
fileKey: string;
+ fileVersion: number;
collapsed: boolean;
}>;
sectionId: string;
@@ -125,7 +126,7 @@
const filesByKey = useMemo(() => new Map(files.map((file) => [file.fileKey, file])), [files]);
const items = useMemo<CodeViewDiffItem<DiffCommentAnnotationGroup>[]>(
() =>
- files.map(({ fileDiff, filePath, fileKey, collapsed }) => {
+ files.map(({ fileDiff, filePath, fileKey, fileVersion, collapsed }) => {
const persisted = reviewComments
.filter(
(comment) =>
@@ -153,7 +154,7 @@
annotations,
collapsed,
version: fnv1a32(
- `${collapsed ? "1" : "0"}:${annotations
+ `${fileVersion}:${collapsed ? "1" : "0"}:${annotations
.flatMap((annotation) =>
annotation.metadata.entries.map(
(entry) => `${entry.id}:${entry.rangeLabel}:${entry.text}`,