D2r ui feature

From TrayHard/d2r-ultra-utility · View interactive version

D2r ui feature is an AI agent skill from the GitHub repository TrayHard/d2r-ultra-utility. Playbook for adding or changing UI in the Diablo II Ultra Utility loot-filter/tweaks editor (React + antd + Tailwind, backed by SettingsContext and the read/apply worker hooks). Use when creating or editing a page/component under src/pages or src/shared/components, wiring a new per-profile setting,

How to use this skill

Skill file

Working on the loot-filter / tweaks UI

Applies when editing anything under src/pages/<domain>, src/shared/components,

src/widgets, or wiring new settings into the editor.

1. State lives in SettingsContext — not local state

getGemSettings, getRuneSettings, getTweaksSettings…); write via the update* setters.

helper, AND add a migration (in the style of migrateItemsSettings / cleanSettings)

so old localStorage/profile JSON keeps loading.

export — never fold tweaks into profile settings.

2. Two different "locale" systems — do not conflate (most common bug)

Add the key to en.json (source of truth), then run node scripts/sync-locales.cjs.

Use in components via useTranslation() / t().

JSON, mirrored by the Locales interface. Adding one means updating every

getDefault* / createFilledLocales helper in SettingsContext.

3. Game file I/O goes through the worker hooks

don't call readTextFile/writeTextFile directly from components.

(game files are often read-only/locked).

removeColorCodes() is display/search only.

4. Styling

600×790 (basic, fixed) and 1200×790 (advanced, resizable).

5. Before you finish

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.