a676a3e99a
comboboxData(config) Alpine factory: typeable input + fuzzysort-ranked dropdown (prefix/substring/abbreviation subsequence matching), keyboard nav (Arrow/Enter/Escape/Tab), a11y roles, x-modelable value binding. allowFree (default) accepts off-list typed values so classics/kit cars are never blocked; allowFree:false for closed lists (US states) snaps back to a valid option on blur. Foundation for replacing native <select> chrome with inputs that match our text fields. 17/17 tests pass. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
51 lines
2.4 KiB
Markdown
51 lines
2.4 KiB
Markdown
# SwitchEV — Shared
|
|
|
|
## Jira Workflow
|
|
All work in this repo should reference the relevant Jira ticket (project: `SEV`). Mention the ticket key in commit messages and PR titles (e.g. `SEV-23: Build shared validation schemas`). Quick fixes with no ticket are fine — just proceed directly.
|
|
|
|
**Relevant Epics (use as parent when creating new tickets):**
|
|
- **SEV-7** — Backend API & Database *(primary — shared Go packages, validation, types)*
|
|
- **SEV-6** — Authentication & User Management *(shared auth constants, role definitions)*
|
|
|
|
**JQL shortcut:** `project = SEV AND parent in (SEV-7, SEV-6) ORDER BY status`
|
|
|
|
Use the Jira MCP tools (`mcp__atlassian-switchev__jira_*`) to search, create, and update tickets directly.
|
|
|
|
## Project
|
|
SwitchEV is an EV conversion marketplace. This repo contains shared constants, validation schemas, and type definitions used across the api/ and frontend sites.
|
|
|
|
## Purpose
|
|
- Shared constants (roles, statuses, tiers, specialties)
|
|
- Validation schemas (reusable between frontend and API)
|
|
- Type definitions
|
|
|
|
## Usage
|
|
Keep this package minimal. Only add code here if it is genuinely shared between multiple repos.
|
|
|
|
## Git Hosting & CI/CD
|
|
- **Gitea:** `git.debyl.io/SwitchEV/shared` — PRs, code review
|
|
- **MCP:** Use the `gitea-personal` MCP server at `git.debyl.io` for PRs and all Gitea operations; fallback is `tea` CLI
|
|
- **CI:** No Gitea Actions workflow — shared library; tests run in consuming repos (api)
|
|
|
|
### Git Workflow
|
|
1. Create a working branch off main, make changes, commit, and push
|
|
2. Create a PR via the `gitea-personal` MCP (or `tea` CLI as fallback)
|
|
3. Wait for CI to pass (if applicable)
|
|
4. Ask the user for code review before merging
|
|
5. Merge the PR (remote branch is auto-deleted)
|
|
6. Locally: `git checkout main && git pull && git fetch --prune`
|
|
|
|
### tea CLI Reference (fallback)
|
|
```bash
|
|
tea pr create --repo SwitchEV/shared --login git.debyl.io --head <branch> --base main --title "Title" --description "Body"
|
|
tea pr list --repo SwitchEV/shared --login git.debyl.io
|
|
tea pr merge --repo SwitchEV/shared --login git.debyl.io <PR#> --style merge
|
|
```
|
|
|
|
### Branch Protection
|
|
Main branch is protected via Gitea:
|
|
- Direct push to main is blocked — all changes go through PRs
|
|
- No required approvals (single-maintainer repo)
|
|
- **Auto-delete branch after merge** is enabled — remote branches are cleaned up automatically
|
|
- Locally, `git fetch --prune` cleans up stale remote-tracking branches
|