feedBack/tests
ChrisBeWithYou ee7bafbb47
fix(v3): decode stats:recorded filename so post-play score badge refreshes (#620)
PR #574 added a `stats:recorded` -> in-place accuracy-badge repaint so a
just-earned score shows without restarting the app. But the repaint never
matched a card, so the badge stayed stale until a full render() (app
restart / search / re-enter the screen) -- exactly the "only updates after
a restart" report.

Root cause is a filename key-space mismatch. The event (like song:loading)
carries the filename `encodeURIComponent`'d, because that is what playCard
hands to playSong (the highway WS decodeURIComponent's it). Library cards,
though, key on the DECODED localFilename (data-fn), and /api/stats/best is
server-canonicalized to that same decoded key (server.py
_canonical_song_filename). So repaintAccuracy's `data-fn !== key` check
rejected every card and `state.accuracy[encoded]` was undefined.

Decode the event filename back into the card / state.accuracy key space via
a small `decFn` helper before marking dirty and repainting, fixing both the
immediate repaint and the onV3SongsScreenEnter deferred path. decFn is
idempotent for already-decoded names and falls back to the original on
malformed input, so a real filename containing a literal '%' is never
corrupted.

Tests: tests/js/v3_songs_score_badge_refresh.test.js extracts the real
decFn from the shipped source and proves the encoded event filename
round-trips to the raw card key (incl. spaces and subfolder '/').


Claude-Session: https://claude.ai/code/session_01QbexxfTt8q2tAn436MqGWF

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: byrongamatos <xasiklas@gmail.com>
2026-06-28 12:39:13 +02:00
..
browser fix(player): reliable Escape "Back" + resumable, optionally-confirmed song exit (#619) 2026-06-28 12:32:33 +02:00
fixtures Remove unused binary test fixture; correct stale scan comments 2026-06-16 18:49:40 +01:00
js fix(v3): decode stats:recorded filename so post-play score badge refreshes (#620) 2026-06-28 12:39:13 +02:00
plugins feat(folder_library): Folder Library core plugin (#610) 2026-06-27 16:03:54 +02:00
__init__.py Clean release snapshot 2026-06-16 18:47:13 +02:00
conftest.py rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
test_audio_bundled.py rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
test_audio_effect_mappings.py rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
test_audio_local_path.py rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
test_audio.py Clean release snapshot 2026-06-16 18:47:13 +02:00
test_builtin_diagnostic_seed.py rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
test_correlation_id.py rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
test_demo_mode.py rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
test_diagnostics_bundle.py rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
test_diagnostics_hardware.py rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
test_diagnostics_redact.py rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
test_drums_lib.py Purge external-format terminology from code, tests and docs 2026-06-16 19:36:53 +01:00
test_env_compat.py rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
test_feedpak_extension.py rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
test_gp2midi.py rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
test_gp2notation.py feat(core): adopt feedpak_version — read on load + stamp on manifest writes (spec §4) (#530) 2026-06-20 21:59:04 +02:00
test_gp2rs_drums.py Clean release snapshot 2026-06-16 18:47:13 +02:00
test_gp2rs_gpx.py fix(gp-import): correct bass string count, lead/rhythm roles, preview note count (#601) 2026-06-26 18:58:35 +02:00
test_gp2rs.py rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
test_gp_audio_sync.py Clean release snapshot 2026-06-16 18:47:13 +02:00
test_highway_3d_routes.py Clean release snapshot 2026-06-16 18:47:13 +02:00
test_highway_ws_notation.py rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
test_library_filters.py rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
test_library_providers.py rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
test_lift_keys_notation.py Clean release snapshot 2026-06-16 18:47:13 +02:00
test_logging_setup.py rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
test_loose_traversal.py rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
test_loosefolder.py Purge external-format terminology from code, tests and docs 2026-06-16 19:36:53 +01:00
test_lyrics_transcribe.py Purge external-format terminology from code, tests and docs 2026-06-16 19:36:53 +01:00
test_midi_import_drums.py Clean release snapshot 2026-06-16 18:47:13 +02:00
test_midi_import.py Clean release snapshot 2026-06-16 18:47:13 +02:00
test_minigames_routes.py rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
test_notation_lib.py Clean release snapshot 2026-06-16 18:47:13 +02:00
test_notation_lift.py Clean release snapshot 2026-06-16 18:47:13 +02:00
test_notation_to_notes.py Clean release snapshot 2026-06-16 18:47:13 +02:00
test_parse_arrangement.py rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
test_playlists_api.py rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
test_plugin_manifest_contract.py rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
test_plugin_runtime_idempotence.py rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
test_plugins.py feat(plugins): full-screen (immersive) plugin screens via manifest opt-in (#590) 2026-06-25 00:02:16 +02:00
test_profile_api.py rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
test_profile_domains.py Clean release snapshot 2026-06-16 18:47:13 +02:00
test_progression_api.py rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
test_progression.py Purge external-format terminology from code, tests and docs 2026-06-16 19:36:53 +01:00
test_safepath.py Clean release snapshot 2026-06-16 18:47:13 +02:00
test_settings_api.py feat(achievements): opt-in, privacy controls & data-min gate (epic PR2) (#591) 2026-06-24 17:00:30 +02:00
test_settings_export.py rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
test_settings_instrument.py rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
test_sloppak_cent_offset.py Clean release snapshot 2026-06-16 18:47:13 +02:00
test_sloppak_cover_art.py rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
test_sloppak_drumtab_load.py Clean release snapshot 2026-06-16 18:47:13 +02:00
test_sloppak_feedpak_version.py feat(core): adopt feedpak_version — read on load + stamp on manifest writes (spec §4) (#530) 2026-06-20 21:59:04 +02:00
test_sloppak_file_traversal.py rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
test_sloppak_keys_load.py feat(core): consume keys.json — song-level key/scale track (loader + WS) (#528) 2026-06-20 21:23:48 +02:00
test_sloppak_notation_load.py Clean release snapshot 2026-06-16 18:47:13 +02:00
test_sloppak_original_audio_load.py feat(sloppak): expose full-mix original_audio alongside stems (#583) 2026-06-23 18:05:45 +02:00
test_sloppak_song_timeline_load.py feat(core): consume song_timeline tempos + time_signatures + per-chart tempos (feedpak 1.2.0) (#529) 2026-06-20 21:35:07 +02:00
test_song_score.py Clean release snapshot 2026-06-16 18:47:13 +02:00
test_song_stats_api.py rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
test_song.py rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
test_songmeta.py Clean release snapshot 2026-06-16 18:47:13 +02:00
test_startup_status.py rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
test_tailwind_rebuild.py rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
test_tones.py Clean release snapshot 2026-06-16 18:47:13 +02:00
test_tunings.py Clean release snapshot 2026-06-16 18:47:13 +02:00
test_version_endpoint.py rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
test_vocal_pitch.py Clean release snapshot 2026-06-16 18:47:13 +02:00
test_xp.py Clean release snapshot 2026-06-16 18:47:13 +02:00