Skip to content

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

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

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

Conversation

@ponponon

@ponponon ponponon commented Jun 12, 2026 •

Copy link
Copy Markdown

Summary

Fixes issues with presets feature: missing i18n, wrong button styling, and inconsistent input borders.

Changes

  • i18n: Added translations for all 18 languages
  • Storage: Migrated from localStorage to persisted storage (desktop: local file, web: localStorage)
  • UI: Fixed button size (large), replaced raw inputs with TextField component
  • Tests: Added unit tests and i18n parity tests

UI Changes

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

Testing

  • ✅ bun typecheck passes
  • ✅ All unit tests pass (14 tests, 607 assertions)
  • ✅ i18n parity tests verify translations

Closes #25817
Fixes #31988

- 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
@github-actions github-actions Bot added the needs:compliance This means the issue will auto-close after 2 hours. label Jun 12, 2026
@github-actions

Copy link
Copy Markdown
Contributor

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • PR description is missing required template sections. Please use the PR template.

Please edit this PR description to address the above within 2 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

@ponponon

Copy link
Copy Markdown
Author

Note: This PR includes UI changes but I don't have access to screenshot tools. If a maintainer could help verify the visual changes, or if someone could provide before/after screenshots, that would be appreciated.

The UI changes are:

  1. Button size: small → large (matching other dialogs like dialog-edit-project.tsx)
  2. Input borders: Raw <input> with border-v2-border-border → TextField component with border-weak-base
  3. Dialog padding: p-6 pt-0 → p-6 (prevents content clipping)

@github-actions

Copy link
Copy Markdown
Contributor

This pull request has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window.

Feel free to open a new pull request that follows our guidelines.

@github-actions github-actions Bot removed the needs:compliance This means the issue will auto-close after 2 hours. label Jun 12, 2026
@github-actions github-actions Bot closed this Jun 12, 2026
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 [FEATURE]: Preset instructions system for reusable chat prompts

1 participant