Skip to content

feat: Statsify 1.2.0: faster CI, open-source docs and a hardened Rust shell - #21

Merged
Kkkermit merged 44 commits into
mainfrom
feature/cleanup-ci-docs-rust
Dec 3, 2026
Merged

Kkkermit merged 44 commits into
mainfrom
feature/cleanup-ci-docs-rust

Conversation

@Kkkermit

@Kkkermit Kkkermit commented Dec 3, 2026 •

Copy link
Copy Markdown
Owner

What and why

Version 1.2.0. Merging this pull request publishes it (tag, release and every installer, automatically).

Four cleanups done in parallel, then reviewed together by a fifth pass that fixed what it found.

1. Faster CI, fewer redundant tests

CI was slow because of how it ran, not because of the number of tests:

  • One job: every end-to-end test ran in a single job.
  • Built twice: the app was built once for the build step and again for the end-to-end tests.
  • Run twice: every pull request commit ran once for the branch push and once for the pull request.
  • Skipped copies: 547 tablet and phone copies of desktop-only tests were started just to be skipped.

The changes:

  • Run once per commit: CI, CodeQL and the desktop builds run on pull requests and main, not also on feature/** pushes. CI can still be started by hand.
  • Build once, test in parallel:
    • Build runs vite build once and uploads statsify-web, which the release still uses.
    • Types, lint & unit tests runs beside it.
    • Four end-to-end jobs reuse that build (E2E_PREBUILT=1). e2e/shard.ts deals the tests out evenly, 115 each, and fails if any listed test isn't picked up.
    • Only the headless Chromium shell is installed.
  • Required checks kept: "Lint, test & build" is now an aggregate job. It always runs, and fails unless every part passed or was skipped, so a failed or cancelled end-to-end job fails it. "Desktop shell (Rust)" keeps its name.
  • Only what changed:
    • A docs-only change skips the end-to-end tests, and a change outside src-tauri/ skips the Rust checks. These are job-level skips, which count as passed.
    • A moved file counts at both of its paths (--no-renames).
    • Pull requests build installers only when they change the desktop build.
    • Release dry runs are build-only.
  • Tablet and phone: they run only app.spec.ts and the [all sizes] tests, chosen in playwright.config.ts instead of starting tests just to skip them.
  • Tests removed or merged (coverage kept elsewhere, checked in review):
    • the axe scan of the full-screen player (a11y overlays);
    • the keyboard-help test (a11y and regression);
    • "server errors" (merged into the devlog test at every size);
    • "offline" (regression and stats);
    • a duplicate autostart test;
    • a duplicate contrast check (backgrounds, over three page loads);
    • one middle "60 % Blue" a11y look.
  • Faster tests: fixed sleeps replaced by waits for the page to settle, and a 21 s wait replaced by a fake clock.
  • Flaky tests fixed: Testing Library's waits raised to 5 s, a lyrics speed limit made robust, the full-screen player's hidden controls woken before clicking, and the tray play/pause test.
  • Expected result: required checks in about 4 minutes instead of 12–14 (to be confirmed by this pull request's CI), and roughly 40 % fewer runner minutes per pull request.

2. Docs for open source

  • Every doc was checked against the code and written for users and contributors. Nothing is addressed to one person or describes old history.
  • README: the page for users: install and first-launch warnings, Spotify setup ("Why do I need my own Client ID?", "Typed the wrong Client ID?"), "Your data and privacy", and a FAQ.
  • GUIDE: reorganised by task, with a troubleshooting table built from the app's real messages.
  • CONTRIBUTING: now only the workflow; set-up lives in DEVELOPMENT.
  • Facts corrected:
    • SECURITY.md's list of permissions;
    • the macOS "damaged app" fix;
    • theme names;
    • where lyrics show;
    • when Spotify starts hidden;
    • that the web build can't be hosted under a sub-path.
  • Links: every relative link and anchor resolves.

3. Comment cleanup

  • Reviewed: all 1,296 comment blocks in app/ and scripts/.
  • Rewritten: 16 that were stale, told the story of an old fix, or repeated another comment.
  • Proof: the built JS and CSS are byte-identical before and after.

4. Rust: bugs found by trying to break it, plus speed and memory

Each bug has a test that failed before the fix.

  • Sign-in listener.
    • The bug: one local request with a huge Content-Length crashed the app (tiny_http reserved the memory), and a smaller one left port 43821 stuck.
    • The fix: tiny_http is replaced by a small standard-library listener in src/oauth.rs:
      • it reads one request per connection, with headers capped at 8 KB and 10 s, and never reads a body;
      • each connection gets its own short-lived thread;
      • the sign-in page is sent with Cache-Control: no-store.
    • Also fixed: a race where a new sign-in could attach to a listener that was already stopping.
    • Idle cost: idle wake-ups fall from 20 every 5 s to 1, and it uses 2 threads instead of about 6.
  • Erasing. Erased song names stayed readable in the SQLite write-ahead log while the app ran. Erasing now empties the log, and quitting closes the database. In review: a retried erase after a half-finished one now finishes the clean-up too.
  • Newer databases. A database from a newer Statsify was modified (switched to WAL) before being refused. The version is now checked first.
  • Launcher.
    • Two quick requests could start Spotify twice; launches are now serialised.
    • A non-Unicode folder on PATH hid Spotify.
  • Speed (200k plays, release build):
    • A full rewrite takes about 2 s instead of about 45 s. Schema 3 adds an index on plays by song, migrated from v1 and v2.
    • Loading is about 20 % faster with half the peak memory (17.8 MB, was 33).
    • The binary is about 100 KB smaller.
  • Errors and readability: history errors are readable sentences, oauth_cancel runs off the main thread, and history.rs is split into small pieces.
  • More tests: a randomised save and load against a model, hostile input, concurrent calls, damaged files, and bad arguments to every command.
  • Contract: the IPC contract is unchanged (commands, arguments, the binary format, error codes).

Also

  • Settings: the "Transparent background" description no longer promises a Windows 11 backdrop on macOS and Linux.
  • AGENTS.md: the performance budget's binary size now says about 6 MB with Tauri 2.13.

How it was tested

  • Unit tests: npm run check passes (typecheck, lint, 550 unit tests, build), on Node 26.
  • Rust: cargo fmt --check, cargo clippy --all-targets -- -D warnings and cargo test pass: 103 tests, with the benchmark ignored by default.
  • End-to-end: the whole suite at desktop, tablet and phone sizes: 448 passed, 0 failed, with no retries needed. The 12 skipped skip themselves on purpose.
  • Workflows:
    • actionlint is clean.
    • The review ran the "What changed" script locally for docs-only, app/, the whole branch, a release, a dry run, a manual run, and a moved file.
    • The four shard lists cover all 460 tests exactly once.
  • This pull request's own CI runs the new pipeline, so its timings are the first real measurement.

Notes for merging

  • Older versions can't open the database. History schema 3: once 1.2.0 opens the history database, Statsify 1.1.1 refuses it (an older version never alters a newer file), so going back needs a backup from before the upgrade. RELEASING.md now counts a self-upgrading schema as a minor release; a major one is for changes people must act on when they upgrade.
  • Only GitHub or Windows can confirm:
    • that skipped jobs satisfy the main ruleset as expected (GitHub documents that they do);
    • that the listener can bind its port again straight after a cancel on Windows, as tiny_http did.

Checklist

  • The branch is named feature/<name> and the commits follow the commit style.
  • npm run check passes (typecheck, lint, unit tests, build).
  • npm run e2e passes, or the change can't affect the UI.
  • Rust changed: cargo fmt --check, cargo clippy --all-targets -- -D warnings and cargo test pass in src-tauri/.
  • New behaviour has tests (Vitest for logic, Playwright with an axe check for UI, Rust tests for commands).
  • UI changes work at desktop, tablet and phone sizes, by keyboard, with reduced motion and in every theme.
  • Docs are updated (README, docs/, AGENTS.md) where behaviour, commands or architecture changed.
  • No secrets, tokens, personal data or real listening history in code, tests, screenshots or logs.

The branch contains merge commits, so merge it with Squash and merge.

https://claude.ai/code/session_01TCk6t7edJdscNtTSeFmyQN


Generated by Claude Code

Kkkermit and others added 30 commits December 3, 2026 10:47
Its doc comment only defined a session; it now names the records the
function returns as well. Comments only; no code changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TCk6t7edJdscNtTSeFmyQN
The charts' comments called the tooltip their live region; ChartStatus is,
and the tooltip is aria-hidden. Comments that told how a layout once broke
("it was cut to six letters", "the row snapped 16 px") now say what the
code guarantees. Comments only; no code changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TCk6t7edJdscNtTSeFmyQN
The Lyrics, Now Playing and Recent pages explained their layout with what
an earlier layout did ("left the name under the player bar", "a phone gave
it 75 px"); they now say why the layout is what it is. Comments only; no
code changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TCk6t7edJdscNtTSeFmyQN
"Not a regex with `.`" sat above a line that uses a regex; it now says the
indent and body are split by search and slice instead. Comments only; no
code changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TCk6t7edJdscNtTSeFmyQN
The accent engine's heatmap comment said what the steps "used to" do; it
now says why they are capped as they are. Comments only; no code changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TCk6t7edJdscNtTSeFmyQN
AlbumBackdrop's doc repeated backdropShown's rules at length; it now points
to them. The window material and the album-backdrop styles state their
reasons in the present tense rather than as what once flickered or fell
under 4.5:1. Comments only; no code changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TCk6t7edJdscNtTSeFmyQN
The version script names five files for "six places"; package-lock.json
holds the version twice. Comments only; no code changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TCk6t7edJdscNtTSeFmyQN
Group the guide the way people use the app: playing music, their listening
history (importing, the plays Statsify saves, All time and Streams, backing
up and deleting), the library, lyrics, full screen, appearance, keyboard
and charts, their account, and troubleshooting.

New: how the import and the 50-play sync fit together, CSV export and
deleting, why lyrics are missing (each message, LRCLIB, the three-day
retry), the theme and album-background settings, and a table of the app's
real error messages with what to do. Lyrics are on the Now playing page,
not the Overview's card, and the browser player is missing from the desktop
WebView on every system, not only Windows'.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TCk6t7edJdscNtTSeFmyQN
…VELOPMENT

The README now covers what Statsify does, installing it (first-launch
warnings on each system, checksums, updating, uninstalling, WebView2 for the
portable .exe), the one-time Spotify setup with why each person needs their
own Client ID (five accounts, Premium for the owner and for playback), a
wrong Client ID, importing history, where data is kept and how to back it
up, delete it or revoke Statsify's access, the permissions it asks for, and
a short FAQ.

Corrected: the theme is "OLED black" and there's "Match system"; Spotify
starts hidden when there's no device to play on, not whenever nothing is
playing; macOS 15 no longer opens unsigned apps from Control-click, and
"is damaged" needs xattr, not Open Anyway; the roadmap is no longer "after
1.0". Removed: the upgrade note for "Spotify Stats" (no release carried that
name), and the scripts table and folder map, which DEVELOPMENT.md and
AGENTS.md already have.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TCk6t7edJdscNtTSeFmyQN
CONTRIBUTING is the workflow: ways to help, where to read first, branches,
commits, pull requests and code style. The command table, the Spotify
account set-up, the Rust check commands and the test details it repeated now
live only in DEVELOPMENT.md (which gains the command table) and AGENTS.md,
linked from where they were.

DEVELOPMENT.md's production build said VITE_SPOTIFY_REDIRECT_URI lets the
app live below the root of a domain; the build links its files from "/", so
it has to be at the root, with every unknown path answered by index.html.
It now says so, with the frame-ancestors header and the release's web zip.
The common problems point at the redirect list by name and add signing in
on localhost.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TCk6t7edJdscNtTSeFmyQN
…oses

The policy read as if Statsify only asked to like songs and add to
playlists. It now lists every permission in SCOPES, the two the browser
build adds for Spotify's web player, and where to revoke access. The
desktop listener closes after the first genuine callback, not only after
five minutes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TCk6t7edJdscNtTSeFmyQN
AGENTS.md describes the README and user guide as they now are, lists every
doc in docs/ and RELEASING.md in the definition of done, names lib/'s
clipboard module, and says what following other tabs prevents rather than
what once happened. CLAUDE.md says plainly that guidance belongs in
AGENTS.md. RELEASING.md's six version places are in five files.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TCk6t7edJdscNtTSeFmyQN
The issue chooser and the bug form link to the user guide's
troubleshooting. The version field says where to find it in each build
(the browser build shows no number in Settings), and the warning names
sign-in links for what they carry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TCk6t7edJdscNtTSeFmyQN
On macOS and Linux the description promised "a Windows 11 frosted backdrop",
which only the Windows build has. The Windows build points to the window
material below, other desktop builds just say the desktop shows through,
and the browser keeps its own description.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TCk6t7edJdscNtTSeFmyQN
One request to the sign-in listener announcing a body it never sends
(`Content-Length: 99999999999999`) aborted the whole app: tiny_http drains
an unread body when a request is dropped, allocating a buffer of the
announced size first. A smaller one left the listener blocked on the
missing body for good, holding the port, so sign-in couldn't finish or be
started again until a restart.

The listener is now a small std::net loop that speaks only what a browser
sends to a redirect URI: one request per connection, its line and headers
capped at 8 KB and 10 s, answered on its own short-lived thread with
`Connection: close`, and no body ever read. Slow, oversized, malformed and
many concurrent connections are refused without holding up the callback.

Also:
- A listener whose wait had ended (timed out, or its callback answered)
  could still be retargeted by a sign-in started in that instant, leaving
  the new sign-in waiting on a closed port. Ending the wait and retargeting
  now decide under the same lock.
- Waiting costs nothing: the threads sleep until a connection, the deadline
  or a cancel, instead of waking four times a second; a cancel frees the
  port at once.
- `oauth_cancel` runs on a worker thread: on the main thread it could wait
  up to a second for a sign-in still binding the port.
- The callback page is sent with `Cache-Control: no-store` (its address
  holds the sign-in code), and only `Host: 127.0.0.1:<port>` is accepted:
  the listener never binds IPv6, so `[::1]` could not reach it anyway.
- tiny_http, ascii, chunked_transfer and httpdate leave the build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TCk6t7edJdscNtTSeFmyQN
findBy* and waitFor gave up after 1 s. The demo API answers every request after a simulated
60-200 ms, a page can wait on a few in a row, and under load (the whole suite at once, a CI
runner) Playlist.test.tsx's heading took longer than that and the test failed. A longer wait
costs nothing when the element turns up.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TCk6t7edJdscNtTSeFmyQN
The crafted-input check allowed 500 ms per case, and one case takes up to about 200 ms on a
quiet machine, so a loaded CI runner failed it. A parser that backtracks or rescans would take
minutes on these inputs, so 3 s still catches it, and far from what a linear one needs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TCk6t7edJdscNtTSeFmyQN
Both ran on pushes to feature/** and again on the pull request for the same commit. They now
run on pull requests and on main. Pull requests build the installers only when they change
what those are built from (src-tauri/, the dependencies, vite.config.ts, the workflow): CI
builds and tests the same web app, and every change to the app still builds them on main.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TCk6t7edJdscNtTSeFmyQN
…ping

Every spec called desktopOnlyUnlessAllSizes(), which skipped its tests on tablet and phone
from a beforeEach: 547 of the 987 tests were queued, started and skipped on every run, and a
shard would count them as work. playwright.config.ts now gives tablet and phone a grep instead
(app.spec.ts, and the tests marked [all sizes]), so they are never queued: 451 tests remain,
the same ones that ran before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TCk6t7edJdscNtTSeFmyQN
The end-to-end step took about 10.5 minutes of a 12-14 minute job, with two browsers, after
building the app a second time. Now:

- Build runs vite build once and uploads statsify-web; four end-to-end jobs download it and
  serve it (E2E_PREBUILT skips the build in Playwright's web server) beside a job for types,
  lint and unit tests.
- e2e/shard.ts deals the tests out between the jobs in turn. Playwright's --shard cuts
  consecutive runs, which gave the job starting with a11y, app and autostart about twice the
  work of the phone's job. The script fails if Playwright doesn't pick every test it listed.
- The browser step installs only the headless shell the tests run in.
- "Lint, test & build" stays the required check: it needs the build, the checks and every
  end-to-end job, always runs (cancelled included), and fails unless each passed or wasn't
  needed. "Desktop shell (Rust)" keeps its name.
- A "What changed" job skips the end-to-end tests for documentation (Markdown, docs/, and
  .github/ other than this workflow) and the Rust checks outside src-tauri/. Skipped jobs
  count as passed, so this is a job-level if, not on: paths, which would leave a required
  check pending.
- CI runs on pull requests and pushes to main, no longer also on pushes to feature/**, which
  ran every pull request's commits twice. Start it by hand for a branch without one.
- The release workflow's dry runs (pull requests that change it) call it with run: build: the
  pull request's own run has the checks, and a dry run only packages the build. Releases run
  everything, and dry runs no longer start on feature-branch pushes as well.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TCk6t7edJdscNtTSeFmyQN
About 5 % less test time (measured on the same machine at the same time as the branch point),
every behaviour and past bug still covered:

- a11y: each theme ran five looks in one 28 s test. 60 % see-through with Blue is gone: Blue
  is no extreme, and 60 % lies between opaque and the 90 % still checked. The rest run as one
  test per theme and look (20), so they spread across workers and CI jobs.
- app: the memory check runs on desktop only (the heap doesn't depend on the window), each
  page no longer sleeps 400 ms before axe (it waits for aria-busy to clear), and the keyboard
  shortcut test is gone: a11y.spec opens help with ? and regression.spec checks G T and /.
- real: the 500 error state (Try again, axe, no errors) joins devlog's [all sizes] test of
  the same failure; the offline message is covered by regression.spec's offline page (now
  also checking for errors) and stats.spec's history pages.
- regression: a token refresh that never answers is cut off by the app's 20 s deadline on a
  fake clock instead of waiting it out (21 s to about 3).
- autostart: the two "mashing Play five times" tests were one scenario; they are one test.
  The tray test waits for the pause request instead of expecting it the moment the button
  flips (it failed under load).
- fullscreen: the player's axe scan repeated a11y.spec's overlays; the focus trap stays.
- window-states: the date's contrast over the waves in full screen repeated backgrounds.spec,
  which measures it over three loads.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TCk6t7edJdscNtTSeFmyQN
…sizes

AGENTS.md (Testing) and DEVELOPMENT.md (end-to-end tests, CI): sizes chosen in the config,
e2e/shard.ts and how to run one CI job's share, the jobs CI runs and the two required checks,
what each kind of change skips, and when CodeQL, the installers and the release dry run start.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TCk6t7edJdscNtTSeFmyQN
The controls fade after 3 s without input, and Playwright waits for an element to take the
click before it moves the mouse, so a click on a faded control waits until the test times
out. On a busy machine an axe scan or a screenshot takes that long: "Lyrics and Both show the
cover" failed so, before and after this branch's changes. wakePlayerControls() moves the
pointer first, as a person would; the glass test's view switcher uses it too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TCk6t7edJdscNtTSeFmyQN
"Sign out and erase data" deleted the account and ran VACUUM, but the
write-ahead log kept the pages that held the erased plays for as long as
the app stayed open (it stays open all day in the tray): the song names
were still readable in listening-history.sqlite3-wal. Erasing now ends
with a TRUNCATE checkpoint, which copies the vacuumed database into the
file and empties the log.

Quitting now closes the database, so SQLite folds the log into the file
and removes it: a backup that copies only listening-history.sqlite3 after
closing the app no longer misses the latest plays.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TCk6t7edJdscNtTSeFmyQN
The schema check that refuses a file from a newer version came after the
file had been switched to WAL mode, which rewrites its header and creates
a log next to it: the "won't write to a file from a newer version" promise
was broken before the refusal. The version is now checked first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TCk6t7edJdscNtTSeFmyQN
Removing a song makes SQLite check that no play still refers to it (the
plays.song_id foreign key), and without an index on song_id that meant
reading every play for each song removed. A save that drops many songs
crawled: rewriting a 200,000-play history whose songs had changed (what
the UI does after a failed save) took 57 s of wall time and 45 s of CPU;
with the index it takes about 2.3 s and 1.9 s of CPU.

The index costs about 14% more file (42.6 MB to 48.6 MB for that
history). Schema 3 adds it in the usual idempotent migration step.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TCk6t7edJdscNtTSeFmyQN
Saving:
- Plays are read in place: names, URIs and platforms are clipped as
  borrowed text instead of being copied for every play (seven
  allocations a play), and the songs a save has met are remembered by
  that text.
- A song's artwork and length were written again for every play that
  carried them, one UPDATE per play; now only when they change.
- Writes take the lock up front (an immediate transaction), so a
  database browser writing at the same time is waited for.

Loading:
- Each song is read once, the first time one of its plays comes up,
  instead of being joined to every play; platforms and countries are
  matched without copying them.
- The header is written straight from the tables, and the stored
  sources and podcast log are passed on as they are, with no JSON tree
  built and thrown away (the podcast log alone can be 16 MB).

On a 200,000-play history of 20,000 songs (tests/history_bench.rs, CPU
time with this commit and the index before it, against the original):
a first save 1.65-1.91 s to 1.45-1.50 s, a load 222-234 ms to 148-150
ms with its peak heap 33.0 MB to 17.8 MB, an import replacing 5,000
plays 150-170 ms to 110-140 ms.

Database errors now say what happened, in a sentence the UI shows ("The
history database is in use by another program", "... file is damaged",
"The disk is full"), with SQLite's words after it. Lengths beyond what
the UI's column holds are treated as unknown, and erasing an account
that isn't there no longer vacuums the whole file. docs/DATABASE.md
documents the load format.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TCk6t7edJdscNtTSeFmyQN
…hmark

Through the IPC layer with the arguments the UI sends:
- hostile saves: megabyte names (stored clipped), impossible dates,
  lengths and flags, wrong shapes and account ids, refused with nothing
  written;
- eight threads saving and loading at once, and an erase racing saves;
- a file that isn't a database: refused in words and never written to;
- a database cut in half: an error, not a shorter history.

tests/history_bench.rs times the history commands and their heap on a
200,000-play history (ignored by default; run with --release --ignored).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TCk6t7edJdscNtTSeFmyQN
Two requests to start Spotify at about the same time both found it not
running and both started it, and so did one arriving before a just-started
Spotify showed up as running (a launcher script or a sandbox can take a
few seconds to start the real program). Launches now run one at a time,
and an install Statsify started in the last ten seconds is reported as
starting instead of being started again.

A PATH holding one folder whose name isn't valid Unicode was skipped
whole (std::env::var refuses the variable), so Spotify on the PATH read
as not installed. The environment is now read lossily: only that folder
is lost.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TCk6t7edJdscNtTSeFmyQN
Kkkermit and others added 11 commits December 3, 2026 11:39
…ments

The tray tooltip keeps an emoji that ends exactly on the 120-unit limit
and drops one that would cross it, and counts UTF-16 units, not bytes.
Every command that takes arguments refuses ones of the wrong shape with
an error, and the app goes on answering.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TCk6t7edJdscNtTSeFmyQN
CI runs on pull requests and main (not feature/** pushes), skips the
end-to-end tests for docs-only changes and the Rust checks for changes
outside src-tauri/, builds installers on pull requests only when they touch
the desktop build, and names its failure artifacts e2e-failures-<n>.
Release dry runs come from pull requests only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TCk6t7edJdscNtTSeFmyQN
A home folder named in another encoding (Linux paths are bytes) still
holds a database that saves and loads.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TCk6t7edJdscNtTSeFmyQN
Measured at 6.2 MB for the Linux release build after the move to Tauri 2.13
and the new GTK bindings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TCk6t7edJdscNtTSeFmyQN
An erase that deleted the plays but then failed to compact the file and
empty the write-ahead log (a full disk, another program writing) is
reported, and "Sign out and erase data" offers to try again. The retry
found nothing left to delete and returned at once, so it said the
history was gone while the erased plays were still readable in the
file's free space and in the log. Erasing now always compacts the file
and empties the log, as it did before the shortcut for accounts with
nothing stored.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TCk6t7edJdscNtTSeFmyQN
"What changed" listed each changed file with git diff --name-only,
which reports a moved file at its new path only. Moving a file out of
src-tauri/ (into docs/, say) skipped the Rust checks, and the skipped
"Desktop shell (Rust)" counted as passed for a build that may no longer
compile; moving one out of app/ into docs/ skipped the end-to-end
tests. --no-renames lists the old path as deleted and the new one as
added.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TCk6t7edJdscNtTSeFmyQN
…en readers do

The test found the description by walking from the switch to its row's
text, which held the label too and would follow any change to the row's
markup. It now checks the switch's accessible description, the whole
sentence for each build, and that the window material control shows
only where its description points to it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TCk6t7edJdscNtTSeFmyQN
The listener reads a request's headers in chunks and looks for the
blank line that ends them across chunk boundaries. No test sent the
genuine callback in pieces with that blank line split between two
reads; one does now (it fails if the search drops the overlap).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TCk6t7edJdscNtTSeFmyQN
The backup steps said to close the app, but with "Keep running in the
tray" on, closing the window only hides it: the database stays open and
its latest plays can still be in the write-ahead log. They now say to
quit, from the tray menu if need be.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TCk6t7edJdscNtTSeFmyQN
@github-actions github-actions Bot added the desktop The desktop app (src-tauri) label Dec 3, 2026
Kkkermit and others added 2 commits December 3, 2026 12:15
Going back to an older version then needs a backup from before the upgrade;
a major version is for changes people must act on when they upgrade.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TCk6t7edJdscNtTSeFmyQN
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TCk6t7edJdscNtTSeFmyQN
@Kkkermit Kkkermit changed the title chore: faster CI, open-source docs, comment cleanup and a hardened Rust shell feat: Statsify 1.2.0: faster CI, open-source docs and a hardened Rust shell Dec 3, 2026
@github-actions github-actions Bot added the enhancement New feature or improvement label Dec 3, 2026
Comment thread src-tauri/src/oauth.rs Fixed
Comment thread src-tauri/src/oauth.rs Fixed
Comment thread src-tauri/src/oauth.rs Fixed
Three tests printed the HTTP response read from the socket when an assertion
failed, which CodeQL reports as log injection (alerts 11-13). They now say
what was wrong in their own words.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TCk6t7edJdscNtTSeFmyQN
@Kkkermit
Kkkermit merged commit a448eef into main Dec 3, 2026
29 checks passed
@Kkkermit
Kkkermit deleted the feature/cleanup-ci-docs-rust branch December 3, 2026 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

desktop The desktop app (src-tauri) enhancement New feature or improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants