fix(web): fence plan mode projection races
This commit is contained in:
13 files changed
+119
-32
No files matched your search
@@ -113,7 +113,10 @@ export const sessionCancelValueSchema = z.object({
|
||||
export const planModeStateSchema = z.object({
|
||||
active: z.boolean(),
|
||||
pending: z.boolean().optional(),
|
||||
}) satisfies z.ZodType<Wire<PlanModeState>>
|
||||
}).refine(
|
||||
state => state.pending === undefined || state.pending !== state.active,
|
||||
{ message: 'pending must differ from active when present', path: ['pending'] },
|
||||
) satisfies z.ZodType<Wire<PlanModeState>>
|
||||
|
||||
/** session.planMode request payload. */
|
||||
export const sessionPlanModeRequestSchema = z.object({
|
||||
|
||||
@@ -47,7 +47,7 @@ export interface SessionSummary {
|
||||
/**
|
||||
* Plan collaboration state exposed to clients. `active` is the logged state
|
||||
* shaping the current request; `pending`, when present, is the user's
|
||||
* next-boundary selection.
|
||||
* next-boundary selection and differs from `active`.
|
||||
*/
|
||||
export interface PlanModeState {
|
||||
active: boolean
|
||||
|
||||
Reference in New Issue
Block a user