Skip to content
This repository was archived by the owner on Aug 30, 2026. It is now read-only.

Fix incrementEntityViews count; expose user-spaces status filter - #32

Merged
Tsabary merged 2 commits into
mainfrom
fix/increment-views-and-user-spaces-status
Aug 16, 2026
Merged

Fix incrementEntityViews count; expose user-spaces status filter#32
Tsabary merged 2 commits into
mainfrom
fix/increment-views-and-user-spaces-status

Conversation

@Tsabary

@Tsabary Tsabary commented Aug 16, 2026

Copy link
Copy Markdown
Collaborator

Two independent changes.

incrementEntityViews ignored the count

The server reads count from the query string, but the SDK sent it as a body field — so the server never saw it and fell back to its default of 1. Calling with count: 500 incremented the counter by 1.

The endpoint is already service/master-key only (requireElevatedAuth), so this was never client-reachable; it only ever affected backends batching view counts through this SDK.

Visible effect: view counts start moving by the real amount. Anything that has been under-counting will look like it jumps.

fetchUserSpaces gains a status filter

Companion to sublay-io/server-hosted#114, which added the param server-side. "active" (default), "pending" for join requests awaiting approval, or "banned".

Testing

Views test rewritten to assert query-param shape, plus a case for the omitted-count path. 418 green.

🤖 Generated with Claude Code

Tsabary and others added 2 commits August 17, 2026 00:28
The server reads `count` from the query string, but it was sent as a body
field — so it was ignored and every call incremented the counter by the
schema default of 1, whatever amount was passed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The server now accepts a membership status on /spaces/user-spaces, so surface
it: "active" (default), "pending" for join requests awaiting approval, or
"banned".

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Aug 16, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@Tsabary, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 36 minutes

Limit details: You’ve used all 3 included reviews currently available under your plan.

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 9c75f8a9-b17c-4f56-9401-c96c50c96e59

📥 Commits

Reviewing files that changed from the base of the PR and between 8e10732 and d267974.

📒 Files selected for processing (3)
  • __tests__/entities.test.ts
  • src/modules/entities/incrementEntityViews.ts
  • src/modules/spaces/fetchUserSpaces.ts

Comment @coderabbitai help to get the list of available commands.

@Tsabary Tsabary self-assigned this Aug 16, 2026
@Tsabary
Tsabary merged commit a6a0199 into main Aug 16, 2026
2 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant