Add `created_at: Option<DateTime<Utc>>` through all layers so CLI users
can backdate entities at creation/update time. When omitted, falls back
to `Utc::now()`.
- Domain: add field to all New*/Update* structs with serde(default)
- Domain: timeline events use entity created_at instead of Utc::now()
- Repos: unify INSERT to explicit Rust-side created_at with unwrap_or_else
- Repos: add created_at to UPDATE dynamic query builders
- Routes: add field to submission structs and has_changes guards
- Clients: pass created_at through manual JSON client methods
- CLI: add --created-at flag with parse_created_at helper (RFC 3339 or YYYY-MM-DD)
- Add reset() method to BackupService that deletes all 8 coffee tables
in a transaction, respecting FK constraint order
- Add POST /api/v1/backup/reset endpoint (requires auth)
- Add "Reset Database" button with double-confirmation to account page
- Stack data buttons vertically on mobile for better layout
Native change events from child inputs were bubbling up and reaching
data-on:change handlers, which expect only the CustomEvent with
evt.detail. Capture and stop native change events so only the
component's own CustomEvent propagates.
The check-in handler was calling cafe_repo.insert() and
cup_repo.insert() directly, bypassing the service layer that records
timeline events. Switch to cafe_service.create() and
cup_service.create() so cafes and cups created via check-in appear on
the timeline.
Add timeline tests for cups (existing cafe, new cafe) and brews to
prevent this regression.
The container image is tagged with the package version from flake.nix,
not the git short hash. Read the version from Cargo.toml so the
docker tag command references the correct source image.
- Add autoPatchelfHook to patch RPATH in the output binary so it can
find libssl and libcrypto at runtime
- Add stdenv.cc.cc.lib to buildInputs to satisfy libgcc_s.so.1
dependency during auto-patchelf
- Move LD_LIBRARY_PATH from devShell to the package so test binaries
can find libssl during checkPhase (before patchelf runs)
* build(deps): bump axum from 0.7.9 to 0.8.8
Bumps [axum](https://github.com/tokio-rs/axum) from 0.7.9 to 0.8.8.
- [Release notes](https://github.com/tokio-rs/axum/releases)
- [Changelog](https://github.com/tokio-rs/axum/blob/main/CHANGELOG.md)
- [Commits](https://github.com/tokio-rs/axum/compare/axum-v0.7.9...axum-v0.8.8)
---
updated-dependencies:
- dependency-name: axum
dependency-version: 0.8.8
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
* fix(deps): adapt code for axum 0.8 and tower-cookies 0.11
- Bump tower-cookies 0.10 → 0.11 (requires axum-core 0.5 / axum 0.8)
- Remove axum::async_trait usage (axum 0.8 uses native async traits)
- Migrate route path params from :param to {param} syntax
* fix(deps): correct axum and tower version constraints
Dependabot updated the lockfile for axum 0.8 but left the Cargo.toml
constraint at "0.7", causing CI to resolve back to 0.7.9. It also
incorrectly downgraded tower from "0.5" to "0.4", creating a duplicate
tower version in the lockfile and trait mismatches with axum 0.8.
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jon Seager <jon@sgrs.uk>
clang and lld are build-time tools but were in buildInputs, causing
"cannot find ld" during compilation. Set LD_LIBRARY_PATH for openssl
so integration tests can find libssl.so.3 during the check phase.
- Add missing quick_notes column to restore_brews INSERT
- Add cups export/restore with CupRecord and BackupData field
- Bump backup version to 2; old v1 backups still restore via serde default
- Set a 30-second default timeout on the shared reqwest client so
future call sites can't hang indefinitely.
- Use ensure_page_within() to clamp the page before querying instead
of fetching, detecting an empty result, and re-fetching.
The same ~250-character inline onclick handler was copy-pasted across
all 7 list templates. Extract it into a toggleRow() function in
base.html and replace the inline copies with a single call.
Add list_all() to PasskeyCredentialRepository so auth_start and
auth_finish fetch all credentials in a single query instead of
looping through every user with a per-user query.
- Add [profile.release] with thin LTO and symbol stripping
- Configure lld linker via .cargo/config.toml for faster linking
- Add clang and lld to Nix devShell
- Add defer attribute to component script tags to unblock HTML parsing
- Add CompressionLayer with gzip to the middleware stack
- Add Cache-Control: public, max-age=604800 (1 week) to all static
asset routes (CSS, JS, favicons)
- Enable WAL journal mode for concurrent reads during writes
- Set synchronous=NORMAL, cache_size=8MB, temp_store=MEMORY, busy_timeout=5s
- Add indexes on brews.grinder_id, brews.brewer_id, brews.filter_paper_id
to speed up the 6-table brew list JOIN
- Gitignore WAL sidecar files (*.db-shm, *.db-wal)
The create_brew handler returned a #brew-list fragment for all Datastar
requests, but that element only exists on the brews data page. Requests
from the homepage or timeline now get a reload-script response instead,
fixing the PatchElementsNoTargetsFound error.
BREWLOG_ADMIN_USERNAME and BREWLOG_ADMIN_PASSWORD were referenced in
docs but never used in the codebase (WebAuthn-only auth). Replace with
the new BREWLOG_INSECURE_COOKIES variable.
Reject non-http(s) URL schemes (javascript:, data:, etc.) in both
NewRoaster::normalize() and new UpdateRoaster::normalize(). The HTML
input type="url" provides browser-side validation, but the API path
had no server-side check.
GearCategory is a Rust enum so this was not exploitable, but the
format!() pattern is a code smell. Use a match returning &'static str
literals instead for consistency with the rest of the parameterised
query codebase.
- Await session DB insert before setting cookie, preventing orphaned sessions
- Invert cookie Secure default: now on by default, opt out via
BREWLOG_INSECURE_COOKIES=true for local HTTP development
- Add Content-Security-Policy, X-Frame-Options, X-Content-Type-Options,
Referrer-Policy, and Strict-Transport-Security response headers
- Set explicit 5 MB request body size limit via RequestBodyLimitLayer
- Enable tower-http "limit" and "set-header" features
Only persist theme to localStorage when the user's choice differs from
the OS preference. Clear it when they match so the prefers-color-scheme
listener remains active and automatically tracks system theme changes.
- Add brewlog-container package using dockerTools.buildImage
- Include cacert for TLS with /etc/ssl/certs and /bin linked
- Run as uid/gid 1000 with database at /data/brewlog.db
- Document Docker usage in README
- Create light (orange-700) and dark (orange-600) coffee cup SVG favicons
- Add explicit routes for both SVG variants
- Set correct favicon on initial load before body renders
- Swap favicon href on manual theme toggle
- Listen for OS prefers-color-scheme changes when no manual override set