Repository navigation
PowerNight 2.0.0 - Mobile UI & Task preset feature #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
9ef66a1
deps: upgrade frontend dependencies to latest versions
manuelgruber d87bdf5
feat: add TaskPreset database model, service, and built-in seed data
manuelgruber aeeb7ec
feat: add task preset REST API endpoints
manuelgruber eeb15e9
feat: add task preset UI and improve responsive layout
manuelgruber 61f403f
Add security remediation plan documenting findings and phased fix app…
manuelgruber 5d11973
Add UX improvement roadmap to docs/plans
manuelgruber aa1083c
Update all dependencies to latest across backend, frontend, and CI
manuelgruber d4f913b
Read app version from __version__ in API endpoints to prevent drift
manuelgruber dd28a79
Stabilize app: remove dead/fictional code, fix config/resilience/conc…
manuelgruber 1b41990
Make authentication optional to support trusted LAN deployments
manuelgruber 85ecc7f
Add shared Conductor repository scripts and defaults.
manuelgruber e01c14f
Add reconnect regression tests to protect scheduled task recovery
manuelgruber 6ddf909
Update dependencies to keep PowerNight current and supported
manuelgruber f3b8122
Fix authentication boundaries to keep Tesla setup accessible
manuelgruber 6800495
Fix Tesla cloud recovery to restore reliable task execution
manuelgruber 715d6a7
Separate runtime overrides to keep secrets out of saved settings
manuelgruber ecc8175
Restore TypeScript checks to catch frontend errors in CI
manuelgruber 8e28340
Handle preset name conflicts to avoid SQL leaks and server errors
manuelgruber 576f7ec
Decouple cached connection status to keep health checks responsive
manuelgruber 06c027d
Serialize Powerwall operations to prevent reconnect command failures
manuelgruber 4aab589
Stage versioned releases to keep latest behind canary validation
manuelgruber 1a6b821
Add Compose smoke checks to verify upgrades and persistence
manuelgruber 51ef6d1
Document 2.0.0 rollout to make release and rollback repeatable
manuelgruber 824fd93
Fix Powerwall reads to prevent deadlocks and stale cache renewal
manuelgruber 1d07d25
Protect persisted credentials to prevent accidental exposure
manuelgruber 560859b
Validate API requests to keep errors predictable and private
manuelgruber c628186
Fix dashboard polling and dialogs to keep the UI responsive
manuelgruber 00876ad
Harden release tooling to validate versioned 2.0.0 rollouts
manuelgruber 5e1ef8c
Protect configuration recovery to keep runtime credentials private
manuelgruber 2d2ca28
Preserve partial status and polling to keep the dashboard responsive
manuelgruber 627bf43
Validate preset times and metadata to keep API responses reliable
manuelgruber 39d326f
Align release tooling and docs to keep validation reproducible
manuelgruber c9cf497
Install build dependencies in CI to keep release builds working
manuelgruber cc61a74
Format command errors with wire values to keep messages readable
manuelgruber File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| "$schema" = "https://conductor.build/schemas/settings.repo.schema.json" | ||
|
|
||
| # PowerNight serves the built React UI from Flask. Preview opens the active | ||
| # workspace's web interface (health: /health). | ||
| [[preview_urls]] | ||
| name = "PowerNight" | ||
| url = "http://localhost:$CONDUCTOR_PORT" | ||
|
|
||
| [scripts] | ||
| # Matches CI: editable Python install + locked npm deps, then frontend build. | ||
| # Creates workspace-local data/logs and seeds .env from the example when missing. | ||
| setup = '''pip install -e ".[dev]" && npm ci && mkdir -p data logs && (test -f .env || cp .env.example .env) && ./build.sh --no-docker --skip-validation''' | ||
|
|
||
| # Dev servers are workspace-local; SQLite lives under ./data with no Docker services. | ||
| archive = "echo 'PowerNight uses workspace-local SQLite under ./data; no external resources to clean up.'" | ||
|
|
||
| # Backend (Flask) and Vite dev server can run side by side in different workspaces. | ||
| run_mode = "concurrent" | ||
|
|
||
| # Full app: Flask API + built React assets. POWERNIGHT_WEB_PORT maps to CONDUCTOR_PORT. | ||
| [scripts.run.app] | ||
| command = "POWERNIGHT_DATA_PATH=$PWD/data POWERNIGHT_WEB_PORT=$CONDUCTOR_PORT python -m powernight.main" | ||
| available_in = ["local"] | ||
| default = true | ||
| icon = "zap" | ||
|
|
||
| # Frontend hot-reload uses the next allocated port and proxies to this workspace API. | ||
| [scripts.run.ui] | ||
| command = "POWERNIGHT_API_PROXY_TARGET=http://127.0.0.1:$CONDUCTOR_PORT npm run dev -- --port $((CONDUCTOR_PORT + 1)) --strictPort" | ||
| icon = "layout" | ||
| available_in = ["local"] | ||
|
|
||
| # Quick backend verification (same pytest scope as CI). | ||
| [scripts.run.test-backend] | ||
| command = 'pytest -q -m "not slow"' | ||
| icon = "test-tube" | ||
|
|
||
| # Frontend unit tests (vitest, one-shot). | ||
| [scripts.run.test-frontend] | ||
| command = "npm run test:run" | ||
| icon = "braces" |
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| # PowerNight environment configuration | ||
| # Copy to .env and fill in real values; docker-compose reads this file. | ||
|
|
||
| # OPTIONAL: API key protecting the web interface and API. Leave unset for a | ||
| # trusted-LAN deployment. Any nonempty key automatically enables authentication. | ||
| # Generate a strong key with: openssl rand -hex 32 | ||
| # POWERNIGHT_API_KEY= | ||
|
|
||
| # Optional explicit switch. Setting this to true without a key (or complete | ||
| # username/password configuration) makes startup fail closed. | ||
| # POWERNIGHT_AUTH_ENABLED=true | ||
|
|
||
| # Tesla account email used for the Powerwall cloud connection | ||
| TESLA_EMAIL= | ||
|
|
||
| # Optional overrides | ||
| # LOG_LEVEL=INFO | ||
| # AUTOMATION_ENABLED=true | ||
| # Vite-only development proxy (export in the shell; .env is for Compose): | ||
| # export POWERNIGHT_API_PROXY_TARGET=http://127.0.0.1:8020 | ||
| # Flask generates and persists /data/.flask_secret automatically. | ||
| # To override it, explicitly pass FLASK_SECRET_KEY in a custom Compose override. |
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,80 @@ | ||
| name: CI | ||
|
|
||
| on: | ||
| pull_request: | ||
| push: | ||
| branches: [main] | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| backend: | ||
| name: Backend (pytest + ruff) | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
|
|
||
| - name: Set up Python | ||
| uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 | ||
| with: | ||
| python-version: "3.14" | ||
| cache: pip | ||
|
|
||
| - name: Install dependencies | ||
| run: pip install -e ".[dev]" | ||
|
|
||
| - name: Ruff (syntax errors and undefined names) | ||
| run: ruff check src/ tests/ --select E9,F63,F7,F82 | ||
|
|
||
| - name: Run tests | ||
| run: pytest -q -m "not slow" --cov=src/powernight --cov-report=term | ||
|
|
||
| frontend: | ||
| name: Frontend (lint + type-check + vitest + build) | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
|
|
||
| - name: Set up Node | ||
| uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 | ||
| with: | ||
| node-version: '26' | ||
| cache: npm | ||
|
|
||
| - name: Install dependencies | ||
| run: npm ci | ||
|
|
||
| - name: Lint | ||
| run: npm run lint | ||
|
|
||
| - name: Type check | ||
| run: npm run type-check | ||
|
|
||
| - name: Unit tests | ||
| run: npm run test:run | ||
|
|
||
| - name: Build | ||
| run: npm run build | ||
|
|
||
| mypy: | ||
| name: Type check backend (informational) | ||
| runs-on: ubuntu-latest | ||
| continue-on-error: true | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
|
|
||
| - name: Set up Python | ||
| uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 | ||
| with: | ||
| python-version: "3.14" | ||
| cache: pip | ||
|
|
||
| - name: Install dependencies | ||
| run: pip install -e ".[dev]" | ||
|
|
||
| - name: mypy | ||
| run: mypy src/ | ||
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.