Compare commits

..

36 Commits

Author SHA1 Message Date
e89cabf33e add firstActivityAt field 2026-05-12 10:10:16 -07:00
c586bdf1a6 Merge pull request 'Add username + profileImageUri to PlayerClusterGQL' (#246) from dean/player-cluster-username into master
Reviewed-on: #246
2026-05-12 00:27:06 +00:00
Dean Wenstrand
9250e4c639 Add username + profileImageUri to PlayerClusterGQL
All checks were successful
Tests / Tests (pull_request) Successful in 9s
The labeling UI was falling back to "user N" for any assigned cluster
whose user wasn't the video owner — e.g. an admin re-labels a video
they don't own. With the resolver now resolving usernames for every
confirmed cluster, the FE can render real names regardless of who's
viewing.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-11 17:25:34 -07:00
a12b3e1210 Merge pull request 'Add averageDifficulty to PlayerSummaryFields' (#245) from dean/player-summaries-avg-difficulty-types into master
Reviewed-on: #245
2026-05-11 22:41:52 +00:00
Dean Wenstrand
5cf2dbaf01 Add averageDifficulty to PlayerSummaryFields
All checks were successful
Tests / Tests (pull_request) Successful in 9s
Regenerated via `just gql` after BE added average_difficulty to
PlayerSummaryGQL.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-11 15:34:25 -07:00
239a143554 Merge pull request 'Regenerate schema + add longestRun to PlayerSummaryFields' (#244) from dean/player-summaries-longest-run-types into master
Reviewed-on: #244
2026-05-11 20:29:39 +00:00
Dean Wenstrand
296522afb8 Regenerate schema + add longestRun to PlayerSummaryFields
All checks were successful
Tests / Tests (pull_request) Successful in 10s
Generated by `just gql` after BE added longest_run to PlayerSummaryGQL.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-11 13:21:47 -07:00
f42579076e Merge pull request 'Add score to PlayerSummaryFields + PlayerClusterFields fragments' (#243) from dean/video-match-score-types into master
Reviewed-on: #243
2026-05-11 17:43:43 +00:00
Dean Wenstrand
0c9eb4945a Add score to PlayerSummaryFields + PlayerClusterFields fragments
All checks were successful
Tests / Tests (pull_request) Successful in 9s
Picks up the BE additions in railbird PR dean/video-match-score:
new `score` field on PlayerClusterGQL and PlayerSummaryGQL, and
a new `score` input field on ClusterAssignmentInput.

Generated by `just gql`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-11 10:22:58 -07:00
1182c15004 Merge pull request 'Add playerSummaries to schema + Video fragments' (#242) from dean/player-summaries-types into master
Reviewed-on: #242
2026-05-09 19:34:40 +00:00
Dean Wenstrand
755336b16a Add playerSummaries to schema + Video fragments
All checks were successful
Tests / Tests (pull_request) Successful in 10s
Backs the multi-player vs UI: feed cards and the detail page both
read `video.playerSummaries`, a per-cluster rollup with username,
profile image, representative full-frame URL, makes/total/percentage.

  - PlayerSummaryFields fragment in shooter.gql
  - VideoCardFields (feed) and GetVideoDetails (detail) include
    playerSummaries via the new fragment
  - VideoCardFields tag selection extended to include tagClasses,
    needed for the FE's player_count detection

Generated by `just gql` from the BE additions in railbird PR
dean/video-player-summaries.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-09 12:02:57 -07:00
c1efe9f5f2 Merge pull request 'Add VideoPlayerClusters query + FinalizePlayerAssignments mutation' (#241) from dean/player-labeling-ops into master
Reviewed-on: #241
2026-05-09 04:46:10 +00:00
Dean Wenstrand
a3460842ac Add VideoPlayerClusters query + FinalizePlayerAssignments mutation
All checks were successful
Tests / Tests (pull_request) Successful in 10s
Operation file for the per-video player-labeling UI that consumes the
schema types added in #240.

  - VideoPlayerClusters($videoId): read clusters + crops
  - FinalizePlayerAssignments($input): apply user assignments and
    shot moves in one transaction

Generated by `just gql`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-08 21:44:42 -07:00
84d3a0252d Merge pull request 'Add player cluster + labeling mutation types' (#240) from dean/labeling-api-types into master
Reviewed-on: #240
2026-05-09 00:38:29 +00:00
Dean Wenstrand
1de4a97cb6 Add player cluster + labeling mutation types
All checks were successful
Tests / Tests (pull_request) Successful in 10s
Schema additions for the per-video player labeling UI:
  * `PlayerClusterGQL` / `PlayerClusterShotGQL` — read shape.
  * `FinalizePlayerAssignmentsInput` + `ClusterAssignmentInput` +
    `ShotMoveInput` — write shape.
  * Query: `videoPlayerClusters(videoId)`.
  * Mutation: `finalizePlayerAssignments(input)`.

Generated by `just gql` from the backend type definitions in
`railbird/datatypes/gql/shooter.py` and resolvers in
`railbird/server/resolvers/shooter.py`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-08 15:04:41 -07:00
130314546c Merge pull request 'Add trial days to GetAvailableSubscriptions' (#239) from loewy/add-trial-period-days into master
Reviewed-on: #239
2026-05-04 21:46:45 +00:00
b88f172355 add trial days to return
All checks were successful
Tests / Tests (pull_request) Successful in 10s
2026-05-04 14:07:16 -07:00
639fc88b0b Merge pull request 'Add createCustomerPortalSession' (#238) from loewy/create-customer-portal-session into master
Reviewed-on: #238
2026-05-01 22:45:40 +00:00
20f50368c9 remove return url
All checks were successful
Tests / Tests (pull_request) Successful in 10s
2026-05-01 13:15:18 -07:00
8367c2d0cd add createCustomerPortalSession
All checks were successful
Tests / Tests (pull_request) Successful in 10s
2026-04-30 11:44:34 -07:00
b0c62f6e80 Merge pull request 'Trim getFeed query fragment' (#237) from loewy/trim-get-feed-query-fragment into master
Reviewed-on: #237
2026-04-29 20:26:40 +00:00
bc1ff66467 trim uncessary requested fields
All checks were successful
Tests / Tests (pull_request) Successful in 38s
2026-04-28 12:53:25 -07:00
ae37a3d9d9 Merge pull request 'Default getLongestRunsLeaderboard limit to 50' (#236) from dean/leaderboard-default-top-50 into master
Reviewed-on: #236
2026-04-24 00:01:23 +00:00
Dean Wenstrand
114b21400e Default getLongestRunsLeaderboard limit to 50
All checks were successful
Tests / Tests (pull_request) Successful in 10s
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-23 16:56:56 -07:00
ad9cab4543 Merge pull request 'Get Game Type Tag Operations' (#234) from loewy/get-game-type-tag-metrics-operation into master
Reviewed-on: #234
2026-04-14 20:11:43 +00:00
cd3ecdfba4 Merge pull request 'Add schema getGameTypeTagMetrics' (#232) from loewy/add-get-game-type-tag-metrics into master
Reviewed-on: #232
2026-04-01 23:23:16 +00:00
28ba01c07f operation
All checks were successful
Tests / Tests (pull_request) Successful in 11s
2026-03-30 15:31:24 -07:00
27a0c08cd5 add schema getGameTypeTagMetrics
All checks were successful
Tests / Tests (pull_request) Successful in 10s
2026-03-30 13:09:18 -07:00
99f0913fd8 Merge pull request 'Add manual entitlement GraphQL schema fields' (#231) from ivan/manual-entitlement-abstraction-gql into master
Reviewed-on: #231
2026-03-22 18:32:22 +00:00
dfb0e02630 Add manual entitlement GraphQL schema fields
All checks were successful
Tests / Tests (pull_request) Successful in 11s
2026-03-22 11:23:11 -07:00
c4a2e184fb Merge pull request 'Add lowestUnuploadedSegmentIndex to operation' (#230) from loewy/add-lowest-unuploaded-segment-index-to-stream-monitoring-details into master
Reviewed-on: #230
2026-03-20 23:39:50 +00:00
f14cf3b255 add lowestUnuploadedSegmentIndex to operation
All checks were successful
Tests / Tests (pull_request) Successful in 11s
2026-03-18 16:43:31 -07:00
c46776d417 Merge pull request 'Upload Quota GQL' (#227) from loewy/upload-quota-limit-gql into master
Reviewed-on: #227
2026-03-18 21:33:26 +00:00
6ab5286a49 add expected durations to operation
All checks were successful
Tests / Tests (pull_request) Successful in 11s
2026-03-17 17:22:19 -07:00
cd6a33bfed getQuotaStatus, expectedDurationSeconds in createUploadStream
All checks were successful
Tests / Tests (pull_request) Successful in 13s
2026-03-17 11:21:42 -07:00
07bb45942e Merge pull request 'Add video processing labels to generated schema' (#228) from processing-clone-labels into master
Reviewed-on: #228
2026-03-17 18:08:08 +00:00
8 changed files with 885 additions and 67 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -31,41 +31,32 @@ fragment VideoCardFields on VideoGQL {
}
name
screenshotUri
totalShotsMade
totalShots
makePercentage
averageTimeBetweenShots
averageDifficulty
createdAt
updatedAt
startTime
endTime
private
elapsedTime
screenshotUri
stream {
id
lastIntendedSegmentBound
isCompleted
streamSegmentType
}
tableSize
pocketSize
tags {
name
tagClasses {
name
}
name
}
playerSummaries {
...PlayerSummaryFields
}
currentProcessing {
id
errors {
message
}
status
statuses {
status
}
}
reactions {
videoId

View File

@@ -20,8 +20,15 @@ mutation CreateSubscription($priceId: String!) {
}
}
mutation CreateCustomerPortalSession {
createCustomerPortalSession {
portalUrl
}
}
query GetAvailableSubscriptionOptions {
getAvailableSubscriptionOptions {
trialPeriodDays
products {
id
name

View File

@@ -0,0 +1,52 @@
fragment PlayerSummaryFields on PlayerSummaryGQL {
clusterId
userId
username
profileImageUri
representativeFullFrameUrl
totalShots
totalShotsMade
makePercentage
score
longestRun
averageDifficulty
averageTimeBetweenShots
}
fragment PlayerClusterShotFields on PlayerClusterShotGQL {
shotId
bboxX1
bboxY1
bboxX2
bboxY2
confidence
isConfirmed
cropUrl
fullFrameUrl
}
fragment PlayerClusterFields on PlayerClusterGQL {
videoId
clusterId
nShots
userId
username
profileImageUri
confirmed
score
shots {
...PlayerClusterShotFields
}
}
query VideoPlayerClusters($videoId: Int!) {
videoPlayerClusters(videoId: $videoId) {
...PlayerClusterFields
}
}
mutation FinalizePlayerAssignments($input: FinalizePlayerAssignmentsInput!) {
finalizePlayerAssignments(input: $input) {
...PlayerClusterFields
}
}

View File

@@ -92,6 +92,17 @@ query GetUserTags {
}
}
query GetGameTypeTagMetrics($input: GameTypeTagMetricsInput!) {
getGameTypeTagMetrics(input: $input) {
tagName
tagLabel
tableSize
shotCount
madeShots
makeRate
}
}
mutation followUser($followedUserId: Int!) {
followUser(followedUserId: $followedUserId) {
id
@@ -165,6 +176,7 @@ fragment UserFragment on UserGQL {
fargoRating
activeVideoId
createdAt
firstActivityAt
updatedAt
videosPrivateByDefault
agreesToMarketing

View File

@@ -10,6 +10,7 @@ query GetStreamMonitoringDetails($videoId: Int!, $debuggingJson: JSON) {
stream {
id
linksRequested
lowestUnuploadedSegmentIndex
uploadsCompleted
segmentProcessingCursor
isCompleted
@@ -82,6 +83,9 @@ query GetVideoDetails($videoId: Int!) {
}
name
}
playerSummaries {
...PlayerSummaryFields
}
}
}

View File

@@ -1,5 +1,11 @@
mutation CreateUploadStream($videoMetadataInput: VideoMetadataInput!) {
createUploadStream(videoMetadata: $videoMetadataInput) {
mutation CreateUploadStream(
$videoMetadataInput: VideoMetadataInput!
$expectedDurationSeconds: Float = null
) {
createUploadStream(
videoMetadata: $videoMetadataInput
expectedDurationSeconds: $expectedDurationSeconds
) {
videoId
}
}

View File

@@ -28,7 +28,7 @@ type Query {
getLongestRunsLeaderboard(
interval: TimeInterval = null
when: DateTime = null
limit: Int! = 100
limit: Int! = 50
requiredTags: [String!] = null
): RunLeaderboardGQL!
getMakesLeaderboard(
@@ -49,6 +49,7 @@ type Query {
limit: Int! = 500
countRespectsLimit: Boolean! = false
): GetRunsResult!
videoPlayerClusters(videoId: Int!): [PlayerClusterGQL!]!
getShotAnnotationTypes(errorTypes: Boolean = false): [ShotAnnotationTypeGQL!]!
getTableState(
b64Image: String!
@@ -97,6 +98,7 @@ type Query {
): UserRelationshipsResult!
getAvailableSubscriptionOptions: StripeSubscriptionOptionsGQL!
getUserSubscriptionStatus: UserSubscriptionStatusGQL!
getQuotaStatus: QuotaStatusGQL!
getPlayTime(userId: Int!, filters: VideoFilterInput = null): UserPlayTimeGQL!
getUserVideos(
userId: Int = null
@@ -105,6 +107,7 @@ type Query {
filters: VideoFilterInput = null
): VideoHistoryGQL!
getUserTags(includeRetiredTags: Boolean = false): [TagGQL!]!
getGameTypeTagMetrics(input: GameTypeTagMetricsInput!): [GameTypeTagMetric!]!
getVideo(videoId: Int!, debuggingJson: JSON = null): VideoGQL!
getVideos(videoIds: [Int!]!): [VideoGQL!]!
}
@@ -348,6 +351,11 @@ type UserGQL {
agreesToMarketing: Boolean
following: [UserGQL!]
followers: [UserGQL!]
"""
Earliest visible non-deleted profile video timestamp with real shot data.
"""
firstActivityAt: DateTime
isFollowedByCurrentUser: Boolean
}
@@ -403,6 +411,7 @@ type VideoGQL {
currentProcessing: VideoProcessingGQL
reactions: [ReactionGQL!]!
comments: [CommentGQL!]!
playerSummaries: [PlayerSummaryGQL!]!
}
type ShotGQL {
@@ -662,6 +671,21 @@ type CommentGQL {
replies: [CommentGQL!]!
}
type PlayerSummaryGQL {
clusterId: Int!
userId: Int
username: String
profileImageUri: String
representativeFullFrameUrl: String
totalShots: Int!
totalShotsMade: Int!
makePercentage: Float!
score: Int
longestRun: Int!
averageDifficulty: Float
averageTimeBetweenShots: Float
}
type DeployedConfigGQL {
allowNewUsers: Boolean!
firebase: Boolean!
@@ -858,6 +882,30 @@ input DatetimeOrdering {
startingAt: DateTime = null
}
type PlayerClusterGQL {
videoId: Int!
clusterId: Int!
nShots: Int!
userId: Int
username: String
profileImageUri: String
confirmed: Boolean!
score: Int
shots: [PlayerClusterShotGQL!]!
}
type PlayerClusterShotGQL {
shotId: Int!
bboxX1: Int!
bboxY1: Int!
bboxX2: Int!
bboxY2: Int!
confidence: Float!
isConfirmed: Boolean!
cropUrl: String
fullFrameUrl: String
}
type TableStateGQL {
identifierToPosition: [[Float!]!]!
homography: HomographyInfoGQL
@@ -938,6 +986,7 @@ type UserRelationship {
type StripeSubscriptionOptionsGQL {
products: [StripeProductGQL!]!
trialPeriodDays: Int
}
type StripeProductGQL {
@@ -960,6 +1009,9 @@ type StripePriceGQL {
type UserSubscriptionStatusGQL {
hasActiveSubscription: Boolean!
entitlementSource: EntitlementSourceTypeEnum
entitlementStartsAt: DateTime
entitlementEndsAt: DateTime
subscriptionStatus: StripeSubscriptionStatusEnum
currentPeriodStart: DateTime
currentPeriodEnd: DateTime
@@ -968,6 +1020,13 @@ type UserSubscriptionStatusGQL {
stripeSubscriptionId: String
}
enum EntitlementSourceTypeEnum {
ADMIN
MANUAL
STRIPE
ALPHA_LEGACY
}
enum StripeSubscriptionStatusEnum {
INCOMPLETE
INCOMPLETE_EXPIRED
@@ -979,6 +1038,17 @@ enum StripeSubscriptionStatusEnum {
PAUSED
}
type QuotaStatusGQL {
tierName: String!
periodStart: DateTime!
periodEnd: DateTime!
durationUsedSeconds: Float!
durationLimitSeconds: Int
maxVideoDurationSeconds: Int
durationRemainingSeconds: Float
canUpload: Boolean!
}
type UserPlayTimeGQL {
totalSeconds: Float!
}
@@ -995,6 +1065,25 @@ type TagClassGQL {
name: String!
}
type GameTypeTagMetric {
tagName: String!
tagLabel: String!
tableSize: Float
shotCount: Int!
madeShots: Int!
makeRate: Float!
}
input GameTypeTagMetricsInput {
userId: Int!
createdAt: DateRangeFilter = null
maxTags: Int = null
groupByTableSize: Boolean! = true
includeUnknown: Boolean! = true
tagClass: String = "game_type"
includePrivate: IncludePrivateEnum! = MINE
}
"""
The `JSON` scalar type represents JSON values as specified by [ECMA-404](https://ecma-international.org/wp-content/uploads/ECMA-404_2nd_edition_december_2017.pdf).
"""
@@ -1051,6 +1140,9 @@ type Mutation {
markAllNotificationsAsRead: Boolean!
markNotificationsAsRead(notificationIds: [Int!]!): Boolean!
deleteNotification(notificationId: Int!): Boolean!
finalizePlayerAssignments(
input: FinalizePlayerAssignmentsInput!
): [PlayerClusterGQL!]!
addAnnotationToShot(
shotId: Int!
annotationName: String!
@@ -1075,7 +1167,16 @@ type Mutation {
ensureStripeCustomerExists: UserGQL!
deleteUser: Boolean!
createSubscription(priceId: String!): CreateSubscriptionResultGQL!
createCustomerPortalSession: CreateCustomerPortalSessionResultGQL!
cancelSubscription: UserSubscriptionStatusGQL!
grantManualEntitlement(
userId: Int!
tierName: String! = "pro"
startsAt: DateTime = null
endsAt: DateTime = null
reason: String = null
): UserSubscriptionStatusGQL!
revokeManualEntitlement(userId: Int!): UserSubscriptionStatusGQL!
submitCancellationFeedback(
reasons: [CancellationReasonEnum!] = null
feedback: String = null
@@ -1084,6 +1185,7 @@ type Mutation {
findPrerecordTableLayout(b64Image: String!, videoId: Int!): HomographyInfoGQL
createUploadStream(
videoMetadata: VideoMetadataInput!
expectedDurationSeconds: Float = null
): CreateUploadStreamReturn!
getUploadLink(videoId: Int!, segmentIndex: Int!): GetUploadLinkReturn!
getHlsInitUploadLink(videoId: Int!): GetUploadLinkReturn!
@@ -1112,6 +1214,23 @@ enum ReportReasonEnum {
OTHER
}
input FinalizePlayerAssignmentsInput {
videoId: Int!
clusterAssignments: [ClusterAssignmentInput!]! = []
shotMoves: [ShotMoveInput!]! = []
}
input ClusterAssignmentInput {
clusterId: Int!
userId: Int = null
score: Int = null
}
input ShotMoveInput {
shotId: Int!
newClusterId: Int!
}
type AddShotAnnotationReturn {
value: SuccessfulAddAddShotAnnotationErrors!
}
@@ -1205,6 +1324,10 @@ type CreateSubscriptionResultGQL {
sessionId: String!
}
type CreateCustomerPortalSessionResultGQL {
portalUrl: String!
}
enum CancellationReasonEnum {
DONT_PLAY_ENOUGH
TOO_EXPENSIVE