Skip to content

Commit e6c2b88

Browse files
committed
feat(server): version snapshots with is_snapshot column and resolved delta data
- Add is_snapshot column to HTTP table with CHECK constraint enforcing mutual exclusivity with is_delta - Create fully-resolved snapshot copies during HttpRun instead of raw deltas - Add migration for is_snapshot column and delta/snapshot exclusivity triggers - Include snapshot data in HttpVersion sync events - Fix sync parity test timeout by collecting events in parallel - Fix Prettier formatting in HTTP.md chore: add version plan for desktop patch
1 parent 2521a2f commit e6c2b88

33 files changed

+2435
-267
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
desktop: patch
3+
---
4+
5+
Version snapshots with is_snapshot column and deterministic test sync

packages/client/src/pages/http/history.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ export const HistoryModal = ({ deltaHttpId, httpId }: HistoryModalProps) => {
9999
</div>
100100
}
101101
>
102-
<Version deltaHttpId={deltaHttpId} httpId={_.httpVersionId} />
102+
<Version httpId={_.httpVersionId} />
103103
</Suspense>
104104
</TabPanel>
105105
)}
@@ -112,11 +112,10 @@ export const HistoryModal = ({ deltaHttpId, httpId }: HistoryModalProps) => {
112112
};
113113

114114
interface VersionProps {
115-
deltaHttpId: Uint8Array | undefined;
116115
httpId: Uint8Array;
117116
}
118117

119-
const Version = ({ deltaHttpId, httpId }: VersionProps) => {
118+
const Version = ({ httpId }: VersionProps) => {
120119
const responseCollection = useApiCollection(HttpResponseCollectionSchema);
121120

122121
const { httpResponseId } =
@@ -137,10 +136,10 @@ const Version = ({ deltaHttpId, httpId }: VersionProps) => {
137136
<PanelGroup {...endpointVersionsLayout} orientation='vertical'>
138137
<Panel className={tw`flex h-full flex-col`} id='request'>
139138
<div className={tw`p-6 pb-2`}>
140-
<HttpUrl deltaHttpId={deltaHttpId} httpId={httpId} isReadOnly />
139+
<HttpUrl httpId={httpId} isReadOnly />
141140
</div>
142141

143-
<HttpRequestPanel deltaHttpId={deltaHttpId} httpId={httpId} isReadOnly />
142+
<HttpRequestPanel httpId={httpId} isReadOnly />
144143
</Panel>
145144

146145
{httpResponseId && (

packages/client/src/pages/http/request/panel.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import { SearchParamTable } from './search-param';
2323

2424
export interface HttpRequestPanelProps {
2525
className?: string;
26-
deltaHttpId: Uint8Array | undefined;
26+
deltaHttpId?: Uint8Array | undefined;
2727
hideDescription?: boolean;
2828
httpId: Uint8Array;
2929
isReadOnly?: boolean;

packages/client/src/pages/http/request/url.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import { MAX_FLOAT, useApiCollection } from '~/shared/api';
2424
import { pick, queryCollection } from '~/shared/lib';
2525

2626
export interface HttpUrlProps {
27-
deltaHttpId: Uint8Array | undefined;
27+
deltaHttpId?: Uint8Array | undefined;
2828
httpId: Uint8Array;
2929
isReadOnly?: boolean;
3030
}

packages/db/pkg/sqlc/gen/db.go

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/db/pkg/sqlc/gen/http.sql.go

Lines changed: 99 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/db/pkg/sqlc/gen/models.go

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)