feat(view-settings): workspace-level client view setting columns (OUT-3851 foundation)#1308
feat(view-settings): workspace-level client view setting columns (OUT-3851 foundation)#1308priosshrsth wants to merge 8 commits into
Conversation
…(foundation) Foundation for OUT-3851. Adds nullable client view defaults to WorkspaceSetting (value + lock per setting), widens the workspace-settings DTO to partial updates, and exposes an IU "Client view settings" section in configure-tasks-app. Inert on the client read path — enforcement (hard lock) and seeding (soft default) land in follow-up PRs. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Greptile SummaryThis PR adds workspace-level client view settings — default view mode and hide-subtasks toggle — that IUs can configure from the
Confidence Score: 4/5Mostly safe to merge; one functional gap in the new UI means that once an IU sets a view-mode override they can never clear it back to "no preference" through the UI. The view-mode dropdown has no "unset" option and its src/app/configure-tasks-app/ui/ClientViewSettingsSection.tsx — the Important Files Changed
Sequence DiagramsequenceDiagram
participant IU as IU Browser
participant Page as ConfigureTasksAppPage
participant WS_API as /api/workspace-settings
participant WS_Svc as WorkspaceSettingsService
participant VS_Svc as ViewSettingsService
participant DB as Database
IU->>Page: Load page
Page->>WS_API: GET /api/workspace-settings
WS_API->>WS_Svc: getWorkspaceSettings()
WS_Svc->>DB: findUnique WorkspaceSetting
alt Row missing
WS_Svc->>DB: create WorkspaceSetting
end
WS_Svc-->>Page: "{ autoArchiveAfterDays, clientDefaultViewMode, clientHideSubtasks }"
Page-->>IU: Render ClientViewSettingsSection
IU->>Page: Change view mode / toggle subtasks
Page->>WS_API: PATCH /api/workspace-settings
WS_API->>WS_Svc: updateWorkspaceSettings(data)
WS_Svc->>DB: update WorkspaceSetting
Note over VS_Svc,DB: When a CU logs in for the first time
VS_Svc->>DB: findFirst ViewSetting (none found)
VS_Svc->>WS_Svc: resolveInitialDisplayDefaults()
WS_Svc->>DB: findUnique WorkspaceSetting
DB-->>WS_Svc: clientDefaultViewMode, clientHideSubtasks
WS_Svc-->>VS_Svc: "{ viewMode, showSubtasks }"
VS_Svc->>DB: create ViewSetting (seeded with workspace defaults)
Reviews (3): Last reviewed commit: "fix issues" | Re-trigger Greptile |
Use a standalone ClientViewSettings type (required locks, nullable values) instead of Pick-ing optional DTO fields, and use an explicit null check in handleViewModeChange for consistency. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Deployment failed with the following error: Learn More: https://vercel.link/multiple-function-regions |
…ned-safety Loose != null clears the lock for both null and undefined, guarding against a value that is absent rather than explicitly null. Applied to both handlers. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Drop the nullable "no opinion" model and the lock columns. Foundation now carries only the client defaults as non-nullable columns matching current behavior (clientDefaultViewMode default board, clientHideSubtasks default false). Lock columns, lock UI, and enforcement move to the hard-lock PR. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
zod strips unknown keys by default; removing .strict() avoids reindenting the autoArchiveAfterDays block and keeps the review diff additive. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
@greptileai review the pr again. |
…-3851-cu-view-settings-foundation
Foundation PR for OUT-3851 — Allow IU to set view settings for CU.
Changes summary
Test cases
2026-06-10.17-41-25.mov