Compare commits

..

14 Commits

Author SHA1 Message Date
adf05e3c28 Add computePotAim query and shot-simulation operations
All checks were successful
Tests / Tests (pull_request) Successful in 10s
Schema: computePotAim(simulationInput, targetBallId, pocket) ->
PotAimGQL, the spin/throw-compensated aim solver (regenerated from
backend strawberry definitions; reuses the existing PocketIdentifier
enum). Operations: GetTableState, SimulateShot, and ComputePotAim
documents so both clients get generated hooks.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 01:44:02 -07:00
5391466e90 Merge pull request 'Add simulateShot query, cue strike and shot projection types' (#277) from shot-simulation-stubs into master
Reviewed-on: #277
2026-07-02 23:35:30 +00:00
4ff2db1ef4 Add simulateShot query, cue strike and shot projection types
All checks were successful
Tests / Tests (pull_request) Successful in 12s
Generated from backend strawberry definitions for the shot simulation
feature (image -> pooltool scenario -> projected outcome). Backend PR:
shot-simulation-stubs.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-02 16:12:11 -07:00
257dcdc31a Merge pull request 'Add DismissVideoExport mutation (soft-hide exports)' (#276) from dean/export-dismiss-gql into master
Reviewed-on: #276
2026-07-02 22:38:02 +00:00
Dean Wenstrand
b41365e99e Add videoName + videoThumbnailUri to VideoExportJobFields
All checks were successful
Tests / Tests (pull_request) Successful in 13s
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-02 14:41:59 -07:00
Dean Wenstrand
0e8233a5d5 Add DismissVideoExport mutation (soft-hide exports)
All checks were successful
Tests / Tests (pull_request) Successful in 17s
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-02 14:18:55 -07:00
b6adae4949 Merge pull request 'Storage limit enforcement schema' (#275) from storage-limit-enforcement-schema into master
Reviewed-on: #275
2026-07-01 22:29:41 +00:00
459e89d8b8 Select storage limit error fields
All checks were successful
Tests / Tests (pull_request) Successful in 11s
2026-07-01 14:50:45 -07:00
fa2ff19572 Add storage limit enforcement schema 2026-07-01 14:41:21 -07:00
428286fa5a Merge pull request 'dean/video-export-gql' (#273) from dean/video-export-gql into master
Reviewed-on: #273
2026-06-30 22:48:02 +00:00
Dean Wenstrand
8771350115 Echo shotIds/runId on VideoExportJobGQL for re-export
All checks were successful
Tests / Tests (pull_request) Successful in 13s
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-30 14:00:04 -07:00
Dean Wenstrand
f1594b8492 Video export client operations + myVideoExports list query
RequestVideoExport mutation, VideoExportJob + MyVideoExports queries (with the
VideoExportJobFields fragment) for the mobile fire-and-list flow.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-30 13:54:29 -07:00
Dean Wenstrand
3ec3e3d081 Add EXPORT_READY notification type (video export Phase 1b)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-30 12:51:39 -07:00
Dean Wenstrand
d2c697e4cb Add video export schema: VideoExportJob + request/query + mode/status enums
Generated from the backend video export resolvers (Phase 1a).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-30 12:35:34 -07:00
5 changed files with 1097 additions and 4 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,57 @@
query GetTableState(
$b64Image: String!
$tableSize: Float
$useHomography: HomographyInputGQL
) {
getTableState(
b64Image: $b64Image
tableSize: $tableSize
useHomography: $useHomography
) {
identifierToPosition
}
}
query SimulateShot($simulationInput: SimulateShotInputGQL!) {
simulateShot(simulationInput: $simulationInput) {
trajectories {
ballId
points {
time
position
}
}
events {
eventType
time
ballIds
position
}
finalState {
ballId
position
}
pottedBallIds
}
}
query ComputePotAim(
$simulationInput: SimulateShotInputGQL!
$targetBallId: Int!
$pocket: PocketIdentifier!
) {
computePotAim(
simulationInput: $simulationInput
targetBallId: $targetBallId
pocket: $pocket
) {
phi
geometricPhi
cutAngle
requiredPrecision
feasible
potted
converged
occludingBallIds
}
}

View File

@@ -0,0 +1,36 @@
fragment VideoExportJobFields on VideoExportJobGQL {
id
videoId
mode
status
videoName
videoThumbnailUri
shotIds
runId
downloadUrl
fileSizeBytes
expiresAt
createdAt
}
mutation RequestVideoExport($input: RequestVideoExportInput!) {
requestVideoExport(input: $input) {
...VideoExportJobFields
}
}
mutation DismissVideoExport($jobId: Int!) {
dismissVideoExport(jobId: $jobId)
}
query VideoExportJob($jobId: Int!) {
videoExportJob(jobId: $jobId) {
...VideoExportJobFields
}
}
query MyVideoExports($limit: Int = 30, $offset: Int = 0) {
myVideoExports(limit: $limit, offset: $offset) {
...VideoExportJobFields
}
}

View File

@@ -67,6 +67,13 @@ mutation GetHlsInitUploadLink($videoId: Int!) {
... on TooManyInitUploadsErr {
linksRequested
}
... on StorageLimitExceededErr {
reason
tierName
retainedStorageUsedBytes
retainedStorageLimitBytes
remainingStorageBytes
}
}
}
}

View File

@@ -66,6 +66,12 @@ type Query {
tableSize: Float = 100
useHomography: HomographyInputGQL = null
): TableStateGQL!
simulateShot(simulationInput: SimulateShotInputGQL!): ShotProjectionGQL!
computePotAim(
simulationInput: SimulateShotInputGQL!
targetBallId: Int!
pocket: PocketIdentifier!
): PotAimGQL!
getOrderedShots(
filterInput: FilterInput!
ids: [Int!] = null
@@ -121,6 +127,8 @@ type Query {
): VideoHistoryGQL!
getUserTags(includeRetiredTags: Boolean = false): [TagGQL!]!
getGameTypeTagMetrics(input: GameTypeTagMetricsInput!): [GameTypeTagMetric!]!
videoExportJob(jobId: Int!): VideoExportJobGQL
myVideoExports(limit: Int! = 30, offset: Int! = 0): [VideoExportJobGQL!]!
getVideo(videoId: Int!, debuggingJson: JSON = null): VideoGQL!
getVideos(videoIds: [Int!]!): [VideoGQL!]!
}
@@ -712,6 +720,7 @@ type DeployedConfigGQL {
minimumAllowedAppVersion: String!
subscriptionGatingEnabled: Boolean!
quotaEnforcementEnabled: Boolean!
storageLimitEnforcementEnabled: Boolean!
bannerMessages: [BannerGQL!]!
defaultAndroidRecordingFormat: StreamSegmentTypeEnum!
bucketUrl: String!
@@ -864,6 +873,7 @@ enum NotificationTypeEnum {
REACTION
FOLLOW
CHALLENGE_INVITE
EXPORT_READY
}
input NotificationFilters {
@@ -966,6 +976,76 @@ input IntPoint2DInput {
y: Int!
}
type ShotProjectionGQL {
trajectories: [BallTrajectoryGQL!]!
events: [SimulationEventGQL!]!
finalState: [SimulationBallStateGQL!]!
pottedBallIds: [Int!]!
}
type BallTrajectoryGQL {
ballId: Int!
points: [TrajectoryPointGQL!]!
}
type TrajectoryPointGQL {
time: Float!
position: [Float!]!
}
type SimulationEventGQL {
eventType: SimulationEventType!
time: Float!
ballIds: [Int!]!
position: [Float!]
}
enum SimulationEventType {
STICK_BALL
BALL_BALL
BALL_CUSHION
BALL_POCKET
BALL_STOP
}
type SimulationBallStateGQL {
ballId: Int!
position: [Float!]!
}
input SimulateShotInputGQL {
cueBallId: Int!
strike: CueStrikeInputGQL!
balls: [SimulationBallStateInputGQL!] = null
b64Image: String = null
useHomography: HomographyInputGQL = null
tableSize: Float = null
}
input CueStrikeInputGQL {
v0: Float!
phi: Float!
theta: Float! = 0
a: Float! = 0
b: Float! = 0
}
input SimulationBallStateInputGQL {
ballId: Int!
position: [Float!]!
}
type PotAimGQL {
phi: Float!
geometricPhi: Float!
cutAngle: Float!
requiredPrecision: Float!
feasible: Boolean!
potted: Boolean!
converged: Boolean!
occludingBallIds: [Int!]!
}
type GetShotsResult {
shots: [ShotGQL!]!
count: Int
@@ -1164,6 +1244,36 @@ input GameTypeTagMetricsInput {
includePrivate: IncludePrivateEnum! = MINE
}
type VideoExportJobGQL {
id: Int!
videoId: Int!
mode: VideoExportModeEnum!
status: VideoExportStatusEnum!
videoName: String
videoThumbnailUri: String
shotIds: [Int!]
runId: Int
downloadUrl: String
fileSizeBytes: Int
expiresAt: DateTime
createdAt: DateTime
}
enum VideoExportModeEnum {
FULL_SESSION
SHOTS
RUN
}
enum VideoExportStatusEnum {
CREATED
QUEUED
RUNNING
SUCCEEDED
FAILED
EXPIRED
}
"""
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).
"""
@@ -1265,6 +1375,8 @@ type Mutation {
feedback: String = null
metadata: CancellationFeedbackMetadataInput = null
): Boolean!
requestVideoExport(input: RequestVideoExportInput!): VideoExportJobGQL!
dismissVideoExport(jobId: Int!): Boolean!
findPrerecordTableLayout(b64Image: String!, videoId: Int!): HomographyInfoGQL
createUploadStream(
videoMetadata: VideoMetadataInput!
@@ -1447,6 +1559,13 @@ input CancellationFeedbackMetadataInput {
platform: String = null
}
input RequestVideoExportInput {
videoId: Int!
mode: VideoExportModeEnum!
shotIds: [Int!] = null
runId: Int = null
}
type CreateUploadStreamReturn {
videoId: Int!
}
@@ -1486,10 +1605,10 @@ type GetUploadLinkReturn {
union UploadLinkGetUploadLinkErrors = UploadLink | GetUploadLinkErrors
type GetUploadLinkErrors {
error: MustHaveSetForUploadLinkErrSegmentAlreadyUploadedErrProcessingFailedErrNoInitForChunkedUploadErrTooManyProfileImageUploadsErrInitUploadAlreadyCompletedErrTooManyInitUploadsErr!
error: MustHaveSetForUploadLinkErrSegmentAlreadyUploadedErrProcessingFailedErrNoInitForChunkedUploadErrTooManyProfileImageUploadsErrInitUploadAlreadyCompletedErrTooManyInitUploadsErrStorageLimitExceededErr!
}
union MustHaveSetForUploadLinkErrSegmentAlreadyUploadedErrProcessingFailedErrNoInitForChunkedUploadErrTooManyProfileImageUploadsErrInitUploadAlreadyCompletedErrTooManyInitUploadsErr =
union MustHaveSetForUploadLinkErrSegmentAlreadyUploadedErrProcessingFailedErrNoInitForChunkedUploadErrTooManyProfileImageUploadsErrInitUploadAlreadyCompletedErrTooManyInitUploadsErrStorageLimitExceededErr =
MustHaveSetForUploadLinkErr
| SegmentAlreadyUploadedErr
| ProcessingFailedErr
@@ -1497,6 +1616,7 @@ union MustHaveSetForUploadLinkErrSegmentAlreadyUploadedErrProcessingFailedErrNoI
| TooManyProfileImageUploadsErr
| InitUploadAlreadyCompletedErr
| TooManyInitUploadsErr
| StorageLimitExceededErr
type MustHaveSetForUploadLinkErr {
resolution: Boolean
@@ -1522,3 +1642,11 @@ type InitUploadAlreadyCompletedErr {
type TooManyInitUploadsErr {
linksRequested: Int!
}
type StorageLimitExceededErr {
reason: String!
tierName: String!
retainedStorageUsedBytes: BigInt!
retainedStorageLimitBytes: BigInt
remainingStorageBytes: BigInt
}