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:
brennanb2025
2026-07-02 18:32:48 -07:00
co-authored by Orca
parent b75728f705
commit fa88ee4b56
2 changed files with 36 additions and 3 deletions
+20 -2
View File
@@ -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: {
+16 -1
View File
@@ -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