Skip to content

feat: slash command card gallery settings UI#16

Merged
YishenTu merged 3 commits into
mainfrom
feat/slash-command-card-gallery
Mar 7, 2026
Merged

feat: slash command card gallery settings UI#16
YishenTu merged 3 commits into
mainfrom
feat/slash-command-card-gallery

Conversation

@YishenTu
Copy link
Copy Markdown
Owner

@YishenTu YishenTu commented Mar 7, 2026

Summary

  • Add slash command definitions, validation, resolution, and autocomplete menu UI
  • Render slash commands as a 2-column card gallery in the settings page
  • Cards default to view mode; inline editor opens only on explicit Edit click
  • Fix editor visibility bug where display: flex overrode the hidden attribute
  • Use data-slash-command-mode CSS selectors for view/edit toggling
  • Add userDisplayText metadata for resolved slash command display in chat

Test plan

  • bun test tests/unit/options/ — 35 tests pass
  • bun test tests/unit/shared/settings.test.ts — passes
  • Slash command card gallery renders in view mode by default
  • Clicking Edit opens inline editor; clicking Done returns to card view
  • Autosave persists valid slash commands without full form submit
  • Validation errors shown for invalid command names on submit

YishenTu added 3 commits March 7, 2026 22:23
- Add slash command definitions, validation, resolution, and menu UI
- Render slash commands as a 2-column card gallery in settings page
- Default cards to view mode; editor opens only on explicit Edit click
- Fix editor visibility bug where flex display overrode hidden attribute
- Use data-slash-command-mode CSS selectors for view/edit toggling
- Add userDisplayText metadata for resolved slash command display
- Include comprehensive unit tests for slash commands and settings
- Merge duplicate mention/slash-command CSS rules into shared selectors
- Consolidate redundant early-return blocks in resolveSlashCommandText
- Simplify updateSelection by removing redundant branch
- Remove unused SlashCommandRowMode type alias
- Remove redundant outer guard around attachment preview checks
- Add fireSlashCommandAutosave wrapper with .catch() to surface storage
  write failures via status message instead of silently dropping them
- Add .catch() to chrome.storage.local.get in slash command menu init
  to prevent unhandled promise rejections
- Reuse createTitleMetaButton utility in slash command menu to reduce
  duplication with tab mention menu
- Add unit tests for renderContentForChat with userDisplayText metadata
- Add unit tests for normalizeContent userDisplayText in camelCase and
  snake_case forms
@YishenTu YishenTu merged commit b3c98ef into main Mar 7, 2026
1 check passed
@YishenTu YishenTu deleted the feat/slash-command-card-gallery branch March 7, 2026 14:46
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.

1 participant