Skip to content

feat(prompt): add Claude Code, Omarchy OS and AI tool apply prompts (#203) - #204

Merged
luongnv89 merged 1 commit into
mainfrom
feat/203-add-theme-change-apply-prompts-for
Oct 16, 2026
Merged

luongnv89 merged 1 commit into
mainfrom
feat/203-add-theme-change-apply-prompts-for

Conversation

@luongnv89

Copy link
Copy Markdown
Owner

Closes #203
Closes #202

Summary

Adds theme-change apply prompts for Claude Code (#203), Omarchy OS (#202) and a General AI tool placeholder (#203). All three are offered for every theme: as chips in the Agent prompt panel of every terminal/coding theme, and in the App target select of Theme pairing for every mapped website theme. They come after the targets a design file declares. Existing per-app prompts (Pi, Ghostty, iTerm2, Warp, OpenCode, VS Code) are unchanged.

Approach

Option 2 of both analyses: universal targets added in code, plus a shared helper. claude-code, omarchy and ai-tool are registered in src/lib/appTargets.ts as UNIVERSAL_APP_TARGETS (types UniversalAppTarget / AnyAppTarget). A new getAvailableAppTargets(designTargets) helper lists a design's declared targets first, then the universal ones, and both panels use it. The schema, the validator and the design JSON are not touched, and isAppTarget / normalizeAppTargets still accept only the six targets a file can declare.

  • Claude Code: the prompt writes ~/.claude/themes/<slug>.json as {name, base, overrides}, with hex colors and documented token names (claude, text, promptBorder, diffAdded, ...), then selects it with /theme (custom:<slug>). This follows the current Claude Code terminal-config docs.
  • Omarchy OS: the prompt writes ~/.config/omarchy/themes/<slug>/colors.toml with the upstream v4 key set (checked against basecamp/omarchy themes/tokyo-night/colors.toml), runs omarchy-theme-set <slug>, and verifies the switch with omarchy-theme-current and the visible terminal/Waybar/Hyprland border change.
  • General AI tool: an apply prompt labelled "General AI tool (placeholder)", whose instructions start with PLACEHOLDER.

A theme with no declared targets still shows the generic prompt until the user picks a universal target, so existing behavior is kept.

Decision Record

Analyzed at: main @ c5fa969 (2026-10-16)

Changes

File Change
src/types/design.ts Add UniversalAppTarget and AnyAppTarget
src/lib/appTargets.ts UNIVERSAL_APP_TARGETS, labels and instructions for Claude Code / Omarchy OS / placeholder, getAvailableAppTargets helper
src/lib/agentPrompt.ts Widen the target type in buildAppThemePrompt and its options
src/lib/themeMapping.ts Widen the target type in buildMappedThemePrompt
src/components/AgentPromptPanel.tsx Chips from getAvailableAppTargets; declared target stays the default
src/components/CodingThemeMappingPanel.tsx App target select shown for every backup, options from getAvailableAppTargets
src/lib/__tests__/appTargets.test.ts Helper, strictness, label/placeholder tests
src/lib/__tests__/agentPrompt.appTargets.test.ts Claude Code, Omarchy OS, placeholder prompt tests
src/lib/themeMapping.test.ts Mapped-prompt tests for Claude Code and light-mode Omarchy
src/components/__tests__/AgentPromptPanel.test.tsx Chip rendering, switching, no-declared-target, persistence, web tests
src/components/__tests__/CodingThemeMappingPanel.test.tsx Select options and no-declared-target backup tests
README.md Document the universal targets

Test Results

  • Unit tests: 480 passed (44 suites; 18 new)
  • Integration tests: skipped
  • E2e tests: skipped
  • Build: passed (vite build, tsc --noEmit, eslint on changed files)
  • QA cycles: 1 (code review PASS; UI code review PASS with 1 note; browser UI review skipped, no running app)

Acceptance Criteria Verification

Criterion Status Evidence
#203: A theme-change apply prompt for Claude Code is available for a selected theme pass AgentPromptPanel.test.tsx "switches the copied prompt to Claude Code…"; CodingThemeMappingPanel.test.tsx "offers Claude Code, Omarchy OS…"
#203: Using the Claude Code prompt in Claude Code applies the selected theme change unverified The prompt follows the documented ~/.claude/themes/ format and /theme flow (agentPrompt.appTargets.test.ts "builds a Claude Code theme-change prompt…"); a manual run in Claude Code is still needed
#203: A general AI tool apply prompt option is present, clearly marked as a placeholder pass appTargets.test.ts "labels each universal target and marks the general AI tool as a placeholder"; agentPrompt.appTargets.test.ts "builds a general AI tool prompt…"
#203: Existing theme-change apply prompts keep working unchanged pass All #181/#187 tests unchanged and passing; appTargets.test.ts "keeps file-declared targets strict…"
#202: User can request generation of an apply prompt for changing the theme in Omarchy OS pass AgentPromptPanel.test.tsx Omarchy OS chip; CodingThemeMappingPanel.test.tsx select option omarchy
#202: Generated prompt applies the requested theme change when used unverified The prompt writes the upstream colors.toml key set and runs omarchy-theme-set (agentPrompt.appTargets.test.ts "builds an Omarchy OS prompt…"); a manual run on Omarchy is still needed
#202: Theme change via the generated prompt is verifiable (theme visibly changes) pass The prompt tells the agent to confirm with omarchy-theme-current and check the visible terminal/Waybar/Hyprland change (asserted in agentPrompt.appTargets.test.ts)

🤖 Generated with Claude Code

…rompts (#203, #202)

Register claude-code, omarchy and ai-tool as universal apply-prompt targets
offered for every theme, after the targets a design file declares. A new
getAvailableAppTargets helper feeds both the Agent prompt chips and the
Theme pairing app-target select. Declared targets, the schema and the
validator are unchanged, so existing prompts stay byte-identical.

Closes #203
Closes #202

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@luongnv89
luongnv89 merged commit 4a94e15 into main Oct 16, 2026
5 checks passed
@luongnv89
luongnv89 deleted the feat/203-add-theme-change-apply-prompts-for branch October 16, 2026 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add theme-change apply prompts for Claude Code and general AI tools Add theme-change apply prompt for Omarchy OS

1 participant