Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
8ec1866
chore(comments): describe what records() returns
Kkkermit Dec 3, 2026
8382ccf
chore(comments): correct and tidy comments in UI components
Kkkermit Dec 3, 2026
0b16c8a
chore(comments): state layout reasons in pages as guarantees
Kkkermit Dec 3, 2026
acb32e0
chore(comments): say what the Lyricsfile reader avoids, and why
Kkkermit Dec 3, 2026
ca8a94f
chore(comments): explain the heatmap's deep steps without the history
Kkkermit Dec 3, 2026
11b1384
chore(comments): tighten visuals and backdrop comments
Kkkermit Dec 3, 2026
55a6d2a
chore(comments): count the version's places in package-lock.json
Kkkermit Dec 3, 2026
fe2a2d3
docs(guide): organise the user guide by task, with troubleshooting
Kkkermit Dec 3, 2026
f1b98b0
docs(readme): answer what users ask, and leave developer detail to DE…
Kkkermit Dec 3, 2026
fa874c3
docs: one job each for CONTRIBUTING and DEVELOPMENT
Kkkermit Dec 3, 2026
b18b7a8
docs(security): list every permission and how the sign-in listener cl…
Kkkermit Dec 3, 2026
98fd8d9
docs: keep the doc index, repository map and done list in step
Kkkermit Dec 3, 2026
6b95861
docs(github): point bug reporters at troubleshooting first
Kkkermit Dec 3, 2026
670e0fc
Merge branch 'feature/docs-review' into feature/cleanup-base
Kkkermit Dec 3, 2026
1d76a36
fix(settings): describe the transparent background for the build it's in
Kkkermit Dec 3, 2026
bd2e4c9
fix(oauth): answer the sign-in redirect without tiny_http
Kkkermit Dec 3, 2026
ef1f260
test: wait up to 5 s in Testing Library, as the demo answers slowly
Kkkermit Dec 3, 2026
f4d67c4
test(lyrics): check the parsers' speed with room for a busy machine
Kkkermit Dec 3, 2026
9831413
ci: stop running CodeQL and the installers twice for every pull request
Kkkermit Dec 3, 2026
6045afd
test(e2e): choose each screen size's tests in the config, not by skip…
Kkkermit Dec 3, 2026
5e8eaa6
ci: build once and run the end-to-end tests in four jobs side by side
Kkkermit Dec 3, 2026
5ab8287
test(e2e): drop repeated checks and waits that bought nothing
Kkkermit Dec 3, 2026
f9b9cd7
docs: describe the split CI jobs and how end-to-end tests pick their …
Kkkermit Dec 3, 2026
8cea2f3
test(e2e): wake the full-screen player's controls before clicking them
Kkkermit Dec 3, 2026
4541c62
fix(history): leave nothing of erased history in the write-ahead log
Kkkermit Dec 3, 2026
61de68d
fix(history): leave a newer Statsify's database untouched
Kkkermit Dec 3, 2026
de1259e
perf(history): index plays by song (schema 3)
Kkkermit Dec 3, 2026
ecce8d2
perf(history): lighter saves and loads, and errors in words
Kkkermit Dec 3, 2026
af99025
test(history): hostile, concurrent and damaged-file cases, and a benc…
Kkkermit Dec 3, 2026
2f8b1b2
fix(launcher): start Spotify once for requests close together
Kkkermit Dec 3, 2026
34ae9f1
test(shell): tooltip clipping at the edge, and malformed command argu…
Kkkermit Dec 3, 2026
12bb385
Merge branch 'feature/faster-ci' into feature/cleanup-base
Kkkermit Dec 3, 2026
82c6b99
docs: match the faster CI in CONTRIBUTING and RELEASING
Kkkermit Dec 3, 2026
5071e28
test(history): a database in a folder whose name isn't Unicode
Kkkermit Dec 3, 2026
92f0663
Merge branch 'feature/rust-review' into feature/cleanup-base
Kkkermit Dec 3, 2026
00ba52e
docs(agents): the desktop binary is about 6 MB with Tauri 2.13
Kkkermit Dec 3, 2026
10e218a
fix(history): finish erasing when an earlier erase stopped half-way
Kkkermit Dec 3, 2026
cda0c01
ci: count a moved file at both of its paths when choosing the checks
Kkkermit Dec 3, 2026
0d487d4
test(settings): read the transparent background's description as scre…
Kkkermit Dec 3, 2026
9730520
test(oauth): a callback that arrives in pieces is read whole
Kkkermit Dec 3, 2026
8c44e3d
docs(database): quit from the tray before copying the history file
Kkkermit Dec 3, 2026
d6bebc6
docs(release): a self-upgrading history schema is a minor release
Kkkermit Dec 3, 2026
2391ddb
chore(release): 1.2.0
Kkkermit Dec 3, 2026
73db7ac
test(oauth): keep the listener's responses out of assertion messages
Kkkermit Dec 3, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ body:
value: |
Thanks for taking the time to report a bug. Please check the [open issues](https://github.com/Kkkermit/Spotify-Stats/issues) first, and **don't use this form for security problems**: report those privately (see [SECURITY.md](https://github.com/Kkkermit/Spotify-Stats/blob/main/SECURITY.md)).

Never paste access tokens, your Client ID's sign-in links, or your listening history here.
Never paste access tokens, sign-in links (they carry one-time codes), or your listening history here. Many problems already have an answer in the user guide's [Troubleshooting](https://github.com/Kkkermit/Spotify-Stats/blob/main/docs/GUIDE.md#troubleshooting).
- type: textarea
id: what-happened
attributes:
Expand Down Expand Up @@ -41,8 +41,8 @@ body:
id: version
attributes:
label: Statsify version
description: Settings → Data & about, or right-click anywhere → Developer log → System.
placeholder: "1.0.0"
description: In the desktop app, Settings → Data & about. In a browser, the release or commit you built from.
placeholder: "1.1.1"
validations:
required: true
- type: dropdown
Expand Down
3 changes: 3 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ contact_links:
- name: Help with the Spotify developer app setup
url: https://github.com/Kkkermit/Spotify-Stats#one-time-spotify-setup-about-2-minutes
about: Client ID, redirect URIs and user management, step by step.
- name: Troubleshooting and FAQ
url: https://github.com/Kkkermit/Spotify-Stats/blob/main/docs/GUIDE.md#troubleshooting
about: What Statsify's messages mean (sign-in, playback, lyrics, importing) and what to do.
162 changes: 151 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,30 @@ name: CI
# Every check a change must pass: types, lint, unit tests, the production build, end-to-end tests
# (demo mode at three screen sizes, with axe accessibility checks) and the Rust checks. The
# release workflow runs it too (workflow_call), so a tag is only released from a green commit.
#
# It runs on pull requests and on pushes to main. Pushes to other branches don't run it: a pull
# request's branch would run it twice for every commit. Start it by hand (workflow_dispatch) for a
# branch without a pull request.
#
# The end-to-end tests take most of the time, so the app is built once and the tests are split
# across four jobs that run side by side. The branch rules require "Lint, test & build" and
# "Desktop shell (Rust)" by name: "Lint, test & build" collects the build, the checks and every
# end-to-end job, and fails if any of them failed. Changes that can't affect a part skip it (a
# skipped job counts as passed): documentation skips the end-to-end tests, and anything outside
# src-tauri/ skips the Rust checks.
on:
push:
branches: [main, "feature/**"]
branches: [main]
pull_request:
workflow_dispatch:
workflow_call:
inputs:
run:
description: >-
"all" runs every check; "build" only builds the web app (the release workflow's dry runs:
their pull request runs every check already).
type: string
default: all

permissions:
contents: read
Expand All @@ -20,9 +38,51 @@ concurrency:
cancel-in-progress: true

jobs:
web:
name: Lint, test & build
changes:
name: What changed
runs-on: ubuntu-latest
timeout-minutes: 5
outputs:
checks: ${{ steps.filter.outputs.checks }}
e2e: ${{ steps.filter.outputs.e2e }}
rust: ${{ steps.filter.outputs.rust }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- id: filter
env:
# Empty unless another workflow calls this one.
RUN: ${{ inputs.run }}
EVENT: ${{ github.event_name }}
# What the change is compared with: the pull request's base, or main before the push.
BASE: ${{ github.event.pull_request.base.sha || github.event.before }}
run: |
checks=true e2e=true rust=true
if [[ "$RUN" == build ]]; then
checks=false e2e=false rust=false
# Anything this can't work out (a run by hand or from another workflow, a new branch, a
# base it can't fetch) runs everything.
# --no-renames lists a moved file at both paths: a file moved out of src-tauri/ changes
# the Rust build as much as one deleted there.
elif [[ -z "$RUN" && "$EVENT" =~ ^(push|pull_request)$ && "$BASE" =~ ^[0-9a-f]{40}$ && ! "$BASE" =~ ^0+$ ]] &&
git fetch --quiet --no-tags --depth=1 origin "$BASE" &&
files=$(git diff --name-only --no-renames "$BASE" "$GITHUB_SHA"); then
echo "Changed files:"
echo "$files"
# Markdown, docs/, the licence and the repository's settings in .github/ can't change
# what the end-to-end tests see; this workflow can. The checks job always runs: one of
# its tests checks every file name, docs included.
code=$(grep -vE '\.md$|^docs/|^LICENSE$|^\.github/' <<< "$files" || true)
if [[ -z "$code" ]] && ! grep -qx '.github/workflows/ci.yml' <<< "$files"; then e2e=false; fi
grep -qE '^src-tauri/|^\.github/workflows/ci\.yml$' <<< "$files" || rust=false
fi
{ echo "checks=$checks"; echo "e2e=$e2e"; echo "rust=$rust"; } | tee -a "$GITHUB_OUTPUT"

build:
name: Build
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
Expand All @@ -32,33 +92,113 @@ jobs:
node-version-file: .nvmrc
cache: npm
- run: npm ci
- run: npm run typecheck
- run: npm run lint
- run: npm test
- run: npm run build
# npm run build is tsc -b && vite build. The types are checked in the checks job, side by
# side with this one, so the end-to-end jobs get the build sooner.
- run: npx vite build
- name: Upload the web build
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: statsify-web
path: dist/
if-no-files-found: error
retention-days: 14
- name: Install Playwright browser
run: npx playwright install --with-deps chromium

checks:
name: Types, lint & unit tests
needs: changes
if: needs.changes.outputs.checks == 'true'
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version-file: .nvmrc
cache: npm
- run: npm ci
- run: npm run typecheck
- run: npm run lint
- run: npm test

e2e:
name: End-to-end tests (${{ matrix.shard }}/${{ strategy.job-total }})
needs: [changes, build]
if: needs.changes.outputs.e2e == 'true'
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
# Every shard runs to the end, so one run reports every failing test.
fail-fast: false
matrix:
# Add a number to split the tests further.
shard: [1, 2, 3, 4]
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version-file: .nvmrc
cache: npm
- run: npm ci
# Headless tests run in Chromium's headless shell, so the full browser isn't downloaded.
# Caching the download saves no time: restoring it takes about as long as fetching it.
- name: Install Playwright's browser
run: npx playwright install --with-deps --only-shell chromium
- name: Download the web build
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
name: statsify-web
path: dist
- name: End-to-end tests (demo mode, 3 screen sizes, axe accessibility)
run: npm run e2e
env:
SHARD: ${{ matrix.shard }}
SHARDS: ${{ strategy.job-total }}
# Serve the downloaded build instead of building again.
E2E_PREBUILT: "1"
# e2e/shard.ts deals the tests out between the jobs in turn, so they take about as long
# as each other (Playwright's --shard gives one job all the slowest specs).
run: |
node e2e/shard.ts "$SHARD" "$SHARDS" "$RUNNER_TEMP/tests.txt"
npx playwright test --test-list "$RUNNER_TEMP/tests.txt"
- name: Upload screenshots of failed end-to-end tests
if: failure()
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: e2e-failures
name: e2e-failures-${{ matrix.shard }}
path: test-results/
if-no-files-found: ignore
retention-days: 7

web:
name: Lint, test & build
needs: [changes, build, checks, e2e]
# Always reports, cancelled runs included: a required check that is skipped counts as passed.
if: always()
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Every part passed, or wasn't needed for this change
env:
CHANGES: ${{ needs.changes.result }}
BUILD: ${{ needs.build.result }}
CHECKS: ${{ needs.checks.result }}
E2E: ${{ needs.e2e.result }}
run: |
echo "What changed: $CHANGES. Build: $BUILD. Types, lint & unit tests: $CHECKS. End-to-end tests: $E2E."
[[ "$CHANGES" == success && "$BUILD" == success ]] || exit 1
for result in "$CHECKS" "$E2E"; do
[[ "$result" == success || "$result" == skipped ]] || exit 1
done

rust:
name: Desktop shell (Rust)
needs: changes
if: needs.changes.outputs.rust == 'true'
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
name: CodeQL

# GitHub's code scanning for security problems in the TypeScript app, the Rust shell and these
# workflows. Findings appear under Security → Code scanning. Runs on pushes to main and feature
# branches, on pull requests, and every week (new queries find problems in old code).
# workflows. Findings appear under Security → Code scanning. Runs on pushes to main, on pull
# requests (not on pushes to their branches as well, which would scan every commit twice), and
# every week (new queries find problems in old code).
on:
push:
branches: [main, "feature/**"]
branches: [main]
pull_request:
schedule:
- cron: "27 4 * * 1"
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/desktop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@ name: Desktop app

# Builds the installable desktop app on Windows, Linux and macOS and uploads the installers as
# downloadable artifacts of the run (Windows .exe/.msi and a portable .exe, Linux .deb/.AppImage,
# a macOS .dmg for both Apple silicon and Intel). Runs when the app's code changes, by hand, and
# from the release workflow, which attaches these files to the GitHub Release.
# a macOS .dmg for both Apple silicon and Intel). Runs by hand, from the release workflow, which
# attaches these files to the GitHub Release, when a change to the app reaches main, and on pull
# requests that change what the installers are built from: the Rust shell, the dependencies
# (Tauri's CLI and API among them) or the build configuration. Pull requests that change only the
# web app don't build them: CI builds and tests the same web app, and builds of main keep
# installers of the latest code to download.
on:
workflow_dispatch:
workflow_call:
push:
branches: [main, "feature/**"]
branches: [main]
paths:
- "app/**"
- "src-tauri/**"
Expand All @@ -20,10 +24,7 @@ on:
- ".github/workflows/desktop.yml"
pull_request:
paths:
- "app/**"
- "src-tauri/**"
- "public/**"
- "index.html"
- "package.json"
- "package-lock.json"
- "vite.config.ts"
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,13 @@ name: Release
# - pushing a version tag by hand (v1.2.0, or v1.2.0-beta.1 for a pre-release from any branch).
#
# Everything else is a dry run that builds and packages the release without creating one: pull
# requests and feature-branch pushes that change this workflow or the version script, and runs
# started by hand from a branch. (Started by hand from a tag, it releases that tag.)
# requests that change this workflow or the version script, and runs started by hand from a
# branch. (Started by hand from a tag, it releases that tag.) A dry run builds the web app without
# running CI's checks again: the pull request's own CI run has them.
# docs/RELEASING.md has the whole process.
on:
push:
tags: ["v*.*.*"]
branches: ["feature/**"]
paths:
- ".github/workflows/release.yml"
- "scripts/set-version.mjs"
pull_request:
paths:
- ".github/workflows/release.yml"
Expand Down Expand Up @@ -97,6 +94,9 @@ jobs:
name: CI
needs: version
uses: ./.github/workflows/ci.yml
with:
# A release runs every check; a dry run only needs the web build to package.
run: ${{ needs.version.outputs.release == 'true' && 'all' || 'build' }}

desktop:
name: Desktop app
Expand Down
Loading
Loading