mirror of
https://github.com/stablyai/orca.git
synced 2026-10-16 16:03:26 +00:00
Add missing TaskResumeState fields to strict client-ui RPC schema
The renderer persists linearMode, linearContext, jiraPreset, and jiraQuery in TaskResumeState, but the strict Zod schema on the runtime ui.set RPC omitted them — paired web/mobile clients had their whole UI-state update rejected whenever any of these fields was present. Pre-existing on main; kept as its own commit so it can be cherry-picked separately. Co-authored-by: Orca <help@stably.ai>
This commit is contained in:
@@ -182,7 +182,16 @@ describe('client UI RPC methods', () => {
|
||||
githubItemsQuery: 'is:open',
|
||||
githubProjectHiddenFieldIdsByView: {
|
||||
'project-1:view-1': ['field-1']
|
||||
}
|
||||
},
|
||||
linearMode: 'projects',
|
||||
linearContext: {
|
||||
kind: 'project',
|
||||
id: 'project-9',
|
||||
workspaceId: 'workspace-1',
|
||||
model: 'project'
|
||||
},
|
||||
jiraPreset: 'assigned',
|
||||
jiraQuery: 'ENG'
|
||||
},
|
||||
workspaceCleanup: {
|
||||
dismissals: {
|
||||
@@ -218,7 +227,16 @@ describe('client UI RPC methods', () => {
|
||||
githubItemsQuery: 'is:open',
|
||||
githubProjectHiddenFieldIdsByView: {
|
||||
'project-1:view-1': ['field-1']
|
||||
}
|
||||
},
|
||||
linearMode: 'projects',
|
||||
linearContext: {
|
||||
kind: 'project',
|
||||
id: 'project-9',
|
||||
workspaceId: 'workspace-1',
|
||||
model: 'project'
|
||||
},
|
||||
jiraPreset: 'assigned',
|
||||
jiraQuery: 'ENG'
|
||||
},
|
||||
workspaceCleanup: {
|
||||
dismissals: {
|
||||
|
||||
@@ -53,8 +53,23 @@ const TaskResumeState = z
|
||||
githubItemsPreset: z.string().nullable().optional(),
|
||||
githubItemsQuery: z.string().optional(),
|
||||
githubProjectHiddenFieldIdsByView: z.record(z.string(), z.array(z.string())).optional(),
|
||||
// Why: this schema is strict — every TaskResumeState field the renderer
|
||||
// persists must be listed or paired web/mobile ui.set updates are rejected
|
||||
// wholesale (see shared/types.ts TaskResumeState).
|
||||
linearMode: z.enum(['issues', 'projects', 'views']).optional(),
|
||||
linearPreset: z.enum(['assigned', 'created', 'all', 'completed']).optional(),
|
||||
linearQuery: z.string().optional()
|
||||
linearQuery: z.string().optional(),
|
||||
linearContext: z
|
||||
.object({
|
||||
kind: z.enum(['project', 'view']),
|
||||
id: z.string(),
|
||||
workspaceId: z.string(),
|
||||
model: z.enum(['issue', 'project']).optional()
|
||||
})
|
||||
.strict()
|
||||
.optional(),
|
||||
jiraPreset: z.enum(['assigned', 'reported', 'all', 'done']).optional(),
|
||||
jiraQuery: z.string().optional()
|
||||
})
|
||||
.strict()
|
||||
const WorkspaceCleanupDismissal = z
|
||||
|
||||
Reference in New Issue
Block a user