Commit graph

68 commits

Author SHA1 Message Date
Jon Seager
3a960b9d14
feat(ui): enhance desktop tables and mobile card views
- Add spacious flat table CSS for desktop (transparent card wrapper,
  lighter dividers, visible hover, larger cell padding)
- Split roaster/cafe columns into separate Country and City columns
  with sortable headers
- Split cup Roast/Roaster into separate desktop columns with city
  sort support (full-stack: domain, repo, view, template)
- Add sortable Status column to bags with colored pills (green Open,
  amber Closed) and remaining weight subtext
- Style bag Finished column as date-only (NaiveDate) and Weight
  column with smaller text
- Show status pill next to mobile bag card actions menu
- Add city to cups mobile card view
- Use middle dot separator for brew recipe weight/volume
- Add tasting notes pills to roast list, brew notes to brew list
- Fix build.rs to use rerun-if-changed for CSS and templates
2026-02-06 15:40:40 +00:00
Jon Seager
f31f87d4e1
feat(ui): spacious flat desktop tables with accent hover
- Remove bordered card wrapper from table sections on desktop
- Strip thead background, rely on typography for header distinction
- Increase cell vertical padding from 0.75rem to 1rem
- Add white row backgrounds with explicit horizontal borders
- Add accent-tinted hover with left bar indicator
- Float pagination below table as un-bordered footer
- Shrink pagination prev/next to compact card-style buttons
2026-02-06 13:57:27 +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
b68748da14
fix(ui): convert nav menu to floating dropdown and clean up icons
Replace the full-width inline menu with a compact right-aligned dropdown
that floats over page content. Adds click-outside-to-close via an
invisible backdrop, and uses z-50 to sit above timeline sticky headings.

- Replace database icon with squares (2x2 grid) for Data link
- Remove 5 unused icon macros: star, pen, login, sparkles, clipboard
- Add hover highlight (bg-surface-alt) to dropdown items
2026-02-06 12:28:36 +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
325e4b611f
refactor(brews): deduplicate brew actions between desktop and mobile views
Extract brew-again form and delete button into a local Askama macro,
eliminating ~50 lines of duplicated markup.
2026-02-05 21:58:43 +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
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
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
3bc6fae656
refactor(ui): improve data table detail rows and mobile cards
- Split created_at into created_date + created_time across all view models
- Add inline card-detail pattern for mobile action buttons
- Add desktop detail-row with ellipsis toggle for table actions
- Add pill-warning and pill-success CSS variants with dark mode
- Center mobile card-detail buttons, fix card-date vertical spacing
- Rename action labels: "View on Map" → "View Map", "Visit website/homepage" → "Homepage"
2026-02-05 20:40:38 +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
Jon Seager
4a54834424
refactor(ui): extract reusable tab bar component
- Create shared tab_bar.html partial with desktop + mobile layouts
- Add CSS component classes (.tab, .tab-active, .tab-mobile variants)
- Replace divergent implementations in data.html and add.html
- Rename DataTab to Tab for shared use across templates
- Improve readability: darker inactive text, more spacing, hover states
2026-02-05 17:23:50 +00:00
Jon Seager
fb67f0659c
feat(ui): redesign with theme tokens, dark mode, and reusable components
Overhaul the web UI with CSS custom property-based theming and
dark mode support. Extract reusable template partials (location
search, scan input) and web components (photo-capture,
searchable-select). Add version and commit info to page footer.

- Replace hardcoded amber palette with semantic theme tokens
- Add dark mode with localStorage persistence and system preference detection
- Extract <brew-photo-capture> and <searchable-select> web components
- Extract location_search and scan_input Askama macros
- Add sun/moon, timeline, database, map icons
- Display version and git commit in footer
- Improve timeline coordinate rounding and map link formatting
- Add roast_name, roaster_name, remaining to BagOptionView
2026-02-05 17:03:09 +00:00
Jon Seager
16a4704fcf
feat(account): add account page with passkey and token management
- Add /account page with passkey list, token list, and sign-out
- Replace nav login/logout buttons with user icon linking to /account or /login
- Add passkey management: add new passkeys (WebAuthn ceremony), delete with confirmation
- Add token management: create, copy one-time value, revoke with confirmation
- Add user/key/clipboard icon macros
- Add PasskeyCredentialRepository::get() for ownership verification
- Add WebAuthn passkey/start and passkey/finish endpoints for adding passkeys
2026-02-05 11:24:43 +00:00
Jon Seager
25705ea0c0
fix(ui): update empty state messages based on auth status
Show a simple "No X added yet" for unauthenticated visitors.
Authenticated users see a prompt to click the Add button.
2026-02-05 11:14:39 +00:00
Jon Seager
e6d9f861e6
style(tables): normalize text styling to match brews table
Replace bold amber (font-semibold text-amber-800) with medium stone
(font-medium text-stone-800) across roaster, roast, cafe, and cup
list templates to match the brews table convention.
2026-02-05 11:11:44 +00:00
Jon Seager
8c521f0e05
feat(data): redesign mobile data page with card layout and tab selector
- Add collapsible mobile tab selector with chevron icons
- Integrate search bar into tab component (below tabs)
- Replace Datastar search handler with vanilla JS for reliability
- Add mobile card layout: card-title, card-date, card-actions classes
- Add three-dot action menu for mobile with details/summary pattern
- Hide duplicate search inside data-content via CSS
- Pass search_value to DataTemplate for input preservation
2026-02-04 22:22:18 +00:00
Jon Seager
2c045f9335
fix(templates): remove dead detail-page links from list tables
The detail page routes and templates were removed but list templates
still linked to them. Replace the <a> tags with plain text to avoid
navigating to non-existent pages.
2026-02-04 20:53:19 +00:00
Jon Seager
2eca0ae3c6
refactor(bags): replace dual-section bag list with single paginated table
Remove the open-bags card grid and closed-bags history table in favour
of a unified table showing all bags with status badges and actions.

- Simplify load_bag_page to single BagFilter::all() query
- Remove open_bags field from BagPageData and BagListTemplate
- Add Status column with Open/Closed badges and remaining weight
- Add Close and Delete action buttons per row
2026-02-04 20:53:12 +00:00
Jon Seager
4bdfc661f9
refactor: consolidate entity pages into unified /data and /add views
Replace per-entity pages (/roasters, /roasts, /bags, /brews, /gear,
/cafes, /cups) and detail pages with a single tabbed /data view and
a dedicated /add page for entity creation.

- Add /data route with tab-based navigation using Datastar
- Add /add route consolidating all create forms
- Remove per-entity page handlers and standalone templates
- Remove detail page routes, handlers, and templates
- Update ListNavigator to accept String paths for query-param URLs
- Update home page and timeline links to use new /data?type=X paths
- Update nav to reference /data instead of individual entity pages
2026-02-04 20:51:30 +00:00
Jon Seager
ba7a38b16f
refactor(home): redesign stats section with icon pills and responsive layout
- Replace single bordered card with compact pill-style stat links
- Add Heroicons for each stat category (beaker, fire, building, bag, cup, location, wrench)
- Rename old bag icon to cup, add new shopping-bag icon for bags
- Use 2-column grid on mobile, centered flex wrap on desktop
- Add min-width on numbers to align labels consistently
2026-02-04 18:54:37 +00:00
Jon Seager
ef039da123
fix(home): prevent text wrapping in brew and bag card detail fields 2026-02-04 17:49:57 +00:00
Jon Seager
37cd595c93
fix(home): truncate long names in brew and bag cards
Add text truncation with ellipsis to roast and roaster names in the
recent brews and open bags cards to prevent layout inconsistency when
titles wrap.
2026-02-04 17:43:36 +00:00
Jon Seager
52084be7ed
refactor(nav): replace login and logout text with icons
- Add login and logout icon macros to shared icons partial
- Desktop nav uses icon-only with aria-label for both
- Mobile nav uses icon + text for both
2026-02-04 17:21:58 +00:00
Jon Seager
e508af4c52
feat(nav): add check-in icon to navigation bar
- Add checkin map-pin icon to shared icons partial
- Add check-in nav link (icon on desktop, icon + text on mobile)
- Only shown when authenticated
- Set nav_active to "checkin" on the check-in page
2026-02-04 17:14:52 +00:00
Jon Seager
3bbcd33933
refactor(templates): extract inline SVG icons into shared icons partial
Replace duplicated inline SVGs across 16 templates with reusable Askama
macros from a new icons.html partial, reducing repetition and making
icon updates a single-point change.
2026-02-04 16:32:18 +00:00
Jon Seager
98c8391670
refactor(templates): extract shared bag card partial for open bags
- Create bag_card.html macro used by both home page and bags page
- Replace divergent card styles with consistent amber-themed design
- Add closeBag() JS to bags page for closing bags with confirmation
- Use "Close" button with cross icon consistently across both pages
2026-02-04 16:01:57 +00:00
Jon Seager
0309ee08df
feat(checkin): add city search, cafe review form, and UX improvements
- Add "Search by city" toggle as alternative to GPS location
- Replace saved cafes button list with select dropdown
- Show editable review form when selecting a Foursquare result
- Guard all datastar-fetch handlers with in-progress signals
- Fix step indicator spacing (mt-4 on steps 2 and 3)
2026-02-04 15:02:20 +00:00
Jon Seager
e4a304b406
feat(checkin): Datastar-native check-in and nearby cafe search
- Add POST /api/v1/check-in endpoint with CheckInSubmission
- nearby_cafes returns HTML fragment for Datastar, JSON for API
- Add NearbyCafeView and NearbyCafesFragment for server-rendered results
- Rewrite checkin.html: replace checkin.js with Datastar signals,
  @post for submission, @get for nearby search, inline geolocation JS
- Cafe filtering uses data-show with signal-based search
2026-02-04 14:36:55 +00:00
Jon Seager
c046be4e33
fix(templates): right-align Actions column header in brew list partial 2026-02-04 12:15:25 +00:00
Jon Seager
3ae3963c5b
fix(templates): align table position and structure across all list pages
Move list partials outside the section element on bags, gear, and brews
pages so they become separate flex children of <main>, matching the
pattern used by roasters, roasts, cafes, and cups. Add mt-6 to each
partial's outer div for consistent spacing.

Standardise brew and gear list partials to match the canonical structure:
empty-state conditional with dashed amber border, <section> wrapper for
the table, and data-star-scope attribute on the outer div.

Update CLAUDE.md to document page template and list partial structure
requirements, preventing future drift.
2026-02-04 12:04:09 +00:00
Jon Seager
4f7d31d47a
refactor(roasters): remove notes field from Roaster entity
- Add migration 0016 to drop notes column from roasters table
- Remove notes from domain structs, repositories, views, CLI, routes
- Remove notes from AI extraction prompts and ExtractedRoaster struct
- Remove notes from scan page form and submission handler
- Update templates, bootstrap script, backup module, and tests
2026-02-03 21:18:48 +00:00
Jon Seager
ae82e8a16e
feat(timeline): show "View on Map / Copy" for cafe position
Replace raw coordinates with a "View on Map" link and a "Copy" button
that copies lat/lon to the clipboard.
2026-02-03 21:17:06 +00:00
Jon Seager
ae3c1090de
refactor(cafes,cups): remove notes field from Cafe and Cup entities
- Add migrations 0014 and 0015 to drop notes columns
- Remove notes from domain structs, repositories, views, CLI, routes
- Remove notes textarea/columns from web templates
- Update bootstrap script, tests, backup module, and README
2026-02-03 21:09:34 +00:00
Jon Seager
fb31d0a0c4
refactor(cafes): remove notes field from Cafe entity
- Add migration 0014 to drop the notes column from cafes table
- Remove notes from domain structs, repository, view model, CLI, routes
- Remove notes textarea/column from web templates
- Update bootstrap script and all test files
2026-02-03 21:02:37 +00:00
Jon Seager
6e2c59814c
feat(cups): add web views, templates, and navigation
- Add CupView, CafeOptionView, RoastOptionView view models
- Add CupsTemplate (full page) and CupListTemplate (fragment)
- Create cups.html with form and cup_list.html with responsive table
- Add Cups link to desktop and mobile navigation
- Add cup timeline event link and label support
2026-02-03 16:36:35 +00:00
Jon Seager
3ab1c50cc8
refactor(timeline): remove map pin icon from timeline title
Position is already shown as a clickable detail row in the card body,
making the title icon redundant. Also removes the unused map_link field
from TimelineEventView.
2026-02-03 15:10:21 +00:00
Jon Seager
3f83d74e20
feat(cafes): add CLI commands, web views, and templates
Add CLI subcommands (add, list, get, update, delete) with negative
number support for coordinates. Add CafeView with map URL generation,
Askama templates for list/detail pages, and nav link between Brews
and Gear.
2026-02-03 14:53:00 +00:00
Jon Seager
16dd72b624
fix(timeline): restore sticky month headers and jump-to-top button
Remove wrapper div around month headings so the h2 is a direct child
of the timeline container. position: sticky was broken because the
heading's containing block (the wrapper) was only as tall as the
heading itself, giving it no room to stick.

Also update MutationObserver to detect headings added as direct
children via node.matches() in addition to node.querySelector().
2026-02-03 13:29:46 +00:00
Jon Seager
145ddb4765
fix(timeline): centre line behind cards on mobile for full-width layout
- Move timeline line to centre on mobile instead of left gutter
- Remove left padding from cards to maximise horizontal space
- Reposition dots to top-centre of each card border on mobile
- Make card background fully opaque so line doesn't show through
- Desktop alternating layout unchanged
2026-02-03 13:21:55 +00:00
Jon Seager
35e8460219
fix(brews): lay out action icons horizontally and merge temp into recipe
Wrap the brew-again form and delete button in an inline-flex container
to match the horizontal layout used in other tables. Fold water
temperature into the Recipe column as desktop subtext alongside the
ratio, reducing the table from 7 to 6 columns and eliminating the
horizontal scrollbar. Document the Actions column pattern in CLAUDE.md.
2026-02-03 13:08:07 +00:00
Jon Seager
2d27228059
refactor(tables): standardise Added column as first column across all tables
Move the Added/Date column to first position in brew, gear, and bag
list templates and apply consistent text-xs font-medium text-stone-600
styling. Document the pattern in CLAUDE.md.
2026-02-03 13:03:43 +00:00
Jon Seager
087ff00177
fix(mobile): better layout for brews table 2026-02-03 12:58:37 +00:00
Jon Seager
8fe88c8ff6
fix(mobile): hide infinite scroll sentinel on desktop
The sentinel div (h-4) added extra space below the pagination bar
on pages with a next page, making the pagination bar appear taller
than on the last page. Since infinite scroll only runs on mobile,
hide the sentinel on desktop with md:hidden.
2026-02-03 12:52:23 +00:00
Jon Seager
8213543ed3
feat(roasters): consolidate table columns and restyle actions
- Combine Country/City into Location column with city as desktop subtext
- Add City as separate mobile-only field for card layout
- Move homepage icon into Actions column alongside delete button
- Remove bordered style from homepage icon to match other action icons
2026-02-03 12:52:14 +00:00
Jon Seager
39598c1709
fix(search): keep search bar visible when search returns no results
- Change empty state condition to also check navigator.has_search()
- Show "No X match your search" message inside the table container
- Applied to roast, roaster, and gear list templates
2026-02-03 12:52:06 +00:00
Jon Seager
1fa88d054c
feat(roasts): consolidate table columns and add tasting notes search
- Combine Roast/Roaster into single column with roaster as subtext on desktop
- Combine Origin/Producer into single column with producer as subtext on desktop
- Add Roaster and Producer as separate mobile-only fields for card layout
- Replace tasting notes pill badges with comma-separated list
- Rename "Notes" column to "Tasting Notes" with right-aligned mobile text
- Include tasting_notes in repository search filter columns
2026-02-03 12:51:59 +00:00
Jon Seager
39bad42f9c
feat(mobile): add infinite scroll and hide pagination on mobile
Add IntersectionObserver-based infinite scroll for mobile viewports
that fetches next pages as the user scrolls. Uses MutationObserver
to re-attach after DOM replacements. Hide pagination controls on
screens narrower than 768px.
2026-02-03 12:51:52 +00:00
Jon Seager
8e92385c56
feat(search): add search input and reposition pagination in templates
Add search_header macro with Datastar-driven live search and debounced
input. Move pagination controls from above to below tables. Add
pagination-controls class for mobile hiding. Add infinite scroll
sentinel divs and data attributes to all list partials.
2026-02-03 12:51:42 +00:00