diff --git a/app/Actions/RecordCommitView.php b/app/Actions/RecordCommitView.php new file mode 100644 index 0000000000..f9e69959d9 --- /dev/null +++ b/app/Actions/RecordCommitView.php @@ -0,0 +1,24 @@ +id}"; + + if ($session->has($key)) { + return; + } + + $session->put($key, true); + + Commit::withoutTimestamps(fn () => $commit->increment('views_count')); + } +} diff --git a/app/Http/Controllers/CommitController.php b/app/Http/Controllers/CommitController.php index b793b45905..d578507342 100644 --- a/app/Http/Controllers/CommitController.php +++ b/app/Http/Controllers/CommitController.php @@ -6,6 +6,7 @@ use App\Actions\CreateCommit; use App\Actions\DeleteCommit; +use App\Actions\RecordCommitView; use App\Dto\ThreadContinuation; use App\Enums\CommitStatus; use App\Exceptions\GuildPaused; @@ -38,6 +39,8 @@ */ public function show(ShowCommitRequest $request, #[CurrentUser] ?User $currentUser, Profile $profile, Commit $commit, CommitPageQuery $page, CommitAncestorsQuery $ancestors, CommitContinuationQuery $continuation, CommitRepliesQuery $replies, LinkCommitsQuery $linkCommits, LinkPages $linkPages, PageMetadata $metadata): Response { + $recordView->handle($commit, $request->session()); + $focusedCommit = null; $getCommit = function () use (&$focusedCommit, $page, $commit, $currentUser): Commit { return $focusedCommit ??= $page->get($commit, $currentUser); diff --git a/app/Http/Resources/CommitResource.php b/app/Http/Resources/CommitResource.php index 6e3f02ed28..22763c432b 100644 --- a/app/Http/Resources/CommitResource.php +++ b/app/Http/Resources/CommitResource.php @@ -78,6 +78,7 @@ public function toArray(Request $request): array 'created_at' => $this->created_at->toIso8601ZuluString(), 'stars_count' => $this->whenCounted('stars'), 'replies_count' => $this->whenCounted('replies'), + 'views_count' => $this->views_count, 'link_preview' => $this->whenLoaded('linkPreview'), 'images' => $this->whenLoaded('images', fn (): mixed => $this->status === CommitStatus::Approved || ! $this->imagesAreVisibleTo($request->user()) ? $this->images diff --git a/app/Models/Commit.php b/app/Models/Commit.php index 93adc3ffd7..bc0c88d419 100644 --- a/app/Models/Commit.php +++ b/app/Models/Commit.php @@ -47,6 +47,7 @@ * @property-read CarbonInterface|null $deleted_at * @property-read int $stars_count * @property-read int $pasteis_count + * @property-read int $views_count * @property-read bool $starred * @property-read User|null $user * @property-read Profile|null $author @@ -107,6 +108,7 @@ final class Commit extends Model */ protected $attributes = [ 'pasteis_count' => 0, + 'views_count' => 0, ]; /** @@ -133,6 +135,7 @@ public function casts(): array 'root_id' => 'string', 'hot_score' => 'float', 'pasteis_count' => 'integer', + 'views_count' => 'integer', 'body' => 'string', 'mentions' => 'array', 'organization_mentions' => 'array', diff --git a/app/Queries/CommitBuilder.php b/app/Queries/CommitBuilder.php index 5ebb4ac9da..6a7a7165c9 100644 --- a/app/Queries/CommitBuilder.php +++ b/app/Queries/CommitBuilder.php @@ -37,8 +37,8 @@ final class CommitBuilder extends Builder */ private const array COLUMNS_BUT_EMBEDDING = [ 'id', 'user_id', 'body', 'created_at', 'updated_at', 'status', 'parent_id', 'deleted_at', 'link_preview_id', - 'quoted_commit_id', 'mentions', 'ai_decision', 'ai_categories', 'root_id', 'hot_score', 'pasteis_count', 'author_id', - 'headlines_classified_at', 'guild_id', + 'quoted_commit_id', 'mentions', 'ai_decision', 'ai_categories', 'root_id', 'hot_score', 'pasteis_count', + 'views_count', ]; /** diff --git a/composer.lock b/composer.lock index 66c7484ce0..a098b3523a 100644 --- a/composer.lock +++ b/composer.lock @@ -295,6 +295,83 @@ "time": "2026-09-06T14:11:38+00:00", "published-time": "2026-09-06T14:15:00+00:00" }, + { + "name": "composer/semver", + "version": "3.5.2", + "source": { + "type": "git", + "url": "https://github.com/composer/semver.git", + "reference": "9dfce66f1e97360ea5e6d3e38ab14277e4cc591e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/semver/zipball/9dfce66f1e97360ea5e6d3e38ab14277e4cc591e", + "reference": "9dfce66f1e97360ea5e6d3e38ab14277e4cc591e", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^1.11", + "symfony/phpunit-bridge": "^3 || ^7" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\Semver\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nils Adermann", + "email": "naderman@naderman.de", + "homepage": "http://www.naderman.de" + }, + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + }, + { + "name": "Rob Bast", + "email": "rob.bast@gmail.com", + "homepage": "http://robbast.nl" + } + ], + "description": "Version comparison library that offers utilities, version constraint parsing and validation.", + "keywords": [ + "semantic", + "semver", + "validation", + "versioning" + ], + "support": { + "irc": "ircs://irc.libera.chat:6697/composer", + "issues": "https://github.com/composer/semver/issues", + "source": "https://github.com/composer/semver/tree/3.5.2" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + } + ], + "time": "2026-10-22T15:37:26+00:00" + }, { "name": "dflydev/dot-access-data", "version": "v3.0.3", @@ -818,6 +895,50 @@ "time": "2025-12-03T09:33:47+00:00", "published-time": "2025-12-03T09:37:01+00:00" }, + { + "name": "google/protobuf", + "version": "v5.36.2", + "source": { + "type": "git", + "url": "https://github.com/protocolbuffers/protobuf-php.git", + "reference": "020bc8e831611869ac387ddd38fbbadd78d15195" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/protocolbuffers/protobuf-php/zipball/020bc8e831611869ac387ddd38fbbadd78d15195", + "reference": "020bc8e831611869ac387ddd38fbbadd78d15195", + "shasum": "" + }, + "require": { + "php": ">=8.2.0" + }, + "require-dev": { + "phpunit/phpunit": ">=11.5.50 <12.0.0" + }, + "suggest": { + "ext-bcmath": "Need to support JSON deserialization" + }, + "type": "library", + "autoload": { + "psr-4": { + "Google\\Protobuf\\": "src/Google/Protobuf", + "GPBMetadata\\Google\\Protobuf\\": "src/GPBMetadata/Google/Protobuf" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "proto library for PHP", + "homepage": "https://developers.google.com/protocol-buffers/", + "keywords": [ + "proto" + ], + "support": { + "source": "https://github.com/protocolbuffers/protobuf-php/tree/v5.36.2" + }, + "time": "2026-09-17T15:56:42+00:00" + }, { "name": "graham-campbell/result-type", "version": "v1.2.0", @@ -4912,23 +5033,977 @@ "shasum": "" }, "require": { - "guzzlehttp/guzzle": "^7.8.2 || ^8.0", - "guzzlehttp/psr7": "^2.6.3 || ^3.0", - "php": "^8.1.0", - "psr/http-client": "^1.0" + "guzzlehttp/guzzle": "^7.8.2 || ^8.0", + "guzzlehttp/psr7": "^2.6.3 || ^3.0", + "php": "^8.1.0", + "psr/http-client": "^1.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^3.13", + "mockery/mockery": "^1.6", + "pestphp/pest": "^1.0|^2.0|^3.0|^4.0|^5.0" + }, + "type": "library", + "autoload": { + "files": [ + "src/Resend.php" + ], + "psr-4": { + "Resend\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Resend and contributors", + "homepage": "https://github.com/resend/resend-php/contributors" + } + ], + "description": "Resend PHP library.", + "homepage": "https://resend.com/", + "keywords": [ + "api", + "client", + "php", + "resend", + "sdk" + ], + "support": { + "issues": "https://github.com/resend/resend-php/issues", + "source": "https://github.com/resend/resend-php/tree/v1.17.0" + }, + "time": "2026-10-20T03:25:21+00:00" + }, + { + "name": "roadrunner-php/roadrunner-api-dto", + "version": "v1.18.0", + "source": { + "type": "git", + "url": "https://github.com/roadrunner-php/roadrunner-api-dto.git", + "reference": "81d8247894cd3f75a4e0fba2b619f9d7efa03d27" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/roadrunner-php/roadrunner-api-dto/zipball/81d8247894cd3f75a4e0fba2b619f9d7efa03d27", + "reference": "81d8247894cd3f75a4e0fba2b619f9d7efa03d27", + "shasum": "" + }, + "require": { + "google/protobuf": "^4.31.1||^5.34.0", + "php": "^8.1" + }, + "conflict": { + "temporal/sdk": "<2.9.0" + }, + "suggest": { + "google/common-protos": "Required for Temporal API" + }, + "type": "library", + "autoload": { + "psr-4": { + "Temporal\\": "generated/Temporal", + "RoadRunner\\": "generated/RoadRunner", + "GPBMetadata\\": "generated/GPBMetadata" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Pavel Butchnev (butschster)", + "email": "pavel.buchnev@spiralscout.com" + }, + { + "name": "Aleksei Gagarin (roxblnfk)", + "email": "alexey.gagarin@spiralscout.com" + }, + { + "name": "RoadRunner Community", + "homepage": "https://github.com/roadrunner-server/roadrunner/graphs/contributors" + } + ], + "description": "RoadRunner PHP API", + "homepage": "https://roadrunner.dev", + "support": { + "chat": "https://discord.gg/V6EK4he", + "docs": "https://docs.roadrunner.dev", + "forum": "https://forum.roadrunner.dev", + "issues": "https://github.com/roadrunner-server/roadrunner/issues", + "source": "https://github.com/roadrunner-php/roadrunner-api-dto/tree/v1.18.0" + }, + "funding": [ + { + "url": "https://github.com/sponsors/roadrunner-server", + "type": "github" + } + ], + "time": "2026-10-09T15:32:54+00:00" + }, + { + "name": "roadrunner/goridge", + "version": "4.6.0", + "source": { + "type": "git", + "url": "https://github.com/roadrunner-php/goridge.git", + "reference": "887bd3a6f89a0b95252db608856d33d7a1284406" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/roadrunner-php/goridge/zipball/887bd3a6f89a0b95252db608856d33d7a1284406", + "reference": "887bd3a6f89a0b95252db608856d33d7a1284406", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-sockets": "*", + "php": ">=8.2", + "roadrunner/roadrunner": "^3.0" + }, + "replace": { + "spiral/goridge": "self.version" + }, + "require-dev": { + "google/protobuf": "^3.22 || ^4.0 || ^5.0", + "jetbrains/phpstorm-attributes": "^1.0", + "llm/skills": "^1.14", + "roxblnfk/unpoly": "^1.8", + "rybakit/msgpack": "^0.7", + "spiral/code-style": "^2.3.1", + "testo/testo": "^0.10.55", + "vimeo/psalm": "^6 || ^7" + }, + "suggest": { + "ext-protobuf": "Protobuf codec support", + "google/protobuf": "(^3.22 || ^4.0 || ^5.0) Protobuf codec support" + }, + "type": "library", + "autoload": { + "psr-4": { + "Spiral\\Goridge\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Anton Titov", + "homepage": "https://github.com/wolfy-j" + }, + { + "name": "Valery Piashchynski", + "homepage": "https://github.com/rustatian" + }, + { + "name": "Aleksei Gagarin", + "homepage": "https://github.com/roxblnfk" + }, + { + "name": "Pavel Buchnev", + "homepage": "https://github.com/butschster" + }, + { + "name": "Maksim Smakouz", + "homepage": "https://github.com/msmakouz" + }, + { + "name": "RoadRunner Community", + "homepage": "https://github.com/roadrunner-server/roadrunner/graphs/contributors" + } + ], + "description": "High-performance PHP-to-Go IPC bridge: the RPC transport between PHP workers and the RoadRunner application server", + "homepage": "https://roadrunner.dev/", + "keywords": [ + "Relay", + "Socket", + "golang", + "goridge", + "ipc", + "pipes", + "protobuf", + "roadrunner", + "rpc" + ], + "support": { + "chat": "https://discord.gg/V6EK4he", + "docs": "https://docs.roadrunner.dev/docs/php-worker/rpc", + "issues": "https://github.com/roadrunner-server/roadrunner/issues", + "source": "https://github.com/roadrunner-php/goridge" + }, + "funding": [ + { + "url": "https://github.com/sponsors/roadrunner-server", + "type": "github" + } + ], + "time": "2026-10-19T08:41:25+00:00" + }, + { + "name": "roadrunner/roadrunner", + "version": "v3.0.1", + "source": { + "type": "git", + "url": "https://github.com/roadrunner-server/roadrunner.git", + "reference": "ed89c2ec991f64b072297fcbee5ad7f058779199" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/roadrunner-server/roadrunner/zipball/ed89c2ec991f64b072297fcbee5ad7f058779199", + "reference": "ed89c2ec991f64b072297fcbee5ad7f058779199", + "shasum": "" + }, + "type": "metapackage", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Anton Titov / Wolfy-J", + "email": "wolfy.jd@gmail.com" + }, + { + "name": "Valery Piashchynski", + "homepage": "https://github.com/rustatian" + }, + { + "name": "RoadRunner Community", + "homepage": "https://github.com/roadrunner-server/roadrunner/graphs/contributors" + } + ], + "description": "RoadRunner: High-performance PHP application server and process manager written in Go and powered with plugins", + "homepage": "https://roadrunner.dev/", + "support": { + "chat": "https://discord.gg/V6EK4he", + "docs": "https://docs.roadrunner.dev/", + "issues": "https://github.com/roadrunner-server/roadrunner/issues", + "source": "https://github.com/roadrunner-server/roadrunner/tree/v3.0.1" + }, + "funding": [ + { + "url": "https://github.com/sponsors/roadrunner-server", + "type": "github" + } + ], + "time": "2026-10-21T19:33:12+00:00" + }, + { + "name": "spiral/core", + "version": "3.17.2", + "source": { + "type": "git", + "url": "https://github.com/spiral/core.git", + "reference": "ca5b8483610aed0c82d4f06bc7907e191d88aca0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spiral/core/zipball/ca5b8483610aed0c82d4f06bc7907e191d88aca0", + "reference": "ca5b8483610aed0c82d4f06bc7907e191d88aca0", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "psr/container": "^1.1|^2.0", + "spiral/security": "^3.17.2" + }, + "provide": { + "psr/container-implementation": "^1.1|^2.0" + }, + "require-dev": { + "mockery/mockery": "^1.6.12", + "phpunit/phpunit": "^10.5.41", + "vimeo/psalm": "^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.17.x-dev" + } + }, + "autoload": { + "psr-4": { + "Spiral\\Core\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Anton Titov (wolfy-j)", + "email": "wolfy-j@spiralscout.com" + }, + { + "name": "Pavel Butchnev (butschster)", + "homepage": "https://github.com/butschster" + }, + { + "name": "Aleksei Gagarin (roxblnfk)", + "homepage": "https://github.com/roxblnfk" + }, + { + "name": "Maksim Smakouz (msmakouz)", + "email": "maksim.smakouz@spiralscout.com" + } + ], + "description": "IoC container, IoC scopes, factory, memory, configuration interfaces", + "homepage": "https://spiral.dev", + "support": { + "issues": "https://github.com/spiral/framework/issues", + "source": "https://github.com/spiral/core" + }, + "funding": [ + { + "url": "https://github.com/sponsors/spiral", + "type": "github" + } + ], + "time": "2026-08-05T12:07:26+00:00" + }, + { + "name": "spiral/hmvc", + "version": "3.17.2", + "source": { + "type": "git", + "url": "https://github.com/spiral/hmvc.git", + "reference": "11111aac577f3d7ccc9bbe8b79dc6441fd21b9c5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spiral/hmvc/zipball/11111aac577f3d7ccc9bbe8b79dc6441fd21b9c5", + "reference": "11111aac577f3d7ccc9bbe8b79dc6441fd21b9c5", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "psr/event-dispatcher": "^1.0", + "spiral/core": "^3.17.2", + "spiral/interceptors": "^3.17.2" + }, + "require-dev": { + "phpunit/phpunit": "^10.5.41", + "spiral/testing": "^2.12", + "vimeo/psalm": "^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.17.x-dev" + } + }, + "autoload": { + "psr-4": { + "Spiral\\Core\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Anton Titov (wolfy-j)", + "email": "wolfy-j@spiralscout.com" + }, + { + "name": "Pavel Butchnev (butschster)", + "homepage": "https://github.com/butschster" + }, + { + "name": "Aleksei Gagarin (roxblnfk)", + "homepage": "https://github.com/roxblnfk" + }, + { + "name": "Maksim Smakouz (msmakouz)", + "email": "maksim.smakouz@spiralscout.com" + } + ], + "description": "HMVC Core and Controllers", + "homepage": "https://spiral.dev", + "support": { + "chat": "https://discord.gg/V6EK4he", + "docs": "https://spiral.dev/docs", + "issues": "https://github.com/spiral/framework/issues", + "source": "https://github.com/spiral/hmvc" + }, + "funding": [ + { + "url": "https://github.com/sponsors/spiral", + "type": "github" + } + ], + "time": "2026-08-05T12:00:27+00:00" + }, + { + "name": "spiral/interceptors", + "version": "3.17.2", + "source": { + "type": "git", + "url": "https://github.com/spiral/interceptors.git", + "reference": "ea0e10ecb2c6058541a2b097a660fd2b532a5ffa" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spiral/interceptors/zipball/ea0e10ecb2c6058541a2b097a660fd2b532a5ffa", + "reference": "ea0e10ecb2c6058541a2b097a660fd2b532a5ffa", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "psr/event-dispatcher": "^1.0", + "spiral/core": "^3.17.2" + }, + "require-dev": { + "phpunit/phpunit": "^10.5.41", + "spiral/testing": "^2.12", + "vimeo/psalm": "^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.17.x-dev" + } + }, + "autoload": { + "psr-4": { + "Spiral\\Interceptors\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Anton Titov (wolfy-j)", + "email": "wolfy-j@spiralscout.com" + }, + { + "name": "Pavel Butchnev (butschster)", + "homepage": "https://github.com/butschster" + }, + { + "name": "Aleksei Gagarin (roxblnfk)", + "homepage": "https://github.com/roxblnfk" + }, + { + "name": "Maksim Smakouz (msmakouz)", + "email": "maksim.smakouz@spiralscout.com" + } + ], + "description": "Spiral Interceptors", + "homepage": "https://spiral.dev", + "keywords": [ + "aop", + "interceptors", + "spiral" + ], + "support": { + "chat": "https://discord.gg/V6EK4he", + "docs": "https://spiral.dev/docs", + "issues": "https://github.com/spiral/framework/issues", + "source": "https://github.com/spiral/interceptors" + }, + "funding": [ + { + "url": "https://github.com/sponsors/spiral", + "type": "github" + } + ], + "time": "2026-08-05T12:00:37+00:00" + }, + { + "name": "spiral/logger", + "version": "3.17.2", + "source": { + "type": "git", + "url": "https://github.com/spiral/logger.git", + "reference": "671d91a3427019a14670b614474cc57156d5cd69" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spiral/logger/zipball/671d91a3427019a14670b614474cc57156d5cd69", + "reference": "671d91a3427019a14670b614474cc57156d5cd69", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "psr/log": "1 - 3", + "spiral/core": "^3.17.2" + }, + "require-dev": { + "mockery/mockery": "^1.6.12", + "phpunit/phpunit": "^10.5.41", + "vimeo/psalm": "^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.17.x-dev" + } + }, + "autoload": { + "psr-4": { + "Spiral\\Logger\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Anton Titov (wolfy-j)", + "email": "wolfy-j@spiralscout.com" + }, + { + "name": "Pavel Butchnev (butschster)", + "homepage": "https://github.com/butschster" + }, + { + "name": "Aleksei Gagarin (roxblnfk)", + "homepage": "https://github.com/roxblnfk" + }, + { + "name": "Maksim Smakouz (msmakouz)", + "email": "maksim.smakouz@spiralscout.com" + } + ], + "description": "LogFactory and global log listeners", + "homepage": "https://spiral.dev", + "support": { + "issues": "https://github.com/spiral/framework/issues", + "source": "https://github.com/spiral/logger" + }, + "funding": [ + { + "url": "https://github.com/sponsors/spiral", + "type": "github" + } + ], + "time": "2026-08-05T12:05:38+00:00" + }, + { + "name": "spiral/roadrunner", + "version": "v2025.1.15", + "source": { + "type": "git", + "url": "https://github.com/roadrunner-server/roadrunner.git", + "reference": "321b817fab1056e404533ca1ddd200e77d1525fd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/roadrunner-server/roadrunner/zipball/321b817fab1056e404533ca1ddd200e77d1525fd", + "reference": "321b817fab1056e404533ca1ddd200e77d1525fd", + "shasum": "" + }, + "type": "metapackage", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Anton Titov / Wolfy-J", + "email": "wolfy.jd@gmail.com" + }, + { + "name": "Valery Piashchynski", + "homepage": "https://github.com/rustatian" + }, + { + "name": "RoadRunner Community", + "homepage": "https://github.com/roadrunner-server/roadrunner/graphs/contributors" + } + ], + "description": "RoadRunner: High-performance PHP application server and process manager written in Go and powered with plugins", + "homepage": "https://roadrunner.dev/", + "support": { + "chat": "https://discord.gg/V6EK4he", + "docs": "https://docs.roadrunner.dev/", + "issues": "https://github.com/roadrunner-server/roadrunner/issues", + "source": "https://github.com/roadrunner-server/roadrunner/tree/v2025.1.15" + }, + "funding": [ + { + "url": "https://github.com/sponsors/roadrunner-server", + "type": "github" + } + ], + "time": "2026-06-17T14:49:38+00:00" + }, + { + "name": "spiral/roadrunner-cli", + "version": "v2.7.2", + "source": { + "type": "git", + "url": "https://github.com/roadrunner-php/cli.git", + "reference": "54909d3fff22d34d1a6e894785f3df9dca0e2e8c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/roadrunner-php/cli/zipball/54909d3fff22d34d1a6e894785f3df9dca0e2e8c", + "reference": "54909d3fff22d34d1a6e894785f3df9dca0e2e8c", + "shasum": "" + }, + "require": { + "composer/semver": "^3.4", + "ext-json": "*", + "php": ">=8.1", + "spiral/roadrunner-worker": "^2 || ^3", + "spiral/tokenizer": "^2.13 || ^3.15", + "symfony/console": "^5.3 || ^6.0 || ^7.0 || ^8.0", + "symfony/http-client": "^4.4.51 || ^5.4.49 || ^6.4.17 || ^7.2 || ^8.0", + "symfony/yaml": "^5.4.49 || ^6.4.17 || ^7.2 || ^8.0" + }, + "require-dev": { + "jetbrains/phpstorm-attributes": "^1.2", + "spiral/code-style": "^2.2.2", + "spiral/dumper": "^3.3", + "vimeo/psalm": "^6.0" + }, + "bin": [ + "bin/rr" + ], + "type": "library", + "autoload": { + "psr-4": { + "Spiral\\RoadRunner\\Console\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Anton Titov (wolfy-j)", + "email": "wolfy-j@spiralscout.com" + }, + { + "name": "RoadRunner Community", + "homepage": "https://github.com/spiral/roadrunner/graphs/contributors" + } + ], + "description": "RoadRunner: Command Line Interface", + "homepage": "https://roadrunner.dev", + "support": { + "chat": "https://discord.gg/V6EK4he", + "docs": "https://docs.roadrunner.dev", + "issues": "https://github.com/roadrunner-server/roadrunner/issues", + "source": "https://github.com/roadrunner-php/cli/tree/v2.7.2" + }, + "funding": [ + { + "url": "https://github.com/sponsors/roadrunner-server", + "type": "github" + } + ], + "time": "2025-12-14T19:18:46+00:00" + }, + { + "name": "spiral/roadrunner-http", + "version": "v3.6.0", + "source": { + "type": "git", + "url": "https://github.com/roadrunner-php/http.git", + "reference": "a44a5f7d54d4ee8a14fe99cd22dcd128db270c88" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/roadrunner-php/http/zipball/a44a5f7d54d4ee8a14fe99cd22dcd128db270c88", + "reference": "a44a5f7d54d4ee8a14fe99cd22dcd128db270c88", + "shasum": "" + }, + "require": { + "ext-json": "*", + "php": ">=8.1", + "psr/http-factory": "^1.0.1", + "psr/http-message": "^1.0.1 || ^2.0", + "roadrunner-php/roadrunner-api-dto": "^1.6", + "spiral/roadrunner": "^2023.3 || ^2024.1 || ^2025.1", + "spiral/roadrunner-worker": "^3.5", + "symfony/polyfill-php83": "^1.29" + }, + "require-dev": { + "jetbrains/phpstorm-attributes": "^1.0", + "nyholm/psr7": "^1.3", + "phpunit/phpunit": "^10.5", + "spiral/code-style": "^2.3", + "spiral/dumper": "^3.3", + "symfony/process": "^6.2 || ^7.0", + "vimeo/psalm": "^6.13" + }, + "suggest": { + "ext-protobuf": "Provides Protocol Buffers support. Without it, performance will be lower.", + "spiral/roadrunner-cli": "Provides RoadRunner installation and management CLI tools" + }, + "type": "library", + "autoload": { + "psr-4": { + "Spiral\\RoadRunner\\Http\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Anton Titov (wolfy-j)", + "email": "wolfy-j@spiralscout.com" + }, + { + "name": "Valery Piashchynski", + "homepage": "https://github.com/rustatian" + }, + { + "name": "Aleksei Gagarin (roxblnfk)", + "homepage": "https://github.com/roxblnfk" + }, + { + "name": "Pavel Buchnev (butschster)", + "email": "pavel.buchnev@spiralscout.com" + }, + { + "name": "Maksim Smakouz (msmakouz)", + "email": "maksim.smakouz@spiralscout.com" + }, + { + "name": "RoadRunner Community", + "homepage": "https://github.com/roadrunner-server/roadrunner/graphs/contributors" + } + ], + "description": "RoadRunner: HTTP and PSR-7 worker", + "homepage": "https://spiral.dev/", + "support": { + "chat": "https://discord.gg/V6EK4he", + "docs": "https://docs.roadrunner.dev", + "forum": "https://forum.roadrunner.dev/", + "issues": "https://github.com/roadrunner-server/roadrunner/issues", + "source": "https://github.com/roadrunner-php/http/tree/v3.6.0" + }, + "funding": [ + { + "url": "https://github.com/sponsors/roadrunner-server", + "type": "github" + } + ], + "time": "2025-08-31T12:42:23+00:00" + }, + { + "name": "spiral/roadrunner-worker", + "version": "v3.8.2", + "source": { + "type": "git", + "url": "https://github.com/roadrunner-php/worker.git", + "reference": "35fcf09b55de68954e03dc727b710b963db9517d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/roadrunner-php/worker/zipball/35fcf09b55de68954e03dc727b710b963db9517d", + "reference": "35fcf09b55de68954e03dc727b710b963db9517d", + "shasum": "" + }, + "require": { + "composer-runtime-api": "^2.0", + "ext-json": "*", + "ext-sockets": "*", + "php": ">=8.2", + "psr/log": "^2.0 || ^3.0", + "roadrunner/goridge": "^4.5", + "roadrunner/roadrunner": "^3.0" + }, + "require-dev": { + "buggregator/trap": "^1.13", + "jetbrains/phpstorm-attributes": "^1.0", + "llm/skills": "^1.14", + "mockery/mockery": "^1.6.7", + "roxblnfk/unpoly": "^1.8", + "spiral/code-style": "^2.3.1", + "testo/bridge-mockery": "^0.1.2", + "testo/testo": "^0.10.55", + "vimeo/psalm": "^6 || ^7" + }, + "suggest": { + "roadrunner/cli": "Provides RoadRunner installation and management CLI tools" + }, + "type": "library", + "autoload": { + "psr-4": { + "Spiral\\RoadRunner\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Anton Titov", + "homepage": "https://github.com/wolfy-j" + }, + { + "name": "Valery Piashchynski", + "homepage": "https://github.com/rustatian" + }, + { + "name": "Aleksei Gagarin", + "homepage": "https://github.com/roxblnfk" + }, + { + "name": "Pavel Buchnev", + "homepage": "https://github.com/butschster" + }, + { + "name": "Maksim Smakouz", + "homepage": "https://github.com/msmakouz" + }, + { + "name": "RoadRunner Community", + "homepage": "https://github.com/roadrunner-server/roadrunner/graphs/contributors" + } + ], + "description": "Base PHP worker for the RoadRunner application server: receives payloads over Goridge, sends responses and manages the worker pool", + "homepage": "https://roadrunner.dev/", + "keywords": [ + "application-server", + "goridge", + "long-running", + "roadrunner", + "worker" + ], + "support": { + "chat": "https://discord.gg/V6EK4he", + "docs": "https://docs.roadrunner.dev/docs/php-worker/worker", + "issues": "https://github.com/roadrunner-server/roadrunner/issues", + "source": "https://github.com/roadrunner-php/worker" + }, + "funding": [ + { + "url": "https://github.com/sponsors/roadrunner-server", + "type": "github" + } + ], + "time": "2026-10-19T08:47:25+00:00" + }, + { + "name": "spiral/security", + "version": "3.17.2", + "source": { + "type": "git", + "url": "https://github.com/spiral/security.git", + "reference": "aefd664efb3e618d0a57c967546f1ad5d9784580" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spiral/security/zipball/aefd664efb3e618d0a57c967546f1ad5d9784580", + "reference": "aefd664efb3e618d0a57c967546f1ad5d9784580", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "spiral/core": "^3.17.2", + "spiral/hmvc": "^3.17.2" + }, + "require-dev": { + "mockery/mockery": "^1.6.12", + "phpunit/phpunit": "^10.5.41", + "spiral/console": "^3.17.2", + "vimeo/psalm": "^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.17.x-dev" + } + }, + "autoload": { + "psr-4": { + "Spiral\\Security\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Anton Titov (wolfy-j)", + "email": "wolfy-j@spiralscout.com" + }, + { + "name": "Pavel Butchnev (butschster)", + "homepage": "https://github.com/butschster" + }, + { + "name": "Aleksei Gagarin (roxblnfk)", + "homepage": "https://github.com/roxblnfk" + }, + { + "name": "Maksim Smakouz (msmakouz)", + "email": "maksim.smakouz@spiralscout.com" + } + ], + "description": "Spiral, RBAC security layer", + "homepage": "https://spiral.dev", + "support": { + "issues": "https://github.com/spiral/framework/issues", + "source": "https://github.com/spiral/security" + }, + "funding": [ + { + "url": "https://github.com/sponsors/spiral", + "type": "github" + } + ], + "time": "2026-08-05T12:07:41+00:00" + }, + { + "name": "spiral/tokenizer", + "version": "3.17.2", + "source": { + "type": "git", + "url": "https://github.com/spiral/tokenizer.git", + "reference": "fcb7a36672d7aef900dc36377ff997ba6f8cde0b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spiral/tokenizer/zipball/fcb7a36672d7aef900dc36377ff997ba6f8cde0b", + "reference": "fcb7a36672d7aef900dc36377ff997ba6f8cde0b", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=8.1", + "spiral/core": "^3.17.2", + "spiral/logger": "^3.17.2", + "symfony/finder": "^6.4.30 || ^7.4 || ^8.0" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^3.13", - "mockery/mockery": "^1.6", - "pestphp/pest": "^1.0|^2.0|^3.0|^4.0|^5.0" + "mockery/mockery": "^1.6.12", + "phpunit/phpunit": "^10.5.41", + "spiral/attributes": "^2.8|^3.0", + "spiral/boot": "^3.17.2", + "spiral/files": "^3.17.2", + "vimeo/psalm": "^6.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.17.x-dev" + } + }, "autoload": { - "files": [ - "src/Resend.php" - ], "psr-4": { - "Resend\\": "src/" + "Spiral\\Tokenizer\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -4937,19 +6012,24 @@ ], "authors": [ { - "name": "Resend and contributors", - "homepage": "https://github.com/resend/resend-php/contributors" + "name": "Anton Titov (wolfy-j)", + "email": "wolfy-j@spiralscout.com" + }, + { + "name": "Pavel Butchnev (butschster)", + "homepage": "https://github.com/butschster" + }, + { + "name": "Aleksei Gagarin (roxblnfk)", + "homepage": "https://github.com/roxblnfk" + }, + { + "name": "Maksim Smakouz (msmakouz)", + "email": "maksim.smakouz@spiralscout.com" } ], - "description": "Resend PHP library.", - "homepage": "https://resend.com/", - "keywords": [ - "api", - "client", - "php", - "resend", - "sdk" - ], + "description": "Static Analysis: Class and Invocation locators", + "homepage": "https://spiral.dev", "support": { "issues": "https://github.com/resend/resend-php/issues", "source": "https://github.com/resend/resend-php/tree/v1.19.0" @@ -5919,6 +6999,185 @@ "time": "2026-11-04T08:39:20+00:00", "published-time": "2026-11-04T11:31:16+00:00" }, + { + "name": "symfony/http-client", + "version": "v8.1.9", + "source": { + "type": "git", + "url": "https://github.com/symfony/http-client.git", + "reference": "f892301df77ac25613b19fc2450139c950d1368a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/http-client/zipball/f892301df77ac25613b19fc2450139c950d1368a", + "reference": "f892301df77ac25613b19fc2450139c950d1368a", + "shasum": "" + }, + "require": { + "php": ">=8.4.1", + "psr/log": "^1|^2|^3", + "symfony/deprecation-contracts": "^2.5|^3.0", + "symfony/http-client-contracts": "^3.7", + "symfony/service-contracts": "^2.5|^3" + }, + "conflict": { + "amphp/amp": "<3", + "php-http/discovery": "<1.15" + }, + "provide": { + "php-http/async-client-implementation": "*", + "php-http/client-implementation": "*", + "psr/http-client-implementation": "1.0", + "symfony/http-client-implementation": "3.0" + }, + "require-dev": { + "amphp/http-client": "^5.3.2", + "amphp/http-tunnel": "^2.0", + "guzzlehttp/guzzle": "^7.10|^8.0", + "nyholm/psr7": "^1.0", + "php-http/httplug": "^1.0|^2.0", + "psr/http-client": "^1.0", + "symfony/cache": "^7.4|^8.0", + "symfony/dependency-injection": "^7.4|^8.0", + "symfony/http-kernel": "^7.4|^8.0", + "symfony/messenger": "^7.4|^8.0", + "symfony/process": "^7.4|^8.0", + "symfony/rate-limiter": "^7.4|^8.0", + "symfony/stopwatch": "^7.4|^8.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\HttpClient\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides powerful methods to fetch HTTP resources synchronously or asynchronously", + "homepage": "https://symfony.com", + "keywords": [ + "http" + ], + "support": { + "source": "https://github.com/symfony/http-client/tree/v8.1.9" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-10-13T15:31:40+00:00" + }, + { + "name": "symfony/http-client-contracts", + "version": "v3.7.3", + "source": { + "type": "git", + "url": "https://github.com/symfony/http-client-contracts.git", + "reference": "35be0019e2c2c9fba80f9dc033290a5240f7b44f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/http-client-contracts/zipball/35be0019e2c2c9fba80f9dc033290a5240f7b44f", + "reference": "35be0019e2c2c9fba80f9dc033290a5240f7b44f", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, + "branch-alias": { + "dev-main": "3.7-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\HttpClient\\": "" + }, + "exclude-from-classmap": [ + "/Test/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Generic abstractions related to HTTP clients", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/http-client-contracts/tree/v3.7.3" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-08-04T08:41:16+00:00" + }, { "name": "symfony/http-foundation", "version": "v8.1.11", @@ -9908,84 +11167,6 @@ "time": "2026-11-14T20:49:33+00:00", "published-time": "2026-11-14T20:50:36+00:00" }, - { - "name": "composer/semver", - "version": "3.6.0", - "source": { - "type": "git", - "url": "https://github.com/composer/semver.git", - "reference": "d92543b7ede9c4ec6b59853cefb061e39866d2cf" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/d92543b7ede9c4ec6b59853cefb061e39866d2cf", - "reference": "d92543b7ede9c4ec6b59853cefb061e39866d2cf", - "shasum": "" - }, - "require": { - "php": "^5.3.2 || ^7.0 || ^8.0" - }, - "require-dev": { - "phpstan/phpstan": "^1.11", - "symfony/phpunit-bridge": "^3 || ^7" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "3.x-dev" - } - }, - "autoload": { - "psr-4": { - "Composer\\Semver\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nils Adermann", - "email": "naderman@naderman.de", - "homepage": "http://www.naderman.de" - }, - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - }, - { - "name": "Rob Bast", - "email": "rob.bast@gmail.com", - "homepage": "http://robbast.nl" - } - ], - "description": "Version comparison library that offers utilities, version constraint parsing and validation.", - "keywords": [ - "semantic", - "semver", - "validation", - "versioning" - ], - "support": { - "irc": "ircs://irc.libera.chat:6697/composer", - "issues": "https://github.com/composer/semver/issues", - "source": "https://github.com/composer/semver/tree/3.6.0" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - } - ], - "time": "2026-10-29T09:13:34+00:00", - "published-time": "2026-10-29T09:14:11+00:00" - }, { "name": "daverandom/libdns", "version": "v2.1.0", @@ -16090,6 +17271,6 @@ "ext-intl": "*", "lib-icu": ">=57.1" }, - "platform-dev": {}, - "plugin-api-version": "2.11.0" + "platform-dev": [], + "plugin-api-version": "2.6.0" } diff --git a/database/migrations/2026_10_29_143753_add_views_count_to_commits_table.php b/database/migrations/2026_10_29_143753_add_views_count_to_commits_table.php new file mode 100644 index 0000000000..037a19e729 --- /dev/null +++ b/database/migrations/2026_10_29_143753_add_views_count_to_commits_table.php @@ -0,0 +1,24 @@ +unsignedBigInteger('views_count')->default(0); + }); + } + + public function down(): void + { + Schema::table('commits', function (Blueprint $table) { + $table->dropColumn('views_count'); + }); + } +}; diff --git a/resources/js/components/commit-card.tsx b/resources/js/components/commit-card.tsx index 096488bad5..544f3d41b8 100644 --- a/resources/js/components/commit-card.tsx +++ b/resources/js/components/commit-card.tsx @@ -1,5 +1,5 @@ import { Link, router, usePage } from '@inertiajs/react'; -import { CornerDownRight } from 'lucide-react'; +import { CornerDownRight, Eye, Trash2 } from 'lucide-react'; import type { MouseEvent, PointerEvent, ReactNode } from 'react'; import { useCallback, useContext, useRef, useState } from 'react'; import CommitController from '@/actions/App/Http/Controllers/CommitController'; @@ -578,6 +578,9 @@ export function CommitCard({ {commit.replies_count === undefined ? (
+ + {translation.button} {threadActions} @@ -745,6 +751,19 @@ export function CommitCard({ ); } +function CommitViewsCount({ count }: { count: number }) { + return ( + + + {count} + + ); +} + export function CommitTombstone({ id, previousLane, diff --git a/resources/js/types/commit.ts b/resources/js/types/commit.ts index 6caf8dc6aa..a1e6f30639 100644 --- a/resources/js/types/commit.ts +++ b/resources/js/types/commit.ts @@ -115,6 +115,7 @@ export type Commit = { deleted_at?: null; stars_count: number; pasteis_count: number; + views_count: number; starred: boolean; author: CommitAuthor; replies_count?: number; diff --git a/tests/Feature/Controllers/Api/CommitControllerTest.php b/tests/Feature/Controllers/Api/CommitControllerTest.php index 2d0348dda6..838d5dba27 100644 --- a/tests/Feature/Controllers/Api/CommitControllerTest.php +++ b/tests/Feature/Controllers/Api/CommitControllerTest.php @@ -76,6 +76,7 @@ 'created_at' => now()->toIso8601ZuluString(), 'stars_count' => 0, 'replies_count' => 0, + 'views_count' => 0, 'link_preview' => null, 'images' => [], 'author' => [ @@ -349,6 +350,7 @@ 'is_pinned' => false, 'starred' => true, 'pasteis_count' => 4, + 'views_count' => 0, 'deleted_at' => null, 'quoted_commit_id' => null, 'quoted_commit' => null, @@ -375,6 +377,7 @@ 'is_pinned' => false, 'starred' => false, 'pasteis_count' => 0, + 'views_count' => 0, 'deleted_at' => null, 'quoted_commit_id' => null, 'quoted_commit' => null, diff --git a/tests/Feature/Controllers/CommitControllerTest.php b/tests/Feature/Controllers/CommitControllerTest.php index ccc05d74ab..f2d6d58251 100644 --- a/tests/Feature/Controllers/CommitControllerTest.php +++ b/tests/Feature/Controllers/CommitControllerTest.php @@ -679,6 +679,20 @@ ->missing('commit.author.email')); }); +it('counts and displays one view per session for a commit page', function (): void { + $commit = Commit::factory()->create(); + + $this->get(route('commit.show', [$commit->user, $commit])) + ->assertOk() + ->assertInertia(fn ($page) => $page->where('commit.views_count', 1)); + + $this->get(route('commit.show', [$commit->user, $commit])) + ->assertOk() + ->assertInertia(fn ($page) => $page->where('commit.views_count', 1)); + + expect($commit->refresh()->views_count)->toBe(1); +}); + it('shows as many replies at a time as the viewer picked', function (): void { $commit = Commit::factory()->create(); Commit::factory()->for($commit, 'parent')->count(4)->create(); diff --git a/tests/Unit/CommitImages.test.tsx b/tests/Unit/CommitImages.test.tsx index 648d203cff..7cb379b40f 100644 --- a/tests/Unit/CommitImages.test.tsx +++ b/tests/Unit/CommitImages.test.tsx @@ -24,6 +24,7 @@ const commit: Commit = { updated_at: '2026-10-16T10:00:00Z', stars_count: 0, pasteis_count: 0, + views_count: 0, starred: false, author: { type: 'user', diff --git a/tests/Unit/NotificationInbox.test.tsx b/tests/Unit/NotificationInbox.test.tsx index b8c5001150..b0413b918f 100644 --- a/tests/Unit/NotificationInbox.test.tsx +++ b/tests/Unit/NotificationInbox.test.tsx @@ -39,6 +39,7 @@ const quoteCommit: Omit = { updated_at: timestamp, stars_count: 0, pasteis_count: 0, + views_count: 0, starred: false, quoted_commit_id: 'quoted-commit', };