Skip to content

feat: dynamic carrier list via get_carriers service + frontend UX improvements#27

Merged
WolffRuoff merged 2 commits into
mainfrom
feat/get-carriers-service-and-ux
Mar 14, 2026
Merged

feat: dynamic carrier list via get_carriers service + frontend UX improvements#27
WolffRuoff merged 2 commits into
mainfrom
feat/get-carriers-service-and-ux

Conversation

@WolffRuoff
Copy link
Copy Markdown
Owner

Summary

  • Dynamic carrier list — new GET /api/carriers scraper endpoint (derived from CARRIER_PROVIDERS) + get_carriers HA service (SupportsResponse.ONLY); coordinator lazily fetches and caches on first poll; frontend carrier dropdown now calls get_carriers on load instead of hardcoding USPS/UPS/FedEx
  • SpeedX in services.yaml — adds SpeedX to the carrier selector in Dev Tools; fixes services description to mention SpeedX
  • Frontend UX — loading bar animation on submit, Enter-key submits form, success message auto-clears after 3 s, click-to-copy tracking number with "Copied!" flash, last-updated timestamp shown per package row
  • CLAUDE.md trimmed — removed sections derivable from source (build commands, REST API list, config flow details, etc.); kept philosophy, gotchas, and non-obvious conventions
  • Testssupported_carriers = [] on __new__-created coordinator fixtures; async_get_carriers default mock in conftest

Test plan

  • make test passes with no regressions
  • Scraper /api/carriers returns [{id, name}, ...] for all carriers
  • get_carriers service returns the same list in HA Dev Tools
  • Add Package card carrier dropdown shows all carriers from scraper dynamically (not hardcoded)
  • Form submits on Enter key press
  • Loading bar appears while submit is in flight
  • Success banner clears after ~3 s
  • Tracking number click copies to clipboard and shows "Copied!" momentarily
  • Package row shows "Updated: ..." timestamp

🤖 Generated with Claude Code

WolffRuoff and others added 2 commits March 14, 2026 09:10
…rovements

- Add GET /api/carriers scraper endpoint derived from CARRIER_PROVIDERS
- Add async_get_carriers() to ScraperApiClient
- Coordinator lazily fetches supported carriers on first poll (non-fatal)
- Add get_carriers SupportsResponse.ONLY service callable from frontend
- Frontend carrier dropdown populated dynamically from get_carriers service
- Add SpeedX to services.yaml carrier selector and fix services description
- Add loading bar animation, Enter-key submit, auto-clear success message
- Click-to-copy tracking number with "Copied!" feedback
- Show last-updated timestamp per package row
- Trim CLAUDE.md to non-derivable content only
- Update tests: supported_carriers fixture init, async_get_carriers mock

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
hassfest does not recognize the `response:` key in services.yaml.
Response behavior is controlled via SupportsResponse.ONLY in Python.
Added required `fields: {}` key to match hassfest schema expectations.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@WolffRuoff WolffRuoff merged commit a6006a5 into main Mar 14, 2026
5 checks passed
@WolffRuoff WolffRuoff deleted the feat/get-carriers-service-and-ux branch March 14, 2026 13:53
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