trypost/app/Actions/AccessToken
Paulo Castellano 097f30c765
Fix 500 on the MCP settings page when a client has never been used (#297)
* Fix 500 on the MCP settings page when a client has never been used

Sorting the connected clients used the raw last_used_at value with an
int fallback, so a workspace holding both a used client (CarbonImmutable)
and a freshly connected one (null, falling back to 0) handed arsort() a
mix of object and int. PHP cannot compare the two and raises
"Object of class Carbon\CarbonImmutable could not be converted to int",
which Laravel's error handler turns into a 500.

Sorting on the timestamp keeps the key a single type; never-used clients
get 0 and land at the bottom, which is the intended order.

The existing ordering test only covered clients that had all been used,
which is why this shipped. The new test covers the mixed case.

* Cover the all-never-used case on the MCP clients list
2026-08-19 09:52:54 -03:00
..
ListConnectedMcpClients.php Fix 500 on the MCP settings page when a client has never been used (#297) 2026-08-19 09:52:54 -03:00
RevokeAccessTokens.php Scope MCP OAuth tokens to user + workspace (#222) (#245) 2026-08-06 21:59:34 -03:00
RevokeMcpOAuthGrants.php Scope MCP OAuth tokens to user + workspace (#222) (#245) 2026-08-06 21:59:34 -03:00
RevokeWorkspaceApiKeys.php MCP: workspace settings, viewer read access, and token access (#241) 2026-08-06 09:54:51 -03:00