Commit Graph

114 Commits

Author SHA1 Message Date
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
Samuel Enocsson 66e892893f 1.2.4
Build and deploy / build-and-push (push) Successful in 1m29s
Build and deploy / deploy (push) Failing after 2s
v1.2.4
2026-05-22 15:23:19 +02:00
Samuel Enocsson 5b9138da25 ci: fix deploy.yml and consolidate workflows
Fix YAML indentation (on:/jobs: were nested under name:), correct
image name from shcizo/myapp to shcizo/pdga-rating, switch registry
auth from GITEA_TOKEN to PACKAGES_TOKEN (auto-injected token lacks
effective registry access), and add packages:write permission.

Remove docker-build.yml since deploy.yml now covers build + push +
deploy in one workflow — previously both triggered on tag push and
raced for the same image tags.
2026-05-22 15:22:41 +02:00
Samuel Enocsson b1e8d63a63 added deploy 2026-05-22 15:15:18 +02:00
Samuel Enocsson e29bc8ee80 feat: show sensitivity bracket around required average
After the binary search converges, also simulate predicted rating at
required±1 average. Display the three rows in the modal so the user can
see how sharp the requirement is — e.g. whether averaging 1 point lower
costs them 1 point of predicted rating or 5.
2026-05-22 13:43:25 +02:00
Samuel Enocsson 96edc606d3 fix: offer refresh button when round history is empty
When a player has rating_history (graph) but no round_history (per-round
detail), calculating a target produced a dead-end error. Now the modal
detects the NO_ROUNDS case and shows a button that triggers the existing
refresh-round-history endpoint and re-runs the calculation on success.
Handles the 24h rate-limit and other refresh errors explicitly.
2026-05-22 13:32:02 +02:00
Samuel Enocsson 1e66b9f94f feat: add target rating calculator (#2) 2026-05-22 13:21:41 +02:00
shcizo c6ac174921 Merge pull request 'fix: preload player rating history to fix first-click chart render (#10)' (#15) from fix/preload-player-history-10 into main 2026-05-22 12:59:26 +02:00
Samuel Enocsson fba1bea247 refactor: address review feedback — extract date helper, rename listener 2026-05-22 11:47:47 +02:00
Samuel Enocsson a63da6f3ca fix: preload player rating history to fix first-click chart render (#10) 2026-05-22 11:41:38 +02:00
shcizo 3cfdc305ec Merge pull request 'fix: header "Next update" uses second Tuesday (closes #12)' (#13) from fix/header-next-update-date into main
Reviewed-on: #13
2026-05-22 10:00:39 +02:00
Samuel Enocsson d336156bbb fix: header "Next update" uses second Tuesday (closes #12)
The topbar showed the first Tuesday of the *next* month instead of
PDGA's actual cycle (second Tuesday of the month). Replace the
duplicated computeNextUpdate() with the central
getNextPDGAUpdateDate() from rating-calculator, keeping only the
formatter ("Tue 9 Jun") here.
2026-05-22 09:54:57 +02:00
Samuel Enocsson e1b9e97484 docs: update CLAUDE.md for Gitea migration and PDGA domain notes
- Fix runtime line (Node 22 slim, not Node 18 Alpine)
- Add Hosting line (Gitea, use tea not gh)
- Reflect new CI/CD flow (Gitea Actions, manual version bump, PACKAGES_TOKEN)
- Add PDGA Domain Notes section (rating cycle, predicted-rating algorithm,
  rate limits) so future sessions don't have to re-derive domain logic
- Note absence of test framework explicitly
2026-05-22 09:35:54 +02:00
Samuel Enocsson ddac06d68f fix(ci): use PACKAGES_TOKEN PAT for docker registry auth
Docker Build / docker (push) Successful in 1m47s
The auto-injected GITEA_TOKEN does not have effective write access to
the container registry on Gitea 1.26 even with `permissions: packages:
write` set. Switching to a dedicated PAT (write:package scope) stored
as the PACKAGES_TOKEN repo secret.

Bumps version to 1.2.3 to trigger a fresh tag-build.
v1.2.3
2026-05-22 09:20:46 +02:00
Samuel Enocsson 5a5e45b685 fix(ci): use secrets.GITEA_TOKEN instead of GITHUB_TOKEN
Docker Build / docker (push) Failing after 8s
Per Gitea Actions docs, the auto-injected token is exposed as
GITEA_TOKEN, not GITHUB_TOKEN. The latter is GitHub-Actions-specific
and not aliased on Gitea by default.

Also bumps version to 1.2.2 to trigger a fresh tag-build.
v1.2.2
2026-05-22 09:13:06 +02:00
Samuel Enocsson 77f00db037 1.2.1
Docker Build / docker (push) Failing after 2m5s
v1.2.1
2026-05-22 08:52:23 +02:00
Samuel Enocsson 50a60b29e7 ci: migrate to Gitea Actions for docker build
Origin moved from GitHub to Gitea. release-please-action and ghcr.io are
GitHub-specific and don't work on Gitea Actions, so the release-please
flow is dropped in favor of manual tag-trigger docker builds.

- Add .gitea/workflows/docker-build.yml: builds and pushes to
  gitea.shcizo.se/shcizo/pdga-rating on tag push (v*)
- Remove release-please-config.json and .release-please-manifest.json
- Neutralize .github/workflows/release-please.yml to workflow_dispatch
  (kept as reference; can't be deleted via tooling under .github/)
2026-05-22 08:50:04 +02:00
Samuel Enocsson 15adddc2f1 re-swap table after refresh for consistent in-place updates
Release Please / release-please (push) Failing after 44s
Release Please / docker (push) Has been skipped
2026-05-21 16:11:32 +02:00
Samuel Enocsson b6c674e4c7 wire refresh button to update both rating and prediction 2026-05-21 16:04:15 +02:00
Samuel Enocsson a7562e9b47 fallback to monthlyHistory for lastMonthRating 2026-05-21 15:58:48 +02:00
Samuel Enocsson 4b145094bf render flat delta pill for null values per design spec 2026-05-21 15:51:17 +02:00
Samuel Enocsson 96ae7d7dac fix CSS for rating row 2026-05-21 15:33:21 +02:00
Samuel Enocsson 9feb5c2c43 fix: remove sticky thead — overlapped table toolbar (#4)
The thead had position: sticky; top: var(--topbar-height), pinning it
to 64px from the viewport. Inside the new .table-card with a toolbar
above, this pulled the header up out of its natural flow and overlapped
the toolbar and first data row. Let thead flow normally — design
doesn't require sticky behavior.
2026-05-21 15:27:08 +02:00
Samuel Enocsson 88df98f269 fix: place history chart in right grid column of expanded row (#7)
The dl + button + chart were 3 direct children of .player-detail (a
2-column grid). Auto-placement put the button in the right column,
forcing the chart to wrap to a second row in the left column.
Wrap dl + button in .player-detail-left so the chart occupies col 2.
2026-05-21 15:23:53 +02:00
Samuel Enocsson 259a3fadf1 chore: remove dead .refresh-section CSS (#4) 2026-05-21 15:17:09 +02:00
Samuel Enocsson 7fb8cab5e2 feat: add 'View calculation details' link to expanded row (#4) 2026-05-21 15:16:51 +02:00
Samuel Enocsson 7af9d8d69e fix: null-safe icon selectors after table restructure (#4) 2026-05-21 15:16:09 +02:00
Samuel Enocsson 16d375ae10 refactor: design-fidelity pass on players page 2026-05-21 15:15:29 +02:00
Samuel Enocsson 686d7ca00c fix: use template-literal interpolation for KPI strip inside body string (#5)
The page body is assembled as a JS template literal inside <% ... %>;
EJS tags inside that string break the EJS parser (it sees the first %>
as the close of the outer tag). Switch to ${kpis.x} interpolation since
we're already inside a backtick string.
2026-05-21 15:03:02 +02:00
Samuel Enocsson ac6008aa14 chore: delete dead progress.js (#4) 2026-05-21 14:38:06 +02:00
Samuel Enocsson cc223a4b8a fix: drop unused html field from renderDeltaPill (#3) 2026-05-21 14:38:06 +02:00