> ## Documentation Index
> Fetch the complete documentation index at: https://docs.encoreos.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Quick actions migration notes

> Legacy rows used action_id holding the label text. The app now normalizes reads via normalizeQuickActionPreferences():

## User preferences (`pf_user_dashboard_preferences.quick_actions`)

Legacy rows used `action_id` holding the **label** text. The app now normalizes reads via `normalizeQuickActionPreferences()`:

* If `action_key` is present, it is used as-is.
* If only `action_id` (label) exists, the row is mapped using `buildLegacyLabelPreferenceKeyMap()` to the stable `action_key`.

New saves write `action_key` only.

## Pinned actions (header / palette)

Legacy `localStorage` key `encore:pinned-quick-actions` stored palette ids in the form `{moduleId}-{route}`.

* `usePinnedActions` migrates to `encore:pinned-quick-actions-v2` storing **action\_key** values.
* When a user has a dashboard preferences row for the org, pins sync to `quick_actions[].is_pinned` (server-backed). A one-time migration copies local pins into preferences (per org + user session gate in `sessionStorage`).

## Rollback

1. Revert application changes that write `action_key` / `is_pinned`.
2. If the migration `20260413180000_pf_quick_action_catalog_and_org_selections.sql` was applied, drop `pf_org_quick_action_selections` and `pf_quick_action_catalog` (and policies) in a follow-up migration only if no production data was written to those tables.

## Org defaults

`pf_org_dashboard_defaults.quick_action_defaults` uses the same `action_key` shape. Org admins manage defaults in **Organization Dashboard Defaults** → **Quick actions** tab.
