Commit graph

24 commits

Author SHA1 Message Date
Jon Seager
9ceb1a2b69
feat(timeline): add expand/collapse all toggle per month
- Add "Expand all" / "Collapse all" link under each month heading
- Individual cards remain toggleable even when month is expanded
- Three signals coordinate state: _expandedMonths (month-level),
  _expandedCard (single card), _collapsedCards (individual overrides)
2026-02-07 11:03:52 +00:00
Jon Seager
b774f356e6
feat(timeline): add collapsible cards with condensed view
Cards start collapsed showing category, relative date, title, and
subtitle. Clicking expands to reveal full timestamp, detail rows,
tasting notes, and external links. Uses a single Datastar signal
for expand state.

- Replace pill badge with small-caps category label
- Remove brew-again button from timeline cards
- Replace @ separators with · in brew detail values
2026-02-07 10:55:21 +00:00
Jon Seager
9feb0e78c3
style: shorten field placeholder for bag descriptions 2026-02-07 10:41:12 +00:00
Jon Seager
577c0e39d3
feat(ui): add horizontal scrolling recent brews on homepage
- Load last 10 brews instead of 3, display in horizontal scroll
- Extract brew card into reusable partial with portrait layout
- Add grinder_model field to BrewView for compact card display
- Move brew-again button to top-right icon, truncate long names
2026-02-07 10:40:20 +00:00
Jon Seager
8410b46a11
feat(ui): add horizontal scrolling open bags on homepage
- Load all open bags instead of limiting to 3
- Replace grid layout with horizontal scroll container using snap
- Redesign bag cards as portrait layout with icon actions
- Add scrollbar-hide CSS utility and x_mark icon
2026-02-07 10:22:48 +00:00
Jon Seager
f9adc849c2
style: reformat checkin and home page templates 2026-02-07 09:48:37 +00:00
Jon Seager
e58ea5758f
feat(backup): add database reset action to account page
- 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
2026-02-07 08:45:30 +00:00
Jon Seager
47feedb273
refactor(ui): simplify navigation and page layouts
- Replace dropdown hamburger menu with inline icon buttons for add,
  theme toggle, account/login
- Move sign-out button to account page header
- Remove unused icons (home, hamburger, close, checkin, timeline,
  squares) and add plus icon
- Simplify data page header (remove inline add button, now in nav)
2026-02-07 08:43:05 +00:00
dependabot[bot]
ea4093b699
build(deps): bump askama from 0.12.1 to 0.15.4 (#7)
* build(deps): bump askama from 0.12.1 to 0.15.4

Bumps [askama](https://github.com/askama-rs/askama) from 0.12.1 to 0.15.4.
- [Release notes](https://github.com/askama-rs/askama/releases)
- [Commits](https://github.com/askama-rs/askama/compare/0.12.1...v0.15.4)

---
updated-dependencies:
- dependency-name: askama
  dependency-version: 0.15.4
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix(deps): adapt templates and tests for askama 0.15

- Migrate macro calls from {% call %} to {{ }} expression syntax (134 occurrences)
- Update test assertion for askama 0.15's numeric HTML entity encoding (&#38; vs &amp;)

---------

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>
2026-02-06 18:45:34 +00:00
Jon Seager
c4914d6ec6
feat(ui): redesign account page and style CLI callback page
- Add page header, card-wrapped sections, and surface-alt item cards
  to the account page for visual consistency with the rest of the app
- Style CLI callback page with centered icon + heading layout matching
  the login page, with dark-mode-safe colors
- Add dark mode variants to all error/success alerts on account page
- Add check_circle icon for CLI callback success state
2026-02-06 12:33:01 +00:00
Jon Seager
202dafb9b9
feat(scan): show cards for existing roasters/roasts during bag scan
After AI extraction, check if the roaster and roast already exist by
slug. When matched, show compact summary cards instead of full edit
forms. Each card has a "Change" link to revert to the form if the
match is wrong.

- Add match_existing_entities() for slug-based roaster/roast lookup
- Return _matched-roaster-id and _matched-roast-id signals from extraction
- Add submit_existing_roast() path to skip creation when roast exists
- Dynamic submit buttons: Save Roaster & Roast / Save Roast / Open Bag
- Hidden inputs bound to signals handle all form submission cleanly
2026-02-06 12:27:25 +00:00
Jon Seager
4a7b054de1
feat(brews): pre-select bag when clicking Brew on homepage bag card
- Add initial-value attribute to searchable-select web component
- Update bag card Brew link to pass bag_id query parameter to add page
- Thread bag_id through route handler and template to pre-select the bag
2026-02-06 10:53:42 +00:00
Jon Seager
d9d87ef849
fix(ui): remove redundant signal resets and default tables to newest-first
Remove inline signal reset chains before extraction (server already
returns all signals) and before reload (reload destroys signal store).
Change gear and bags default sort from Make/RoastDate to CreatedAt so
data tables show newest entries first.
2026-02-05 21:59:06 +00:00
Jon Seager
4e4ac30332
refactor(account): convert token creation from imperative JS to Datastar
Replace fetch/classList DOM manipulation with Datastar signals and @post.
Server now returns signal patches for Datastar requests while preserving
the JSON API for CLI usage.
2026-02-05 21:58:57 +00:00
Jon Seager
af13ee472a
fix: brew again on homepage should be instant without reload 2026-02-05 21:56:28 +00:00
Jon Seager
f1cdf75eaf
refactor(templates): replace manual JS with Datastar patterns
- Convert data.html search from manual fetch+debounce to Datastar @get
- Replace filterList() on checkin page with <searchable-select> component
- Convert account.html form show/hide from classList to data-show signals
- Rename _scanWaiting/_scanError to _extracting/_extractError for consistency
- Delete unused render_signals_fragment() and escape_html_attr() from support.rs
- Document Datastar vs JS guidelines in CLAUDE.md
2026-02-05 21:42:14 +00:00
Jon Seager
ba71bb69c5
style: update design of recent brew card 2026-02-05 21:20:38 +00:00
Jon Seager
8777ceb25b
fix(brews): carry over quick notes when using "Brew Again"
- Add quick_notes_raw field to BrewView with comma-separated form values
- Include quick_notes hidden input in all three brew-again forms
  (homepage, brew list desktop, brew list mobile)
2026-02-05 21:18:11 +00:00
Jon Seager
6b1d6a3187
fix(ui): tone down token-created success banner in dark mode
Add dark: variants for the green success banner on the account page
so it doesn't appear overly bright against the dark background.
Also tidy .gitignore to catch all .db and .db-journal files.
2026-02-05 21:06:42 +00:00
Jon Seager
709adcdd3e
fix(ui): tokenize neutral text colors for dark mode contrast
Replace ~268 hardcoded text-stone-* classes with theme-aware token
utilities (text-text, text-text-secondary, text-text-muted) across all
templates and JS components. Adjust dark mode token values to meet
WCAG AA contrast ratios on dark surfaces.
2026-02-05 20:57:59 +00:00
Jon Seager
1377d43935
fix: resolve clippy warnings for dead field and struct prefix
- Remove unused passkey_name from RegisterStartRequest (only used in RegisterFinishRequest)
- Rename AiUsageView fields from total_calls/total_tokens/total_cost to calls/tokens/cost
2026-02-05 20:49:17 +00:00
Jon Seager
fbc2d66a84
refactor(home): move quick notes pills to card footer with icon-only brew again
- Move quick notes pills into border-t footer row, left-aligned
- Show "No Notes" muted pill when brew has no quick notes
- Replace text "Brew Again" button with compact refresh icon button
- Footer now always visible (pills + optional brew-again action)
2026-02-05 20:46:07 +00:00
Jon Seager
010b700595
feat(brews): add quick notes
Predefined toggleable tags for brews: Good, Too Fast, Too Slow,
Too Hot, Under Extracted, Over Extracted.

- Add quick_notes TEXT column storing JSON array
- Add QuickNote enum with label/form-value/positive helpers
- Update repository to encode/decode JSON, backup to export notes
- Add toggle pill UI on brew form with Datastar signals
- Show pills on home page cards (muted for Good, amber for others)
- Show comma-joined text in data table Notes column
- Add --quick-notes flag to CLI, update HTTP client
- Update bootstrap script with sample quick notes
2026-02-05 20:42:03 +00:00
Jon Seager
56109f3afe
refactor: reorganize templates into pages/, partials/lists/, and forms/
Move 9 page templates to templates/pages/, nav to partials/,
7 list partials + table.html to partials/lists/. Extract duplicated
scan result form (~85 lines) from home.html and add.html into
partials/forms/scan_result_form.html. Update all Askama template
paths, include/import directives.
2026-02-05 17:48:18 +00:00