Register assistant user settings as a core Preferences section (replace /assistant/preferences) #25

Open
opened 2026-10-13 23:39:00 +00:00 by KofTwentyTwo · 0 comments
KofTwentyTwo commented 2026-10-13 23:39:00 +00:00 (Migrated from github.com)

QQQ core is adding a standard per-user Preferences capability: GET /qqq/v1/preferences, GET and PATCH /qqq/v1/preferences/{section} (spec: docs/USER-PREFERENCES.md in QRun-IO/qqq, branch feature/user-preferences). Qbits register a section of typed fields (normal QFieldMetaData), with storage delegated to a provider SPI (UserPreferenceProviderInterface), so each qbit keeps its own table. Next UI renders every section on one Preferences page from the user menu, and features can deep-link to their own section.

When #21 (write mode) lands, the assistant's per-user settings should register as an "Assistant" section instead of shipping a bespoke GET/PATCH /assistant/preferences endpoint.

Proposed shape

  • Section assistant (label "Assistant", icon smart_toy, app scope the assistant app, permission the assistant's use permission).
  • Fields: defaultWriteMode (ENUM: Read-only / Write), autoConfirmLowRisk (BOOLEAN). Make it read-only, with a reason, when the policy doesn't allow auto-confirm.
  • Provider: an AssistantPreferencesProvider backed by the existing assistant_user_preference table. Its validate enforces the policy (today's 403 becomes a 400 message).
  • /config can keep reporting preferences, but read them through the provider. Drop or deprecate the bespoke operations, so clients have a single way to change preferences.
  • The Next panel's write-mode toggle keeps working. It reads and writes through /qqq/v1/preferences/assistant.

Depends on: the QQQ RC that ships user preferences, plus #21.

QQQ core is adding a standard per-user Preferences capability: `GET /qqq/v1/preferences`, `GET` and `PATCH /qqq/v1/preferences/{section}` (spec: `docs/USER-PREFERENCES.md` in QRun-IO/qqq, branch `feature/user-preferences`). Qbits register a **section** of typed fields (normal `QFieldMetaData`), with storage delegated to a provider SPI (`UserPreferenceProviderInterface`), so each qbit keeps its own table. Next UI renders every section on one Preferences page from the user menu, and features can deep-link to their own section. When #21 (write mode) lands, the assistant's per-user settings should register as an **"Assistant" section** instead of shipping a bespoke `GET/PATCH /assistant/preferences` endpoint. **Proposed shape** - Section `assistant` (label "Assistant", icon `smart_toy`, app scope the assistant app, permission the assistant's use permission). - Fields: `defaultWriteMode` (ENUM: Read-only / Write), `autoConfirmLowRisk` (BOOLEAN). Make it read-only, with a reason, when the policy doesn't allow auto-confirm. - Provider: an `AssistantPreferencesProvider` backed by the existing `assistant_user_preference` table. Its `validate` enforces the policy (today's 403 becomes a 400 message). - `/config` can keep reporting `preferences`, but read them through the provider. Drop or deprecate the bespoke operations, so clients have a single way to change preferences. - The Next panel's write-mode toggle keeps working. It reads and writes through `/qqq/v1/preferences/assistant`. **Depends on:** the QQQ RC that ships user preferences, plus #21.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: QRun-IO/qbit-assistant#25