Skip to content

fix(app): improve presets i18n, storage, and UI consistency#32139

Open
ponponon wants to merge 1 commit into
anomalyco:devfrom
ponponon:feat/presets
Open

fix(app): improve presets i18n, storage, and UI consistency#32139
ponponon wants to merge 1 commit into
anomalyco:devfrom
ponponon:feat/presets

Conversation

@ponponon

Copy link
Copy Markdown

Issue for this PR

Closes #31988

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Fixes issues with the presets feature:

  1. i18n: Added translations for all 18 languages (presets were hardcoded Chinese)
  2. Storage: Migrated from localStorage to persisted storage (desktop: local file, web: localStorage)
  3. UI: Fixed button styling and input borders to match project conventions
  4. Tests: Added unit tests and i18n parity tests

How did you verify your code works?

  • bun typecheck passes
  • ✅ All unit tests pass (14 tests, 607 assertions)
  • ✅ i18n parity tests verify all translations are present
  • ✅ Button styling matches other dialogs (size=large, variant=primary)

Screenshots / recordings

Before:

  • Buttons used size="small" with inconsistent styling
  • Raw <input>/<textarea> with manual border classes
  • Dialog had pt-0 causing content clipping

After:

  • Buttons use size="large" matching other dialogs
  • TextField component with consistent border styling
  • Proper dialog padding

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

- Add presets popover in prompt input toolbar for quick insertion
- Add presets manager dialog for CRUD and reorder
- Support variables ({date}, {time}, {file}, {code}, {text})
- Persist presets using platform-aware storage (localStorage for web, local file for desktop)
- Add i18n support for 18 languages
- Add unit tests for extractVariables and resolveVariables
- Fix button styling to match project conventions (size=large, variant=primary)

Closes anomalyco#25817
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.

[FEATURE]: Preset phrases for quick prompt insertion

1 participant