mirror of
https://github.com/stablyai/orca.git
synced 2026-10-01 08:01:56 +00:00
refactor: centralize thread filter value domains
Consolidate filter value definitions in agents-view-thread-filters and use them in Zod schema validation to ensure consistent, persistent serialization of filter state.
This commit is contained in:
@@ -3,6 +3,10 @@ import {
|
||||
isFeatureInteractionId,
|
||||
type FeatureInteractionId
|
||||
} from '../../../../shared/feature-interactions'
|
||||
import {
|
||||
ACTIVITY_GROUP_BY_VALUES,
|
||||
THREAD_READ_FILTER_VALUES
|
||||
} from '../../../../shared/agents-view-thread-filters'
|
||||
import { isFeatureTipId } from '../../../../shared/feature-tips'
|
||||
import { isReleaseChannel, type ReleaseChannel } from '../../../../shared/release-channel'
|
||||
import {
|
||||
@@ -126,8 +130,8 @@ const UiUpdateFields = z
|
||||
agentsFilterRepoIds: StringArray.optional(),
|
||||
agentsShowChildAgents: z.boolean().optional(),
|
||||
agentsCompactMode: z.boolean().optional(),
|
||||
agentsReadFilter: z.enum(['all', 'unread']).optional(),
|
||||
agentsGroupBy: z.enum(['none', 'status', 'project', 'worktree', 'agent']).optional(),
|
||||
agentsReadFilter: z.enum(THREAD_READ_FILTER_VALUES).optional(),
|
||||
agentsGroupBy: z.enum(ACTIVITY_GROUP_BY_VALUES).optional(),
|
||||
workspaceHostOrder: z.array(z.string()).optional(),
|
||||
automationHostFilter: z
|
||||
.union([
|
||||
|
||||
@@ -49,8 +49,9 @@ export type WorktreeCardMode = 'Default' | 'Compact'
|
||||
|
||||
export type AgentActivityDisplayMode = 'compact' | 'full'
|
||||
|
||||
export type ThreadReadFilter = 'all' | 'unread'
|
||||
export type ActivityGroupBy = 'none' | 'status' | 'project' | 'worktree' | 'agent'
|
||||
// Re-exported so existing importers keep one home for UI chrome types; the
|
||||
// value domain lives with the normalizers that police it.
|
||||
export type { ActivityGroupBy, ThreadReadFilter } from './agents-view-thread-filters'
|
||||
|
||||
export type StatusBarItem =
|
||||
| 'claude'
|
||||
|
||||
Reference in New Issue
Block a user