chore(deps): bump vite-plus to v0.2.2#17
Conversation
* fix: populate starred date on Subsonic songs, albums and artists * fix: populate played date on Subsonic albums * refactor: use query builder for exists clause and index interactions for last-played lookups
…frequent and recent types (koel#2606)
…#2602) * fix: read DATE vorbis tag for year when scanning FLAC/OGG files * test: assert year is read from DATE vorbis tag when scanning FLAC --------- Co-authored-by: Phan An <me@phanan.net>
There was a problem hiding this comment.
Code Review
This pull request adds 'starred' and 'played' timestamps to Subsonic API resources, implements offset-based pagination in the album repository, adds a composite index to the 'interactions' table, and updates project dependencies and documentation formatting. The review feedback identifies several issues: missing imports for the 'DB' facade in 'AlbumBuilder.php' and the 'FavoriteableType' enum in 'GetStarred2Test.php', a missing 'down' method in the database migration, and an incorrect 'vitest' version in 'pnpm-workspace.yaml' that should be pinned to the commit build to prevent breaking the unified toolchain.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| vitest: 'catalog:' | ||
| catalog: | ||
| vite: npm:@voidzero-dev/vite-plus-core@0.0.0-commit.1d7ba811f0e456640b0e761e8e8acf77d1ad3251 | ||
| vitest: 4.1.9 |
There was a problem hiding this comment.
The PR description states that vitest is pinned to the commit build. However, in the catalog section, vitest is set to 4.1.9 (a standard semver version). This will install the standard vitest package instead of the vite-plus test wrapper (@voidzero-dev/vite-plus-test), which breaks the unified toolchain setup. It should be pinned to the corresponding commit build.
vitest: npm:@voidzero-dev/vite-plus-test@0.0.0-commit.1d7ba811f0e456640b0e761e8e8acf77d1ad3251| throw_unless($this->user, new LogicException('User must be set to query last played timestamps.')); | ||
|
|
||
| return $this->addSelect([ | ||
| 'last_played_at' => DB::table('interactions') |
There was a problem hiding this comment.
The DB facade is used here but is not imported in this file. Since DB was not previously used in AlbumBuilder.php, this will cause a runtime error (Class "App\Builders\DB" not found). We should fully qualify it as \Illuminate\Support\Facades\DB or import it at the top of the file.
'last_played_at' => \\Illuminate\\Support\\Facades\\DB::table('interactions')| Favorite::factory()->createMany([ | ||
| [ | ||
| 'user_id' => $user->id, | ||
| 'favoriteable_type' => FavoriteableType::PLAYABLE->value, | ||
| 'favoriteable_id' => $song->id, | ||
| 'created_at' => $favoritedAt, | ||
| ], | ||
| [ | ||
| 'user_id' => $user->id, | ||
| 'favoriteable_type' => FavoriteableType::ALBUM->value, | ||
| 'favoriteable_id' => $album->id, | ||
| 'created_at' => $favoritedAt, | ||
| ], | ||
| [ | ||
| 'user_id' => $user->id, | ||
| 'favoriteable_type' => FavoriteableType::ARTIST->value, | ||
| 'favoriteable_id' => $artist->id, | ||
| 'created_at' => $favoritedAt, | ||
| ], | ||
| ]); |
There was a problem hiding this comment.
The FavoriteableType enum is used in this new test, but it is not imported at the top of GetStarred2Test.php. This will cause a test failure (Class "Tests\Feature\Subsonic\FavoriteableType" not found). We should fully qualify it as \App\Enums\FavoriteableType.
Favorite::factory()->createMany([
[
'user_id' => $user->id,
'favoriteable_type' => \\App\\Enums\\FavoriteableType::PLAYABLE->value,
'favoriteable_id' => $song->id,
'created_at' => $favoritedAt,
],
[
'user_id' => $user->id,
'favoriteable_type' => \\App\\Enums\\FavoriteableType::ALBUM->value,
'favoriteable_id' => $album->id,
'created_at' => $favoritedAt,
],
[
'user_id' => $user->id,
'favoriteable_type' => \\App\\Enums\\FavoriteableType::ARTIST->value,
'favoriteable_id' => $artist->id,
'created_at' => $favoritedAt,
],
]);| return new class extends Migration { | ||
| public function up(): void | ||
| { | ||
| Schema::table('interactions', static function (Blueprint $table): void { | ||
| $table->index(['song_id', 'user_id', 'last_played_at']); | ||
| }); | ||
| } | ||
| }; |
There was a problem hiding this comment.
This migration lacks a down() method to drop the newly added composite index. To ensure the migration is reversible and supports rollback functionality, please add a down() method.
return new class extends Migration {
public function up(): void
{
Schema::table('interactions', static function (Blueprint $table): void {
$table->index(['song_id', 'user_id', 'last_played_at']);
});
}
public function down(): void
{
Schema::table('interactions', static function (Blueprint $table): void {
$table->dropIndex(['song_id', 'user_id', 'last_played_at']);
});
}
};
Summary
Bump
vite-plusand related packages to the pkg.pr.new prerelease build for v0.2.2 (registry-bridge commit build) to smoke-test the prerelease.vite-plus+vite(alias to@voidzero-dev/vite-plus-core) andvitestpinned to the commit build across deps / overrides / catalogsminimumReleaseAgeenabled with thevite-plus/@voidzero-dev/*/ oxc / oxlint stack excluded.npmrc(or.yarnrc.yml) points the package manager at the registry bridge (prerelease scaffolding)Test plan