Conversation
Add human-friendly aliases (e.g. 'groceries') as an optional setting per
list, usable in place of the UUID. Aliases are unique among active lists,
normalized to lowercase, and cleaned up automatically with list expiry.
Prepares for future MCP/AI integration.
Backend:
- New column 'alias' on shopping_lists with unique index
- GET /api/lists/by-alias/{alias} to resolve alias to list
- PUT /api/lists/{id}/alias to set, update, or remove alias
- Full validation (format, length, UUID-rejection, conflict 409)
- Switch SchemaUtils.create() to createMissingTablesAndColumns()
so new columns are auto-added on deployment
- 11 new tests (7 route + 4 repository)
Frontend:
- Alias settings UI in BurgerMenu (set/edit/remove with validation)
- API client methods for alias endpoints
- i18n keys in en.json and de.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add optional human-friendly aliases (e.g.
groceries) for shopping lists, usable in place of the UUID. Aliases are unique among active lists, normalized to lowercase, and automatically cleaned up when the list expires. This prepares for a future MCP/AIintegration that will allow adding items to lists by name via voice or text.
Also switches database initialization from
SchemaUtils.create()toSchemaUtils.createMissingTablesAndColumns()so the new alias column is automatically added to existing databases on deployment.Type of Change
What Changed
Backend (Kotlin/Ktor):
aliascolumn onshopping_liststable with unique indexGET /api/lists/by-alias/{alias}— resolve a list by its aliasPUT /api/lists/{id}/alias— set, update, or remove a list's aliasDatabaseFactoryusescreateMissingTablesAndColumns()for automatic schema evolutionFrontend (React/TypeScript):
en.jsonandde.jsonDocs:
[Unreleased]Testing
npm test— 229 tests /./gradlew test— 80 tests)Backend alias endpoints tested: create, update, remove, conflict (409), not found (404), invalid format (400), UUID rejection (400). Frontend alias UI tested: set alias, edit, remove, validation feedback, conflict error display.
Checklist
CHANGELOG (Unreleased):
Added
groceries) for shopping lists, usable in place of the UUID; aliases are unique among active lists, normalized to lowercase, and deleted automatically when the list expires. New endpoints:GET /api/ lists/by-alias/{alias}to resolve an alias,PUT /api/lists/{id}/aliasto set, update, or remove it. Small settings UI in the burger menu for managing the alias per list.Changed
SchemaUtils.create()toSchemaUtils.createMissingTablesAndColumns()so new columns (like alias) are automatically added to existing tables on deployment without manual migration