Task #613: replace per-app hide toggles with single Dock visibility switch
The per-app hidden feature shipped in #609 was rejected — user wanted one toggle that hides/shows the entire bottom AppDock bar, leaving Home apps untouched. Removed: - lib/db/src/schema/user-hidden-apps.ts (and index.ts export); table dropped via `pnpm --filter @workspace/db run push` - GET /me/apps and PUT /me/apps/:appId/hidden routes - getHiddenAppIdsForUser + getVisibleNonHiddenAppsForUser helpers - MyApp + UpdateMyAppHiddenBody OpenAPI schemas - MyAppsBody settings UI + related i18n keys - Regenerated api-client-react + api-zod from the trimmed spec - Reverted GET /apps back to getVisibleAppsForUser Added: - artifacts/tx-os/src/hooks/use-dock-visible.ts — localStorage-backed preference with a custom window event for in-tab sync and the native `storage` event for cross-tab sync. Default = true. - DockBody in settings-panel: single ToggleRow under a new "App dock" section ("settingsPanel.section.dock" / "settingsPanel.dock.show") - AppDock now returns null when the preference is off and clears `--app-dock-height` so page padding doesn't stay reserved. Code review: PASS (architect). No remaining references to the removed infra. Typecheck shows only pre-existing errors in executive-meetings.ts and push.ts unrelated to this change. Follow-up: publish to Gitea + redeploy on Mac (proposed as a follow-up task).
This commit is contained in:
@@ -633,64 +633,6 @@ paths:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ErrorResponse"
|
||||
|
||||
/me/apps:
|
||||
get:
|
||||
operationId: listMyApps
|
||||
tags: [apps]
|
||||
summary: List apps for the current user with their per-user hidden state
|
||||
description: |
|
||||
Returns every globally active app (regardless of the per-user hidden
|
||||
flag), each with a `hidden` boolean indicating whether the current
|
||||
user has hidden it from their own Home/Dock via PUT /me/apps/{appId}/hidden.
|
||||
Used by the per-user Settings panel; the Home and Dock continue to use
|
||||
GET /apps which already filters out hidden apps server-side.
|
||||
responses:
|
||||
"200":
|
||||
description: Apps visible to the current user, with per-user hidden state
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
$ref: "#/components/schemas/MyApp"
|
||||
|
||||
/me/apps/{appId}/hidden:
|
||||
put:
|
||||
operationId: updateMyAppHidden
|
||||
tags: [apps]
|
||||
summary: Hide or show an app for the current user
|
||||
parameters:
|
||||
- name: appId
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: integer
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/UpdateMyAppHiddenBody"
|
||||
responses:
|
||||
"200":
|
||||
description: Updated per-user app state
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/MyApp"
|
||||
"400":
|
||||
description: Validation error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ErrorResponse"
|
||||
"404":
|
||||
description: App not found or not visible to the current user
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ErrorResponse"
|
||||
|
||||
# Settings
|
||||
/settings:
|
||||
get:
|
||||
@@ -4289,23 +4231,6 @@ components:
|
||||
type: string
|
||||
format: date-time
|
||||
|
||||
MyApp:
|
||||
allOf:
|
||||
- $ref: "#/components/schemas/App"
|
||||
- type: object
|
||||
required: [hidden]
|
||||
properties:
|
||||
hidden:
|
||||
type: boolean
|
||||
description: True when the current user has hidden this app from their Home/Dock.
|
||||
|
||||
UpdateMyAppHiddenBody:
|
||||
type: object
|
||||
required: [hidden]
|
||||
properties:
|
||||
hidden:
|
||||
type: boolean
|
||||
|
||||
UpdateMyAppOrderBody:
|
||||
type: object
|
||||
required: [order]
|
||||
|
||||
Reference in New Issue
Block a user