accessibility-expert
WCAG 2.1/2.2 compliance, WAI-ARIA implementation, screen reader optimization, keyboard…
Complete guide for adding, updating, and removing settings in OrcaQ. Covers the full data flow — type → constant → store → component — for all settings panels (Appearance, Editor, Quick Query, Agent). Load this skill for any task involving user preferences, persistent configs,
$ npx -y skills add cin12211/orca-q --skill settings-flow --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/settings-flowContext preview
The summary Claude sees to decide when to auto-load this skill.
Complete guide for adding, updating, and removing settings in OrcaQ. Covers the full data flow — type → constant → store → component — for all settings panels (Appearance, Editor, Quick Query, Agent). Load this skill for any task involving user preferences, persistent configs,
name: settings-flow description: Complete guide for adding, updating, and removing settings in OrcaQ. Covers the full data flow — type → constant → store → component — for all settings panels (Appearance, Editor, Quick Query, Agent). Load this skill for any task involving user preferences, persistent configs, or the settings modal.
Settings in OrcaQ follow a strict 4-layer flow:
types/settings.types.ts ← Define the shape / enum constants/settings.constants.ts ← Default values & UI option arrays core/stores/appConfigStore.ts ← Reactive state + reset actions (persisted) components/modules/settings/ ← UI panels that read/write the store
All state is persisted automatically via `{ persist: true }` on the Pinia store — no manual localStorage calls needed.
---
| Purpose | File | | ------------------------- | ------------------------------------------------------------------ | | Types & enums | `components/modules/settings/types/settings.types.ts` | | Constants & defaults | `components/modules/settings/constants/settings.constants.ts` | | Pinia store | `core/stores/appConfigStore.ts` | | Settings modal controller | `core/contexts/useSettingsModal.ts` | | Container (modal shell) | `components/modules/settings/containers/SettingsContainer.vue` | | Appearance panel | `components/modules/settings/components/AppearanceConfig.vue` | | Editor panel | `components/modules/settings/components/EditorConfig.vue` | | Quick Query panel | `components/modules/settings/components/QuickQueryConfig.vue` | | Agent panel | `components/modules/settings/components/AgentConfig.vue` | | Table Appearance panel | `components/modules/settings/components/TableAppearanceConfig.vue` | | Public module API | `components/modules/settings/index.ts` |
---
In `components/modules/settings/types/settings.types.ts`:
// For a simple value — add a field to an existing interface
export interface CodeEditorConfigs {
theme: EditorTheme;
fontSize: number;
showMiniMap: boolean;
indentation: boolean;
wordWrap: boolean; // ← new field
}
// For an enum setting — add an enum
export enum WordWrapMode {
Off = 'off',
On = 'on',
Bounded = 'bounded',
}In `components/modules/settings/constants/settings.constants.ts`:
// Default value (used in store initialisation and reset)
export const DEFAULT_EDITOR_CONFIG = {
...existingDefaults,
wordWrap: WordWrapMode.Off,
};
// Option array for UI dropdowns / toggles
export const WORD_WRAP_OPTIONS: Array<{ label: string; value: WordWrapMode }> =
[
{ label: 'Off', value: WordWrapMode.Off },
{ label: 'On', value: WordWrapMode.On },
{ label: 'Bounded', value: WordWrapMode.Bounded },
];In `core/stores/appConfigStore.ts`:
// Inside the store factory function, add the reactive field
const codeEditorConfigs = reactive<CodeEditorConfigs>({
...
wordWrap: DEFAULT_EDITOR_CONFIG.wordWrap, // ← new field
});
// Update the reset action
const resetCodeEditorConfigs = () => {
Object.assign(codeEditorConfigs, {
...
wordWrap: DEFAULT_EDITOR_CONFIG.wordWrap, // ← include in reset
});
};
// Make sure it is included in the return object (it already is if using the reactive object)In the relevant `*Config.vue` under `components/modules/settings/components/`:
<script setup lang="ts">
import { WORD_WRAP_OPTIONS } from '../constants';
const appConfigStore = useAppConfigStore();
</script>
<template>
<!-- Follow the standard settings row pattern -->
<div class="flex items-center justify-between gap-4">
<div class="flex flex-col gap-0.5">
<p class="text-sm">Word wrap</p>
<p class="text-xs text-muted-foreground">
Control how long lines are handled in the editor
</p>
</div>
<Select
:modelValue="appConfigStore.codeEditorConfigs.wordWrap"
@update:modelValue="appConfigStore.codeEditorConfigs.wordWrap = $event"
>
<SelectTrigger size="sm" class="h-6! cursor-pointer">
<SelectValue placeholder="Select word wrap mode" />
</SelectTrigger>
<SelectContent>
<SelectGroup>
<SelectItem
class="cursor-pointer h-6!"
v-for="opt in WORD_WRAP_OPTIONS"
:key="opt.value"
:value="opt.value"
>
{{ opt.label }}
</SelectItem>
</SelectGroup>
</SelectContent>
</Select>
</div>
</template>---
// settings.types.ts
export enum SettingsComponentKey {
EditorConfig = 'EditorConfig',
QuickQueryConfig = 'QuickQueryConfig',
AgentConfig = 'AgentConfig',
AppearanceConfig = 'AppearanceConfig',
TableAppearanceConfig = 'TableAppearanceConfig',
MyNewConfig = 'MyNewConfig', // ← new
}// settings.constants.ts
export const SETTINGS_NAV_ITEMS: SettingsNavItem[] = [
...existingItems,
{
name: 'My New Section',
icon: 'hugeicons:some-icon',
componentKey: SettingsComponentKey.MyNewConfig,
},
];Create `components/modules/settings/components/MyNewConfig.vue` following the standard visual pattern (see Standard UI Pattern below).
In `components/modules/settings/containers/SettingsContainer.vue`:
import M
Repo: cin12211/orca-q
WCAG 2.1/2.2 compliance, WAI-ARIA implementation, screen reader optimization, keyboard…
CSS architecture and styling expert with deep knowledge of modern CSS features, responsive…
Database performance optimization, schema design, query analysis, and connection management…
Expert in documentation structure, cohesion, flow, audience targeting, and information…
Git expert with deep knowledge of merge conflicts, branching strategies, repository recovery,…
Use for any question about a codebase, its architecture, file relationships, or project…