Agent Skills
› luxury-yacht/app
› app-shell
app-shell
GitHub处理应用外壳层功能,包括设置、命令面板、侧边栏、快捷键、全局导航、模态框及持久化等。涉及前后端交互与视觉测试,确保UI组件符合架构规范。
Trigger Scenarios
修改应用设置或首选项界面
调整命令面板或快捷键逻辑
开发侧边栏或可停靠面板
更新全局导航或模态框
进行应用外壳层的视觉测试
Install
npx skills add luxury-yacht/app --skill app-shell -g -y
SKILL.md
Frontmatter
{
"name": "app-shell",
"description": "Work on settings, command palette, sidebar, shortcuts, modals, dockable panels, favorites, global navigation, persistence, and visual shell tests"
}
App Shell
Use this when touching settings, preferences, command palette, sidebar, shortcuts, global navigation, modals, overlays, dockable panels, favorites, saved views, app-shell persistence, or visual shell tests.
Core Contracts
Read:
AGENTS.mdfrontend/AGENTS.mddocs/frontend/component-structure.mddocs/frontend/keyboard.mddocs/frontend/modals.mddocs/frontend/tabs.mddocs/frontend/dockable-panels.mddocs/architecture/data-access.mdfor app state and persisted readsdocs/architecture/application-lifecycle.mdfor native shell and process UI ownership
Settings-specific contract:
- Persisted app preferences and runtime-enforced settings are backend-owned and
owned by
PreferencesServiceand described byreadAppSettingsSchema. frontend/src/core/settings/appPreferences.tsowns the frontend schema metadata cache and typed metadata helpers. Settings UI sections should consume defaults, bounds, enum values, validation hints, and runtime flags through those helpers instead of duplicating backend constants.- Fallback metadata belongs only inside
appPreferences.tsfor first paint, Wails-unavailable tests, or schema-load failure; it is not a second settings contract. - Settings components should not fetch backend schema directly. Add or reuse a
typed helper in
core/settingswhen UI needs preference metadata. - Frontend preference setters should use the shared optimistic update path that
calls
UpdateAppPreferences, then roll back cache, emitted events, and any appearance localStorage mirrors on failure. UpdateAppPreferencesreturns normalized settings and changed keys. Do not change that response shape unless a workflow genuinely needs schema metadata in the mutation response.- Runtime-effect flags are metadata for diagnostics and future UI decisions. Do not add user-facing runtime-effect copy unless the workflow calls for it.
- Settings effects run only after successful persistence and lock release,
through the owner-shaped sinks documented in
docs/architecture/data-access.md; settings UI must not add a direct runtime owner call. - Frontend-only or bootstrap state stays local when it is transient or needed before Wails is available. Do not move local UI state into the backend just because it appears in Settings.
- Object panel position and layout defaults are persisted preferences with backend-normalized defaults.
Entry Points
frontend/src/ui/settingsfrontend/src/core/settingsfrontend/src/core/app-state-accessbackend/preferences_service.gobackend/preferences_settings.gobackend/runtime_setting_policies.gobackend/data_management_coordinator.gobackend/desktop_shell.gobackend/favorites_service.gobackend/ui_state_store.gofrontend/src/ui/command-palettefrontend/src/ui/shortcutsfrontend/src/ui/navigationfrontend/src/ui/layoutfrontend/src/ui/dockablefrontend/src/ui/modalsfrontend/src/ui/favoritesfrontend/src/shared/components/modalsfrontend/src/shared/components/tabs
Checklist
- User-facing labels, icons, categories, and command-palette entries stay aligned across surfaces.
- Settings and persistence keys are scoped correctly, including cluster or namespace identity when the state is cluster data.
- Persisted preferences hydrate from backend schema metadata instead of duplicating defaults and bounds in UI code.
- Backend-owned Settings controls read min/max/default/current values from
schema metadata helpers in
core/settings; keep fallback constants local to the metadata layer only. - Backend schema coverage includes every preference accepted by
UpdateAppPreferences, without adding non-preference settings like selected kubeconfigs or saved themes to the preference schema. - Regenerate Wails bindings when backend settings DTOs, schema fields, or response shapes change.
- Preference mutations use
UpdateAppPreferencessemantics: atomic validation, persistence before runtime side effects, and rollback on failure. - Local-only Settings state and first-paint bootstrap caches remain frontend-owned.
- Keyboard shortcuts respect focus ownership and text-input behavior.
- Modals preserve focus trap, drag regions, and keyboard dismissal behavior.
- Dockable panel and tab changes preserve selection, close, drag/drop, and cluster/object identity behavior.
- Visual changes reuse existing CSS/tokens and avoid inline styles.
- Tests cover persistence, keyboard/focus, and changed UI state.
Validation
Use focused checks while iterating:
mise exec -- npm run typecheck --prefix frontend
mise exec -- npm run test --prefix frontend -- settings command-palette shortcuts modals dockable favorites
Use browser or Storybook validation for visual behavior, then follow the root final validation gate.
Version History
- ee846a6 Current 2026-08-20 13:01


