Skip to content

Commit b24aeeb

Browse files
committed
feat(app): add localization and dashboard polish
- add Italian and Chinese locale support across the app shell, settings, widgets, and energy surfaces - add reusable overlay scroll area behavior and room navigation scrollbar polish - improve Home Assistant connection handling and dashboard/store coverage - update docs and package metadata for the expanded app behavior
1 parent 81c134e commit b24aeeb

42 files changed

Lines changed: 4257 additions & 458 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

AGENTS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ style paths in Storybook configuration.
5858

5959
```
6060
src/app/
61-
features/ # 17+ domain modules — each owns its hooks, stores, components
61+
features/ # 16 domain modules — each owns its hooks, stores, components
6262
components/
6363
ui/ # Radix UI wrappers (buttons, dialogs, selects …)
6464
layout/ # Header, sidebar, navigation
@@ -260,7 +260,7 @@ copy all service state on every event.
260260
- Pushes to `main` publish only developer app images: `ghcr.io/awesomestvi/navet:dev` and `sha-*`.
261261
- Manual Publish workflow runs are for developer hardware testing and default to the `dev` app image tag.
262262
- Public beta app images publish only from `v*-alpha.*`, `v*-beta.*`, and `v*-rc.*` tags. They update the exact tag, `beta`, `latest`, and `sha-*`.
263-
- Home Assistant add-on images do not publish on every `main` push. They publish on manual workflow runs as `dev` or on public beta tags as add-on version, `beta`, `latest`, and `sha-*`.
263+
- Home Assistant add-on images publish `dev` and `sha-*` on `main` pushes or manual workflow runs, and add-on version, `beta`, `latest`, and `sha-*` on public beta tags.
264264
- There is no stable channel yet. Treat `latest` as the current public beta compatibility tag because existing users already consume it.
265265

266266
---

CONTRIBUTING.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,11 @@ This project adheres to a code of conduct. By participating, you are expected to
5353
pnpm dev
5454
```
5555

56+
Open the URL Vite prints, usually `http://localhost:5173`. For live Home Assistant testing,
57+
enter your Home Assistant URL and long-lived access token in the onboarding screen. Normal source
58+
development does not require copying `.env.example`; the repo-root `.env` flow is for
59+
Docker/add-on runtime defaults and production-style preview work.
60+
5661
## 💻 Development Process
5762

5863
### Branch Strategy
@@ -100,7 +105,8 @@ This project adheres to a code of conduct. By participating, you are expected to
100105

101106
### CI and local checks
102107

103-
Pull requests and pushes to `main` run **GitHub Actions** (`.github/workflows/ci.yml`) in this order:
108+
Pull requests and all branch pushes run **GitHub Actions** (`.github/workflows/ci.yml`) in this
109+
order:
104110

105111
1. `pnpm check` — Biome lint and format
106112
2. `pnpm check:stories` — Storybook title and ownership rules
@@ -109,7 +115,9 @@ Pull requests and pushes to `main` run **GitHub Actions** (`.github/workflows/ci
109115
5. `pnpm test` — Vitest unit tests
110116
6. `pnpm build` — production Vite build
111117

112-
Before opening a PR, run the same sequence locally (or at minimum `pnpm check`, `pnpm check:ui-kit`, `pnpm typecheck`, and `pnpm test`) so CI stays green.
118+
Before opening a PR, run the relevant fast checks for the area you changed, such as `pnpm check`,
119+
`pnpm check:stories`, `pnpm check:ui-kit`, `pnpm typecheck`, and `pnpm test`. CI remains the
120+
source of truth for the production `pnpm build` step.
113121

114122
[Dependabot](.github/dependabot.yml) opens weekly PRs for npm dependency updates; review them for breaking changes before merge.
115123

@@ -205,9 +213,9 @@ The current hook split is:
205213
- enforces the Conventional Commit format: `type(scope): summary`
206214
- `pre-commit`
207215
- `pnpm check:lockfile` to keep `package.json` and `pnpm-lock.yaml` in sync
208-
- `pnpm check` for Biome lint/format issues
209-
- `pnpm check:stories` for Storybook title conventions, primitive/pattern story coverage, and colocated story ownership
210-
- `pnpm check:ui-kit` for shared UI boundary rules
216+
- `pnpm check` for Biome lint/format issues
217+
- `pnpm check:stories` for Storybook title conventions, primitive/pattern story coverage, and colocated story ownership
218+
- `pnpm check:ui-kit` for shared UI boundary rules
211219
- `pre-push`
212220
- `pnpm typecheck`
213221
- `pnpm test`

README.md

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,10 @@ volumes:
165165
navet-data:
166166
```
167167

168+
`latest` tracks the current public beta tag. Pushes to `main` publish developer images as `dev` and
169+
`sha-*`, so production-style deployments should use `latest`, `beta`, or a specific prerelease tag
170+
instead of expecting `main` to update `latest`.
171+
168172
Start Navet:
169173

170174
```bash
@@ -202,8 +206,8 @@ Use the source workflow when developing Navet, testing changes, or contributing
202206

203207
- Node.js `^20.19.0` or `>=22.12.0`
204208
- `pnpm`
205-
- A running Home Assistant instance
206-
- A Home Assistant long-lived access token
209+
- A running Home Assistant instance only when testing live Home Assistant behavior
210+
- A Home Assistant long-lived access token only when connecting the local app to that instance
207211

208212
### Install
209213

@@ -213,28 +217,20 @@ cd navet
213217
pnpm install
214218
```
215219

216-
### Configure Home Assistant
217-
218-
Create `.env` from the example file:
219-
220-
```bash
221-
cp .env.example .env
222-
```
223-
224-
Set your Home Assistant URL and token:
225-
226-
```env
227-
NAVET_HASS_URL=http://your-home-assistant:8123
228-
NAVET_HASS_TOKEN=your-long-lived-access-token
229-
```
230-
231220
### Start the app
232221

233222
```bash
234223
pnpm dev
235224
```
236225

237-
Open the URL Vite prints, usually `http://localhost:5173`.
226+
Open the URL Vite prints, usually `http://localhost:5173`. For live Home Assistant testing, enter
227+
your Home Assistant URL and long-lived access token in the onboarding screen. The local app stores
228+
that session in browser storage, so contributors do not need a repo-root `.env` file for normal
229+
development.
230+
231+
Use `.env.example` only when you need runtime defaults for Docker, add-on, or production-style
232+
preview flows. `NAVET_HASS_URL` and `NAVET_HASS_TOKEN` are deployment/runtime values, not required
233+
source setup.
238234

239235
For a production-style local preview:
240236

@@ -246,12 +242,15 @@ pnpm preview
246242

247243
```bash
248244
pnpm dev
249-
pnpm typecheck
250-
pnpm check
245+
pnpm check:stories
246+
pnpm check:ui-kit
251247
pnpm test
252248
pnpm storybook
253249
```
254250

251+
CI also runs `pnpm check`, `pnpm typecheck`, and `pnpm build`. Follow the repository instructions for
252+
when to run those locally.
253+
255254
### Project docs
256255

257256
- [docs/README.md](docs/README.md): active documentation index

addons/navet-dev/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
# Navet Dev Home Assistant Add-on
22

3-
This add-on serves the latest manually published Navet development image through Home Assistant
4-
Ingress. It is intended for testing changes before they are released through the regular `Navet`
5-
add-on.
3+
This add-on serves the latest Navet development image through Home Assistant Ingress. It is intended
4+
for testing changes before they are released through the regular `Navet` add-on.
65

76
The image is pulled from GitHub Container Registry using the `dev` tag:
87

98
```text
109
ghcr.io/awesomestvi/{arch}-navet-addon:dev
1110
```
1211

13-
Publish a fresh dev image by running the **Publish Home Assistant Add-on** GitHub Actions workflow
14-
manually, then refresh the add-on repository in Home Assistant and rebuild or reinstall this add-on.
12+
Fresh dev images publish on `main` pushes and can also be published by running the **Publish Home
13+
Assistant Add-on** GitHub Actions workflow manually. After publishing, refresh the add-on repository
14+
in Home Assistant and rebuild or reinstall this add-on.
1515

1616
## Configuration
1717

addons/navet/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ This add-on serves the Navet frontend through Home Assistant Ingress.
44

55
[![Open your Home Assistant instance and show the add add-on repository dialog with a specific repository URL pre-filled.](https://my.home-assistant.io/badges/supervisor_add_addon_repository.svg)](https://my.home-assistant.io/redirect/supervisor_add_addon_repository/?repository_url=https%3A%2F%2Fgithub.com%2Fawesomestvi%2Fnavet)
66

7-
The Home Assistant add-on now pulls a prebuilt container image from GitHub Container Registry instead of relying on committed frontend build artifacts in `addons/navet/www/`.
7+
The Home Assistant add-on pulls a prebuilt container image from GitHub Container Registry instead
8+
of relying on checked-in frontend assets inside the add-on directory.
89

910
The image is built from the repository root in CI, which allows the add-on image to compile the frontend directly from source while still keeping the add-on metadata in `addons/navet/`.
1011

design-system/FEATURES.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ coverage is expected to exist.
99
Current active feature folders under
1010
[`src/app/features/`](../src/app/features):
1111

12-
- `auth`
1312
- `calendar`
1413
- `climate`
1514
- `dashboard`
@@ -313,12 +312,15 @@ Vitest is the preferred path for:
313312
Current co-located `__tests__/` directories:
314313

315314
- `src/app/components/layout/__tests__/`
315+
- `src/app/components/primitives/__tests__/`
316316
- `src/app/components/shared/theme/__tests__/`
317317
- `src/app/components/system/tokens/__tests__/`
318318
- `src/app/features/calendar/components/calendar/__tests__/`
319+
- `src/app/features/climate/utils/__tests__/`
319320
- `src/app/features/dashboard/components/__tests__/`
320321
- `src/app/features/dashboard/hooks/__tests__/`
321322
- `src/app/features/dashboard/stores/__tests__/`
323+
- `src/app/features/dashboard/utils/__tests__/`
322324
- `src/app/features/energy/components/dashboard/__tests__/`
323325
- `src/app/features/energy/components/energy-setup-wizard/__tests__/`
324326
- `src/app/features/energy/services/__tests__/`
@@ -328,10 +330,16 @@ Current co-located `__tests__/` directories:
328330
- `src/app/features/media/components/media-card/__tests__/`
329331
- `src/app/features/media/components/media/__tests__/`
330332
- `src/app/features/rss/components/rss-feed-card/__tests__/`
333+
- `src/app/features/security/components/__tests__/`
334+
- `src/app/features/security/components/cover-card/__tests__/`
335+
- `src/app/features/security/utils/__tests__/`
331336
- `src/app/features/tasks/components/__tests__/`
332337
- `src/app/features/tasks/utils/__tests__/`
333338
- `src/app/features/vacuum/components/vacuum/__tests__/`
334339
- `src/app/hooks/__tests__/`
340+
- `src/app/hooks/device-mappers/__tests__/`
341+
- `src/app/services/__tests__/`
342+
- `src/app/session/__tests__/`
335343
- `src/app/stores/__tests__/`
336344
- `src/app/utils/__tests__/`
337345

docs/DOCKER_HOME_ASSISTANT_ADDON.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -111,13 +111,14 @@ Then open `http://localhost:8080`.
111111

112112
### Release Pipeline
113113

114-
The GitHub Actions publish workflow publishes a multi-arch image to GitHub Container Registry on pushes to `main`, and it can also be run manually:
114+
The GitHub Actions publish workflow publishes multi-arch app images to GitHub Container Registry:
115115

116-
- `ghcr.io/<owner>/navet:main`
117-
- `ghcr.io/<owner>/navet:sha-<commit>`
118-
- `ghcr.io/<owner>/navet:latest`
116+
- pushes to `main`: `ghcr.io/<owner>/navet:dev` and `ghcr.io/<owner>/navet:sha-<commit>`
117+
- public prerelease tags (`v*-alpha.*`, `v*-beta.*`, `v*-rc.*`): exact tag, `beta`, `latest`, and `sha-*`
118+
- manual workflow runs: the requested developer tag, defaulting to `dev`, plus `sha-*`
119119

120-
Manual dispatch can still publish an additional version tag such as `0.1.0-beta.3`.
120+
`latest` is the current public beta compatibility tag. It is updated by prerelease tags, not by
121+
ordinary `main` pushes.
121122

122123
### GHCR Deployment
123124

@@ -183,7 +184,7 @@ Assistant pulls `ghcr.io/awesomestvi/{arch}-navet-addon:dev`.
183184
Typical flow:
184185

185186
1. Push changes to the repository
186-
2. Merge or push to `main` and wait for **Publish Home Assistant Add-on** to publish the `dev` image
187+
2. Merge or push to `main`, or manually run **Publish Home Assistant Add-on**, and wait for it to publish the `dev` image
187188
3. In Home Assistant, open Settings -> Add-ons -> Add-on Store
188189
4. Refresh the custom add-on repository
189190
5. Open the `Navet Dev` add-on
@@ -257,7 +258,7 @@ The current add-on still expects explicit Home Assistant connection details. It
257258

258259
## CI Pipeline
259260

260-
The CI workflow runs on pushes to `main` and on pull requests. It currently:
261+
The CI workflow runs on all branch pushes and pull requests. It currently:
261262

262263
1. Installs dependencies with the pinned `pnpm`
263264
2. Runs `pnpm check`

docs/ROADMAP.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ Planned and in-progress features. Check off items as they ship. Add new ideas to
5555

5656
- [x] **Public demo mode**`/demo` renders a generated smart home environment with bundled assets and no Home Assistant connection, suitable for public previews without exposing private instances or tokens
5757
- [x] **Public launch deployment hardening** — Docker and Home Assistant add-on deployments share nginx security headers; runtime config keeps Home Assistant tokens server-only; RSS proxying, imported dashboard config, external URLs, and custom button service calls validate public-facing inputs
58-
- [x] **Home Assistant add-on image publishing** — add-on CI/CD builds pull request images and publishes `main` branch images to GHCR for supported architectures
58+
- [x] **Home Assistant add-on image publishing** — add-on CI/CD publishes `dev` images from `main` and manual workflow runs, plus versioned public beta images for supported architectures
5959
- [x] **Automation management** — Tasks section lists Home Assistant automations, shows active/disabled filters, displays last-run metadata and read-only config details, and supports trigger plus enable/disable actions
6060
- [x] **Security camera dashboard** — dedicated security camera dashboard model and view with camera live viewing support, entity mapping, stories, and tests
6161
- [x] **Energy history** — per-device and per-source consumption over time with Home Assistant Energy prefs, recorder statistics, source diagnostics, tracked-device sparklines, and drill-down to individual appliances

docs/VERSIONING.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,16 +55,17 @@ Recommended lightweight flow:
5555

5656
1. Decide whether the change is `patch`, `minor`, or `beta prerelease`.
5757
2. Bump `package.json`.
58-
3. If the release meaning changed, update this file.
59-
4. Tag the commit with `v<version>`, for example `v0.1.1-beta.1`.
60-
5. Push the tag to GitHub to trigger [.github/workflows/github-release.yml](../.github/workflows/github-release.yml).
61-
6. If needed, manually run the container publish workflows for matching image tags.
58+
3. For add-on releases, bump `addons/navet/config.yaml` and update `addons/navet/CHANGELOG.md`.
59+
4. If the release meaning changed, update this file.
60+
5. Tag the commit with a prerelease tag such as `v0.1.1-beta.1`.
61+
6. Push the tag to GitHub to trigger [.github/workflows/github-release.yml](../.github/workflows/github-release.yml), app image publishing, and add-on image publishing.
62+
7. For developer hardware testing before a public tag, manually run the publish workflows with the `dev` tag.
6263

6364
## GitHub Releases
6465

65-
- Tags matching `v*` create a GitHub Release automatically.
66-
- Tags containing `-beta.`, `-alpha.`, or `-rc.` are published as GitHub prereleases.
67-
- Stable tags such as `v0.1.0` are published as normal releases.
66+
- Prerelease tags matching `v*-alpha.*`, `v*-beta.*`, or `v*-rc.*` create a GitHub Release automatically.
67+
- The current release workflow marks those releases as prereleases.
68+
- Stable `v*` tags are not part of the current automated workflow; add one deliberately when Navet has a stable channel.
6869

6970
## Stable Exit
7071

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -67,16 +67,16 @@
6767
},
6868
"devDependencies": {
6969
"@biomejs/biome": "^2.4.15",
70-
"@storybook/addon-a11y": "^10.3.6",
71-
"@storybook/addon-docs": "10.3.6",
72-
"@storybook/addon-vitest": "^10.3.6",
73-
"@storybook/react": "10.3.6",
74-
"@storybook/react-vite": "^10.3.6",
70+
"@storybook/addon-a11y": "^10.4.0",
71+
"@storybook/addon-docs": "10.4.0",
72+
"@storybook/addon-vitest": "^10.4.0",
73+
"@storybook/react": "10.4.0",
74+
"@storybook/react-vite": "^10.4.0",
7575
"@tailwindcss/vite": "4.3.0",
7676
"@testing-library/jest-dom": "^6.9.1",
7777
"@testing-library/react": "^16.3.2",
7878
"@types/leaflet": "^1.9.21",
79-
"@types/node": "^25.8.0",
79+
"@types/node": "^25.9.0",
8080
"@types/react": "^19.2.14",
8181
"@types/react-dom": "^19.2.3",
8282
"@vitejs/plugin-react": "6.0.2",
@@ -88,7 +88,7 @@
8888
"storybook": "^10.4.0",
8989
"tailwindcss": "4.3.0",
9090
"typescript": "^6.0.3",
91-
"vite": "8.0.12",
91+
"vite": "8.0.13",
9292
"vite-plugin-pwa": "^1.3.0",
9393
"vitest": "^4.1.6"
9494
},

0 commit comments

Comments
 (0)