Commit Graph

144 Commits

Author SHA1 Message Date
shcizo 6f3e33a5ea Merge pull request 'fix: invalidate stale predicted_rating after PDGA cycle rollover (#29)' (#31) from fix/invalidate-stale-predicted-rating-29 into main
Release / release (push) Failing after 6s
2026-06-09 14:02:42 +02:00
Samuel Enocsson c7fb4a7068 fix: use re-fetched timestamp after recompute + rename helper var (#29)
Reviewer 1 flagged: staleness-check read predicted_calculated_at from
the original cachedPlayer snapshot even after recompute, so newly
calculated ratings (predicted_calculated_at = NULL in snapshot)
were immediately nulled by the staleness branch.

Fix: read predicted_calculated_at from updatedPlayer too.

Reviewer 2 nit: rename thisMonths → secondTuesday for consistency
with the original variable name in getNextPDGAUpdateDate.
2026-06-09 11:04:53 +02:00
Samuel Enocsson 27ffa096e4 fix: invalidate stale predicted_rating after PDGA cycle rollover (#29) 2026-06-09 10:58:42 +02:00
shcizo 5198a1c0f4 Merge pull request 'fix: preserve predicted_rating via UPSERT in savePlayerToDB (#11)' (#28) from fix/upsert-preserve-predicted-rating-11 into main
Release / release (push) Successful in 5s
Build and deploy / build-and-push (push) Successful in 10s
Build and deploy / deploy (push) Successful in 4s
v1.4.3
2026-06-08 09:53:01 +02:00
Samuel Enocsson 7297c0a16b fix: preserve predicted_rating via UPSERT in savePlayerToDB (#11)
INSERT OR REPLACE deletes the existing row and resets columns absent from
the VALUES list (predicted_rating, std_dev, last_round_update,
excluded_rounds_count, cutoff_rating) to NULL. Refresh-all called this for
every player, wiping predicted ratings table-wide.

Switch to a SQLite UPSERT keyed on pdga_number that updates only the four
scraped columns in place, leaving the predicted-rating columns and the
24h-cooldown timestamp untouched. Mirror course.js's lastID==0 SELECT
fallback so the function still returns a real player id on the update path.
2026-06-08 09:50:03 +02:00
Release Bot ada2dcb4ae 1.4.2
Release / release (push) Successful in 5s
Build and deploy / build-and-push (push) Successful in 33s
Build and deploy / deploy (push) Successful in 8s
v1.4.2
2026-06-08 06:46:23 +00:00
shcizo 5ece854340 Merge pull request 'feat: add refresh button to mobile player card (#26)' (#27) from feat/mobile-card-refresh-button-26 into main
Release / release (push) Successful in 8s
2026-06-08 08:46:13 +02:00
Samuel Enocsson 2ef7de4e58 fix: spin only the icon glyph in mobile refresh button (#26) 2026-06-08 08:44:51 +02:00
Samuel Enocsson 16c045e7cc feat: add refresh button to mobile player card (#26) 2026-06-08 08:24:09 +02:00
Release Bot 8ee5cc3861 1.4.1
Release / release (push) Successful in 5s
Build and deploy / build-and-push (push) Successful in 23s
Build and deploy / deploy (push) Successful in 8s
v1.4.1
2026-06-01 07:04:42 +00:00
shcizo 2561ee12ef Merge pull request 'fix: parse latest tournament from recent-events list on player page (#24)' (#25) from fix/parse-recent-events-tournament-24 into main
Release / release (push) Successful in 25s
2026-06-01 09:04:13 +02:00
Samuel Enocsson 0d2f0fa3a8 fix: skip recent-events tournament when extracted date predates afterDate (#24) 2026-06-01 08:57:51 +02:00
Samuel Enocsson ec3ae872da fix: parse latest tournament from recent-events list on player page (#24) 2026-06-01 08:53:12 +02:00
Release Bot a90f2d0e86 1.4.0
Release / release (push) Successful in 5s
Build and deploy / build-and-push (push) Successful in 21s
Build and deploy / deploy (push) Successful in 7s
v1.4.0
2026-05-25 09:18:47 +00:00
shcizo f8233960d2 Merge pull request 'feat: show excluded rounds count and cutoff rating in player history (#21)' (#23) from feat/show-excluded-rounds-count-21 into main
Release / release (push) Successful in 7s
2026-05-25 11:18:35 +02:00
Samuel Enocsson 98a6c6be2e feat: show cutoff rating threshold in player history accordion (#21) 2026-05-25 11:12:01 +02:00
Samuel Enocsson 9138299ae0 Merge remote-tracking branch 'origin/main' into feat/show-excluded-rounds-count-21 2026-05-25 11:01:53 +02:00
Release Bot 3275241aa7 1.3.0
Release / release (push) Successful in 5s
Build and deploy / build-and-push (push) Successful in 25s
Build and deploy / deploy (push) Successful in 8s
v1.3.0
2026-05-25 08:52:17 +00:00
shcizo 6faddc6232 Merge pull request 'feat: Courses-redesign + Tjing-import (#8)' (#22) from feat/courses-redesign-tjing-import-8 into main
Release / release (push) Successful in 7s
2026-05-25 10:52:06 +02:00
Samuel Enocsson cad14def56 style: align course row typography with Players (#8) 2026-05-25 10:36:43 +02:00
Samuel Enocsson 75b2360e96 feat: add table header row to Courses matching Players style (#8) 2026-05-25 10:33:47 +02:00
Samuel Enocsson 2035ae0efc fix: use FontAwesome icons matching Players page (#8) 2026-05-25 10:29:34 +02:00
Samuel Enocsson 88396c9220 fix: remove EJS comment inside template literal causing parse error (#8) 2026-05-25 10:25:59 +02:00
Samuel Enocsson 9cb78c9c98 fix: address code-review findings from pass 1 + 2 (#8)
- Fix saveCourseToDB returning 0 on conflict by falling back to SELECT
- Fix inactive layouts showing 'Never played' when last_played exists
- Add .icon-btn.spinning to courses.css for refresh button feedback
- Remove duplicate .btn-primary from courses.css (use shared.css version)
- Tokenize rating tier colors into --rating-tier-{high,mid,low} CSS vars
- Convert var to const/let throughout courses.js
- Fix logger.error calls to use {err} object form (pino convention)
- Extract RATING_TIER_HIGH/MID constants in course-layouts.ejs scriptlet
- Remove dead href='#' View all link from courses.ejs (deferred)
- Pass total prop explicitly from course-table.ejs to course-cards.ejs
- Remove dead #search-results-info selector from mobile.css
- Remove redundant .replace(/"/g, '"') from data attributes in course-table.ejs
2026-05-25 09:54:15 +02:00
Samuel Enocsson f2e30c62aa fix: zero excluded count in fallback, drop debug-icon orphan, align ejs guard (#21) 2026-05-25 09:44:46 +02:00
Samuel Enocsson 4bbf6d9728 feat: redesign Courses page with tabs + restore Tjing import (#8)
- Restore src/scrapers/tjing.js with AbortController timeout (8s),
  error-object returns, and verbatim GraphQL queries
- Add getOrCreateLayout() to src/models/course.js
- New /api/tjing/search and /api/tjing/import/:tjingId routes;
  course-table route now includes layoutCount/activeLayoutCount via
  LEFT JOIN aggregation
- Rewrite courses.ejs: action-card with Find/Import tabs, results bar,
  HTMX course-table-region with body:refresh trigger
- Rewrite course-table.ejs: CSS-grid div structure replacing <table>,
  lazy-load expanded layouts via JS htmx.ajax
- Rewrite course-layouts.ejs: layout-card chips with rating tier colouring,
  collapsible inactive layouts section
- Rewrite courses.js: tab switching, live client-side filter, count display,
  Tjing search/import using DOM API (no innerHTML with untrusted data)
- Rewrite courses.css: full new design system using project tokens
2026-05-25 09:39:44 +02:00
Samuel Enocsson 0beeb98002 feat: show excluded rounds count in player history accordion (#21) 2026-05-25 09:34:42 +02:00
Release Bot f4c5e963d2 1.2.11
Release / release (push) Successful in 5s
Build and deploy / build-and-push (push) Successful in 21s
Build and deploy / deploy (push) Successful in 11s
v1.2.11
2026-05-25 06:04:26 +00:00
shcizo 27d1bef8dd Merge pull request 'fix: move std-dev info to accordion, remove broken tooltip (#19)' (#20) from fix/std-dev-tooltip-positioning-and-discoverability-19 into main
Release / release (push) Successful in 7s
2026-05-25 08:04:14 +02:00
Samuel Enocsson 088e283dcf refactor: split round spread and rating range into separate accordion rows (#19) 2026-05-25 08:02:05 +02:00
Samuel Enocsson 5791d8e34f refactor: move std-dev info to accordion, remove tooltip (#19)
- Add "Round spread" row (±stdDev, range lo–hi) to desktop accordion
  (player-history.ejs) and mobile card expanded section (ratings-cards.ejs)
- Remove .std-dev-tooltip div and .std-dev-inline span from table partial
- Remove stdDevTooltipText, updateStdDevInline, initRatingsTooltips helpers
  and all call sites from players.js
- Remove .std-dev-tooltip and .std-dev-inline CSS rules; drop cursor:help
  from .rating-value
2026-05-25 07:54:46 +02:00
Samuel Enocsson 1ff768e2fa fix: address std-dev inline span refresh + style fixes (#19)
- A: create inline span when missing in refreshRoundHistory (was silently dropped)
- B: updateStdDevInline also called from refreshHistoryThenCalculate
- C: extract stdDevTooltipText + updateStdDevInline helpers; replace 3 call sites
- D: remove margin-left: 4px and bump font-size to 12px on .std-dev-inline
- E: guard against stdDev === 0 in EJS (truthy → != null)
2026-05-23 06:45:39 +02:00
Samuel Enocsson c3fb850de3 fix: reposition std-dev tooltip and surface ±-spread inline (#19) 2026-05-23 06:40:08 +02:00
Release Bot c69efa469e 1.2.10
Release / release (push) Successful in 5s
Build and deploy / build-and-push (push) Successful in 21s
Build and deploy / deploy (push) Successful in 8s
v1.2.10
2026-05-22 20:11:32 +00:00
Samuel Enocsson e21e6f2ef0 fix: couple mobile add-bar offset to container padding via CSS var
Release / release (push) Successful in 7s
Previously .mobile-add-bar { margin-bottom: -80px } was hardcoded
to match .container { padding-bottom: 80px }. Now both reference
--m-container-pad-bottom so they can't drift out of sync.
2026-05-22 22:11:20 +02:00
Samuel Enocsson 141dc90db7 ci: add automated release workflow with conventional commits
Release / release (push) Successful in 5s
- New .gitea/workflows/release.yml triggers on push to main
- Scans commits since last v* tag and bumps strict semver
- feat: -> minor, fix: -> patch, !: or BREAKING CHANGE -> major
- Updates package.json + package-lock.json, commits as <version>,
  tags v<version>, pushes both
- Tag push triggers existing deploy.yml (PACKAGES_TOKEN is a PAT so
  cross-workflow triggers work)
- Skips silently when no releaseable commits are found
- Updates CLAUDE.md release section to reflect automation
2026-05-22 22:04:07 +02:00
Samuel Enocsson b4d9305550 1.2.9
Build and deploy / build-and-push (push) Successful in 22s
Build and deploy / deploy (push) Successful in 8s
v1.2.9
2026-05-22 21:57:39 +02:00
shcizo e900b86e69 Merge pull request 'feat: mobile UI card layout for players and courses (#16)' (#18) from feat/mobile-ui-card-layout-16 into main 2026-05-22 21:49:48 +02:00
Samuel Enocsson 4dc429b961 fix: hide desktop table-toolbar on mobile + fix sparkline overflow (#16)
- Add .table-toolbar to mobile hide list (was rendering duplicate
  'TRACKED PLAYERS' header above the mobile section-head)
- Change .m-card__body grid to minmax(0, 1fr) auto so the stats
  column can shrink below content size
- Add min-width: 0 to .m-card__stats for proper grid shrinking
- Remove grid-row: span 2 from .m-card__sparkline (single-row grid)
- Remove overflow: visible from .m-chart-spark so the end-dot stays
  within the SVG viewport
2026-05-22 21:44:22 +02:00
Samuel Enocsson 4bcf83d267 style: convert var to const in sparkline toggle block (#16) 2026-05-22 21:32:14 +02:00
Samuel Enocsson 7ab16994c5 chore: remove dead mobile-add-bar.ejs partial (#16) 2026-05-22 21:27:57 +02:00
Samuel Enocsson b51c47dc4c fix: address mobile UI review findings (#16)
- Hide desktop .card-section on mobile, add .m-search-input with same
  HTMX attrs for mobile course search (fixes horizontal overflow)
- Remove dead layoutCount var and .m-layouts-pill block in course-cards
- Remove dead 768px breakpoints from players.css (table hidden at 880px)
- Move .mobile-section-head inside else-block for empty state in both
  ratings-cards and course-cards (fixes section head showing on empty)
- Add tabindex, role=button, aria-expanded, onkeydown to .m-card and
  .m-course-card; toggle aria-expanded in JS toggle functions
- Fix data-history attribute to use <%=  (HTML-escaped) instead of <%-
- Convert var to const/let in all new/changed JS blocks
2026-05-22 21:27:05 +02:00
Samuel Enocsson cc9d8eb4cd feat: mobile UI card layout for players and courses (#16) 2026-05-22 21:07:00 +02:00
Samuel Enocsson e25f66c5d3 1.2.8
Build and deploy / build-and-push (push) Successful in 21s
Build and deploy / deploy (push) Successful in 7s
v1.2.8
2026-05-22 15:52:55 +02:00
shcizo 1442396418 Merge pull request 'feat: target rating calculator (#2)' (#17) from feat/target-rating-calculator-2 into main
Reviewed-on: #17
2026-05-22 15:46:05 +02:00
Samuel Enocsson 307dffd3a7 docs: update CLAUDE.md for consolidated deploy.yml workflow 2026-05-22 15:45:04 +02:00
Samuel Enocsson 46f78b42dc 1.2.6
Build and deploy / build-and-push (push) Successful in 20s
Build and deploy / deploy (push) Successful in 3s
v1.2.6
2026-05-22 15:27:42 +02:00
Samuel Enocsson d0c278ea1b ci: use full Gitea URL for package-updater-action 2026-05-22 15:27:30 +02:00
Samuel Enocsson d0040901ab 1.2.5
Build and deploy / build-and-push (push) Successful in 21s
Build and deploy / deploy (push) Failing after 2s
v1.2.5
2026-05-22 15:25:51 +02:00
Samuel Enocsson c0f9dd5f33 ci: fix updater secret name (UPDATER_API_KEY) 2026-05-22 15:25:38 +02:00