|
16700
|
0:10
SlackFileEditViewGoHistoryWindowHelpPetko Kas 0:10
SlackFileEditViewGoHistoryWindowHelpPetko KashinskiScreen shareChromeFileEditViewHistoryBookmarksProfilesTabWindowHelp•WorkGreetiScorecandre;wilson→ws.planhat.com/jiminny/apps?id=66ceb97643c2530bb32c8bb6D АIKВChatPlayground Al..10 Jiminny - Calenda...M GMailMy Calendly - Eve...+ BackSearch Jiminny8 App Center& UP > PH UXAl apps& Created by meG Recently most active& Integrations25 AutomationsP Private appsEditorEa Runs8 Data6д Huddle with Petko KashinskiCall Ar= PH New UI LoginJiminnM Inbox=Nate R= AрGet Starting with J...C Apps• Chloe Onboarding....§ Support Daily • in 2h 43 mQBuildinUserp+ CX Journey SMB.....100% <78• Mon 11 May 12:17:40+8•Mon 11 May 12:17NewtWorkE PetkoWebhookwonkotsCompleted8bcea7d0-160b-4ad7-8c0d-3a01448c66bd BTriggeranythingOmsTriggered by8 Support User (Removed)3 Huddle with Lukas KovalikOutputsE Event log9= Al Notes: OffNx"moeh200m7&ГА0:09Leave...
|
CleanShot X
|
|
NULL
|
16700
|
|
16701
|
0:13
SlackFileEditViewGoHistoryWindowHelpPetko Kas 0:13
SlackFileEditViewGoHistoryWindowHelpPetko KashinskiScreen shareChromeFileEditViewHistoryBookmarksProfilesTabWindowHelp•WorkGreetiScorecandre;wilson→ws.planhat.com/jiminny/apps?id=66ceb97643c2530bb32c8bb6D АIKВChatPlayground Al..10 Jiminny - Calenda...M GMailMy Calendly - Eve...+ Back83 App CenterUP > PH UXAl apps8 EditorEa Runs8 DataCrcatco loy likEvent Log2 InteE AunP Pri"tenantid": "Jiminny"."automationid": "E6ceb9T643c2530bb32c&bb6","NX-094be176",elicas.Safd2b7a-8557-4eb9-82cc-0938575SebBe*app-Jiminny.com6д Huddle with Petko KashinskiCall Ar= PH New UI LoginJiminnM InboxGet Starting with J..§ Support Daily • in 2h 43 mlQ=Nate R= AрBuildinUserpD Apps• Chloe Onboarding...+ CX Journey SMB.....100% <78• Mon 11 May 12:17:43+8•Mon 11 May 12:17NewtWork+a PetkoEnsoeoetno.hendricksBanyvan.com',62 Huddle with Lukas Kovalik9= Al Notes: Off v200mT&0:12Leave...
|
CleanShot X
|
|
NULL
|
16701
|
|
16702
|
0:16
SlackFileEditViewPetko KashinskiScreen shareC 0:16
SlackFileEditViewPetko KashinskiScreen shareChromeFileGoHistoryWindowHelp6д Huddle with Petko Kashinski§ Support Daily • in 2h 43 mlQ100% <8• Mon 11 May 12:17:46D АIKВRedInteAutPrivEditViewHistoryBookmarksProfilesTabWindowHelpWorkGreetiScorecandre;wilsonCall ArJiminnM Inbox=Nate R= AрBuildinUserpws.planhat.com/jiminny/apps?id=66ceb97643c2530bb32c8bb6ChatPlayground AAl...10 Jiminny - Calenda...M GMail• My Calendly - Eve...= PH New UI LoginGGet Starting with J...AppsChloe Onboarding...+ CX Journey SMB....Event Log"tenantId": "jiminny""automationId": "66ceb97643c2530bb32c8bb6" ,"model": "Webhook""operation": "incoming","update": {"app_token": "NX-094be170","data": {"action": "clicked","company": {"id":"5afd2b7a-8557-4eb9-82cc-09385755eb8e"},"hostname":"app.jiminny.com","id": 131,"pathname":"/ondemand?min_duration=1&only_recorded=1&query=Tamara+Elvin&sequence_number=2","platform" :"web""title":"PH-TI-Clicks"3 Huddle with Lukas Kovalik+8•Mon 11 May 12:17NewtWork9= Al Notes: Offom",7-e4886aa49561"&0:15Leave...
|
CleanShot X
|
|
NULL
|
16702
|
|
16703
|
0:40
PnostorimINavicatecodeFV faVsco.js?9 JY-20725 0:40
PnostorimINavicatecodeFV faVsco.js?9 JY-20725-handle-HS-search-rateProiect v© UserAutomatedReportsController.php X› D Themesv D UserAutomatedRep© UserAutomatedlv Dv2C) Hubspot/Service.onp© HubspotSyncStrategyBase.phpwDeletecrmenutylrait.ongnoteмatch.php© MatchActivityCrmData.phpC) ACuiVityvzcontrAskAnythingCor© AskJiminnyRepoJob.ohoC) PaqinationState.phoC) MatchCrmData.phpC) CrmObiectsResolver.pho© ProviderRateLimiter.php© PaginationConfia.php(c) DealsvzControllclass UserAutomatedReportsController extends ControllerA14 X2 A Y(C) OnDemandV2CcPlavlistControlle€ PlavlistShareCor2 usagespublic const string SORT_DIRECTION = 'sort_direction';C) PlavlistTrackcor30 O1C) ActionltemsControlC) ActivitvControlier.oC) A CrmNotesControl© BaseController.phpc) ClientTokenControlc) CrmController nhopublic functionconstructdprivate readonly AutomatedReportsRepository SautomatedReportsRepository.private readonly AutomatedReportsService $automatedReportsService,private readonly ApiResponseService $apiResponseServiceprivate readonly Response Sresponseprivate readonly PlanhatService $planhatService,D f..3C) Deall evelPromntseliPOST /api/v1/automated-reports/interest 1 usageoubulc Tunction crackinuerest reouest srecuest. Jsonkesponse© Instantmeeuingcon© LanguageController/** @var User Suser *c LayoutmanagemenCal livoSoodControllorsuser = srequest->usero?© Meeuingscontroller• Messacecontrollerdefer(fn ( => Sthis->planhatService->track(c Meradaracontroller© MobileSettingsConuser: suser.'automated-renorts-track-interest'.c) Momentcontroller.r€ NudgeController.ph)->alwavs@ :) NumberAllocatorec€ OraanizationMemb• OrganizationRetentreturn sthis->response->with0korC) OraanizationRolescl© OrganizationSvncC@ PartnerController.o* Athrows AnnZicationExcentionC) PhoneNumberContg) PlavbackControlle'@ PlavlistController.nlGET lanilv1lautomated-renortspublic function list(Request $request): JsonResponse{...}© ScimController.php@ SidekickController123 09 ›DELETE /api/v1/automated-reports/{uuid}public function delete(Request Srequest, string Suuid): JsonResponsef...}C) SoftnhoneControlle(C) ScoController nhn(C) SubscrintionControe ToamAiAutamatione ToamAiContovtear9a ToamCantrollor nh.(e) TosminciahtcContrsupoont Dally • In Zn 441100% 5.• мon 11 May 12-18.17AskJiminnyReportActivityServiceTest+0 ..A SF (jiminny@localhost]4 HS_local (jiminny@localhost]# console [PKOb.# console leu)# console [slAGiNg)2026-05-07 14:21:15] local.INF0: [Hubspot] DEBUG Getting headers {MMi9.У"Vace". "Inu,ur May 2020 14.21.19 6Ml"Jn"concenc-lyoe. apolicacion/ison.charser=utt-on"Transfer-Encoding": ["chunked"]."CF-Ray": ["9f80deb8db60dc3a-SOF"]."CF-Cache-Status": L"DYNAMIC"J,"Strict-Transport-Secur1ty":"max-aqe=31536000* 1ncludeSUbDomains: preload"),acceot-encodino"."access-control-allow-credentials": "false"i."server-timing": ["hcid;desc=|"019e02d0-6fd8-7812-bdba-885b7ccb3ee3\",cfr;desc=|"9f80deb8e7c6dc3a-IAD\""],"x-content-tvoe-ootions":"nosniff"."x-hubspot-correlation-id":["019e02d0-6fd8-7812-bdba-885b7ccb3ee3"],"Set-Cookip"." c+hm=Stlirtd0aXVr.kSandas6hzVVKhzTn0BidvMaheCtm0V-1778163675-1.0.107-May-26 14:51:15 GMT; domain=.hubapi.com; Http0nly; Secure; SameSite=None"],"Report-To":["{"endnoints".("url\":"https:\\/\\/a.nel.cloudflare.com\\/report\\/v4?s=NYAlsVTP0fYm32qrSDjxYE4sd2RV("group\":\"cf-nel\".("max_age\":604800}"],"NEL"L"1"success_fraction\":0.01,reportto. "cr-nel,"max agel ":604800}"].'Server":["cloudflare"]}} {"correlation_1d":"95256555-ec98-4541-b9za-adta/Sboyeab","trace_10":"C/AD8565-905t-4604-9405-0e5b551e5545CascadeHubspot Rate Limit ReE. Deaicatea low-concurrency worker poolRun only 5 workers for analytics low so concurrency naturally matches the 5 RPS limitEbashpho artisan queue:work --queue=analvtics low --tries=0 --max-iobs= --processes=5Effect: 5 workers x 1 successful op/sec = 5/sec. No rate-limit storms because we're under the limit by design. Each worker rarely sees a 429.Trade-oris•Slower throughput (still b/sec ceiling = 5.5 hours tor 100k• Other iobs on this queue comnete with the bottlenecWorks, but requires Horizon config changesF. Pre-flight cache check at job entry (mentioned earlier)Eliminates the DB.transaction churn.from.cache-hit cvcles.Doesnit chande.the throughnut.ceilina.but.reduces.cost.during.a.storm.to.almost.nothinaEasy win. Pairs with all other optionsG. Filter unmatchable activities betore dispatchIf manv activities have no email/ohone/name to match. dispatchina them is pure waste.• phpActivity::needsCrmMatch()›whereHas("participants', fn (Sq) = $q->whereNotNull('email")->orWhereNotNull('phone"))-›each(fn ($a) => MatchActivityCrmData::dispatch($a->id)):If 30% of the 100k are unmatchable (no contact info), removing them gets you to 70k - still over 9k cap, but closer.Effort: low if a querv-side filter is feasibleRecommended combinationFor maximum RoI1. A hatch endnoints) — 100x throuahnut. Solves the nroblem2. B (dispatch throttling) - defense in depth. prevents future storms.3. C (lookup caching) - reduces redundant API calls.4. F (pre-flight cache check) - eliminates DB churn during inevitable stormsWith A + B alone, the 100k → 9k problem becomes 100k → 100k completed in ~3-10 minutes, depending on caching efficiency.A is the leverage point. Without batch endpoints, you're brute-forcing through a 5 RPS hose. With them, the hose is 500 matches/sec.SummaryRace window: 5-10 wasted real APl calls per cache iil cycle, Bounded, ~15k calls wastedlin 30 min (vs 441k without cache). Acceptables can be tiahtened with aprobe lock if neededHubSpot-named middleware on multi-CRM iob: no functional issue for HubSpot. Salesforce/Pinedrive rate-limits ao throuch the wrond nath (treated as real100k → 9k bottleneck: not a rate-limiter problem, an architectural one. The fix is batch endpoints + dispatch throttling, not more aggressive retry logic.Ask anvthing (84D)+ « CodeClaude Onus 4.7 Mediumfo 4 spaces...
|
CleanShot X
|
|
NULL
|
16703
|
|
16704
|
0:43
SlackFileEditViewGoHistoryWindowHelpPetko Kas 0:43
SlackFileEditViewGoHistoryWindowHelpPetko KashinskiScreen shareChromeFileEditViewHistory•••Work(abl§ Support Daily • in 2h 42 m100% <78• Mon 11 May 12:18:146д Huddle with Petko KashinskiD АIKВ• ChatPlayground Al...Jiminny - Calenda...M GMail• My Calendly - Eve...BookmarksProfilesTabWindowHelpGreetScoreandrewilso®Call A= PH New UI LoginJiminSearch Google or type a URLGoogle+Add shortcut3 Huddle with Lukas Kovalik9= Al Notes: Off vGoogleQM Inbox= Nate=AppsBuildu UserNewC Ai ModeGet Starting with J...Apps• Chloe Onboarding...+ CX Journey SM....JiminnySalesforceUsefplotLogin | MaxioHome| HookReachdeskIntercomDashboard | GetAcceptEfficient contract management for modern businessesJiraJira ConfluenceCloudApp3 HubSpotBambooHRThe LoopGoogle DriveGoogle groups docsPublic Profile - ConveyorSign up | Miro | The Visual Workspace for InnovationVision by The OrgcbLoomActivity Feed | Crunchbase+8•Mon 11 May 12:18Oл xWorkagesCustomise Chrome200m7&ГА0:43Leave...
|
CleanShot X
|
|
NULL
|
16704
|
|
16705
|
0:46
SlackFileEditViewGoHistoryWindowHelpllol§ Sup 0:46
SlackFileEditViewGoHistoryWindowHelpllol§ Support Daily - in 2h 42 m6д Huddle with Petko Kashinski100% C8• Mon 11 May 12:18:17GPetko KashinskiScreen shareSlackFile•• е→D AIKBEditViewGoHistoryWindowHelpWork® Greet® Scorerun.userpilot.io/dashboards/product-usage• ChatPlayground Al....10 Jiminny - CalendaM GMailQ8•+Mon 11 May 12:18andrewilso®Call AJiminM Inbox= Nate=Apps© Buildu UserNew• My Calendly - Eve..= PH New UI LoginGet Starting with J.D AppsQ Search engagement, feedback, reports, users and moreC Chloe Onboarding…# cx Journey SM....l WorkJiminay118•Huddle with Lukas Kovalik200mTA&ГА0:46Leave...
|
CleanShot X
|
|
NULL
|
16705
|
|
16706
|
0:49
SlackFileEditViewGoHistoryWindowHelp(abl§ Sup 0:49
SlackFileEditViewGoHistoryWindowHelp(abl§ Support Daily • in 2h 42 m100% <78• Mon 11 May 12:18:206д Huddle with Petko KashinskiPetko KashinskiScreen share+ChromeFileEditViewHistoryBookmarksProfilesTabWindowHelpQ8•Mon 11 May 12:18WorkGreelScoreandrewilso®Call AJiminM Inbox= Nate=AppsBuildu UserNewu Ux+run.userpilot.io/dashboards/product-usageWorkAIKBChatPlayground Al...BJiminny - Calenda.….M GMail• My Calendly - Eve...= PH New UI LoginGet Starting with J...Apps• Chloe Onboarding....+ CX Journey SMB....+ All dashboardsQ Search engagement, feedback, reports, users and moreJiminny88DashboardsProduct UsageThe Product Usage Dashboard tracks user and company engagement metrics, popular pages, and features. It highlights trends, user stickiness, top interactions, and browser preferences.elect time periodAdd FiltersDacaE User activity metricsMeasures the daily, weekly, and monthly number of individual users actively using the product.Wietric tooa& Company activity metricsMeasures the daily, weekly, and monthly number of companies actively using the product.Metric | TodayActive Users542DailyActive Users4,390WeeklyActive Users6,578MonthlyActive CompaniesActive CompaniesActive Companies122Daily293Weekly324Monthly[PASSWORD_DOTS]E Trend of active usersTracks active users over time, providing a time-based view of engagement.Line - Linear || Last 90 DaysE Trend of active companiesTracks active companies over time, providing a time-based view of engagement.lineainasracooeHuddle with Lukas KovalikPetko Kashinskipeско.kasлinseуm$= Al Notes: OffGet Started with Userpilotc LogoutPK&ГА.••0:49Leave...
|
CleanShot X
|
|
NULL
|
16706
|
|
16707
|
0:55
SlackFileEditViewGoHistoryWindowHelp(abl§ Sup 0:55
SlackFileEditViewGoHistoryWindowHelp(abl§ Support Daily • in 2h 42 m6д Huddle with Petko KashinskiPetko KashinskiScreen share+ChromeFileEditViewHistoryBookmarksProfilesTabWindowHelp8•Mon 11 May 12:18WorkGreetScoreandrewilso!®Call AJiminM Inbox=Nate=AppsBuildu Users@ Newu LXrun.userpilot.io/installation/statusWork1 AIKBChatPlayground Al...10 Jiminny - Calenda.M GMail• My Calendly - Eve...= PH New UI LoginGet Starting with J...Apps• Chloe Onboarding....Q Search engagement, feedback, reports, users and moreDashboardsPeopleInstallationInstalling Userpilot on your app lets you sync live user data to Userpilot and target tailored in-app user experiences to theright user at the right time.StatusInstallation MethodDacaQ Search_All StatusAll environment© Last 14 days |app.jiminny.comapp.jiminny.euActiveapp.qai.jiminny.comapp.qa.jiminny.comapp.staging.jiminny.comActiveearth.staging.jiminny.comdev.app.jiminny.commercury.staging.jminny.comActiveHuddle with Lukas Kovalikjupiter.staging.jiminny.comActive$= Al Notes: Offsaturn.staging.jiminny.comPK200m7# cX Journey SM....Data receivedProduction10 seconds agoProduction18 seconds agoProduction15 minutes agoProduction|1 hour agoProduction3 hours agoProduction2 days agoProduction2 days agoProduction2 days agoProduction|3 days ago3 days agoGet Started with UserpilotDisplaying 1 - 13 of 13100%8• Mon 11 May 12:18:26GГА0:55Leave...
|
CleanShot X
|
|
NULL
|
16707
|
|
16708
|
0:58
SlackFileEditViewGoHistoryWindowHelp6д Huddle 0:58
SlackFileEditViewGoHistoryWindowHelp6д Huddle with Petko KashinskiPetko KashinskiScreen shareChromeFileEditViewHistoryBookmarksProfilesTabWindowHelpWorkGreelScoreandrewilso®Call AJiminM Inboxrun.userpilot.io/integrations/native-integrationAIKBChatPlayground Al...10 Jiminny - Calenda..M GMail• My Calendly - Eve...= PH New UI LoginGet Starting with J...Q Search engagement, feedback, reports, users and moreDashboardsIntegrationsWith integrations, you can stream Userpilot-generated events to other external providers.PeopleNative IntegrationsWebhooksDacaAmplitudeSync Userpfict data ieto AmplitudeconnerGoogle AnalyticsSyne Userpilot data nco Google AnalvaceConnectWoridiowsHHeapSync Userpilot data into HeapConnectKissmetricsSync Userpilot data into KissmetricsConnect|MixpanelSync Userpilot data into MixpanelConnectSegmentSync Userpuct data nnto SegmentConnectSlackConnectedPoeumto ccoun uoolnn ống munHuddle with Lukas Kovalik(abl§ Support Daily • in 2h 42 m100% <78• Mon 11 May 12:18:29Q8•Mon 11 May 12:18Nate=AppsBuildu UsersNewu UxWorkApps• Chloe Onboarding....+ CX Journey SMB.....JimininyGoogle Tag ManagerSyne Userpilor data into Google Tag ManagerIntercomSync Userpilor data into IntercomConnectConnectSuggest an integration$= Al Notes: OffPK&Get Started with Userpilot200mГА0:58Leave...
|
CleanShot X
|
|
NULL
|
16708
|
|
16709
|
1:01
SlackFileEditViewGoHistoryWindowHelpI46l§ Sup 1:01
SlackFileEditViewGoHistoryWindowHelpI46l§ Support Daily • in 2h 42 m6д Huddle with Petko KashinskiPetko KashinskiScreen shareChromeFileEditViewHistoryBookmarksProfilesTabWindowHelpQWorkGreelScoreandrewilso®Call ABJiminM Inbox=Nate=AppsBuildu UsersNewrun.userpilot.io/integrations/webhooksAIKBChatPlayground Al...10 Jiminny - Calenda..M GMail• My Calendly - Eve...= PH New UI LoginGet Starting with J...Apps• Chloe Onboarding....+ cx Journey SMB....Q Search engagement, feedback, reports, users and more100% <8• Mon 11 May 12:18:32+8•Mon 11 May 12:18u LXRl WorkJimininyCreate WebhookDashboardsPeopleDacaWoridiowsIntegrationsWith integrations, you can stream Userpilot-generated events to other external providers.Native IntegrationsWebhookswotes roure usns ora chadied viconooks. Upyrade your pion to acuvote more de d ume.UpgradeNamePlanha WH TestPlanhat WH TessEndpointDescriptionhttps://webhooks.planhat.com/catch/9d4dd6a4-7544-4663-873b-5a120f399_Description Not Availablehttps://webhooks.planhat.com/catch/9d4dd6a4-7544-4663-873b-5a120f399.Description Not Available |Huddle with Lukas Kovalik$= Al Notes: OffStatusPK&Get Started with Userpilot200m())))ГА1:01Leave...
|
CleanShot X
|
|
NULL
|
16709
|
|
16710
|
1:07
SlackFileEditViewGoHistoryWindowHelpllol§ Sup 1:07
SlackFileEditViewGoHistoryWindowHelpllol§ Support Daily • in 2h 42 m100% C8• Mon 11 May 12:18:386д Huddle with Petko KashinskiPetko KashinskiScreen shareSlackFileEditViewGoHistoryWindowHelpQWorkGreel® Scoreandre@ wilso®Call AJiminM Inbox= Nate=Apps© Buildu UserNewrun.userpilot.io/integrations/webhooks/14/editD АIKВChatPlayground Al....10 Jiminny - CalendaM GMail• My Calendly - Eve...= PH New UI LoginGGet Starting with J.D AppsC Chloe Onboarding....# cx Journey SMB....Configure webhook+8•Mon 11 May 12:18u LXF WorkX Close$E Al Notes: OffPetko ...200mGOOTAE•il&1:07Leave...
|
CleanShot X
|
|
NULL
|
16710
|
|
16711
|
1:10
SlackFileEditViewGoHistoryWindowHelpPetko Kas 1:10
SlackFileEditViewGoHistoryWindowHelpPetko KashinskiScreen shareChromeFileEditViewHistoryBookmarksProfilesTabWindowHelp•WorkGreetScoreandrewilso®Call Arun.userpilot.io/integrations/webhooks/14/editD АIKВ• ChatPlayground Al....10 Jiminny - Calenda...M GMail• My Calendly - Eve...= PH New UI LoginData setupDetailsData setupIabl§ Support Daily • in 2h 42 m6д Huddle with Petko Kashinski100% <8• Mon 11 May 12:18:41QJiminM Inbox=Nate=Apps© Buildu UsersNew+8•Mon 11 May 12:18u LXF WorkGet Starting with J..Apps• Chloe Onboarding...# cX Journey SM....X CloseWebhook Guidance CTracked EventsLabeled EventsWiloocicotrcrs1 Labeled Efents SelectedTagged Pages• Checklists• Flows |• Mobile content |O NPS|O Surveys• Forms|Send TestAl Notes: OffPetko ...reen ...200m7&1:10Leave...
|
CleanShot X
|
|
NULL
|
16711
|
|
16712
|
1:12
PnostorimINavicatecodeFV faVsco.js?9 JY-20725 1:12
PnostorimINavicatecodeFV faVsco.js?9 JY-20725-handle-HS-search-rateProiect v© UserAutomatedReportsController.php X>D Themesv D UserAutomatedRep© UserAutomatedlv Dv2C) Hubspot/Service.onp© HubspotSyncStrategyBase.phpwDeletecrmenutylrait.ongnoteмatch.php© MatchActivityCrmData.phpC) ACuiVityvzcontrAskAnythingCor© AskJiminnyRepoJob.ohoC) PaqinationState.phoC) MatchCrmData.phpC) CrmObiectsResolver.pho© ProviderRateLimiter.php© PaginationConfia.php(c) DealsvzControllclass UserAutomatedReportsController extends ControllerA14 X2 A Y(C) OnDemandV2CcPlavlistControlle€ PlavlistShareCor2 usagespublic const string SORT_DIRECTION = 'sort_direction';C) PlavlistTrackcor30 0lC) ActionltemsControlC) ActivitvControlier.oC) A CrmNotesControl© BaseController.phpc) ClientTokenControlc) CrmController nhopublic functionconstructdprivate readonly AutomatedReportsRepository SautomatedReportsRepository.private readonly AutomatedReportsService $automatedReportsService,private readonly ApiResponseService $apiResponseServiceprivate readonly Response Sresponseprivate readonly PlanhatService $planhatService,D f..3C) Deall evelPromntseliPOST /api/v1/automated-reports/interest 1 usageoubulc Tunction crackinuerest reouest srecuest. Jsonkesponse© Instantmeeuingcon© LanguageController/** @var User Suser *c LayoutmanagemenCal livoSoodControllorsuser = srequest->usero?© Meeuingscontroller• Messacecontrollerdefer(fn ( => Sthis->planhatService->track(c Meradaracontroller© MobileSettingsConuser: suser.'automated-renorts-track-interest'.c) Momentcontroller.r€ NudgeController.ph)->alwavs@ :) NumberAllocatorec€ OraanizationMemb• OrganizationRetentreturn sthis->response->with0korC) OraanizationRolescl© OrganizationSvncC@ PartnerController.o* Athrows AnnZicationExcentionC) PhoneNumberContg) PlavbackControlle'@ PlavlistController.nlGET lanilv1lautomated-renortspublic function list(Request $request): JsonResponse{...}© ScimController.php@ SidekickController123 09 ›DELETE /api/v1/automated-reports/{uuid}public function delete(Request Srequest, string Suuid): JsonResponsef...}C) SoftnhoneControlle(C) ScoController nhn(C) SubscrintionControe ToamAiAutamatione ToamAiContovtear9a ToamCantrollor nh.(e) TosminciahtcContrsupoont Dally • In Zn 441100% 5.• мon 11 Mаy 12-10.44AskJiminnyReportActivityServiceTest+0 ..A SF (jiminny@localhost]4 HS_local (jiminny@localhost]# console [PKOb.# console leu)# console [slAGiNg)2026-05-07 14:21:15] local.INF0: [Hubspot] DEBUG Getting headers {MMi9.У"Vace". "Inu,ur May 2020 14.21.19 6Ml"Jn"concenc-lyoe. apolicacion/ison.charser=utt-on"Transfer-Encoding": ["chunked"]."CF-Ray": ["9f80deb8db60dc3a-SOF"]."CF-Cache-Status": L"DYNAMIC"J,"Strict-Transport-Secur1ty":"max-aqe=31536000* 1ncludeSUbDomains: preload"),acceot-encodino"."access-control-allow-credentials": "false"i."server-timing": ["hcid;desc=|"019e02d0-6fd8-7812-bdba-885b7ccb3ee3\",cfr;desc=|"9f80deb8e7c6dc3a-IAD\""],"x-content-tvoe-ootions":"nosniff"."x-hubspot-correlation-id":["019e02d0-6fd8-7812-bdba-885b7ccb3ee3"],"Set-Cookip"." c+hm=Stlirtd0aXVr.kSandas6hzVVKhzTn0BidvMaheCtm0V-1778163675-1.0.107-May-26 14:51:15 GMT; domain=.hubapi.com; Http0nly; Secure; SameSite=None"],"Report-To":["{"endnoints".("url\":"https:\\/\\/a.nel.cloudflare.com\\/report\\/v4?s=NYAlsVTP0fYm32qrSDjxYE4sd2RV("group\":\"cf-nel\".("max_age\":604800}"],"NEL"L"1"success_fraction\":0.01,reportto. "cr-nel,"max agel ":604800}"].'Server":["cloudflare"]}} {"correlation_1d":"95256555-ec98-4541-b9za-adta/Sboyeab","trace_10":"C/AD8565-905t-4604-9405-0e5b551e5545CascadeHubspot Rate Limit ReE. Deaicatea low-concurrency worker poolRun only 5 workers for analytics low so concurrency naturally matches the 5 RPS limitEbashpho artisan queue:work --queue=analvtics low --tries=0 --max-iobs= --processes=5Effect: 5 workers x 1 successful op/sec = 5/sec. No rate-limit storms because we're under the limit by design. Each worker rarely sees a 429.Trade-oris•Slower throughput (still b/sec ceiling = 5.5 hours tor 100k• Other iobs on this queue comnete with the bottlenecWorks, but requires Horizon config changesF. Pre-flight cache check at job entry (mentioned earlier)Eliminates the DB.transaction churn.from.cache-hit cvcles.Doesnit chande.the throughnut.ceilina.but.reduces.cost.during.a.storm.to.almost.nothinaEasy win. Pairs with all other optionsG. Filter unmatchable activities betore dispatchIf manv activities have no email/ohone/name to match. dispatchina them is pure waste.• phpActivity::needsCrmMatch()›whereHas("participants', fn (Sq) = $q->whereNotNull('email")->orWhereNotNull('phone"))-›each(fn ($a) => MatchActivityCrmData::dispatch($a->id)):If 30% of the 100k are unmatchable (no contact info), removing them gets you to 70k - still over 9k cap, but closer.Effort: low if a querv-side filter is feasibleRecommended combinationFor maximum RoI1. A hatch endnoints) — 100x throuahnut. Solves the nroblem2. B (dispatch throttling) - defense in depth. prevents future storms.3. C (lookup caching) - reduces redundant API calls.4. F (pre-flight cache check) - eliminates DB churn during inevitable stormsWith A + B alone, the 100k → 9k problem becomes 100k → 100k completed in ~3-10 minutes, depending on caching efficiency.A is the leverage point. Without batch endpoints, you're brute-forcing through a 5 RPS hose. With them, the hose is 500 matches/sec.SummaryRace window: 5-10 wasted real APl calls per cache iil cycle, Bounded, ~15k calls wastedlin 30 min (vs 441k without cache). Acceptables can be tiahtened with aprobe lock if neededHubSpot-named middleware on multi-CRM iob: no functional issue for HubSpot. Salesforce/Pinedrive rate-limits ao throuch the wrond nath (treated as real100k → 9k bottleneck: not a rate-limiter problem, an architectural one. The fix is batch endpoints + dispatch throttling, not more aggressive retry logic.Ask anvthing (84D)+ « CodeClaude Onus 4.7 Mediumfo 4 spaces...
|
CleanShot X
|
|
NULL
|
16712
|
|
16713
|
1:13
SlackFileEditViewGoHistoryWindowHelpPetko Kas 1:13
SlackFileEditViewGoHistoryWindowHelpPetko KashinskiScreen shareChromeFilellol§ Support Daily - in 2h 42 m6д Huddle with Petko Kashinski100%8• Mon 11 May 12:18:44G+EditViewHistoryBookmarksProfilesTabWindowHelp8•Mon 11 May 12:18WorkGreelScoreandrewilso®Call AJiminM Inbox= Nate=Apps®Buildu UsersNewu LXrun.userpilot.io/integrations/webhooks/14/editWorkD АIKВ• ChatPlayground Al....10 Jiminny - Calenda...M GMail• My Calendly - Eve...= PH New UI LoginGet Starting with J..Apps• Chloe Onboarding....# cX Journey SM....Data setupX CloseDetailsuser id X+ Add]Data setupWebhook Guidance CProperties: 4/ 308 User PropertiesName XEmail XEl Company PropertiesID X+ Add) Feature Tags (Legacy)Xudeeureeey15 Feature Tags (Legacy) Selected[ All Feature Tags (LegacytsPH-TI-CoachingPH-TI-TopicsPH-TI-StatisticsE PH-T-EePH-TI-ConversationsV PH-PI-Clicks• Checklists|O FlowsSend Testhas been Click•||1|Al Notes: OffPetko ...reen ...&ГА1:13Leave...
|
CleanShot X
|
|
NULL
|
16713
|
|
16714
|
1:19
SlackFileEditViewGoHistoryWindowHelp(abl§ Sup 1:19
SlackFileEditViewGoHistoryWindowHelp(abl§ Support Daily • in 2h 42 m6д Huddle with Petko KashinskiPetko KashinskiScreen shareChromeFileEditViewHistoryBookmarksProfilesTabWindowHelpQ••WorkGreelScoreandrewilso®Call AJiminM Inbox= Nate=Apps© в xu User;€ New→chatgpt.com/c/6a019c7b-a6d8-8394-a783-8b6635a0b714D АIKВ• ChatPlayground Al...10 Jiminny - Calenda...M GMail• My Calendly - Eve...AppsChloe Onboarding...ChatGPTC New chatQ Search chats? Images88 AppsỞ Agents* Deep research® CodexGPTS8 Jiminny Customisation Archit.@ Custom Prompt Generator® Prompt CreatorEngineering translator© Exec Summary and Coaching.Transcript highlights8 2. Tech Integrations/Services.@ Test reserach® Travel Guide ExpertO CSM Business ResearchSiminlyBusiness79, Invite team members200m&= PH New UI LoginGet Starting with J..+ CX Journey SMB....Planhat calculated metrics are rolling-period based rather than static calendar-period based, so use alarge window if you want an approximate lifetime count, for example:en JSON""type": "eetricovertine,days": 3650,op": SUN",prop": "ac;s.autosated-reports-track-interest"Important checksMake sure the activity name is referenced exactly as Planhat stores it. Since yours already includes theprefix activities., your prop should be:activitiel.automated-reports-track-interestnot:activities.activities.autonated-reports-track-interestAlso check the aggregation behavior. For User Activities and Custom Metrics, Planhat reflects raw time-series data, while calculated metrics use the processed formula output.heipplarhat.comMy recommendation: create the 30-day metric first, then optionally add a 7-day version if you want asharper buying-intent signal.Sources+Ask anythingThinkingvChatGPT can make mistakes. OpenAi doesn't use Jiminny workspace data to train its models.71:19100% <78• Mon 11 May 12:18:50+8•Mon 11 May 12:18User;+WorkShareAl Notes: OffPetko ...reen ...Leave...
|
CleanShot X
|
|
NULL
|
16714
|
|
16715
|
1:22
SlackFileEditViewGoHistoryWindowHelp(abl§ Sup 1:22
SlackFileEditViewGoHistoryWindowHelp(abl§ Support Daily - in 2h 42 m6д Huddle with Petko KashinskiPetko KashinskiScreen shareChromeFileEditViewHistoryBookmarksProfilesTabWindowHelpSDQ•WorkGreelScoreandrewilso®Call AJiminM Inbox=Nate= ABuildu Users€ New→ws.planhat.com/jiminny/apps?id=66ceb97643c2530bb32c8bb6D АIKВChatPlayground AAl...10 Jiminny - Calenda...M GMail• My Calendly - Eve...= PH New UI LoginGet Starting with J..D Apps|• Chloe Onboarding....+ CX Journey SMB.....RedEvent LogInteAutPriv},"hostname": "app.jiminny.com","id": 131,"pathname": "/ondemand?min_duration=1&only_recorded=1&query=Tamara+Elvin&sequence_number=2","platform": "web""title": "PH-TI-Clickg","type": "feature_tag""user": {"email": "[EMAIL]","name":"Keeno Hendricks""user_id" : "a80b2f1a-d25d-4ad5-8917-e4886aa49561"},"environment": "production","id":"req_s/x0YWYY29ZJVjWhGyPA+rqVS","timestamp": 1778491036,"type": "feature_tag.clicked"}."headers": {"host":"webhooks.planhat.com","content-length":"537""api-version": "v1","content-type":"user-agent":"application/json""Userpilot Webhooks/1.0","x-cloud-trace-context":"d81137dcdeabd157475ef52da7fff39a/15989076238625456460"200m())))100% <{78• Mon 11 May 12:18:53+8•Mon 11 May 12:18UserWorkAl Notes: OffPetko ..reen.&ГА1:22Leave...
|
CleanShot X
|
|
NULL
|
16715
|
|
16716
|
1:31
SlackFileEditViewGoHistoryWindowHelpalol# Sup 1:31
SlackFileEditViewGoHistoryWindowHelpalol# Support Daily - in 2 h 41 m6д Huddle with Petko KashinskiPetko KashinskiScreen shareChromeFileEditViewHistoryBookmarksProfilesTabWindowHelpSDQ••WorkGree!Scoreandrewilso!®Call AJiminM InboxNate=Buildu Users€ New→ws.planhat.com/jiminny/apps?id=66ceb97643c2530bb32c8bb6D АIKВChatPlayground AAl...10 Jiminny - Calenda...M GMailMy Calendly - Eve...= PH New UI LoginGet Starting with J..( Apps• Chloe Onboarding....+ CX Journey SMB....+ Back83 App Center& UP > PH UX|Al appsPa Runs8 DataCrcatco oy tneEvent LogE Aun8 Pri100% <78• Mon 11 May 12:19:028•Mon 11 May 12:19User+Work+a Petko"app.Jiminny.com",*/ondenandtmin_duration»1Sonly_recorded»1ßquery«Tamara+Elvinäsequence_nunber=2",PH-TI-Clicks*.feature,tag".kecno.nenor.cksoshyvan.comuser_1d°: *3806211a-d25d-4ad5-8917-4LJ863349561*"production",1d*: *req_s/x0YVYY29ZJVjwhGyPA+rqvS*.1778491836,moturetesiacneod81137dcdeabd157475ef52da7f1139a/159890762386254*[IP_ADDRESS],[IP_ADDRESS]*9= Al Notes: OffQ 100%ConnectionsPetko ..reen.200m&1:31Leave...
|
CleanShot X
|
|
NULL
|
16716
|
|
16717
|
1:37
SlackFileEditViewGoHistoryWindowHelpall# Supp 1:37
SlackFileEditViewGoHistoryWindowHelpall# Support Daily - in 2 h 41 m6д Huddle with Petko KashinskiPetko KashinskiScreen shareChromeFileEditViewHistoryBookmarksProfilesTabWindowHelpQWorkGreelScoreandrewilso!®Call AJiminM InboxNateBuildu Users€ New→ws.planhat.com/jiminny/apps?id=66ceb97643c2530bb32c8bb6D АIKВChatPlayground AAl...10 Jiminny - Calenda...M GMailMy Calendly - Eve…= PH New UI LoginGet Starting with J...D Apps• Chloe Onboarding....+ CX Journey SM....+ BackSearch Jiminny8 App Center& UP > PH UXAll appsCreated by meG Recently most activeIntegrations& AutomationsP Private apps1 EditonEa Runs8 Data100% <78• Mon 11 May 12:19:088•Mon 11 May 12:19User+WorkE Petko• xWebhookvonkotCompleted8bcea7d0-160b-4ad7-8c0d-3a01448c66bd gTriggeranythingOmsTriggered by8 Support User (Removed)•||)OutputsQ 100% -"NX-094be170".ConnectionsAl Notes: OffPetko ..reen.200m&ГА1:37Leave...
|
CleanShot X
|
|
NULL
|
16717
|
|
16718
|
1:40
SlackFileEditViewGoHistoryWindowHelpPetko Kas 1:40
SlackFileEditViewGoHistoryWindowHelpPetko KashinskiScreen shareChromeFileEditViewHistoryBookmarksProfilesWorkGreelScore→ws.planhat.com/jiminny/appsD АIKВChatPlayground AAl...10 Jiminny - Calenda...M GMail+ Back8 App CenterEE All appsQ PLAAll appsCreated by meG Recently most activeIntegrations5 AutomationsP Private appsAppUpdate Trial Length12.02 UPDATED (Manager) Leader Change to Slack channel SMB ®4 12.02 UPDATED (Manager) Leader Created to Slack channel SMB E4Update License to Churn4 Opportunity Stage Update on Health score4 Event Created/Updated SlackUP ASK Jimnny CucksUP > PH UXImplementation Specialist UpdateTrial Heid Auto updateActive Jiminny Instance Auto UpdateInitial Phase Update6д Huddle with Petko KashinskiTabWindowHelpandrewilso!®Call AJiminM InboxNateMy Calendly - Eve…= PH New UI LoginGet Starting with J...D AppsSearch Jiminnyalol# Support Daily - in 2 h 41 mQBuildu Users€ New• Chloe Onboarding....+ CX Journey SM....100% <78• Mon 11 May 12:19:118•Mon 11 May 12:19User+Work.Petko• New appAl credits (300)30S 'IIII111010111111811II111•1IIE1111110••111184 days ago4 days ago6 days ago3 days ago2 years ago2 years ago2 minutes ago3 days ago9 hours ago9 hours ago3 days agoAl Notes: OffConnectionsPetko ..reen ...200m&ГА1:40Leave...
|
CleanShot X
|
|
NULL
|
16718
|
|
16719
|
1:43
PnostorimINavicatecodeFV faVsco.js?9 JY-20725 1:43
PnostorimINavicatecodeFV faVsco.js?9 JY-20725-handle-HS-search-rateProiect© UserAutomatedReportsController.php X>D Themesv D UserAutomatedRep© UserAutomatedlv Dv2C) Hubspot/Service.onp© HubspotSyncStrategyBase.phpwDeletecrmenutylrait.ongnoteмatch.php© MatchActivityCrmData.phpC) ACuiVityvzcontrAskAnythingCor© AskJiminnyRepoJob.ohoC) PaqinationState.phoC) MatchCrmData.phpC) CrmObiectsResolver.pho© ProviderRateLimiter.php© PaginationConfia.php(c) DealsvzControllclass UserAutomatedReportsController extends ControllerA14 X2 A Y(C) OnDemandV2CcPlavlistControlle€ PlavlistShareCor2 usagespublic const string SORT_DIRECTION = 'sort_direction';C) PlavlistTrackcor30 0lC) ActionltemsControlC) ActivitvControlier.oC) A CrmNotesControl© BaseController.phpc) ClientTokenControlc) CrmController nhopublic functionconstructdprivate readonly AutomatedReportsRepository SautomatedReportsRepository.private readonly AutomatedReportsService $automatedReportsService,private readonly ApiResponseService $apiResponseServiceprivate readonly Response Sresponseprivate readonly PlanhatService $planhatService,D f..3C) Deall evelPromntseliPOST /api/v1/automated-reports/interest 1 usageoubulc Tunction crackinuerest reouest srecuest. Jsonkesponse© Instantmeeuingcon© LanguageController/** @var User Suser *c LayoutmanagemenCal livoSoodControllorsuser = srequest->usero?© Meeuingscontroller• Messacecontrollerdefer(fn ( => Sthis->planhatService->track(c Meradaracontroller© MobileSettingsConuser: suser.'automated-renorts-track-interest'.c) Momentcontroller.r€ NudgeController.ph)->alwavs@ :) NumberAllocatorec€ OraanizationMemb• OrganizationRetentreturn sthis->response->with0korC) OraanizationRolescl© OrganizationSvncC@ PartnerController.o* Athrows AnnZicationExcentionC) PhoneNumberContg) PlavbackControlle'@ PlavlistController.nlGET lanilv1lautomated-renortspublic function list(Request $request): JsonResponse{...}© ScimController.php@ SidekickController123 09 ›DELETE /api/v1/automated-reports/{uuid}public function delete(Request Srequest, string Suuid): JsonResponsef...}C) SoftnhoneControlle(C) ScoController nhn(C) SubscrintionControe ToamAiAutamatione ToamAiContovtear9a ToamCantrollor nh.(e) TosminciahtcContrsuppon Dally • In Zn 41m100% 5• мon 11 May 12-19.19AskJiminnyReportActivityServiceTestv+0 ..A SF (jiminny@localhost]4 HS_local (jiminny@localhost]# console [PKOb.# console leu)# console [slAGiNg)2026-05-07 14:21:15] local.INF0: [Hubspot] DEBUG Getting headers {MMi9.У"Vace". "Inu,ur May 2020 14.21.19 6Ml"Jn"concenc-lyoe. apolicacion/ison.charser=utt-on"Transfer-Encoding": ["chunked"]."CF-Ray": ["9f80deb8db60dc3a-SOF"]."CF-Cache-Status": L"DYNAMIC"J,"Strict-Transport-Secur1ty":"max-aqe=31536000* 1ncludeSUbDomains: preload"),acceot-encodino"."access-control-allow-credentials": "false"i."server-timing": ["hcid;desc=|"019e02d0-6fd8-7812-bdba-885b7ccb3ee3\",cfr;desc=|"9f80deb8e7c6dc3a-IAD\""],"x-content-tvoe-ootions":"nosniff"."x-hubspot-correlation-id":["019e02d0-6fd8-7812-bdba-885b7ccb3ee3"],"Set-Cookip"." c+hm=Stlirtd0aXVr.kSandas6hzVVKhzTn0BidvMaheCtm0V-1778163675-1.0.107-May-26 14:51:15 GMT; domain=.hubapi.com; Http0nly; Secure; SameSite=None"],"Report-To":["{"endnoints".("url\":"https:\\/\\/a.nel.cloudflare.com\\/report\\/v4?s=NYAlsVTP0fYm32qrSDjxYE4sd2RV("group\":\"cf-nel\".("max_age\":604800}"],"NEL"L"1"success_fraction\":0.01,reportto. "cr-nel,"max agel ":604800}"].'Server":["cloudflare"]}} {"correlation_1d":"95256555-ec98-4541-b9za-adta/Sboyeab","trace_10":"C/AD8565-905t-4604-9405-0e5b551e5545CascadeHubspot Rate Limit ReE. Deaicatea low-concurrency worker poolRun only 5 workers for analytics low so concurrency naturally matches the 5 RPS limitEbashpho artisan queue:work --queue=analvtics low --tries=0 --max-iobs= --processes=5Effect: 5 workers x 1 successful op/sec = 5/sec. No rate-limit storms because we're under the limit by design. Each worker rarely sees a 429.Trade-oris•Slower throughput (still b/sec ceiling = 5.5 hours tor 100k• Other iobs on this queue comnete with the bottlenecWorks, but requires Horizon config changesF. Pre-flight cache check at job entry (mentioned earlier)Eliminates the DB.transaction churn.from.cache-hit cvcles.Doesnit chande.the throughnut.ceilina.but.reduces.cost.during.a.storm.to.almost.nothinaEasy win. Pairs with all other optionsG. Filter unmatchable activities betore dispatchIf manv activities have no email/ohone/name to match. dispatchina them is pure waste.• phpActivity::needsCrmMatch()›whereHas("participants', fn (Sq) = $q->whereNotNull('email")->orWhereNotNull('phone"))-›each(fn ($a) => MatchActivityCrmData::dispatch($a->id)):If 30% of the 100k are unmatchable (no contact info), removing them gets you to 70k - still over 9k cap, but closer.Effort: low if a querv-side filter is feasibleRecommended combinationFor maximum RoI1. A hatch endnoints) — 100x throuahnut. Solves the nroblem2. B (dispatch throttling) - defense in depth. prevents future storms.3. C (lookup caching) - reduces redundant API calls.4. F (pre-flight cache check) - eliminates DB churn during inevitable stormsWith A + B alone, the 100k → 9k problem becomes 100k → 100k completed in ~3-10 minutes, depending on caching efficiency.A is the leverage point. Without batch endpoints, you're brute-forcing through a 5 RPS hose. With them, the hose is 500 matches/sec.SummaryRace window: 5-10 wasted real APl calls per cache iil cycle, Bounded, ~15k calls wastedlin 30 min (vs 441k without cache). Acceptables can be tiahtened with aprobe lock if neededHubSpot-named middleware on multi-CRM iob: no functional issue for HubSpot. Salesforce/Pinedrive rate-limits ao throuch the wrond nath (treated as real100k → 9k bottleneck: not a rate-limiter problem, an architectural one. The fix is batch endpoints + dispatch throttling, not more aggressive retry logic.Ask anvthing (84D)+ « CodeClaude Onus 4.7 Mediumfo 4 spaces...
|
CleanShot X
|
|
NULL
|
16719
|
|
16720
|
1:47
SlackFileEditViewGoHistoryWindowHelpPetko Kas 1:47
SlackFileEditViewGoHistoryWindowHelpPetko KashinskiScreen shareChromeFileEditViewHistoryBookmarksProfilesTabWindowHelpWorkGreelScoreandrewilso!®Call AJimin→ws.planhat.com/jiminny/home/data-explorer/usagemetricdefD АIKВChatPlayground Al...GCalendarData ExplorerQ* NotificationsEmail ManagerMoreoooasCS Day-to-day -Getting started Guide• Just CS DataDaily OperationsWeekly prepRenewals and UpsellRisk and Churn AnalyticsImplementation -Impl ProjectsTrial Opps (Under Review)Stoyan's clientsLeadership •System ReportsLeadership OperationsNPS Report - GregClient Engagement OverviewRevenue Analytics10 Jiminny - Calenda...M GMail• My Calendly - Eve...8 Metric -EB DatasetQ PLAYBACK+ MetricName• UP TI Statistics Clicks (Last 30 days)• UP TI Statistics Clicks (Last 7 days)• UP TI Statistics Clicks (Last 1 day)• UP TI Engagement Clicks (Last 30 days)• UP TI Engagement Clicks (Last 7 days)• UP TI Engagement Clicks (Last 1 day)• UP 11 Deais Clicks (Last 30 days)• UP TI Deals Clicks (Last 7 days)• UP TI Deals Clicks (Last 1 day)• UP T1 Conversations Clicks (Last 30 days)• UP TI Conversations Clicks (Last 7 days)UP TI Conversations Clicks (Last 1 day)UP TI Coaching Clicks (Last 30 days)UP TI Coaching Clicks (Last 7 days)• UP TI Coaching Clicks (Last 1 day)• Playlists Adoptionshow di group oaca= PH New UI LoginSearch Jiminny37 metricsTypeCalculated MetricsModelEndUserCalculated MetricsEndUserEndUserCalculated MetricsEndUserCalculated MetricsEndUserCalculated MetricsEndUserCalculated MetricsEndUserCalculated MetricsEndUserCalculated MetricsEndUserCalculated MetricsEndUserCalculated MetricsEndUserCalculated MetricsnalesCalculated MetricsEndUserCalculated MetricsEndUserCalculated MetricsEndUserCalculated MetricsEndUseralol# Support Daily - in 2 h 41 m100% <78• Mon 11 May 12:19:176д Huddle with Petko KashinskiM Inbox=NGet Starting with J...QAppsBuildu Users€ NewApps• Chloe Onboarding....+ CX Journey SM....8•Mon 11 May 12:19User+Work+E PetkoDescriptionUPUPUPUPUPUPUPUPUP Playlists Clicks (Last 30 days)Save as Jiminny defaultResetCreated Byl Petko€ PetkoPetko€ Petkoe Petko( Petkol Petko(: PetkoPetkoPetkoPetkol Petko(A Petko( Petko€ Petkol Petkodb Add chartQ Search fields.Created d...Sep 02, 2024Sep 02, 2024Sep 02, 2024Sep 02, 2024Sep 02, 2024Sep 02, 2024Sep 02, 2024Sep 02, 2024Sep 02, 2024Sep 02, 2024Sep 02, 2024Sep 02, 2024Sep 02, 2024Sep 02, 2024Sep 02, 2024Sep 02, 2024Updated d...Sep 02, 2024Featured P Global fitersP Advanced fiterJun 09, 2025Jun 09, 2025Jun 09, 2025Jun 09, 2025Jun 09, 2025Jun 09, 2025Jun 09, 2025Jun 09, 2025Jun 09, 2025Jun 09, 2025Jun 09, 2025Jun 09, 2025Jun 09, 2025Jun 09, 2025Oct 10, 2024Aggregation modeAvailability in PlanhatBuild PeriodCrestedbCreated dateDescriptionFeaturedGroupLast BuitModelNameТyрeUpdated ByUpdated datiUpdated datiInvalid formeAl Notes: Off88&Petko ..€1:46Leave...
|
CleanShot X
|
|
NULL
|
16720
|
|
16721
|
1:50
SlackFileEditViewGoHistoryWindowHelpPetko Kas 1:50
SlackFileEditViewGoHistoryWindowHelpPetko KashinskiScreen shareChromeFileEditViewHistoryBookmarksProfilesTabWindowHelpWorkGreelScoreandrewilso®Call A→ws.planhat.com/jiminny/home/data-explorer/usagemetricdefD АIKВChatPlayground Al...CalendarData ExplorerEmail ManagerMoreoooasCS Day-to-day -Getting started Guide& Just CS DataDaily OperationsWeekly prepRenewals and UpsellRisk and Churn AnalyticsImplementation -Impl ProjectsTrial Opps (Under Review)Stoyan's clientsELeadership •System ReportsLeadership Operations88Pordonlo Overview (DasnooNPS Report - GregClient Engagement Overview10 Jiminny - Calenda...M GMail• My Calendly - Eve...= PH New UI LoginSearch Jiminny8 Metric -EB DatasetQ PLAYBACK+ Metric6 metricsTypeModelCompany 2• Playback Adoption AvgCalculated MetricsCompany• Playback AdoptionCalculated MetricsCompanyv EndUser 4• JUsers Playback AdoptionCalculated MetricsEndUser• Playback Adoption (Last 7 days)Calculated MetricsEndUser• Playback AdoptionCalculated MetricsEndUserplaybrckVisitedhttps://ws.planhat.com/jiminny/home/data-explorer/usagemetricdef?preview=Us…alol# Support Daily - in 2 h 41 m100% <78• Mon 11 May 12:19:206д Huddle with Petko KashinskiJiminM Inbox=Get Starting with J...QAppsBuildu Users€ NewApps• Chloe Onboarding....+ CX Journey SMB.....8•Mon 11 May 12:19User+Work+E PetkoDescriptionSave as Jiminny defaultResetdis Add chartQ Search fields.Created ByCreated d...Updated d.€ Petkol Petkol Petkol Petko€ PetkoFeatured7 Global fitersP Advanced fiterDec 02, 2024Dec 02, 2024Nov 28, 2024Nov 28, 2024Mar 23, 2026Mar 23, 2026Dec 02, 2024Dec 02, 2024Nov 28, 2024Nov 28, 2024Aggregation modeAvailability in PlanhatBuild PeriodCrestedbCreated dateCreated dateDescriptionFeaturedGroupLast BuitModelNameOrderTypeUpdated ByUpdated datiUpdated datiInvalid formuAl Notes: OffPetko ..&ГА1:49Leave...
|
CleanShot X
|
|
NULL
|
16721
|
|
16722
|
Project: faVsco.js, menu
JY-20725-handle-HS-search Project: faVsco.js, menu
JY-20725-handle-HS-search-rate-limit, menu
Start Listening for PHP Debug Connections
AskJiminnyReportActivityServiceTest
Run 'AskJiminnyReportActivityServiceTest'
Debug 'AskJiminnyReportActivityServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Code changed:
Hide
Sync Changes
Hide This Notification
14
2
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Http\Controllers\API\UserAutomatedReports;
use Illuminate\Support\Carbon;
use Illuminate\Http\JsonResponse;
use Jiminny\Exceptions\ApplicationException;
use Jiminny\Http\Controllers\Controller;
use Jiminny\Http\Responses\Api\Response;
use Jiminny\Models\User;
use Jiminny\Repositories\AutomatedReportsRepository;
use Jiminny\Services\ApiResponseService;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Jiminny\Services\Kiosk\AutomatedReports\ReportSort;
use Jiminny\Services\Kiosk\AutomatedReports\ReportSortDirection;
use Jiminny\Services\PlanhatService;
use Illuminate\Http\Request;
use Throwable;
class UserAutomatedReportsController extends Controller
{
public const int RESULTS_PER_PAGE = 25;
public const string SORT_COLUMN = 'sort_column';
public const string SORT_DIRECTION = 'sort_direction';
public function __construct(
private readonly AutomatedReportsRepository $automatedReportsRepository,
private readonly AutomatedReportsService $automatedReportsService,
private readonly ApiResponseService $apiResponseService,
private readonly Response $response,
private readonly PlanhatService $planhatService,
) {
parent::__construct();
}
public function trackInterest(Request $request): JsonResponse
{
/** @var User $user */
$user = $request->user();
defer(
fn () => $this->planhatService->track(
user: $user,
event: 'automated-reports-track-interest',
)
)->always();
return $this->response->withOk();
}
/**
* @throws ApplicationException
*/
public function list(Request $request): JsonResponse
{
/** @var User $user */
$user = $request->user();
$teamIds = $request->has('team')
? (array) $request->get('team')
: [];
$reportTypes = $request->has('report_type')
? (array) $request->get('report_type')
: [];
$name = $request->has('name') ? trim($request->get('name', '')) : null;
try {
$fromDate = $request->has('from_date') ? Carbon::parse($request->get('from_date')) : null;
$toDate = $request->has('to_date') ? Carbon::parse($request->get('to_date')) : null;
} catch (\Exception) {
return $this->response->errorWrongArgs('Invalid date.');
}
$page = $request->has('page') ? (int) $request->get('page') : 1;
$sort = ReportSort::tryFrom(
$request->get(self::SORT_COLUMN, '')
) ?? ReportSort::GENERATED_AT;
$sortDirection = ReportSortDirection::tryFrom(
strtolower($request->get(self::SORT_DIRECTION, ''))
) ?? ReportSortDirection::DESC;
$paginatedUserReports = $this->automatedReportsRepository->getPaginatedUserReports(
user: $user,
sort: $sort,
sortDirection: $sortDirection,
resultsPerPage: self::RESULTS_PER_PAGE,
page: $page,
fromDate: $fromDate,
toDate: $toDate,
teamIds: array_map('intval', $teamIds),
reportTypes: $reportTypes,
name: $name,
);
$reportResults = $this->automatedReportsService->transformReportResults(
$paginatedUserReports->getCollection()
);
$team = $user->getTeam();
$reportTypeFilter = $this->automatedReportsService->getReportTypeFieldData(
shortVersion: true,
team: $team
);
$data = $this->apiResponseService->fromPaginatorToArray(
paginator: $paginatedUserReports,
data: $reportResults,
moreMeta: [
self::SORT_COLUMN => $sort->value,
self::SORT_DIRECTION => $sortDirection->value,
],
filters: [
$reportTypeFilter['id'] => $reportTypeFilter,
],
);
return $this->response->withArray($data);
}
public function delete(Request $request, string $uuid): JsonResponse
{
/** @var User $user */
$user = $request->user();
try {
$result = $this->automatedReportsRepository->findResultByUuidForUser($uuid, $user);
if ($result === null) {
return new JsonResponse(
data: ['error' => 'Report not found'],
status: JsonResponse::HTTP_NOT_FOUND
);
}
$result->delete();
return new JsonResponse(null, JsonResponse::HTTP_NO_CONTENT);
} catch (Throwable $e) {
return new JsonResponse(
data: ['error' => 'Failed to delete report result'],
status: JsonResponse::HTTP_INTERNAL_SERVER_ERROR
);
}
}
}
Sync Changes
Hide This Notification
Code changed:
Hide
19
Previous Highlighted Error
Next Highlighted Error
[2026-05-07 14:21:15] local.INFO: [Hubspot] DEBUG Getting headers {
"headers":{
"Date":["Thu,07 May 2026 14:21:15 GMT"],
"Content-Type":["application/json;charset=utf-8"],
"Transfer-Encoding":["chunked"],
"Connection":["keep-alive"],
"CF-Ray":["9f80deb8db60dc3a-SOF"],
"CF-Cache-Status":["DYNAMIC"],
"Strict-Transport-Security":["max-age=31536000; includeSubDomains; preload"],
"Vary":["origin,
accept-encoding"],
"access-control-allow-credentials":["false"],
"server-timing":["hcid;desc=\"019e02d0-6fd8-7812-bdba-885b7ccb3ee3\",
cfr;desc=\"9f80deb8e7c6dc3a-IAD\""],
"x-content-type-options":["nosniff"],
"x-hubspot-correlation-id":["019e02d0-6fd8-7812-bdba-885b7ccb3ee3"],
"Set-Cookie":["__cf_bm=SIUrtdQgXVrik50pdqF6hZVYKhzTnQBidvMabeCtm0Y-1778163675-[IP_ADDRESS]-rI.ZggtDKxTge5zr8_2gbBfWMQQ.ufZEXDZyHz2mBUFdzdo2gTHEsOkXMSEShjK0hGYxNhUGM1ZoBpX7BcFZcHEjA7Cs_.SMUhUnd2nYjko; path=/; expires=Thu,
07-May-26 14:51:15 GMT; domain=.hubapi.com; HttpOnly; Secure; SameSite=None"],
"Report-To":["{
\"endpoints\":[{
\"url\":\"https:\\/\\/a.nel.cloudflare.com\\/report\\/v4?s=NYAlsVTP0fYm32qrSDjxYE4sd2RWRqiSp3wHsmdEgZlzoYdxI%2BIxVpHmsKn3O%2BKVA3mFIJ2m7YRECDGSM%2BW2IYTzo6FM4%2BdUIjURO8srzKSvJgZ%2BQ6R79arKQw3uHLlX\"}],
\"group\":\"cf-nel\",
\"max_age\":604800}"],
"NEL":["{
\"success_fraction\":0.01,
\"report_to\":\"cf-nel\",
\"max_age\":604800}"],
"Server":["cloudflare"]}} {
"correlation_id":"95236535-ec98-4541-b92a-adfa73b69eab",
"trace_id":"c7ab8365-903f-46d4-9403-0e5b551e3545"}
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
PhpStorm
|
faVsco.js – UserAutomatedReportsController.php
|
NULL
|
16722
|
|
16723
|
PnostorimINavicatecodeFV faVsco.js?9 JY-20725-hand PnostorimINavicatecodeFV faVsco.js?9 JY-20725-handle-HS-search-rateProiect© UserAutomatedReportsController.php X>D Themesv D UserAutomatedRep© UserAutomatedlv Dv2C) Hubspot/Service.onp© HubspotSyncStrategyBase.phpwDeletecrmenutylrait.ongnoteмatch.php© MatchActivityCrmData.phpC) ACuiVityvzcontrAskAnythingCor© AskJiminnyRepoJob.ohoC) PaqinationState.phoC) MatchCrmData.phpC) CrmObiectsResolver.pho© ProviderRateLimiter.php© PaginationConfia.php(c) DealsvzControllclass UserAutomatedReportsController extends ControllerA14 X2 A Y(C) OnDemandV2CcPlavlistControlle€ PlavlistShareCor2 usagespublic const string SORT_DIRECTION = 'sort_direction';C) PlavlistTrackcor30 0lC) ActionltemsControlC) ActivitvControlier.oC) A CrmNotesControl© BaseController.phpc) ClientTokenControlc) CrmController nhopublic functionconstructdprivate readonly AutomatedReportsRepository SautomatedReportsRepository.private readonly AutomatedReportsService $automatedReportsService,private readonly ApiResponseService $apiResponseServiceprivate readonly Response Sresponseprivate readonly PlanhatService $planhatService,D f..3C) Deall evelPromntseliPOST /api/v1/automated-reports/interest 1 usageoubulc Tunction crackinuerest reouest srecuest. Jsonkesponse© Instantmeeuingcon© LanguageController/** @var User Suser *c LayoutmanagemenCal livoSoodControllorsuser = srequest->usero?© Meeuingscontroller• Messacecontrollerdefer(fn ( => Sthis->planhatService->track(c Meradaracontroller© MobileSettingsConuser: suser.'automated-renorts-track-interest'.c) Momentcontroller.r€ NudgeController.ph)->alwavs@ :) NumberAllocatorec€ OraanizationMemb• OrganizationRetentreturn sthis->response->with0korC) OraanizationRolescl© OrganizationSvncC@ PartnerController.o* Athrows AnnZicationExcentionC) PhoneNumberContg) PlavbackControlle'@ PlavlistController.nlGET lanilv1lautomated-renortspublic function list(Request $request): JsonResponse{...}© ScimController.php@ SidekickController123 09 ›DELETE /api/v1/automated-reports/{uuid}public function delete(Request Srequest, string Suuid): JsonResponsef...}C) SoftnhoneControlle(C) ScoController nhn(C) SubscrintionControe ToamAiAutamatione ToamAiContovtear9a ToamCantrollor nh.(e) TosminciahtcContrsuppon Dally • In Zn 41m100% 5• мon 11 May 12-19-20AskJiminnyReportActivityServiceTestv+0 ..A SF (jiminny@localhost]4 HS_local (jiminny@localhost]# console [PKOb.# console leu)# console [slAGiNg)2026-05-07 14:21:15] local.INF0: [Hubspot] DEBUG Getting headers {MMi9.У"Vace". "Inu,ur May 2020 14.21.19 6Ml"Jn"concenc-lyoe. apolicacion/ison.charser=utt-on"Transfer-Encoding": ["chunked"]."CF-Ray": ["9f80deb8db60dc3a-SOF"]."CF-Cache-Status": L"DYNAMIC"J,"Strict-Transport-Secur1ty":"max-aqe=31536000* 1ncludeSUbDomains: preload"),acceot-encodino"."access-control-allow-credentials": "false"i."server-timing": ["hcid;desc=|"019e02d0-6fd8-7812-bdba-885b7ccb3ee3\",cfr;desc=|"9f80deb8e7c6dc3a-IAD\""],"x-content-tvoe-ootions":"nosniff"."x-hubspot-correlation-id":["019e02d0-6fd8-7812-bdba-885b7ccb3ee3"],"Set-Cookip"." c+hm=Stlirtd0aXVr.kSandas6hzVVKhzTn0BidvMaheCtm0V-1778163675-1.0.107-May-26 14:51:15 GMT; domain=.hubapi.com; Http0nly; Secure; SameSite=None"],"Report-To":["{"endnoints".("url\":"https:\\/\\/a.nel.cloudflare.com\\/report\\/v4?s=NYAlsVTP0fYm32qrSDjxYE4sd2RV("group\":\"cf-nel\".("max_age\":604800}"],"NEL"L"1"success_fraction\":0.01,reportto. "cr-nel,"max agel ":604800}"].'Server":["cloudflare"]}} {"correlation_1d":"95256555-ec98-4541-b9za-adta/Sboyeab","trace_10":"C/AD8565-905t-4604-9405-0e5b551e5545CascadeHubspot Rate Limit ReE. Deaicatea low-concurrency worker poolRun only 5 workers for analytics low so concurrency naturally matches the 5 RPS limitl bashpho artisan queue:work --queue=analvtics low --tries=0 --max-iobs= --processes=5Effect: 5 workers x 1 successful op/sec = 5/sec. No rate-limit storms because we're under the limit by design. Each worker rarely sees a 429.Trade-oris•Slower throughput (still b/sec ceiling = 5.5 hours tor 100k• Other iobs on this queue comnete with the bottlleneckWorks, but requires Horizon config changesF. Pre-flight cache check at job entry (mentioned earlier)Eliminates the DB.transaction churn.from.cache-hit cvcles.Doesnit chande.the throughnut.ceilina.but.reduces.cost.during.a.storm.to.almost.nothinaEasy win. Pairs with all other optionsG. Filter unmatchable activities betore dispatchIf manv activities have no email/ohone/name to match. dispatchina them is pure waste.• phpActivity::needsCrmMatch()›whereHas("participants', fn (Sq) = $q->whereNotNull('email")->orWhereNotNull('phone"))-›each(fn ($a) => MatchActivityCrmData::dispatch($a->id)):If 30% of the 100k are unmatchable (no contact info), removing them gets you to 70k - still over 9k cap, but closer.Effort: low if a querv-side filter is feasibleRecommended combinationFor maximum RoI1. A hatch endnoints) — 100x throuahnut. Solves the nroblem2. B (dispatch throttling) - defense in depth. prevents future storms.3. C (lookup caching) - reduces redundant API calls.4. F (pre-flight cache check) - eliminates DB churn during inevitable stormsWith A + B alone, the 100k → 9k problem becomes 100k → 100k completed in ~3-10 minutes, depending on caching efficiency.A is the leverage point. Without batch endpoints, you're brute-forcing through a 5 RPS hose. With them, the hose is 500 matches/sec.SummaryRace window: 5-10 wasted real APl calls per cache iil cycle, Bounded, ~15k calls wastedlin 30 min (vs 441k without cache). Acceptables can be tiahtened with aprobe lock if neededHubSpot-named middleware on multi-CRM iob: no functional issue for HubSpot. Salesforce/Pinedrive rate-limits ao throuch the wrond nath (treated as real100k → 9k bottleneck: not a rate-limiter problem, an architectural one. The fix is batch endpoints + dispatch throttling, not more aggressive retry logic.Ask anvthing (84D)+ « CodeClaude Onus 4.7 Mediumfo 4 spaces...
|
PhpStorm
|
faVsco.js – UserAutomatedReportsController.php
|
NULL
|
16723
|
|
16724
|
Project: faVsco.js, menu
JY-20725-handle-HS-search Project: faVsco.js, menu
JY-20725-handle-HS-search-rate-limit, menu
Start Listening for PHP Debug Connections
AskJiminnyReportActivityServiceTest
Run 'AskJiminnyReportActivityServiceTest'
Debug 'AskJiminnyReportActivityServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Code changed:
Hide
Sync Changes
Hide This Notification
14
2
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Http\Controllers\API\UserAutomatedReports;
use Illuminate\Support\Carbon;
use Illuminate\Http\JsonResponse;
use Jiminny\Exceptions\ApplicationException;
use Jiminny\Http\Controllers\Controller;
use Jiminny\Http\Responses\Api\Response;
use Jiminny\Models\User;
use Jiminny\Repositories\AutomatedReportsRepository;
use Jiminny\Services\ApiResponseService;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Jiminny\Services\Kiosk\AutomatedReports\ReportSort;
use Jiminny\Services\Kiosk\AutomatedReports\ReportSortDirection;
use Jiminny\Services\PlanhatService;
use Illuminate\Http\Request;
use Throwable;
class UserAutomatedReportsController extends Controller
{
public const int RESULTS_PER_PAGE = 25;
public const string SORT_COLUMN = 'sort_column';
public const string SORT_DIRECTION = 'sort_direction';
public function __construct(
private readonly AutomatedReportsRepository $automatedReportsRepository,
private readonly AutomatedReportsService $automatedReportsService,
private readonly ApiResponseService $apiResponseService,
private readonly Response $response,
private readonly PlanhatService $planhatService,
) {
parent::__construct();
}
public function trackInterest(Request $request): JsonResponse
{
/** @var User $user */
$user = $request->user();
defer(
fn () => $this->planhatService->track(
user: $user,
event: 'automated-reports-track-interest',
)
)->always();
return $this->response->withOk();
}
/**
* @throws ApplicationException
*/
public function list(Request $request): JsonResponse
{
/** @var User $user */
$user = $request->user();
$teamIds = $request->has('team')
? (array) $request->get('team')
: [];
$reportTypes = $request->has('report_type')
? (array) $request->get('report_type')
: [];
$name = $request->has('name') ? trim($request->get('name', '')) : null;
try {
$fromDate = $request->has('from_date') ? Carbon::parse($request->get('from_date')) : null;
$toDate = $request->has('to_date') ? Carbon::parse($request->get('to_date')) : null;
} catch (\Exception) {
return $this->response->errorWrongArgs('Invalid date.');
}
$page = $request->has('page') ? (int) $request->get('page') : 1;
$sort = ReportSort::tryFrom(
$request->get(self::SORT_COLUMN, '')
) ?? ReportSort::GENERATED_AT;
$sortDirection = ReportSortDirection::tryFrom(
strtolower($request->get(self::SORT_DIRECTION, ''))
) ?? ReportSortDirection::DESC;
$paginatedUserReports = $this->automatedReportsRepository->getPaginatedUserReports(
user: $user,
sort: $sort,
sortDirection: $sortDirection,
resultsPerPage: self::RESULTS_PER_PAGE,
page: $page,
fromDate: $fromDate,
toDate: $toDate,
teamIds: array_map('intval', $teamIds),
reportTypes: $reportTypes,
name: $name,
);
$reportResults = $this->automatedReportsService->transformReportResults(
$paginatedUserReports->getCollection()
);
$team = $user->getTeam();
$reportTypeFilter = $this->automatedReportsService->getReportTypeFieldData(
shortVersion: true,
team: $team
);
$data = $this->apiResponseService->fromPaginatorToArray(
paginator: $paginatedUserReports,
data: $reportResults,
moreMeta: [
self::SORT_COLUMN => $sort->value,
self::SORT_DIRECTION => $sortDirection->value,
],
filters: [
$reportTypeFilter['id'] => $reportTypeFilter,
],
);
return $this->response->withArray($data);
}
public function delete(Request $request, string $uuid): JsonResponse
{
/** @var User $user */
$user = $request->user();
try {
$result = $this->automatedReportsRepository->findResultByUuidForUser($uuid, $user);
if ($result === null) {
return new JsonResponse(
data: ['error' => 'Report not found'],
status: JsonResponse::HTTP_NOT_FOUND
);
}
$result->delete();
return new JsonResponse(null, JsonResponse::HTTP_NO_CONTENT);
} catch (Throwable $e) {
return new JsonResponse(
data: ['error' => 'Failed to delete report result'],
status: JsonResponse::HTTP_INTERNAL_SERVER_ERROR
);
}
}
}
Sync Changes
Hide This Notification
Code changed:...
|
PhpStorm
|
faVsco.js – UserAutomatedReportsController.php
|
NULL
|
16724
|
|
16725
|
Project Files
Preview
Filter
Open in Find Tool Win Project Files
Preview
Filter
Open in Find Tool Window
P
TrackAutomatedReportGeneratedEvent.php .../.../AutomatedReports/UserPilot/TrackAutomatedReportGeneratedEvent.php, class
TrackAutomatedReportGeneratedEventTest.php .../.../UserPilot/TrackAutomatedReportGeneratedEventTest.php, class
Track.php .../app/Models/Track.php, class
track-restored.blade.php resources/views/emails/activities
TrackAvailable.php .../app/Events/Activities/Audio/TrackAvailable.php, class
TrackAvailable.php .../app/Listeners/Activities/Audio/TrackAvailable.php, class
TrackAvailableListenerTest.php .../tests/Unit/Listeners/Activities/Audio/TrackAvailableListenerTest.php, class
TrackChannelsAnalyzedEvent.php .../app/Component/FFMpeg/Events/Audio/TrackChannelsAnalyzedEvent.php, class
TrackChannelsAnalyzedEvent.php .../app/Component/FFMpeg/Events/Video/TrackChannelsAnalyzedEvent.php, class
TrackChannelsAnalyzedEventTest.php .../tests/Unit/.../FFMpeg/Events/Audio/TrackChannelsAnalyzedEventTest.php, class
Track.php.html build/coverage/Models
TrackAvailable.php.html build/coverage/Events/Activities/Audio
TrackAvailable.php.html build/coverage/Listeners/Activities/Audio
TrackChannelsAnalyzedEvent.php.html build/coverage/Component/FFMpeg/Events/Audio
TrackChannelsAnalyzedEvent.php.html build/coverage/Component/FFMpeg/Events/Video
TrackAutomatedReportGeneratedEvent.php .../.../AutomatedReports/UserPilot/TrackAutomatedReportGeneratedEvent.php, class
TrackAutomatedReportGeneratedEventTest.php .../.../UserPilot/TrackAutomatedReportGeneratedEventTest.php, class
Track.php .../app/Models/Track.php, class
track-restored.blade.php resources/views/emails/activities
TrackAvailable.php .../app/Events/Activities/Audio/TrackAvailable.php, class
TrackAvailable.php .../app/Listeners/Activities/Audio/TrackAvailable.php, class
TrackAvailableListenerTest.php .../tests/Unit/Listeners/Activities/Audio/TrackAvailableListenerTest.php, class
TrackChannelsAnalyzedEvent.php .../app/Component/FFMpeg/Events/Audio/TrackChannelsAnalyzedEvent.php, class
TrackChannelsAnalyzedEvent.php .../app/Component/FFMpeg/Events/Video/TrackChannelsAnalyzedEvent.php, class
TrackChannelsAnalyzedEventTest.php .../tests/Unit/.../FFMpeg/Events/Audio/TrackChannelsAnalyzedEventTest.php, class
Track.php.html build/coverage/Models
TrackAvailable.php.html build/coverage/Events/Activities/Audio
TrackAvailable.php.html build/coverage/Listeners/Activities/Audio
TrackChannelsAnalyzedEvent.php.html build/coverage/Component/FFMpeg/Events/Audio
TrackChannelsAnalyzedEvent.php.html build/coverage/Component/FFMpeg/Events/Video
Listeners/AutomatedReports/UserPilot/TrackAutomatedReportGeneratedEvent.php
Open In Right Split...
|
PhpStorm
|
|
NULL
|
16725
|
|
16726
|
Project Files
Preview
Filter
Open in Find Tool Win Project Files
Preview
Filter
Open in Find Tool Window
PLay
PlaybackController.php .../app/Http/Controllers/PlaybackController.php, final class
PlaybackService.php .../app/Services/PlaybackService.php, class
PLAYLIST_ACTIVITY_ACCESS.md contrib/doc/sequence diagrams
PlaybackController.php .../app/Http/Controllers/API/PlaybackController.php, final class
PlaybackController.php .../app/Http/Controllers/API/Page/PlaybackController.php, class
PlaybackPageTransformer.php .../app/Http/Transformers/PlaybackPageTransformer.php, class
Play.php .../app/Models/Activity/Play.php, class
PrepareAiTemplateSystemLayout.php .../app/.../AiAutomation/Listeners/Layout/PrepareAiTemplateSystemLayout.php, class
PrepareAiTemplateSystemLayoutTest.php .../tests/.../Listeners/Layout/PrepareAiTemplateSystemLayoutTest.php, class
Play.php.html build/coverage/Models/Activity
PlaybackController.php.html build/coverage/Http/Controllers
PlaybackController.php.html build/coverage/Http/Controllers/API
PlaybackController.php.html build/coverage/Http/Controllers/API/Page
PlaybackService.php.html build/coverage/Services
PlaybackPageTransformer.php.html build/coverage/Http/Transformers
… more
PlaybackController.php .../app/Http/Controllers/PlaybackController.php, final class
PlaybackService.php .../app/Services/PlaybackService.php, class
PLAYLIST_ACTIVITY_ACCESS.md contrib/doc/sequence diagrams
PlaybackController.php .../app/Http/Controllers/API/PlaybackController.php, final class
PlaybackController.php .../app/Http/Controllers/API/Page/PlaybackController.php, class
PlaybackPageTransformer.php .../app/Http/Transformers/PlaybackPageTransformer.php, class
Play.php .../app/Models/Activity/Play.php, class
PrepareAiTemplateSystemLayout.php .../app/.../AiAutomation/Listeners/Layout/PrepareAiTemplateSystemLayout.php, class
PrepareAiTemplateSystemLayoutTest.php .../tests/.../Listeners/Layout/PrepareAiTemplateSystemLayoutTest.php, class
Play.php.html build/coverage/Models/Activity
PlaybackController.php.html build/coverage/Http/Controllers
PlaybackController.php.html build/coverage/Http/Controllers/API
PlaybackController.php.html build/coverage/Http/Controllers/API/Page
PlaybackService.php.html build/coverage/Services
PlaybackPageTransformer.php.html build/coverage/Http/Transformers
… more
Http/Controllers/PlaybackController.php
Open In Right Split...
|
PhpStorm
|
|
NULL
|
16726
|
|
16727
|
Project Files
Preview
Filter
Open in Find Tool Win Project Files
Preview
Filter
Open in Find Tool Window
PLayback
PlaybackController.php .../app/Http/Controllers/PlaybackController.php, final class
PlaybackService.php .../app/Services/PlaybackService.php, class
PlaybackController.php .../app/Http/Controllers/API/PlaybackController.php, final class
PlaybackController.php .../app/Http/Controllers/API/Page/PlaybackController.php, class
PlaybackTheme.php .../app/Models/PlaybackTheme.php, class
PlaybackPageTransformer.php .../app/Http/Transformers/PlaybackPageTransformer.php, class
PlaybackThemeFactory.php .../database/factories/PlaybackThemeFactory.php, class
PlaybackThemeAnalyzerService.php .../app/Component/ActivityAnalytics/Service/PlaybackThemeAnalyzerService.php, class
PlaybackController.php.html build/coverage/Http/Controllers
PlaybackController.php.html build/coverage/Http/Controllers/API
PlaybackController.php.html build/coverage/Http/Controllers/API/Page
PlaybackService.php.html build/coverage/Services
PlaybackTheme.php.html build/coverage/Models
PlaybackPageTransformer.php.html build/coverage/Http/Transformers
PlaybackThemeAnalyzerService.php.html build/coverage/Component/ActivityAnalytics/Service
… more
PlaybackController.php .../app/Http/Controllers/PlaybackController.php, final class
PlaybackService.php .../app/Services/PlaybackService.php, class
PlaybackController.php .../app/Http/Controllers/API/PlaybackController.php, final class
PlaybackController.php .../app/Http/Controllers/API/Page/PlaybackController.php, class
PlaybackTheme.php .../app/Models/PlaybackTheme.php, class
PlaybackPageTransformer.php .../app/Http/Transformers/PlaybackPageTransformer.php, class
PlaybackThemeFactory.php .../database/factories/PlaybackThemeFactory.php, class
PlaybackThemeAnalyzerService.php .../app/Component/ActivityAnalytics/Service/PlaybackThemeAnalyzerService.php, class
PlaybackController.php.html build/coverage/Http/Controllers
PlaybackController.php.html build/coverage/Http/Controllers/API
PlaybackController.php.html build/coverage/Http/Controllers/API/Page
PlaybackService.php.html build/coverage/Services
PlaybackTheme.php.html build/coverage/Models
PlaybackPageTransformer.php.html build/coverage/Http/Transformers
PlaybackThemeAnalyzerService.php.html build/coverage/Component/ActivityAnalytics/Service
… more
Http/Controllers/PlaybackController.php
Open In Right Split...
|
PhpStorm
|
|
NULL
|
16727
|
|
16728
|
All Places
Preview
Filter
Open in Find Tool Window All Places
Preview
Filter
Open in Find Tool Window
PLayback-visi
Http/Controllers/PlaybackController.php
Open In Right Split...
|
PhpStorm
|
|
NULL
|
16728
|
|
16729
|
Include non-project items
Preview
Filter
Open in F Include non-project items
Preview
Filter
Open in Find Tool Window
PLayback-
playback-themes contrib/playback-themes
activity-playback-available.email.mustache resources/views/emails/postmark-templates/email
activity-playback-available.subject.mustache resources/views/emails/postmark-templates/email
2021_06_25-emea-themes-pl-add.csv contrib/playback-themes
2021_01_05-emea-themes-pt-add.csv contrib/playback-themes
2021-02-12-emea-themes-da-add.csv contrib/playback-themes
2021_01_05-emea-themes-de-add.csv contrib/playback-themes
2021_01_05-emea-themes-en-add.csv contrib/playback-themes
2021_01_05-emea-themes-en-remove.csv contrib/playback-themes
2021_01_05-emea-themes-es-add.csv contrib/playback-themes
2021_01_05-emea-themes-fr-add.csv contrib/playback-themes
2021_01_05-emea-themes-it-add.csv contrib/playback-themes
2021_01_05-emea-themes-nl-add.csv contrib/playback-themes
2021_01_05-emea-themes-sv-add.csv contrib/playback-themes
2022_04_27-emea-themes-el-add.csv contrib/playback-themes
… more
playback-themes contrib/playback-themes
activity-playback-available.email.mustache resources/views/emails/postmark-templates/email
activity-playback-available.subject.mustache resources/views/emails/postmark-templates/email
2021_06_25-emea-themes-pl-add.csv contrib/playback-themes
2021_01_05-emea-themes-pt-add.csv contrib/playback-themes
2021-02-12-emea-themes-da-add.csv contrib/playback-themes
2021_01_05-emea-themes-de-add.csv contrib/playback-themes
2021_01_05-emea-themes-en-add.csv contrib/playback-themes
2021_01_05-emea-themes-en-remove.csv contrib/playback-themes
2021_01_05-emea-themes-es-add.csv contrib/playback-themes...
|
PhpStorm
|
|
NULL
|
16729
|
|
16730
|
Include non-project items
Preview
Filter
Open in F Include non-project items
Preview
Filter
Open in Find Tool Window
PLayback-
playback-themes contrib/playback-themes
activity-playback-available.email.mustache resources/views/emails/postmark-templates/email
activity-playback-available.subject.mustache resources/views/emails/postmark-templates/email
2021_06_25-emea-themes-pl-add.csv contrib/playback-themes
2021_01_05-emea-themes-pt-add.csv contrib/playback-themes
2021-02-12-emea-themes-da-add.csv contrib/playback-themes
2021_01_05-emea-themes-de-add.csv contrib/playback-themes
2021_01_05-emea-themes-en-add.csv contrib/playback-themes
2021_01_05-emea-themes-en-remove.csv contrib/playback-themes
2021_01_05-emea-themes-es-add.csv contrib/playback-themes
2021_01_05-emea-themes-fr-add.csv contrib/playback-themes
2021_01_05-emea-themes-it-add.csv contrib/playback-themes
2021_01_05-emea-themes-nl-add.csv contrib/playback-themes
2021_01_05-emea-themes-sv-add.csv contrib/playback-themes
2022_04_27-emea-themes-el-add.csv contrib/playback-themes
… more
playback-themes contrib/playback-themes
activity-playback-available.email.mustache resources/views/emails/postmark-templates/email
activity-playback-available.subject.mustache resources/views/emails/postmark-templates/email
2021_06_25-emea-themes-pl-add.csv contrib/playback-themes
2021_01_05-emea-themes-pt-add.csv contrib/playback-themes
2021-02-12-emea-themes-da-add.csv contrib/playback-themes
2021_01_05-emea-themes-de-add.csv contrib/playback-themes
2021_01_05-emea-themes-en-add.csv contrib/playback-themes
2021_01_05-emea-themes-en-remove.csv contrib/playback-themes...
|
PhpStorm
|
|
NULL
|
16730
|
|
16731
|
Include non-project items
Preview
Filter
Open in F Include non-project items
Preview
Filter
Open in Find Tool Window
PLayback-
activity-playback-available.email.mustache resources/views/emails/postmark-templates/email
activity-playback-available.subject.mustache resources/views/emails/postmark-templates/email
2021-02-12-emea-themes-da-add.csv contrib/playback-themes
2021_01_05-emea-themes-de-add.csv contrib/playback-themes
2021_01_05-emea-themes-en-add.csv contrib/playback-themes
2021_01_05-emea-themes-en-remove.csv contrib/playback-themes
2021_01_05-emea-themes-es-add.csv contrib/playback-themes
2021_01_05-emea-themes-fr-add.csv contrib/playback-themes
2021_01_05-emea-themes-it-add.csv contrib/playback-themes
2021_01_05-emea-themes-nl-add.csv contrib/playback-themes
2021_01_05-emea-themes-pt-add.csv contrib/playback-themes
2021_01_05-emea-themes-sv-add.csv contrib/playback-themes
2021_06_25-emea-themes-pl-add.csv contrib/playback-themes...
|
PhpStorm
|
|
NULL
|
16731
|
|
16732
|
Include non-project items
Preview
Filter
Open in F Include non-project items
Preview
Filter
Open in Find Tool Window
PLayback-
activity-playback-available.email.mustache resources/views/emails/postmark-templates/email
activity-playback-available.subject.mustache resources/views/emails/postmark-templates/email
2021-02-12-emea-themes-da-add.csv contrib/playback-themes
2021_01_05-emea-themes-de-add.csv contrib/playback-themes
2021_01_05-emea-themes-en-add.csv contrib/playback-themes
2021_01_05-emea-themes-en-remove.csv contrib/playback-themes
2021_01_05-emea-themes-es-add.csv contrib/playback-themes
2021_01_05-emea-themes-fr-add.csv contrib/playback-themes
2021_01_05-emea-themes-it-add.csv contrib/playback-themes
2021_01_05-emea-themes-nl-add.csv contrib/playback-themes
2021_01_05-emea-themes-pt-add.csv contrib/playback-themes
2021_01_05-emea-themes-sv-add.csv contrib/playback-themes
2021_06_25-emea-themes-pl-add.csv contrib/playback-themes...
|
PhpStorm
|
|
NULL
|
16732
|
|
16733
|
Include non-project items
Preview
Filter
Open in F Include non-project items
Preview
Filter
Open in Find Tool Window
playback
PlaybackController.php .../app/Http/Controllers/PlaybackController.php, final class
playback_theme_id jiminny.playback_theme_topics [EU]
playback_theme_id jiminny.scorecard_rules [EU]
playback_theme_id jiminny.playback_theme_topics [jiminny@localhost]
playback_theme_id jiminny.scorecard_rules [jiminny@localhost]
playback_theme_id jiminny.playback_theme_topics [PROD]
playback_theme_id jiminny.scorecard_rules [PROD]
playback_theme_id jiminny.playback_theme_topics [QA]
playback_theme_id jiminny.scorecard_rules [QA]
playback_theme_id jiminny.playback_theme_topics [QAi]
playback_theme_id jiminny.scorecard_rules [QAi]
playback_theme_id jiminny.playback_theme_topics [QAI PROD]
playback_theme_id jiminny.scorecard_rules [QAI PROD]
playback_theme_id jiminny.playback_theme_topics [STAGING]
playback_theme_id jiminny.scorecard_rules [STAGING]
playback_theme_id jiminny_jupiter.playback_theme_topics [STAGING]
PlaybackController \Jiminny\Http\Controllers\API\Page .../app/Http/Controllers/API/Page, class
PlaybackController \Jiminny\Http\Controllers\API .../app/Http/Controllers/API, final class
PlaybackController \Jiminny\Http\Controllers .../app/Http/Controllers, final class
PlaybackController.php .../app/Http/Controllers/API/PlaybackController.php, final class
PlaybackController.php .../app/Http/Controllers/API/Page/PlaybackController.php, class
PlaybackController.php.html build/coverage/Http/Controllers
PlaybackController.php.html build/coverage/Http/Controllers/API
PlaybackController.php.html build/coverage/Http/Controllers/API/Page
PlaybackPageTransformer.php .../app/Http/Transformers/PlaybackPageTransformer.php, class
PlaybackPageTransformer.php.html build/coverage/Http/Transformers
PlaybackService.php .../app/Services/PlaybackService.php, class
PlaybackService.php.html build/coverage/Services
PlaybackTheme.php .../app/Models/PlaybackTheme.php, class
PlaybackTheme.php.html build/coverage/Models
PlaybackThemeAnalyzerService.php .../app/Component/ActivityAnalytics/Service/PlaybackThemeAnalyzerService.php, class
PlaybackThemeAnalyzerService.php.html build/coverage/Component/ActivityAnalytics/Service
PlaybackThemeFactory.php .../database/factories/PlaybackThemeFactory.php, class
playback-themes contrib/playback-themes
paths./page/playback/{activity}
contrib/misc-api.yaml
[playback.audio.stream] GET "/stream/{track}"
playback_themes database/schema/mysql-schema.sql
playback_theme_id database/schema/mysql-schema.sql
playback_theme_id database/schema/mysql-schema.sql
playback_theme_topics database/schema/mysql-schema.sql
PlaybackPageTransformer \Jiminny\Http\Transformers .../app/Http/Transformers, class
PlaybackService \Jiminny\Services .../app/Services, class
PlaybackTheme \Jiminny\Models .../app/Models, class
PlaybackTheme \Jiminny\Models .../_ide_helper_models.php, class
PlaybackThemeAnalyzerService \Jiminny\Component\ActivityAnalytics\Service .../.../Component/ActivityAnalytics/Service, class
PlaybackThemeFactory \Database\Factories .../database/factories, class
PlaybackThemePolicy \Jiminny\Policies .../app/Policies, final class
PlaybackThemePolicyTest \Tests\Unit\Policies .../tests/Unit/Policies, class
PlaybackThemesCopyCommand \Jiminny\Console\Commands\PlaybackThemes .../.../Commands/PlaybackThemes, class
PlaybackThemesMigrateToVersionsCommand \Jiminny\Console\Commands\PlaybackThemes .../PlaybackThemes, class
PlaybackThemeTopicPolicy \Jiminny\Policies .../app/Policies, class
PlaybackThemeTopicPolicyTest \Tests\Unit\Policies .../tests/Unit/Policies, class
PlaybackController.php .../app/Http/Controllers/PlaybackController.php, final class
playback_theme_id jiminny.playback_theme_topics [EU]
playback_theme_id jiminny.scorecard_rules [EU]
playback_theme_id jiminny.playback_theme_topics [jiminny@localhost]
playback_theme_id jiminny.scorecard_rules [jiminny@localhost]
playback_theme_id jiminny.playback_theme_topics [PROD]
playback_theme_id jiminny.scorecard_rules [PROD]
playback_theme_id jiminny.playback_theme_topics [QA]
playback_theme_id jiminny.scorecard_rules [QA]
playback_theme_id jiminny.playback_theme_topics [QAi]
playback_theme_id jiminny.scorecard_rules [QAi]
playback_theme_id jiminny.playback_theme_topics [QAI PROD]
playback_theme_id jiminny.scorecard_rules [QAI PROD]
playback_theme_id jiminny.playback_theme_topics [STAGING]
playback_theme_id jiminny.scorecard_rules [STAGING]
playback_theme_id jiminny_jupiter.playback_theme_topics [STAGING]
PlaybackController \Jiminny\Http\Controllers\API\Page .../app/Http/Controllers/API/Page, class
PlaybackController \Jiminny\Http\Controllers\API .../app/Http/Controllers/API, final class
PlaybackController \Jiminny\Http\Controllers .../app/Http/Controllers, final class
PlaybackController.php .../app/Http/Controllers/API/PlaybackController.php, final class
PlaybackController.php .../app/Http/Controllers/API/Page/PlaybackController.php, class
PlaybackController.php.html build/coverage/Http/Controllers
PlaybackController.php.html build/coverage/Http/Controllers/API
PlaybackController.php.html build/coverage/Http/Controllers/API/Page
PlaybackPageTransformer.php .../app/Http/Transformers/PlaybackPageTransformer.php, class
PlaybackPageTransformer.php.html build/coverage/Http/Transformers
PlaybackService.php .../app/Services/PlaybackService.php, class
PlaybackService.php.html build/coverage/Services
PlaybackTheme.php .../app/Models/PlaybackTheme.php, class
PlaybackTheme.php.html build/coverage/Models
PlaybackThemeAnalyzerService.php .../app/Component/ActivityAnalytics/Service/PlaybackThemeAnalyzerService.php, class
PlaybackThemeAnalyzerService.php.html build/coverage/Component/ActivityAnalytics/Service
PlaybackThemeFactory.php .../database/factories/PlaybackThemeFactory.php, class
playback-themes contrib/playback-themes
paths./page/playback/{activity}
contrib/misc-api.yaml
[playback.audio.stream] GET "/stream/{track}"
playback_themes database/schema/mysql-schema.sql
playback_theme_id database/schema/mysql-schema.sql
playback_theme_id database/schema/mysql-schema.sql
playback_theme_topics database/schema/mysql-schema.sql
PlaybackPageTransformer \Jiminny\Http\Transformers .../app/Http/Transformers, class
PlaybackService \Jiminny\Services .../app/Services, class
PlaybackTheme \Jiminny\Models .../app/Models, class
PlaybackTheme \Jiminny\Models .../_ide_helper_models.php, class
PlaybackThemeAnalyzerService \Jiminny\Component\ActivityAnalytics\Service .../.../Component/ActivityAnalytics/Service, class
PlaybackThemeFactory \Database\Factories .../database/factories, class
PlaybackThemePolicy \Jiminny\Policies .../app/Policies, final class
PlaybackThemePolicyTest \Tests\Unit\Policies .../tests/Unit/Policies, class...
|
PhpStorm
|
|
NULL
|
16733
|
|
16734
|
Include non-project items
Preview
Filter
Open in F Include non-project items
Preview
Filter
Open in Find Tool Window
playbackVis
Http/Controllers/PlaybackController.php
Open In Right Split...
|
PhpStorm
|
|
NULL
|
16734
|
|
16735
|
Include non-project items
Preview
Filter
Open in F Include non-project items
Preview
Filter
Open in Find Tool Window
playbackVis
PhpStormINavicarecodeFV faVsco.js°9 JY-20725-handle-HS-search-rate-limProiect› D Themesv D UserAutomatedRep© UserAutomatedlv Dv2C) Hubspot/Service.pnpyhubspotsyncstrategybase.orgwDeletecrmenutylrait.ongnoteмatch.php© MatchActivityCrmData.phpC) ACuiVityvzcontrAskAnythingCor© AskJiminnyRepoC) PaqinationState.phoC) MatchCrmData.phpC) CrmObiectsResolver.pho© ProviderRateLimiter.php© PaginationConfia.php(c) DealsvzControllclass UserAutomatedReportsController extends ControllerA14 X2 A Y(C) OnDemandV2CcPlavlistControlle€ PlavlistShareCor2 usagespublic const string SORT_DIRECTION = 'sort_direction';C) PlavlistTrackcor30 O1(c) UoloadcontrolleC) ActionltemsControlC) ActivitvControlier.oC) A CrmNotesControl© BaseController.phpc) ClientTokenControlpublic functionconstructdprivate readonly AutomatedReportsRepository SautomatedReportsRepository.private readonly AutomatedReportsService $automatedReportsService,private readonly ApiResponseService $apiResponseServiceprivate readonly Response Sresponseprivate readonly PlanhatService $planhatService,D f..3© CrmController.php© DealLevelPromptsCPOST /api/v1/automated-reports/interest 1 usageoubulc Tunction crackinuerest reouest srecuest. Jsonkesponse© Instantmeeuingcon© LanguageControllerc Layoutmanagemen/** @var User Suser *Suser = Srequest->user@:© Meeuingscontrollerwalewalalttaliledefer(fn ( => Sthis->planhatService->track(c Meradaracontroller© MobileSettingsConuser: suser.event:'automated-renorts-track-1nterest'.c) Momentcontroller.r)->alwavs@ :€ NumberAllocatorCcreturn sthis->response->with0kor• OrganizationRetentC) OraanizationRolesa© OrganizationSvncC@ PartnerController.o* Athrows AnnZicationExcentionC) PhoneNumberContg) PlavbackControlle'@ PlavlistController.nlGET lanilv1lautomated-renortspublic function list(Request Srequest): JsonResponse{...}© ScimController.php@ SidekickController123 09 ›C) SoftnhoneControlleDELETE /api/v1/automated-reports/{uuid}public function delete(Request Srequest, string Suvid): JsonResponsef...}(C) ScoController nhn(C) SubscrintionControe ToamAiAutamatione ToamAiContovtear9a ToamCantrollor nh.(e) TosminciahtcContrlelner Code will hoin INF to underctand vour Laravel ann code II Generate II Don't Show Anvmore (todav Q•08)helsupoon Dally • In zn 41m100% Lz• Mon 11 May 12:19:53AskJiminnyReportActivityServiceTest v+0 ..=laravel.logA SF (jiminny@localhost]4 HS_local [jiminny@localhost]# console [PKOb.A console [EU]# console [slAGiNg).2026-05-07 14:21:15] local.INF0: [Hubspot] DEBUG Getting headers <MMi9.Уheaders'1"Vace". "Inu,ur May 2020 14.21.19 6Ml"Jn"concent-lyoe. apolicacion/ison.charser=utr-on"Transfer-Encoding": ["chunked"]."CF-Ray":"9t80deb8dbo0dcsa-S0F""CF-cache-Status":"DYNAMIC"IrClassesFilesSymbolsActionsQ- playbackVis"server-timino":"hcid: de" * Sending 'blavbackVisited' event to Planhat without slowing thecfr;desc=|"9f80deb8e7c6d"x-content-tvoe-ootions"t event: "olavoackVisitedi"x-hubsoot-correlation-1"Set-Cookip"."" cfhm=s07-May-26 14:51:15 GMT;"Report-To":["{"endnoints".("url\":"https:|\/1Va.nel("group\":\"cf-nel\".("max_age\":604800}"],INCII.TIS"success_fraction\":0.01,"reportco. "cr-nel"max agel ":604800}"].'Server":["cloudflare"]}} {"correlation_1d":"95256555-"trace_id":"c7ab8365-903f-4CascadeHubspot Rate Limit ReE. Deaicatea low-concurrency worker poolRun only 5 workers tor analytics low so concurrency naturally matches the o RPS limitb bashphp artisan queue:work --queue=analytics_low --tries=0 --max-jobs=0 --processes=5Effect: 5 workers x 1 successful op/sec = 5/sec. No rate-limit storms because we're under the limit by design. Each worker rarely sees a 429.Trade-oris.Include non-project itemsrs tor 100k)earlierControllers/PlavbackController.oho 96evcles. Doesn't chande the throudhout cellina, but reduces cost durina a storm to almost nothinalch. dispatchina them is pure waste$q->whereNotNull('email")->orwhereNotNull('phone"))a::dispatch($a->id));o), removing them gets you to 70k - still over 9k cap, but closer.ic the nroblemevents tuture stormsurn auring inevitable storms100k → 100k completed in ~3-10 minutes, depending on caching efficiency.ou're brute-forcing through a 5 RPS hose. With them, the hose is 500 matches/sec.Open In Riaht SolitTTL cvcle. Bounded, ~15k calls wasted in 30 min (vs 441k without cache). Accentable: can be tiahtened with aprobe lock if needed.HubSpot-named middleware on multi-CRM iob: no functional issue for HubSpot. Salesforce/Pinedrive rate-limits ao throuch the wrond nath (treated as real100k → 9k bottleneck: not a rate-limiter problem, an architectural one. The fix is batch endpoints + dispatch throttling, not more aggressive retry logic.r.nl .Ask anvthing (84.L)+ « CodeClaude Onus 4.7 MediumW Windsurf Toams 55-8UTF.8io 4 spaces...
|
PhpStorm
|
|
NULL
|
16735
|
|
16736
|
Project: faVsco.js, menu
JY-20725-handle-HS-search Project: faVsco.js, menu
JY-20725-handle-HS-search-rate-limit, menu
Start Listening for PHP Debug Connections
AskJiminnyReportActivityServiceTest
Run 'AskJiminnyReportActivityServiceTest'
Debug 'AskJiminnyReportActivityServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
2
Previous Highlighted Error
Next Highlighted Error
<?php
namespace Jiminny\Http\Controllers;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Illuminate\Http\RedirectResponse;
use Illuminate\Auth\Access\AuthorizationException;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use Illuminate\Notifications\DatabaseNotification;
use Illuminate\Support\Facades\Log;
use Jiminny\Component\PlaybackPage\Download\Services\DownloadActivityService;
use Jiminny\Http\Serializers\JsonSerializer;
use Jiminny\Http\Transformers\PlaybackPageTransformer;
use Jiminny\Models\User;
use Jiminny\Models;
use Jiminny\Models\Activity;
use Jiminny\Models\Track;
use Jiminny\Services\PlanhatService;
use Jiminny\Services\PlaybackService;
use JsonException;
use Spatie\Fractal\Fractal;
use Illuminate\Support\Facades\Cookie;
final class PlaybackController extends FrontendController
{
use AuthorizesRequests;
public function __construct(
private readonly PlaybackService $playbackService,
private readonly DownloadActivityService $downloadActivityService,
private readonly PlanhatService $planhatService,
) {
}
/**
* @throws AuthorizationException
* @throws JsonException
*/
public function show(Activity $activity, PlaybackPageTransformer $transformer, Request $request): array|string
{
$this->authorize('view', $activity);
/** @var User $user */
$user = $request->user();
$activityTypeCheck = in_array(
$activity->type,
[
Activity::TYPE_CONFERENCE,
Activity::TYPE_SOFTPHONE,
Activity::TYPE_SOFTPHONE_INBOUND,
],
true
);
abort_unless($activityTypeCheck, 404);
$notificationId = $request->input('nId');
if ($notificationId) {
/** @var DatabaseNotification|null $notification */
$notification = $user->unreadNotifications->where('id', $notificationId)->first();
if ($notification) {
$notification->markAsRead();
}
}
$view = $request->input('view', 'page');
$activity->loadMissing([
'questions.participant',
'participants.activity',
'topicTriggers',
'topicTriggers.participant',
'topicTriggers.playbackThemeTopicTrigger',
'topicTriggers.playbackThemeTopicTrigger.playbackThemeTopic',
]);
$data = Fractal::create()
->item(
$activity,
$transformer->setConsumer($user)
)
->serializeWith(new JsonSerializer())
->toArray();
$data['playbackData']['masterPlaylist'] = $this->getPreloadedPlaylist($activity);
if (! isset($data['playbackData']['tracks'])) {
$data['playbackData']['tracks'] = [];
}
/**
* Sending 'playbackVisited' event to Planhat without slowing the
* response to the user e.g. after the response is sent back.
*/
defer(
fn () => $this->planhatService->track(
user: $user,
event: 'playbackVisited',
payload: [
'activityId' => $activity->getId(),
'activityUuid' => $activity->getUuid(),
]
)
)->always();
return $this->render([
'playbackData' => [
'activity' => $data['playbackData'],
'favorited' => $data['favorited'],
'subscribed' => $data['subscribed'],
'view' => $view,
],
]);
}
private function getPreloadedPlaylist(Activity $activity): array
{
$masterPlaylist = [];
$urlPlaceholder = PlaybackService::M3U8_TRACK_PLACEHOLDER;
$this->authorize('stream', $activity);
$masterPlaylist['m3u8'] = $this->playbackService->generateMasterPlaylist($activity, null, $urlPlaceholder);
$masterPlaylist['placeholder'] = $urlPlaceholder;
$masterPlaylist['tracks'] = [];
/** @var Models\Track $track */
foreach ($this->playbackService->getMasterPlaylistTracks($activity) as $track) {
$mediaPlaylistPath = $this->mediaPlaylistPath($track);
$masterPlaylist['tracks'][] = [
'id' => $track->getUuid(),
'path' => $mediaPlaylistPath,
];
}
return $masterPlaylist;
}
/**
* @throws AuthorizationException
*/
public function playlist(Activity $activity): Response
{
$this->authorize('stream', $activity);
$masterPlaylist = $this->playbackService->generateMasterPlaylist($activity);
return response($masterPlaylist)
->header('Content-Type', 'application/x-mpegURL');
}
/**
* Generate a VTT "Video Text Tracks" file.
*
* @throws AuthorizationException
*/
public function vtt(Activity $activity): Response
{
$this->authorize('stream', $activity);
$vtt = $this->playbackService->generateVtt($activity);
return response($vtt)
->header('Content-Type', 'text/vtt;charset=utf-8');
}
/**
* @throws AuthorizationException
*/
public function media(Track $track): Response
{
$this->authorize('stream', $track->activity);
$this->queueMediaCookies($track);
$payload = $this->playbackService->generateMediaPlaylist($track);
return response($payload)
->header('Content-Type', 'application/x-mpegURL');
}
private function mediaPlaylistPath(Track $track): string
{
$this->queueMediaCookies($track);
// @TODO return cdn when CORS is fixed
// return client_cdn($track->content_path, $track->activity->user->team);
return route('media', ['track' => $track->id_string]);
}
private function queueMediaCookies(Track $track): void
{
$keepAliveCookieName = 'Media-KeepAlive_' . $track->id_string;
if (Cookie::has($keepAliveCookieName)) {
return;
}
// Restrict segment URLs to the IP requesting it.
$remoteIp = request()->ip();
$cookies = $this->playbackService->generateCookies($track, $remoteIp);
$keepAliveDuration = PlaybackService::MEDIA_COOKIE_MINIMUM_DURATION / 60;
// Cookie is only valid for this particular stream path.
$trackPath = '/' . preg_replace('/\/[^\/]+$/', '/', $track->content_path);
$host = config('jiminny.client_cdn_signed_cookie_domain');
// Queue up cookies to be able to be served secure track media.
foreach ($cookies as $name => $cookie) {
Cookie::queue($name, $cookie, $keepAliveDuration, $trackPath, $host, true, true);
}
// Cookie is only valid for this particular activity.
$paths = [
route('activity.playback', $track->activity->id_string, false),
route('media', ['track' => $track->id_string], false),
];
foreach ($paths as $path) {
Cookie::queue($keepAliveCookieName, 1, $keepAliveDuration, $path, $host, true, true);
}
}
/**
* Used by the Web app to download the activity.
*
* @throws AuthorizationException
*/
public function download(Activity $activity): RedirectResponse
{
$this->authorize('download', $activity);
try {
$url = $this->downloadActivityService->generateDownloadUrl($activity);
} catch (\Throwable $e) {
Log::info(
__METHOD__ . ' Download failed.',
['activity' => $activity->getUuid(), 'message' => $e->getMessage()]
);
abort(404, $e->getMessage());
}
return redirect($url);
}
/**
* Used by the Mobile app to download the activity.
*
* @throws AuthorizationException
*/
public function getDownloadUrl(Activity $activity): JsonResponse
{
$this->authorize('download', $activity);
try {
$url = $this->downloadActivityService->generateDownloadUrl($activity);
} catch (\Throwable $e) {
Log::info(
__METHOD__ . ' Getting signed url failed.',
['activity' => $activity->getUuid(), 'message' => $e->getMessage()]
);
abort(404, $e->getMessage());
}
return new JsonResponse(
['activity_url' => $url],
JsonResponse::HTTP_OK
);
}
}...
|
PhpStorm
|
faVsco.js – PlaybackController.php
|
NULL
|
16736
|
|
16737
|
Project: faVsco.js, menu
JY-20725-handle-HS-search Project: faVsco.js, menu
JY-20725-handle-HS-search-rate-limit, menu
Start Listening for PHP Debug Connections
AskJiminnyReportActivityServiceTest
Run 'AskJiminnyReportActivityServiceTest'
Debug 'AskJiminnyReportActivityServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
SlackFileEditViewGolHistoryWindowHelp6д Huddle with Petko KashinskiPetko KashinskiScreen shareChromeFileEditViewHistoryBookmarksProfilesTabWindowHelpWorkGreelScoreandrewilsoCall AJiminM Inbox=N→ws.planhat.com/jiminny/home/data-explorer/usagemetricdef?preview=UsageMetricDef.67489a8c40ddfa05d5bf5aa4D АIKВChatPlayground Al...D AppsJiminny ~CalendarData ExplorerEmail ManagerMoreoooasCS Day-to-day -Getting started Guide• Just CS DataDaily OperationsWeekly prepRenewals and UpsellRisk and Churn AnalyticsImplementation -Impl ProjectsTrial Opps (Under Review)Stoyan's clientsLeadership •System ReportsLeadership OperationsPordollo Overview lbasnoo.NPS KOpON- OTeyClient Engagement OverviewRevenue Analytics10 Jiminny - Calenda...M GMail• My Calendly - Eve...= PH New UI LoginGet Starting with J...Search Jiminny8 Metric -EB DatasetPlayback AdoptionQ PLAYBACK+ MetricReporting & Data modeis (Featured)calculated.67489a8c40ddfaO5dSbf5aa4NameTytOverviewLogsTraceCompany 2• May 11, 2026• Playback Adoption AvgCal02:02 - Metric rebuild queued, executed by system user• Playback AdoptionCal• May 10, 202602:01 - Metric rebuild queued, executed by system userv EndUser 4• May 09, 2026• JUsers Playback AdoptionCal06-26 - Metric rebuiid success, executed by system user• Playback Adoption (Last 7 days)Cal• May 08, 2026• Playback Adoption05:17 - Metric rebulld success, executed by system userplaybackVisited• May 07, 202605:16 - Metric rebuild success, executed by system user• May 06, 202607-27 - Metric rebuild success, executed by system user• May 05, 202605:04 - Metric rebuild success, executed by system userSupport Daily - in 2h 41 m100% <28• Mon 11 May 12:19:56QAppsBuildu Users€ New• Chloe Onboarding....+ CX Journey SMB.....+8•Mon 11 May 12:19User+Work+E PetkoAl Notes: OffE88&Logs History is limited to 90 days in your current Plan. Upgrade for200m7Petko ..reen.ГА2:25Leave...
|
PhpStorm
|
faVsco.js – PlaybackController.php
|
NULL
|
16737
|
|
16738
|
Project: faVsco.js, menu
JY-20725-handle-HS-search Project: faVsco.js, menu
JY-20725-handle-HS-search-rate-limit, menu
Start Listening for PHP Debug Connections
AskJiminnyReportActivityServiceTest
Run 'AskJiminnyReportActivityServiceTest'
Debug 'AskJiminnyReportActivityServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
6
3
Previous Highlighted Error
Next Highlighted Error
<?php
namespace Jiminny\Http\Controllers;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Illuminate\Http\RedirectResponse;
use Illuminate\Auth\Access\AuthorizationException;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use Illuminate\Notifications\DatabaseNotification;
use Illuminate\Support\Facades\Log;
use Jiminny\Component\PlaybackPage\Download\Services\DownloadActivityService;
use Jiminny\Http\Serializers\JsonSerializer;
use Jiminny\Http\Transformers\PlaybackPageTransformer;
use Jiminny\Models\User;
use Jiminny\Models;
use Jiminny\Models\Activity;
use Jiminny\Models\Track;
use Jiminny\Services\PlanhatService;
use Jiminny\Services\PlaybackService;
use JsonException;
use Spatie\Fractal\Fractal;
use Illuminate\Support\Facades\Cookie;
final class PlaybackController extends FrontendController
{
use AuthorizesRequests;
public function __construct(
private readonly PlaybackService $playbackService,
private readonly DownloadActivityService $downloadActivityService,
private readonly PlanhatService $planhatService,
) {
}
/**
* @throws AuthorizationException
* @throws JsonException
*/
public function show(Activity $activity, PlaybackPageTransformer $transformer, Request $request): array|string
{
$this->authorize('view', $activity);
/** @var User $user */
$user = $request->user();
$activityTypeCheck = in_array(
$activity->type,
[
Activity::TYPE_CONFERENCE,
Activity::TYPE_SOFTPHONE,
Activity::TYPE_SOFTPHONE_INBOUND,
],
true
);
abort_unless($activityTypeCheck, 404);
$notificationId = $request->input('nId');
if ($notificationId) {
/** @var DatabaseNotification|null $notification */
$notification = $user->unreadNotifications->where('id', $notificationId)->first();
if ($notification) {
$notification->markAsRead();
}
}
$view = $request->input('view', 'page');
$activity->loadMissing([
'questions.participant',
'participants.activity',
'topicTriggers',
'topicTriggers.participant',
'topicTriggers.playbackThemeTopicTrigger',
'topicTriggers.playbackThemeTopicTrigger.playbackThemeTopic',
]);
$data = Fractal::create()
->item(
$activity,
$transformer->setConsumer($user)
)
->serializeWith(new JsonSerializer())
->toArray();
$data['playbackData']['masterPlaylist'] = $this->getPreloadedPlaylist($activity);
if (! isset($data['playbackData']['tracks'])) {
$data['playbackData']['tracks'] = [];
}
/**
* Sending 'playbackVisited' event to Planhat without slowing the
* response to the user e.g. after the response is sent back.
*/
defer(
fn () => $this->planhatService->track(
user: $user,
event: 'playbackVisited',
payload: [
'activityId' => $activity->getId(),
'activityUuid' => $activity->getUuid(),
]
)
)->always();
return $this->render([
'playbackData' => [
'activity' => $data['playbackData'],
'favorited' => $data['favorited'],
'subscribed' => $data['subscribed'],
'view' => $view,
],
]);
}
private function getPreloadedPlaylist(Activity $activity): array
{
$masterPlaylist = [];
$urlPlaceholder = PlaybackService::M3U8_TRACK_PLACEHOLDER;
$this->authorize('stream', $activity);
$masterPlaylist['m3u8'] = $this->playbackService->generateMasterPlaylist($activity, null, $urlPlaceholder);
$masterPlaylist['placeholder'] = $urlPlaceholder;
$masterPlaylist['tracks'] = [];
/** @var Models\Track $track */
foreach ($this->playbackService->getMasterPlaylistTracks($activity) as $track) {
$mediaPlaylistPath = $this->mediaPlaylistPath($track);
$masterPlaylist['tracks'][] = [
'id' => $track->getUuid(),
'path' => $mediaPlaylistPath,
];
}
return $masterPlaylist;
}
/**
* @throws AuthorizationException
*/
public function playlist(Activity $activity): Response
{
$this->authorize('stream', $activity);
$masterPlaylist = $this->playbackService->generateMasterPlaylist($activity);
return response($masterPlaylist)
->header('Content-Type', 'application/x-mpegURL');
}
/**
* Generate a VTT "Video Text Tracks" file.
*
* @throws AuthorizationException
*/
public function vtt(Activity $activity): Response
{
$this->authorize('stream', $activity);
$vtt = $this->playbackService->generateVtt($activity);
return response($vtt)
->header('Content-Type', 'text/vtt;charset=utf-8');
}
/**
* @throws AuthorizationException
*/
public function media(Track $track): Response
{
$this->authorize('stream', $track->activity);
$this->queueMediaCookies($track);
$payload = $this->playbackService->generateMediaPlaylist($track);
return response($payload)
->header('Content-Type', 'application/x-mpegURL');
}
private function mediaPlaylistPath(Track $track): string
{
$this->queueMediaCookies($track);
// @TODO return cdn when CORS is fixed
// return client_cdn($track->content_path, $track->activity->user->team);
return route('media', ['track' => $track->id_string]);
}
private function queueMediaCookies(Track $track): void
{
$keepAliveCookieName = 'Media-KeepAlive_' . $track->id_string;
if (Cookie::has($keepAliveCookieName)) {
return;
}
// Restrict segment URLs to the IP requesting it.
$remoteIp = request()->ip();
$cookies = $this->playbackService->generateCookies($track, $remoteIp);
$keepAliveDuration = PlaybackService::MEDIA_COOKIE_MINIMUM_DURATION / 60;
// Cookie is only valid for this particular stream path.
$trackPath = '/' . preg_replace('/\/[^\/]+$/', '/', $track->content_path);
$host = config('jiminny.client_cdn_signed_cookie_domain');
// Queue up cookies to be able to be served secure track media.
foreach ($cookies as $name => $cookie) {
Cookie::queue($name, $cookie, $keepAliveDuration, $trackPath, $host, true, true);
}
// Cookie is only valid for this particular activity.
$paths = [
route('activity.playback', $track->activity->id_string, false),
route('media', ['track' => $track->id_string], false),
];
foreach ($paths as $path) {
Cookie::queue($keepAliveCookieName, 1, $keepAliveDuration, $path, $host, true, true);
}
}
/**
* Used by the Web app to download the activity.
*
* @throws AuthorizationException
*/
public function download(Activity $activity): RedirectResponse
{
$this->authorize('download', $activity);
try {
$url = $this->downloadActivityService->generateDownloadUrl($activity);
} catch (\Throwable $e) {
Log::info(
__METHOD__ . ' Download failed.',
['activity' => $activity->getUuid(), 'message' => $e->getMessage()]
);
abort(404, $e->getMessage());
}
return redirect($url);
}
/**
* Used by the Mobile app to download the activity.
*
* @throws AuthorizationException
*/
public function getDownloadUrl(Activity $activity): JsonResponse
{
$this->authorize('download', $activity);
try {
$url = $this->downloadActivityService->generateDownloadUrl($activity);
} catch (\Throwable $e) {
Log::info(
__METHOD__ . ' Getting signed url failed.',
['activity' => $activity->getUuid(), 'message' => $e->getMessage()]
);
abort(404, $e->getMessage());
}
return new JsonResponse(
['activity_url' => $url],
JsonResponse::HTTP_OK
);
}
}
Sync Changes
Hide This Notification
Code changed:
Hide
19
Previous Highlighted Error
Next Highlighted Error
[2026-05-07 14:21:15] local.INFO: [Hubspot] DEBUG Getting headers {
"headers":{
"Date":["Thu,07 May 2026 14:21:15 GMT"],
"Content-Type":["application/json;charset=utf-8"],
"Transfer-Encoding":["chunked"],
"Connection":["keep-alive"],
"CF-Ray":["9f80deb8db60dc3a-SOF"],
"CF-Cache-Status":["DYNAMIC"],
"Strict-Transport-Security":["max-age=31536000; includeSubDomains; preload"],
"Vary":["origin,
accept-encoding"],
"access-control-allow-credentials":["false"],
"server-timing":["hcid;desc=\"019e02d0-6fd8-7812-bdba-885b7ccb3ee3\",
cfr;desc=\"9f80deb8e7c6dc3a-IAD\""],
"x-content-type-options":["nosniff"],
"x-hubspot-correlation-id":["019e02d0-6fd8-7812-bdba-885b7ccb3ee3"],
"Set-Cookie":["__cf_bm=SIUrtdQgXVrik50pdqF6hZVYKhzTnQBidvMabeCtm0Y-1778163675-[IP_ADDRESS]-rI.ZggtDKxTge5zr8_2gbBfWMQQ.ufZEXDZyHz2mBUFdzdo2gTHEsOkXMSEShjK0hGYxNhUGM1ZoBpX7BcFZcHEjA7Cs_.SMUhUnd2nYjko; path=/; expires=Thu,
07-May-26 14:51:15 GMT; domain=.hubapi.com; HttpOnly; Secure; SameSite=None"],
"Report-To":["{
\"endpoints\":[{
\"url\":\"https:\\/\\/a.nel.cloudflare.com\\/report\\/v4?s=NYAlsVTP0fYm32qrSDjxYE4sd2RWRqiSp3wHsmdEgZlzoYdxI%2BIxVpHmsKn3O%2BKVA3mFIJ2m7YRECDGSM%2BW2IYTzo6FM4%2BdUIjURO8srzKSvJgZ%2BQ6R79arKQw3uHLlX\"}],
\"group\":\"cf-nel\",
\"max_age\":604800}"],
"NEL":["{
\"success_fraction\":0.01,
\"report_to\":\"cf-nel\",
\"max_age\":604800}"],
"Server":["cloudflare"]}} {
"correlation_id":"95236535-ec98-4541-b92a-adfa73b69eab",
"trace_id":"c7ab8365-903f-46d4-9403-0e5b551e3545"}
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
PhpStorm
|
faVsco.js – PlaybackController.php
|
NULL
|
16738
|
|
16739
|
Project: faVsco.js, menu
JY-20725-handle-HS-search Project: faVsco.js, menu
JY-20725-handle-HS-search-rate-limit, menu
Start Listening for PHP Debug Connections
AskJiminnyReportActivityServiceTest
Run 'AskJiminnyReportActivityServiceTest'
Debug 'AskJiminnyReportActivityServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
6
3
Previous Highlighted Error
Next Highlighted Error
<?php
namespace Jiminny\Http\Controllers;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Illuminate\Http\RedirectResponse;
use Illuminate\Auth\Access\AuthorizationException;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use Illuminate\Notifications\DatabaseNotification;
use Illuminate\Support\Facades\Log;
use Jiminny\Component\PlaybackPage\Download\Services\DownloadActivityService;
use Jiminny\Http\Serializers\JsonSerializer;
use Jiminny\Http\Transformers\PlaybackPageTransformer;
use Jiminny\Models\User;
use Jiminny\Models;
use Jiminny\Models\Activity;
use Jiminny\Models\Track;
use Jiminny\Services\PlanhatService;
use Jiminny\Services\PlaybackService;
use JsonException;
use Spatie\Fractal\Fractal;
use Illuminate\Support\Facades\Cookie;
final class PlaybackController extends FrontendController
{
use AuthorizesRequests;
public function __construct(
private readonly PlaybackService $playbackService,
private readonly DownloadActivityService $downloadActivityService,
private readonly PlanhatService $planhatService,
) {
}
/**
* @throws AuthorizationException
* @throws JsonException
*/
public function show(Activity $activity, PlaybackPageTransformer $transformer, Request $request): array|string
{
$this->authorize('view', $activity);
/** @var User $user */
$user = $request->user();
$activityTypeCheck = in_array(
$activity->type,
[
Activity::TYPE_CONFERENCE,
Activity::TYPE_SOFTPHONE,
Activity::TYPE_SOFTPHONE_INBOUND,
],
true
);
abort_unless($activityTypeCheck, 404);
$notificationId = $request->input('nId');
if ($notificationId) {
/** @var DatabaseNotification|null $notification */
$notification = $user->unreadNotifications->where('id', $notificationId)->first();
if ($notification) {
$notification->markAsRead();
}
}
$view = $request->input('view', 'page');
$activity->loadMissing([
'questions.participant',
'participants.activity',
'topicTriggers',
'topicTriggers.participant',
'topicTriggers.playbackThemeTopicTrigger',
'topicTriggers.playbackThemeTopicTrigger.playbackThemeTopic',
]);
$data = Fractal::create()
->item(
$activity,
$transformer->setConsumer($user)
)
->serializeWith(new JsonSerializer())
->toArray();
$data['playbackData']['masterPlaylist'] = $this->getPreloadedPlaylist($activity);
if (! isset($data['playbackData']['tracks'])) {
$data['playbackData']['tracks'] = [];
}
/**
* Sending 'playbackVisited' event to Planhat without slowing the
* response to the user e.g. after the response is sent back.
*/
defer(
fn () => $this->planhatService->track(
user: $user,
event: 'playbackVisited',
payload: [
'activityId' => $activity->getId(),
'activityUuid' => $activity->getUuid(),
]
)
)->always();
return $this->render([
'playbackData' => [
'activity' => $data['playbackData'],
'favorited' => $data['favorited'],
'subscribed' => $data['subscribed'],
'view' => $view,
],
]);
}
private function getPreloadedPlaylist(Activity $activity): array
{
$masterPlaylist = [];
$urlPlaceholder = PlaybackService::M3U8_TRACK_PLACEHOLDER;
$this->authorize('stream', $activity);
$masterPlaylist['m3u8'] = $this->playbackService->generateMasterPlaylist($activity, null, $urlPlaceholder);
$masterPlaylist['placeholder'] = $urlPlaceholder;
$masterPlaylist['tracks'] = [];
/** @var Models\Track $track */
foreach ($this->playbackService->getMasterPlaylistTracks($activity) as $track) {
$mediaPlaylistPath = $this->mediaPlaylistPath($track);
$masterPlaylist['tracks'][] = [
'id' => $track->getUuid(),
'path' => $mediaPlaylistPath,
];
}
return $masterPlaylist;
}
/**
* @throws AuthorizationException
*/
public function playlist(Activity $activity): Response
{
$this->authorize('stream', $activity);
$masterPlaylist = $this->playbackService->generateMasterPlaylist($activity);
return response($masterPlaylist)
->header('Content-Type', 'application/x-mpegURL');
}
/**
* Generate a VTT "Video Text Tracks" file.
*
* @throws AuthorizationException
*/
public function vtt(Activity $activity): Response
{
$this->authorize('stream', $activity);
$vtt = $this->playbackService->generateVtt($activity);
return response($vtt)
->header('Content-Type', 'text/vtt;charset=utf-8');
}
/**
* @throws AuthorizationException
*/
public function media(Track $track): Response
{
$this->authorize('stream', $track->activity);
$this->queueMediaCookies($track);
$payload = $this->playbackService->generateMediaPlaylist($track);
return response($payload)
->header('Content-Type', 'application/x-mpegURL');
}
private function mediaPlaylistPath(Track $track): string
{
$this->queueMediaCookies($track);
// @TODO return cdn when CORS is fixed
// return client_cdn($track->content_path, $track->activity->user->team);
return route('media', ['track' => $track->id_string]);
}
private function queueMediaCookies(Track $track): void
{
$keepAliveCookieName = 'Media-KeepAlive_' . $track->id_string;
if (Cookie::has($keepAliveCookieName)) {
return;
}
// Restrict segment URLs to the IP requesting it.
$remoteIp = request()->ip();
$cookies = $this->playbackService->generateCookies($track, $remoteIp);
$keepAliveDuration = PlaybackService::MEDIA_COOKIE_MINIMUM_DURATION / 60;
// Cookie is only valid for this particular stream path.
$trackPath = '/' . preg_replace('/\/[^\/]+$/', '/', $track->content_path);
$host = config('jiminny.client_cdn_signed_cookie_domain');
// Queue up cookies to be able to be served secure track media.
foreach ($cookies as $name => $cookie) {
Cookie::queue($name, $cookie, $keepAliveDuration, $trackPath, $host, true, true);
}
// Cookie is only valid for this particular activity.
$paths = [
route('activity.playback', $track->activity->id_string, false),
route('media', ['track' => $track->id_string], false),
];
foreach ($paths as $path) {
Cookie::queue($keepAliveCookieName, 1, $keepAliveDuration, $path, $host, true, true);
}
}
/**
* Used by the Web app to download the activity.
*
* @throws AuthorizationException
*/
public function download(Activity $activity): RedirectResponse
{
$this->authorize('download', $activity);
try {
$url = $this->downloadActivityService->generateDownloadUrl($activity);
} catch (\Throwable $e) {
Log::info(
__METHOD__ . ' Download failed.',
['activity' => $activity->getUuid(), 'message' => $e->getMessage()]
);
abort(404, $e->getMessage());
}
return redirect($url);
}
/**
* Used by the Mobile app to download the activity.
*
* @throws AuthorizationException
*/
public function getDownloadUrl(Activity $activity): JsonResponse
{
$this->authorize('download', $activity);
try {
$url = $this->downloadActivityService->generateDownloadUrl($activity);
} catch (\Throwable $e) {
Log::info(
__METHOD__ . ' Getting signed url failed.',
['activity' => $activity->getUuid(), 'message' => $e->getMessage()]
);
abort(404, $e->getMessage());
}
return new JsonResponse(
['activity_url' => $url],
JsonResponse::HTTP_OK
);
}
}
Sync Changes
Hide This Notification
Code changed:
Hide
19
Previous Highlighted Error
Next Highlighted Error
[2026-05-07 14:21:15] local.INFO: [Hubspot] DEBUG Getting headers {
"headers":{
"Date":["Thu,07 May 2026 14:21:15 GMT"],
"Content-Type":["application/json;charset=utf-8"],
"Transfer-Encoding":["chunked"],
"Connection":["keep-alive"],
"CF-Ray":["9f80deb8db60dc3a-SOF"],
"CF-Cache-Status":["DYNAMIC"],
"Strict-Transport-Security":["max-age=31536000; includeSubDomains; preload"],
"Vary":["origin,
accept-encoding"],
"access-control-allow-credentials":["false"],
"server-timing":["hcid;desc=\"019e02d0-6fd8-7812-bdba-885b7ccb3ee3\",
cfr;desc=\"9f80deb8e7c6dc3a-IAD\""],
"x-content-type-options":["nosniff"],
"x-hubspot-correlation-id":["019e02d0-6fd8-7812-bdba-885b7ccb3ee3"],
"Set-Cookie":["__cf_bm=SIUrtdQgXVrik50pdqF6hZVYKhzTnQBidvMabeCtm0Y-1778163675-[IP_ADDRESS]-rI.ZggtDKxTge5zr8_2gbBfWMQQ.ufZEXDZyHz2mBUFdzdo2gTHEsOkXMSEShjK0hGYxNhUGM1ZoBpX7BcFZcHEjA7Cs_.SMUhUnd2nYjko; path=/; expires=Thu,
07-May-26 14:51:15 GMT; domain=.hubapi.com; HttpOnly; Secure; SameSite=None"],
"Report-To":["{
\"endpoints\":[{
\"url\":\"https:\\/\\/a.nel.cloudflare.com\\/report\\/v4?s=NYAlsVTP0fYm32qrSDjxYE4sd2RWRqiSp3wHsmdEgZlzoYdxI%2BIxVpHmsKn3O%2BKVA3mFIJ2m7YRECDGSM%2BW2IYTzo6FM4%2BdUIjURO8srzKSvJgZ%2BQ6R79arKQw3uHLlX\"}],
\"group\":\"cf-nel\",
\"max_age\":604800}"],
"NEL":["{
\"success_fraction\":0.01,
\"report_to\":\"cf-nel\",
\"max_age\":604800}"],
"Server":["cloudflare"]}} {
"correlation_id":"95236535-ec98-4541-b92a-adfa73b69eab",
"trace_id":"c7ab8365-903f-46d4-9403-0e5b551e3545"}
Project
Project
New File or Directory…
Expand Selected...
|
PhpStorm
|
faVsco.js – PlaybackController.php
|
NULL
|
16739
|
|
16740
|
Project: faVsco.js, menu
JY-20725-handle-HS-search Project: faVsco.js, menu
JY-20725-handle-HS-search-rate-limit, menu
Start Listening for PHP Debug Connections
AskJiminnyReportActivityServiceTest
Run 'AskJiminnyReportActivityServiceTest'
Debug 'AskJiminnyReportActivityServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
6
3
Previous Highlighted Error
Next Highlighted Error
<?php
namespace Jiminny\Http\Controllers;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Illuminate\Http\RedirectResponse;
use Illuminate\Auth\Access\AuthorizationException;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use Illuminate\Notifications\DatabaseNotification;
use Illuminate\Support\Facades\Log;
use Jiminny\Component\PlaybackPage\Download\Services\DownloadActivityService;
use Jiminny\Http\Serializers\JsonSerializer;
use Jiminny\Http\Transformers\PlaybackPageTransformer;
use Jiminny\Models\User;
use Jiminny\Models;
use Jiminny\Models\Activity;
use Jiminny\Models\Track;
use Jiminny\Services\PlanhatService;
use Jiminny\Services\PlaybackService;
use JsonException;
use Spatie\Fractal\Fractal;
use Illuminate\Support\Facades\Cookie;
final class PlaybackController extends FrontendController
{
use AuthorizesRequests;
public function __construct(
private readonly PlaybackService $playbackService,
private readonly DownloadActivityService $downloadActivityService,
private readonly PlanhatService $planhatService,
) {
}
/**
* @throws AuthorizationException
* @throws JsonException
*/
public function show(Activity $activity, PlaybackPageTransformer $transformer, Request $request): array|string
{
$this->authorize('view', $activity);
/** @var User $user */
$user = $request->user();
$activityTypeCheck = in_array(
$activity->type,
[
Activity::TYPE_CONFERENCE,
Activity::TYPE_SOFTPHONE,
Activity::TYPE_SOFTPHONE_INBOUND,
],
true
);
abort_unless($activityTypeCheck, 404);
$notificationId = $request->input('nId');
if ($notificationId) {
/** @var DatabaseNotification|null $notification */
$notification = $user->unreadNotifications->where('id', $notificationId)->first();
if ($notification) {
$notification->markAsRead();
}
}
$view = $request->input('view', 'page');
$activity->loadMissing([
'questions.participant',
'participants.activity',
'topicTriggers',
'topicTriggers.participant',
'topicTriggers.playbackThemeTopicTrigger',
'topicTriggers.playbackThemeTopicTrigger.playbackThemeTopic',
]);
$data = Fractal::create()
->item(
$activity,
$transformer->setConsumer($user)
)
->serializeWith(new JsonSerializer())
->toArray();
$data['playbackData']['masterPlaylist'] = $this->getPreloadedPlaylist($activity);
if (! isset($data['playbackData']['tracks'])) {
$data['playbackData']['tracks'] = [];
}
/**
* Sending 'playbackVisited' event to Planhat without slowing the
* response to the user e.g. after the response is sent back.
*/
defer(
fn () => $this->planhatService->track(
user: $user,
event: 'playbackVisited',
payload: [
'activityId' => $activity->getId(),
'activityUuid' => $activity->getUuid(),
]
)
)->always();
return $this->render([
'playbackData' => [
'activity' => $data['playbackData'],
'favorited' => $data['favorited'],
'subscribed' => $data['subscribed'],
'view' => $view,
],
]);
}
private function getPreloadedPlaylist(Activity $activity): array
{
$masterPlaylist = [];
$urlPlaceholder = PlaybackService::M3U8_TRACK_PLACEHOLDER;
$this->authorize('stream', $activity);
$masterPlaylist['m3u8'] = $this->playbackService->generateMasterPlaylist($activity, null, $urlPlaceholder);
$masterPlaylist['placeholder'] = $urlPlaceholder;
$masterPlaylist['tracks'] = [];
/** @var Models\Track $track */
foreach ($this->playbackService->getMasterPlaylistTracks($activity) as $track) {
$mediaPlaylistPath = $this->mediaPlaylistPath($track);
$masterPlaylist['tracks'][] = [
'id' => $track->getUuid(),
'path' => $mediaPlaylistPath,
];
}
return $masterPlaylist;
}
/**
* @throws AuthorizationException
*/
public function playlist(Activity $activity): Response
{
$this->authorize('stream', $activity);
$masterPlaylist = $this->playbackService->generateMasterPlaylist($activity);
return response($masterPlaylist)
->header('Content-Type', 'application/x-mpegURL');
}
/**
* Generate a VTT "Video Text Tracks" file.
*
* @throws AuthorizationException
*/
public function vtt(Activity $activity): Response
{
$this->authorize('stream', $activity);
$vtt = $this->playbackService->generateVtt($activity);
return response($vtt)
->header('Content-Type', 'text/vtt;charset=utf-8');
}
/**
* @throws AuthorizationException
*/
public function media(Track $track): Response
{
$this->authorize('stream', $track->activity);
$this->queueMediaCookies($track);
$payload = $this->playbackService->generateMediaPlaylist($track);
return response($payload)
->header('Content-Type', 'application/x-mpegURL');
}
private function mediaPlaylistPath(Track $track): string
{
$this->queueMediaCookies($track);
// @TODO return cdn when CORS is fixed
// return client_cdn($track->content_path, $track->activity->user->team);
return route('media', ['track' => $track->id_string]);
}
private function queueMediaCookies(Track $track): void
{
$keepAliveCookieName = 'Media-KeepAlive_' . $track->id_string;
if (Cookie::has($keepAliveCookieName)) {
return;
}
// Restrict segment URLs to the IP requesting it.
$remoteIp = request()->ip();
$cookies = $this->playbackService->generateCookies($track, $remoteIp);
$keepAliveDuration = PlaybackService::MEDIA_COOKIE_MINIMUM_DURATION / 60;
// Cookie is only valid for this particular stream path.
$trackPath = '/' . preg_replace('/\/[^\/]+$/', '/', $track->content_path);
$host = config('jiminny.client_cdn_signed_cookie_domain');
// Queue up cookies to be able to be served secure track media.
foreach ($cookies as $name => $cookie) {
Cookie::queue($name, $cookie, $keepAliveDuration, $trackPath, $host, true, true);
}
// Cookie is only valid for this particular activity.
$paths = [
route('activity.playback', $track->activity->id_string, false),
route('media', ['track' => $track->id_string], false),
];
foreach ($paths as $path) {
Cookie::queue($keepAliveCookieName, 1, $keepAliveDuration, $path, $host, true, true);
}
}
/**
* Used by the Web app to download the activity.
*
* @throws AuthorizationException
*/
public function download(Activity $activity): RedirectResponse
{
$this->authorize('download', $activity);
try {
$url = $this->downloadActivityService->generateDownloadUrl($activity);
} catch (\Throwable $e) {
Log::info(
__METHOD__ . ' Download failed.',
['activity' => $activity->getUuid(), 'message' => $e->getMessage()]
);
abort(404, $e->getMessage());
}
return redirect($url);
}
/**
* Used by the Mobile app to download the activity.
*
* @throws AuthorizationException
*/
public function getDownloadUrl(Activity $activity): JsonResponse
{
$this->authorize('download', $activity);
try {
$url = $this->downloadActivityService->generateDownloadUrl($activity);
} catch (\Throwable $e) {
Log::info(
__METHOD__ . ' Getting signed url failed.',
['activity' => $activity->getUuid(), 'message' => $e->getMessage()]
);
abort(404, $e->getMessage());
}
return new JsonResponse(
['activity_url' => $url],
JsonResponse::HTTP_OK
);
}
}
Sync Changes
Hide This Notification
Code changed:
Hide
19
Previous Highlighted Error
Next Highlighted Error
[2026-05-07 14:21:15] local.INFO: [Hubspot] DEBUG Getting headers {
"headers":{
"Date":["Thu,07 May 2026 14:21:15 GMT"],
"Content-Type":["application/json;charset=utf-8"],
"Transfer-Encoding":["chunked"],
"Connection":["keep-alive"],
"CF-Ray":["9f80deb8db60dc3a-SOF"],
"CF-Cache-Status":["DYNAMIC"],
"Strict-Transport-Security":["max-age=31536000; includeSubDomains; preload"],
"Vary":["origin,
accept-encoding"],
"access-control-allow-credentials":["false"],
"server-timing":["hcid;desc=\"019e02d0-6fd8-7812-bdba-885b7ccb3ee3\",
cfr;desc=\"9f80deb8e7c6dc3a-IAD\""],
"x-content-type-options":["nosniff"],
"x-hubspot-correlation-id":["019e02d0-6fd8-7812-bdba-885b7ccb3ee3"],
"Set-Cookie":["__cf_bm=SIUrtdQgXVrik50pdqF6hZVYKhzTnQBidvMabeCtm0Y-1778163675-[IP_ADDRESS]-rI.ZggtDKxTge5zr8_2gbBfWMQQ.ufZEXDZyHz2mBUFdzdo2gTHEsOkXMSEShjK0hGYxNhUGM1ZoBpX7BcFZcHEjA7Cs_.SMUhUnd2nYjko; path=/; expires=Thu,
07-May-26 14:51:15 GMT; domain=.hubapi.com; HttpOnly; Secure; SameSite=None"],
"Report-To":["{
\"endpoints\":[{
\"url\":\"https:\\/\\/a.nel.cloudflare.com\\/report\\/v4?s=NYAlsVTP0fYm32qrSDjxYE4sd2RWRqiSp3wHsmdEgZlzoYdxI%2BIxVpHmsKn3O%2BKVA3mFIJ2m7YRECDGSM%2BW2IYTzo6FM4%2BdUIjURO8srzKSvJgZ%2BQ6R79arKQw3uHLlX\"}],
\"group\":\"cf-nel\",
\"max_age\":604800}"],
"NEL":["{
\"success_fraction\":0.01,
\"report_to\":\"cf-nel\",
\"max_age\":604800}"],
"Server":["cloudflare"]}} {
"correlation_id":"95236535-ec98-4541-b92a-adfa73b69eab",
"trace_id":"c7ab8365-903f-46d4-9403-0e5b551e3545"}
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
PhpStorm
|
faVsco.js – PlaybackController.php
|
NULL
|
16740
|
|
16741
|
Project: faVsco.js, menu
JY-20725-handle-HS-search Project: faVsco.js, menu
JY-20725-handle-HS-search-rate-limit, menu
Start Listening for PHP Debug Connections
AskJiminnyReportActivityServiceTest
Run 'AskJiminnyReportActivityServiceTest'
Debug 'AskJiminnyReportActivityServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
6
3
Previous Highlighted Error
Next Highlighted Error
<?php
namespace Jiminny\Http\Controllers;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Illuminate\Http\RedirectResponse;
use Illuminate\Auth\Access\AuthorizationException;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use Illuminate\Notifications\DatabaseNotification;
use Illuminate\Support\Facades\Log;
use Jiminny\Component\PlaybackPage\Download\Services\DownloadActivityService;
use Jiminny\Http\Serializers\JsonSerializer;
use Jiminny\Http\Transformers\PlaybackPageTransformer;
use Jiminny\Models\User;
use Jiminny\Models;
use Jiminny\Models\Activity;
use Jiminny\Models\Track;
use Jiminny\Services\PlanhatService;
use Jiminny\Services\PlaybackService;
use JsonException;
use Spatie\Fractal\Fractal;
use Illuminate\Support\Facades\Cookie;
final class PlaybackController extends FrontendController
{
use AuthorizesRequests;
public function __construct(
private readonly PlaybackService $playbackService,
private readonly DownloadActivityService $downloadActivityService,
private readonly PlanhatService $planhatService,
) {
}
/**
* @throws AuthorizationException
* @throws JsonException
*/
public function show(Activity $activity, PlaybackPageTransformer $transformer, Request $request): array|string
{
$this->authorize('view', $activity);
/** @var User $user */
$user = $request->user();
$activityTypeCheck = in_array(
$activity->type,
[
Activity::TYPE_CONFERENCE,
Activity::TYPE_SOFTPHONE,
Activity::TYPE_SOFTPHONE_INBOUND,
],
true
);
abort_unless($activityTypeCheck, 404);
$notificationId = $request->input('nId');
if ($notificationId) {
/** @var DatabaseNotification|null $notification */
$notification = $user->unreadNotifications->where('id', $notificationId)->first();
if ($notification) {
$notification->markAsRead();
}
}
$view = $request->input('view', 'page');
$activity->loadMissing([
'questions.participant',
'participants.activity',
'topicTriggers',
'topicTriggers.participant',
'topicTriggers.playbackThemeTopicTrigger',
'topicTriggers.playbackThemeTopicTrigger.playbackThemeTopic',
]);
$data = Fractal::create()
->item(
$activity,
$transformer->setConsumer($user)
)
->serializeWith(new JsonSerializer())
->toArray();
$data['playbackData']['masterPlaylist'] = $this->getPreloadedPlaylist($activity);
if (! isset($data['playbackData']['tracks'])) {
$data['playbackData']['tracks'] = [];
}
/**
* Sending 'playbackVisited' event to Planhat without slowing the
* response to the user e.g. after the response is sent back.
*/
defer(
fn () => $this->planhatService->track(
user: $user,
event: 'playbackVisited',
payload: [
'activityId' => $activity->getId(),
'activityUuid' => $activity->getUuid(),
]
)
)->always();
return $this->render([
'playbackData' => [
'activity' => $data['playbackData'],
'favorited' => $data['favorited'],
'subscribed' => $data['subscribed'],
'view' => $view,
],
]);
}
private function getPreloadedPlaylist(Activity $activity): array
{
$masterPlaylist = [];
$urlPlaceholder = PlaybackService::M3U8_TRACK_PLACEHOLDER;
$this->authorize('stream', $activity);
$masterPlaylist['m3u8'] = $this->playbackService->generateMasterPlaylist($activity, null, $urlPlaceholder);
$masterPlaylist['placeholder'] = $urlPlaceholder;
$masterPlaylist['tracks'] = [];
/** @var Models\Track $track */
foreach ($this->playbackService->getMasterPlaylistTracks($activity) as $track) {
$mediaPlaylistPath = $this->mediaPlaylistPath($track);
$masterPlaylist['tracks'][] = [
'id' => $track->getUuid(),
'path' => $mediaPlaylistPath,
];
}
return $masterPlaylist;
}
/**
* @throws AuthorizationException
*/
public function playlist(Activity $activity): Response
{
$this->authorize('stream', $activity);
$masterPlaylist = $this->playbackService->generateMasterPlaylist($activity);
return response($masterPlaylist)
->header('Content-Type', 'application/x-mpegURL');
}
/**
* Generate a VTT "Video Text Tracks" file.
*
* @throws AuthorizationException
*/
public function vtt(Activity $activity): Response
{
$this->authorize('stream', $activity);
$vtt = $this->playbackService->generateVtt($activity);
return response($vtt)
->header('Content-Type', 'text/vtt;charset=utf-8');
}
/**
* @throws AuthorizationException
*/
public function media(Track $track): Response
{
$this->authorize('stream', $track->activity);
$this->queueMediaCookies($track);
$payload = $this->playbackService->generateMediaPlaylist($track);
return response($payload)
->header('Content-Type', 'application/x-mpegURL');
}
private function mediaPlaylistPath(Track $track): string
{
$this->queueMediaCookies($track);
// @TODO return cdn when CORS is fixed
// return client_cdn($track->content_path, $track->activity->user->team);
return route('media', ['track' => $track->id_string]);
}
private function queueMediaCookies(Track $track): void
{
$keepAliveCookieName = 'Media-KeepAlive_' . $track->id_string;
if (Cookie::has($keepAliveCookieName)) {
return;
}
// Restrict segment URLs to the IP requesting it.
$remoteIp = request()->ip();
$cookies = $this->playbackService->generateCookies($track, $remoteIp);
$keepAliveDuration = PlaybackService::MEDIA_COOKIE_MINIMUM_DURATION / 60;
// Cookie is only valid for this particular stream path.
$trackPath = '/' . preg_replace('/\/[^\/]+$/', '/', $track->content_path);
$host = config('jiminny.client_cdn_signed_cookie_domain');
// Queue up cookies to be able to be served secure track media.
foreach ($cookies as $name => $cookie) {
Cookie::queue($name, $cookie, $keepAliveDuration, $trackPath, $host, true, true);
}
// Cookie is only valid for this particular activity.
$paths = [
route('activity.playback', $track->activity->id_string, false),
route('media', ['track' => $track->id_string], false),
];
foreach ($paths as $path) {
Cookie::queue($keepAliveCookieName, 1, $keepAliveDuration, $path, $host, true, true);
}
}
/**
* Used by the Web app to download the activity.
*
* @throws AuthorizationException
*/
public function download(Activity $activity): RedirectResponse
{
$this->authorize('download', $activity);
try {
$url = $this->downloadActivityService->generateDownloadUrl($activity);
} catch (\Throwable $e) {
Log::info(
__METHOD__ . ' Download failed.',
['activity' => $activity->getUuid(), 'message' => $e->getMessage()]
);
abort(404, $e->getMessage());
}
return redirect($url);
}
/**
* Used by the Mobile app to download the activity.
*
* @throws AuthorizationException
*/
public function getDownloadUrl(Activity $activity): JsonResponse
{
$this->authorize('download', $activity);
try {
$url = $this->downloadActivityService->generateDownloadUrl($activity);
} catch (\Throwable $e) {
Log::info(
__METHOD__ . ' Getting signed url failed.',
['activity' => $activity->getUuid(), 'message' => $e->getMessage()]
);
abort(404, $e->getMessage());
}
return new JsonResponse(
['activity_url' => $url],
JsonResponse::HTTP_OK
);
}
}
Sync Changes
Hide This Notification
Code changed:
Hide
19
Previous Highlighted Error
Next Highlighted Error
[2026-05-07 14:21:15] local.INFO: [Hubspot] DEBUG Getting headers {
"headers":{
"Date":["Thu,07 May 2026 14:21:15 GMT"],
"Content-Type":["application/json;charset=utf-8"],
"Transfer-Encoding":["chunked"],
"Connection":["keep-alive"],
"CF-Ray":["9f80deb8db60dc3a-SOF"],
"CF-Cache-Status":["DYNAMIC"],
"Strict-Transport-Security":["max-age=31536000; includeSubDomains; preload"],
"Vary":["origin,
accept-encoding"],
"access-control-allow-credentials":["false"],
"server-timing":["hcid;desc=\"019e02d0-6fd8-7812-bdba-885b7ccb3ee3\",
cfr;desc=\"9f80deb8e7c6dc3a-IAD\""],
"x-content-type-options":["nosniff"],
"x-hubspot-correlation-id":["019e02d0-6fd8-7812-bdba-885b7ccb3ee3"],
"Set-Cookie":["__cf_bm=SIUrtdQgXVrik50pdqF6hZVYKhzTnQBidvMabeCtm0Y-1778163675-[IP_ADDRESS]-rI.ZggtDKxTge5zr8_2gbBfWMQQ.ufZEXDZyHz2mBUFdzdo2gTHEsOkXMSEShjK0hGYxNhUGM1ZoBpX7BcFZcHEjA7Cs_.SMUhUnd2nYjko; path=/; expires=Thu,
07-May-26 14:51:15 GMT; domain=.hubapi.com; HttpOnly; Secure; SameSite=None"],
"Report-To":["{
\"endpoints\":[{
\"url\":\"https:\\/\\/a.nel.cloudflare.com\\/report\\/v4?s=NYAlsVTP0fYm32qrSDjxYE4sd2RWRqiSp3wHsmdEgZlzoYdxI%2BIxVpHmsKn3O%2BKVA3mFIJ2m7YRECDGSM%2BW2IYTzo6FM4%2BdUIjURO8srzKSvJgZ%2BQ6R79arKQw3uHLlX\"}],
\"group\":\"cf-nel\",
\"max_age\":604800}"],
"NEL":["{
\"success_fraction\":0.01,
\"report_to\":\"cf-nel\",
\"max_age\":604800}"],
"Server":["cloudflare"]}} {
"correlation_id":"95236535-ec98-4541-b92a-adfa73b69eab",
"trace_id":"c7ab8365-903f-46d4-9403-0e5b551e3545"}
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
PhpStorm
|
faVsco.js – PlaybackController.php
|
NULL
|
16741
|
|
16742
|
Project: faVsco.js, menu
JY-20725-handle-HS-search Project: faVsco.js, menu
JY-20725-handle-HS-search-rate-limit, menu
Start Listening for PHP Debug Connections
AskJiminnyReportActivityServiceTest
Run 'AskJiminnyReportActivityServiceTest'
Debug 'AskJiminnyReportActivityServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
6
3
Previous Highlighted Error
Next Highlighted Error
<?php
namespace Jiminny\Http\Controllers;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Illuminate\Http\RedirectResponse;
use Illuminate\Auth\Access\AuthorizationException;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use Illuminate\Notifications\DatabaseNotification;
use Illuminate\Support\Facades\Log;
use Jiminny\Component\PlaybackPage\Download\Services\DownloadActivityService;
use Jiminny\Http\Serializers\JsonSerializer;
use Jiminny\Http\Transformers\PlaybackPageTransformer;
use Jiminny\Models\User;
use Jiminny\Models;
use Jiminny\Models\Activity;
use Jiminny\Models\Track;
use Jiminny\Services\PlanhatService;
use Jiminny\Services\PlaybackService;
use JsonException;
use Spatie\Fractal\Fractal;
use Illuminate\Support\Facades\Cookie;
final class PlaybackController extends FrontendController
{
use AuthorizesRequests;
public function __construct(
private readonly PlaybackService $playbackService,
private readonly DownloadActivityService $downloadActivityService,
private readonly PlanhatService $planhatService,
) {
}
/**
* @throws AuthorizationException
* @throws JsonException
*/
public function show(Activity $activity, PlaybackPageTransformer $transformer, Request $request): array|string
{
$this->authorize('view', $activity);
/** @var User $user */
$user = $request->user();
$activityTypeCheck = in_array(
$activity->type,
[
Activity::TYPE_CONFERENCE,
Activity::TYPE_SOFTPHONE,
Activity::TYPE_SOFTPHONE_INBOUND,
],
true
);
abort_unless($activityTypeCheck, 404);
$notificationId = $request->input('nId');
if ($notificationId) {
/** @var DatabaseNotification|null $notification */
$notification = $user->unreadNotifications->where('id', $notificationId)->first();
if ($notification) {
$notification->markAsRead();
}
}
$view = $request->input('view', 'page');
$activity->loadMissing([
'questions.participant',
'participants.activity',
'topicTriggers',
'topicTriggers.participant',
'topicTriggers.playbackThemeTopicTrigger',
'topicTriggers.playbackThemeTopicTrigger.playbackThemeTopic',
]);
$data = Fractal::create()
->item(
$activity,
$transformer->setConsumer($user)
)
->serializeWith(new JsonSerializer())
->toArray();
$data['playbackData']['masterPlaylist'] = $this->getPreloadedPlaylist($activity);
if (! isset($data['playbackData']['tracks'])) {
$data['playbackData']['tracks'] = [];
}
/**
* Sending 'playbackVisited' event to Planhat without slowing the
* response to the user e.g. after the response is sent back.
*/
defer(
fn () => $this->planhatService->track(
user: $user,
event: 'playbackVisited',
payload: [
'activityId' => $activity->getId(),
'activityUuid' => $activity->getUuid(),
]
)
)->always();
return $this->render([
'playbackData' => [
'activity' => $data['playbackData'],
'favorited' => $data['favorited'],
'subscribed' => $data['subscribed'],
'view' => $view,
],
]);
}
private function getPreloadedPlaylist(Activity $activity): array
{
$masterPlaylist = [];
$urlPlaceholder = PlaybackService::M3U8_TRACK_PLACEHOLDER;
$this->authorize('stream', $activity);
$masterPlaylist['m3u8'] = $this->playbackService->generateMasterPlaylist($activity, null, $urlPlaceholder);
$masterPlaylist['placeholder'] = $urlPlaceholder;
$masterPlaylist['tracks'] = [];
/** @var Models\Track $track */
foreach ($this->playbackService->getMasterPlaylistTracks($activity) as $track) {
$mediaPlaylistPath = $this->mediaPlaylistPath($track);
$masterPlaylist['tracks'][] = [
'id' => $track->getUuid(),
'path' => $mediaPlaylistPath,
];
}
return $masterPlaylist;
}
/**
* @throws AuthorizationException
*/
public function playlist(Activity $activity): Response
{
$this->authorize('stream', $activity);
$masterPlaylist = $this->playbackService->generateMasterPlaylist($activity);
return response($masterPlaylist)
->header('Content-Type', 'application/x-mpegURL');
}
/**
* Generate a VTT "Video Text Tracks" file.
*
* @throws AuthorizationException
*/
public function vtt(Activity $activity): Response
{
$this->authorize('stream', $activity);
$vtt = $this->playbackService->generateVtt($activity);
return response($vtt)
->header('Content-Type', 'text/vtt;charset=utf-8');
}
/**
* @throws AuthorizationException
*/
public function media(Track $track): Response
{
$this->authorize('stream', $track->activity);
$this->queueMediaCookies($track);
$payload = $this->playbackService->generateMediaPlaylist($track);
return response($payload)
->header('Content-Type', 'application/x-mpegURL');
}
private function mediaPlaylistPath(Track $track): string
{
$this->queueMediaCookies($track);
// @TODO return cdn when CORS is fixed
// return client_cdn($track->content_path, $track->activity->user->team);
return route('media', ['track' => $track->id_string]);
}
private function queueMediaCookies(Track $track): void
{
$keepAliveCookieName = 'Media-KeepAlive_' . $track->id_string;
if (Cookie::has($keepAliveCookieName)) {
return;
}
// Restrict segment URLs to the IP requesting it.
$remoteIp = request()->ip();
$cookies = $this->playbackService->generateCookies($track, $remoteIp);
$keepAliveDuration = PlaybackService::MEDIA_COOKIE_MINIMUM_DURATION / 60;
// Cookie is only valid for this particular stream path.
$trackPath = '/' . preg_replace('/\/[^\/]+$/', '/', $track->content_path);
$host = config('jiminny.client_cdn_signed_cookie_domain');
// Queue up cookies to be able to be served secure track media.
foreach ($cookies as $name => $cookie) {
Cookie::queue($name, $cookie, $keepAliveDuration, $trackPath, $host, true, true);
}
// Cookie is only valid for this particular activity.
$paths = [
route('activity.playback', $track->activity->id_string, false),
route('media', ['track' => $track->id_string], false),
];
foreach ($paths as $path) {
Cookie::queue($keepAliveCookieName, 1, $keepAliveDuration, $path, $host, true, true);
}
}
/**
* Used by the Web app to download the activity.
*
* @throws AuthorizationException
*/
public function download(Activity $activity): RedirectResponse
{
$this->authorize('download', $activity);
try {
$url = $this->downloadActivityService->generateDownloadUrl($activity);
} catch (\Throwable $e) {
Log::info(
__METHOD__ . ' Download failed.',
['activity' => $activity->getUuid(), 'message' => $e->getMessage()]
);
abort(404, $e->getMessage());
}
return redirect($url);
}
/**
* Used by the Mobile app to download the activity.
*
* @throws AuthorizationException
*/
public function getDownloadUrl(Activity $activity): JsonResponse
{
$this->authorize('download', $activity);
try {
$url = $this->downloadActivityService->generateDownloadUrl($activity);
} catch (\Throwable $e) {
Log::info(
__METHOD__ . ' Getting signed url failed.',
['activity' => $activity->getUuid(), 'message' => $e->getMessage()]
);
abort(404, $e->getMessage());
}
return new JsonResponse(
['activity_url' => $url],
JsonResponse::HTTP_OK
);
}
}
Sync Changes
Hide This Notification
Code changed:
Hide
19
Previous Highlighted Error
Next Highlighted Error
[2026-05-07 14:21:15] local.INFO: [Hubspot] DEBUG Getting headers {
"headers":{
"Date":["Thu,07 May 2026 14:21:15 GMT"],
"Content-Type":["application/json;charset=utf-8"],
"Transfer-Encoding":["chunked"],
"Connection":["keep-alive"],
"CF-Ray":["9f80deb8db60dc3a-SOF"],
"CF-Cache-Status":["DYNAMIC"],
"Strict-Transport-Security":["max-age=31536000; includeSubDomains; preload"],
"Vary":["origin,
accept-encoding"],
"access-control-allow-credentials":["false"],
"server-timing":["hcid;desc=\"019e02d0-6fd8-7812-bdba-885b7ccb3ee3\",
cfr;desc=\"9f80deb8e7c6dc3a-IAD\""],
"x-content-type-options":["nosniff"],
"x-hubspot-correlation-id":["019e02d0-6fd8-7812-bdba-885b7ccb3ee3"],
"Set-Cookie":["__cf_bm=SIUrtdQgXVrik50pdqF6hZVYKhzTnQBidvMabeCtm0Y-1778163675-[IP_ADDRESS]-rI.ZggtDKxTge5zr8_2gbBfWMQQ.ufZEXDZyHz2mBUFdzdo2gTHEsOkXMSEShjK0hGYxNhUGM1ZoBpX7BcFZcHEjA7Cs_.SMUhUnd2nYjko; path=/; expires=Thu,
07-May-26 14:51:15 GMT; domain=.hubapi.com; HttpOnly; Secure; SameSite=None"],
"Report-To":["{
\"endpoints\":[{
\"url\":\"https:\\/\\/a.nel.cloudflare.com\\/report\\/v4?s=NYAlsVTP0fYm32qrSDjxYE4sd2RWRqiSp3wHsmdEgZlzoYdxI%2BIxVpHmsKn3O%2BKVA3mFIJ2m7YRECDGSM%2BW2IYTzo6FM4%2BdUIjURO8srzKSvJgZ%2BQ6R79arKQw3uHLlX\"}],
\"group\":\"cf-nel\",
\"max_age\":604800}"],
"NEL":["{
\"success_fraction\":0.01,
\"report_to\":\"cf-nel\",
\"max_age\":604800}"],
"Server":["cloudflare"]}} {
"correlation_id":"95236535-ec98-4541-b92a-adfa73b69eab",
"trace_id":"c7ab8365-903f-46d4-9403-0e5b551e3545"}
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
PhpStorm
|
faVsco.js – PlaybackController.php
|
NULL
|
16742
|
|
16743
|
Project: faVsco.js, menu
JY-20725-handle-HS-search Project: faVsco.js, menu
JY-20725-handle-HS-search-rate-limit, menu
Start Listening for PHP Debug Connections
AskJiminnyReportActivityServiceTest
Run 'AskJiminnyReportActivityServiceTest'
Debug 'AskJiminnyReportActivityServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
6
3
Previous Highlighted Error
Next Highlighted Error
<?php
namespace Jiminny\Http\Controllers;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Illuminate\Http\RedirectResponse;
use Illuminate\Auth\Access\AuthorizationException;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use Illuminate\Notifications\DatabaseNotification;
use Illuminate\Support\Facades\Log;
use Jiminny\Component\PlaybackPage\Download\Services\DownloadActivityService;
use Jiminny\Http\Serializers\JsonSerializer;
use Jiminny\Http\Transformers\PlaybackPageTransformer;
use Jiminny\Models\User;
use Jiminny\Models;
use Jiminny\Models\Activity;
use Jiminny\Models\Track;
use Jiminny\Services\PlanhatService;
use Jiminny\Services\PlaybackService;
use JsonException;
use Spatie\Fractal\Fractal;
use Illuminate\Support\Facades\Cookie;
final class PlaybackController extends FrontendController
{
use AuthorizesRequests;
public function __construct(
private readonly PlaybackService $playbackService,
private readonly DownloadActivityService $downloadActivityService,
private readonly PlanhatService $planhatService,
) {
}
/**
* @throws AuthorizationException
* @throws JsonException
*/
public function show(Activity $activity, PlaybackPageTransformer $transformer, Request $request): array|string
{
$this->authorize('view', $activity);
/** @var User $user */
$user = $request->user();
$activityTypeCheck = in_array(
$activity->type,
[
Activity::TYPE_CONFERENCE,
Activity::TYPE_SOFTPHONE,
Activity::TYPE_SOFTPHONE_INBOUND,
],
true
);
abort_unless($activityTypeCheck, 404);
$notificationId = $request->input('nId');
if ($notificationId) {
/** @var DatabaseNotification|null $notification */
$notification = $user->unreadNotifications->where('id', $notificationId)->first();
if ($notification) {
$notification->markAsRead();
}
}
$view = $request->input('view', 'page');
$activity->loadMissing([
'questions.participant',
'participants.activity',
'topicTriggers',
'topicTriggers.participant',
'topicTriggers.playbackThemeTopicTrigger',
'topicTriggers.playbackThemeTopicTrigger.playbackThemeTopic',
]);
$data = Fractal::create()
->item(
$activity,
$transformer->setConsumer($user)
)
->serializeWith(new JsonSerializer())
->toArray();
$data['playbackData']['masterPlaylist'] = $this->getPreloadedPlaylist($activity);
if (! isset($data['playbackData']['tracks'])) {
$data['playbackData']['tracks'] = [];
}
/**
* Sending 'playbackVisited' event to Planhat without slowing the
* response to the user e.g. after the response is sent back.
*/
defer(
fn () => $this->planhatService->track(
user: $user,
event: 'playbackVisited',
payload: [
'activityId' => $activity->getId(),
'activityUuid' => $activity->getUuid(),
]
)
)->always();
return $this->render([
'playbackData' => [
'activity' => $data['playbackData'],
'favorited' => $data['favorited'],
'subscribed' => $data['subscribed'],
'view' => $view,
],
]);
}
private function getPreloadedPlaylist(Activity $activity): array
{
$masterPlaylist = [];
$urlPlaceholder = PlaybackService::M3U8_TRACK_PLACEHOLDER;
$this->authorize('stream', $activity);
$masterPlaylist['m3u8'] = $this->playbackService->generateMasterPlaylist($activity, null, $urlPlaceholder);
$masterPlaylist['placeholder'] = $urlPlaceholder;
$masterPlaylist['tracks'] = [];
/** @var Models\Track $track */
foreach ($this->playbackService->getMasterPlaylistTracks($activity) as $track) {
$mediaPlaylistPath = $this->mediaPlaylistPath($track);
$masterPlaylist['tracks'][] = [
'id' => $track->getUuid(),
'path' => $mediaPlaylistPath,
];
}
return $masterPlaylist;
}
/**
* @throws AuthorizationException
*/
public function playlist(Activity $activity): Response
{
$this->authorize('stream', $activity);
$masterPlaylist = $this->playbackService->generateMasterPlaylist($activity);
return response($masterPlaylist)
->header('Content-Type', 'application/x-mpegURL');
}
/**
* Generate a VTT "Video Text Tracks" file.
*
* @throws AuthorizationException
*/
public function vtt(Activity $activity): Response
{
$this->authorize('stream', $activity);
$vtt = $this->playbackService->generateVtt($activity);
return response($vtt)
->header('Content-Type', 'text/vtt;charset=utf-8');
}
/**
* @throws AuthorizationException
*/
public function media(Track $track): Response
{
$this->authorize('stream', $track->activity);
$this->queueMediaCookies($track);
$payload = $this->playbackService->generateMediaPlaylist($track);
return response($payload)
->header('Content-Type', 'application/x-mpegURL');
}
private function mediaPlaylistPath(Track $track): string
{
$this->queueMediaCookies($track);
// @TODO return cdn when CORS is fixed
// return client_cdn($track->content_path, $track->activity->user->team);
return route('media', ['track' => $track->id_string]);
}
private function queueMediaCookies(Track $track): void
{
$keepAliveCookieName = 'Media-KeepAlive_' . $track->id_string;
if (Cookie::has($keepAliveCookieName)) {
return;
}
// Restrict segment URLs to the IP requesting it.
$remoteIp = request()->ip();
$cookies = $this->playbackService->generateCookies($track, $remoteIp);
$keepAliveDuration = PlaybackService::MEDIA_COOKIE_MINIMUM_DURATION / 60;
// Cookie is only valid for this particular stream path.
$trackPath = '/' . preg_replace('/\/[^\/]+$/', '/', $track->content_path);
$host = config('jiminny.client_cdn_signed_cookie_domain');
// Queue up cookies to be able to be served secure track media.
foreach ($cookies as $name => $cookie) {
Cookie::queue($name, $cookie, $keepAliveDuration, $trackPath, $host, true, true);
}
// Cookie is only valid for this particular activity.
$paths = [
route('activity.playback', $track->activity->id_string, false),
route('media', ['track' => $track->id_string], false),
];
foreach ($paths as $path) {
Cookie::queue($keepAliveCookieName, 1, $keepAliveDuration, $path, $host, true, true);
}
}
/**
* Used by the Web app to download the activity.
*
* @throws AuthorizationException
*/
public function download(Activity $activity): RedirectResponse
{
$this->authorize('download', $activity);
try {
$url = $this->downloadActivityService->generateDownloadUrl($activity);
} catch (\Throwable $e) {
Log::info(
__METHOD__ . ' Download failed.',
['activity' => $activity->getUuid(), 'message' => $e->getMessage()]
);
abort(404, $e->getMessage());
}
return redirect($url);
}
/**
* Used by the Mobile app to download the activity.
*
* @throws AuthorizationException
*/
public function getDownloadUrl(Activity $activity): JsonResponse
{
$this->authorize('download', $activity);
try {
$url = $this->downloadActivityService->generateDownloadUrl($activity);
} catch (\Throwable $e) {
Log::info(
__METHOD__ . ' Getting signed url failed.',
['activity' => $activity->getUuid(), 'message' => $e->getMessage()]
);
abort(404, $e->getMessage());
}
return new JsonResponse(
['activity_url' => $url],
JsonResponse::HTTP_OK
);
}
}
Sync Changes
Hide This Notification
Code changed:
Hide
19
Previous Highlighted Error
Next Highlighted Error
[2026-05-07 14:21:15] local.INFO: [Hubspot] DEBUG Getting headers {
"headers":{
"Date":["Thu,07 May 2026 14:21:15 GMT"],
"Content-Type":["application/json;charset=utf-8"],
"Transfer-Encoding":["chunked"],
"Connection":["keep-alive"],
"CF-Ray":["9f80deb8db60dc3a-SOF"],
"CF-Cache-Status":["DYNAMIC"],
"Strict-Transport-Security":["max-age=31536000; includeSubDomains; preload"],
"Vary":["origin,
accept-encoding"],
"access-control-allow-credentials":["false"],
"server-timing":["hcid;desc=\"019e02d0-6fd8-7812-bdba-885b7ccb3ee3\",
cfr;desc=\"9f80deb8e7c6dc3a-IAD\""],
"x-content-type-options":["nosniff"],
"x-hubspot-correlation-id":["019e02d0-6fd8-7812-bdba-885b7ccb3ee3"],
"Set-Cookie":["__cf_bm=SIUrtdQgXVrik50pdqF6hZVYKhzTnQBidvMabeCtm0Y-1778163675-[IP_ADDRESS]-rI.ZggtDKxTge5zr8_2gbBfWMQQ.ufZEXDZyHz2mBUFdzdo2gTHEsOkXMSEShjK0hGYxNhUGM1ZoBpX7BcFZcHEjA7Cs_.SMUhUnd2nYjko; path=/; expires=Thu,
07-May-26 14:51:15 GMT; domain=.hubapi.com; HttpOnly; Secure; SameSite=None"],
"Report-To":["{
\"endpoints\":[{
\"url\":\"https:\\/\\/a.nel.cloudflare.com\\/report\\/v4?s=NYAlsVTP0fYm32qrSDjxYE4sd2RWRqiSp3wHsmdEgZlzoYdxI%2BIxVpHmsKn3O%2BKVA3mFIJ2m7YRECDGSM%2BW2IYTzo6FM4%2BdUIjURO8srzKSvJgZ%2BQ6R79arKQw3uHLlX\"}],
\"group\":\"cf-nel\",
\"max_age\":604800}"],
"NEL":["{
\"success_fraction\":0.01,
\"report_to\":\"cf-nel\",
\"max_age\":604800}"],
"Server":["cloudflare"]}} {
"correlation_id":"95236535-ec98-4541-b92a-adfa73b69eab",
"trace_id":"c7ab8365-903f-46d4-9403-0e5b551e3545"}
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
PhpStorm
|
faVsco.js – PlaybackController.php
|
NULL
|
16743
|
|
16744
|
Project: faVsco.js, menu
JY-20725-handle-HS-search Project: faVsco.js, menu
JY-20725-handle-HS-search-rate-limit, menu
Start Listening for PHP Debug Connections
AskJiminnyReportActivityServiceTest
Run 'AskJiminnyReportActivityServiceTest'
Debug 'AskJiminnyReportActivityServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
6
3
Previous Highlighted Error
Next Highlighted Error
<?php
namespace Jiminny\Http\Controllers;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Illuminate\Http\RedirectResponse;
use Illuminate\Auth\Access\AuthorizationException;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use Illuminate\Notifications\DatabaseNotification;
use Illuminate\Support\Facades\Log;
use Jiminny\Component\PlaybackPage\Download\Services\DownloadActivityService;
use Jiminny\Http\Serializers\JsonSerializer;
use Jiminny\Http\Transformers\PlaybackPageTransformer;
use Jiminny\Models\User;
use Jiminny\Models;
use Jiminny\Models\Activity;
use Jiminny\Models\Track;
use Jiminny\Services\PlanhatService;
use Jiminny\Services\PlaybackService;
use JsonException;
use Spatie\Fractal\Fractal;
use Illuminate\Support\Facades\Cookie;
final class PlaybackController extends FrontendController
{
use AuthorizesRequests;
public function __construct(
private readonly PlaybackService $playbackService,
private readonly DownloadActivityService $downloadActivityService,
private readonly PlanhatService $planhatService,
) {
}
/**
* @throws AuthorizationException
* @throws JsonException
*/
public function show(Activity $activity, PlaybackPageTransformer $transformer, Request $request): array|string
{
$this->authorize('view', $activity);
/** @var User $user */
$user = $request->user();
$activityTypeCheck = in_array(
$activity->type,
[
Activity::TYPE_CONFERENCE,
Activity::TYPE_SOFTPHONE,
Activity::TYPE_SOFTPHONE_INBOUND,
],
true
);
abort_unless($activityTypeCheck, 404);
$notificationId = $request->input('nId');
if ($notificationId) {
/** @var DatabaseNotification|null $notification */
$notification = $user->unreadNotifications->where('id', $notificationId)->first();
if ($notification) {
$notification->markAsRead();
}
}
$view = $request->input('view', 'page');
$activity->loadMissing([
'questions.participant',
'participants.activity',
'topicTriggers',
'topicTriggers.participant',
'topicTriggers.playbackThemeTopicTrigger',
'topicTriggers.playbackThemeTopicTrigger.playbackThemeTopic',
]);
$data = Fractal::create()
->item(
$activity,
$transformer->setConsumer($user)
)
->serializeWith(new JsonSerializer())
->toArray();
$data['playbackData']['masterPlaylist'] = $this->getPreloadedPlaylist($activity);
if (! isset($data['playbackData']['tracks'])) {
$data['playbackData']['tracks'] = [];
}
/**
* Sending 'playbackVisited' event to Planhat without slowing the
* response to the user e.g. after the response is sent back.
*/
defer(
fn () => $this->planhatService->track(
user: $user,
event: 'playbackVisited',
payload: [
'activityId' => $activity->getId(),
'activityUuid' => $activity->getUuid(),
]
)
)->always();
return $this->render([
'playbackData' => [
'activity' => $data['playbackData'],
'favorited' => $data['favorited'],
'subscribed' => $data['subscribed'],
'view' => $view,
],
]);
}
private function getPreloadedPlaylist(Activity $activity): array
{
$masterPlaylist = [];
$urlPlaceholder = PlaybackService::M3U8_TRACK_PLACEHOLDER;
$this->authorize('stream', $activity);
$masterPlaylist['m3u8'] = $this->playbackService->generateMasterPlaylist($activity, null, $urlPlaceholder);
$masterPlaylist['placeholder'] = $urlPlaceholder;
$masterPlaylist['tracks'] = [];
/** @var Models\Track $track */
foreach ($this->playbackService->getMasterPlaylistTracks($activity) as $track) {
$mediaPlaylistPath = $this->mediaPlaylistPath($track);
$masterPlaylist['tracks'][] = [
'id' => $track->getUuid(),
'path' => $mediaPlaylistPath,
];
}
return $masterPlaylist;
}
/**
* @throws AuthorizationException
*/
public function playlist(Activity $activity): Response
{
$this->authorize('stream', $activity);
$masterPlaylist = $this->playbackService->generateMasterPlaylist($activity);
return response($masterPlaylist)
->header('Content-Type', 'application/x-mpegURL');
}
/**
* Generate a VTT "Video Text Tracks" file.
*
* @throws AuthorizationException
*/
public function vtt(Activity $activity): Response
{
$this->authorize('stream', $activity);
$vtt = $this->playbackService->generateVtt($activity);
return response($vtt)
->header('Content-Type', 'text/vtt;charset=utf-8');
}
/**
* @throws AuthorizationException
*/
public function media(Track $track): Response
{
$this->authorize('stream', $track->activity);
$this->queueMediaCookies($track);
$payload = $this->playbackService->generateMediaPlaylist($track);
return response($payload)
->header('Content-Type', 'application/x-mpegURL');
}
private function mediaPlaylistPath(Track $track): string
{
$this->queueMediaCookies($track);
// @TODO return cdn when CORS is fixed
// return client_cdn($track->content_path, $track->activity->user->team);
return route('media', ['track' => $track->id_string]);
}
private function queueMediaCookies(Track $track): void
{
$keepAliveCookieName = 'Media-KeepAlive_' . $track->id_string;
if (Cookie::has($keepAliveCookieName)) {
return;
}
// Restrict segment URLs to the IP requesting it.
$remoteIp = request()->ip();
$cookies = $this->playbackService->generateCookies($track, $remoteIp);
$keepAliveDuration = PlaybackService::MEDIA_COOKIE_MINIMUM_DURATION / 60;
// Cookie is only valid for this particular stream path.
$trackPath = '/' . preg_replace('/\/[^\/]+$/', '/', $track->content_path);
$host = config('jiminny.client_cdn_signed_cookie_domain');
// Queue up cookies to be able to be served secure track media.
foreach ($cookies as $name => $cookie) {
Cookie::queue($name, $cookie, $keepAliveDuration, $trackPath, $host, true, true);
}
// Cookie is only valid for this particular activity.
$paths = [
route('activity.playback', $track->activity->id_string, false),
route('media', ['track' => $track->id_string], false),
];
foreach ($paths as $path) {
Cookie::queue($keepAliveCookieName, 1, $keepAliveDuration, $path, $host, true, true);
}
}
/**
* Used by the Web app to download the activity.
*
* @throws AuthorizationException
*/
public function download(Activity $activity): RedirectResponse
{
$this->authorize('download', $activity);
try {
$url = $this->downloadActivityService->generateDownloadUrl($activity);
} catch (\Throwable $e) {
Log::info(
__METHOD__ . ' Download failed.',
['activity' => $activity->getUuid(), 'message' => $e->getMessage()]
);
abort(404, $e->getMessage());
}
return redirect($url);
}
/**
* Used by the Mobile app to download the activity.
*
* @throws AuthorizationException
*/
public function getDownloadUrl(Activity $activity): JsonResponse
{
$this->authorize('download', $activity);
try {
$url = $this->downloadActivityService->generateDownloadUrl($activity);
} catch (\Throwable $e) {
Log::info(
__METHOD__ . ' Getting signed url failed.',
['activity' => $activity->getUuid(), 'message' => $e->getMessage()]
);
abort(404, $e->getMessage());
}
return new JsonResponse(
['activity_url' => $url],
JsonResponse::HTTP_OK
);
}
}
Sync Changes
Hide This Notification
Code changed:
Hide
19
Previous Highlighted Error
Next Highlighted Error
[2026-05-07 14:21:15] local.INFO: [Hubspot] DEBUG Getting headers {
"headers":{
"Date":["Thu,07 May 2026 14:21:15 GMT"],
"Content-Type":["application/json;charset=utf-8"],
"Transfer-Encoding":["chunked"],
"Connection":["keep-alive"],
"CF-Ray":["9f80deb8db60dc3a-SOF"],
"CF-Cache-Status":["DYNAMIC"],
"Strict-Transport-Security":["max-age=31536000; includeSubDomains; preload"],
"Vary":["origin,
accept-encoding"],
"access-control-allow-credentials":["false"],
"server-timing":["hcid;desc=\"019e02d0-6fd8-7812-bdba-885b7ccb3ee3\",
cfr;desc=\"9f80deb8e7c6dc3a-IAD\""],
"x-content-type-options":["nosniff"],
"x-hubspot-correlation-id":["019e02d0-6fd8-7812-bdba-885b7ccb3ee3"],
"Set-Cookie":["__cf_bm=SIUrtdQgXVrik50pdqF6hZVYKhzTnQBidvMabeCtm0Y-1778163675-[IP_ADDRESS]-rI.ZggtDKxTge5zr8_2gbBfWMQQ.ufZEXDZyHz2mBUFdzdo2gTHEsOkXMSEShjK0hGYxNhUGM1ZoBpX7BcFZcHEjA7Cs_.SMUhUnd2nYjko; path=/; expires=Thu,
07-May-26 14:51:15 GMT; domain=.hubapi.com; HttpOnly; Secure; SameSite=None"],
"Report-To":["{
\"endpoints\":[{
\"url\":\"https:\\/\\/a.nel.cloudflare.com\\/report\\/v4?s=NYAlsVTP0fYm32qrSDjxYE4sd2RWRqiSp3wHsmdEgZlzoYdxI%2BIxVpHmsKn3O%2BKVA3mFIJ2m7YRECDGSM%2BW2IYTzo6FM4%2BdUIjURO8srzKSvJgZ%2BQ6R79arKQw3uHLlX\"}],
\"group\":\"cf-nel\",
\"max_age\":604800}"],
"NEL":["{
\"success_fraction\":0.01,
\"report_to\":\"cf-nel\",
\"max_age\":604800}"],
"Server":["cloudflare"]}} {
"correlation_id":"95236535-ec98-4541-b92a-adfa73b69eab",
"trace_id":"c7ab8365-903f-46d4-9403-0e5b551e3545"}
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
PhpStorm
|
faVsco.js – PlaybackController.php
|
NULL
|
16744
|
|
16745
|
Project: faVsco.js, menu
JY-20725-handle-HS-search Project: faVsco.js, menu
JY-20725-handle-HS-search-rate-limit, menu
Start Listening for PHP Debug Connections
AskJiminnyReportActivityServiceTest
Run 'AskJiminnyReportActivityServiceTest'
Debug 'AskJiminnyReportActivityServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
6
3
Previous Highlighted Error
Next Highlighted Error
<?php
namespace Jiminny\Http\Controllers;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Illuminate\Http\RedirectResponse;
use Illuminate\Auth\Access\AuthorizationException;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use Illuminate\Notifications\DatabaseNotification;
use Illuminate\Support\Facades\Log;
use Jiminny\Component\PlaybackPage\Download\Services\DownloadActivityService;
use Jiminny\Http\Serializers\JsonSerializer;
use Jiminny\Http\Transformers\PlaybackPageTransformer;
use Jiminny\Models\User;
use Jiminny\Models;
use Jiminny\Models\Activity;
use Jiminny\Models\Track;
use Jiminny\Services\PlanhatService;
use Jiminny\Services\PlaybackService;
use JsonException;
use Spatie\Fractal\Fractal;
use Illuminate\Support\Facades\Cookie;
final class PlaybackController extends FrontendController
{
use AuthorizesRequests;
public function __construct(
private readonly PlaybackService $playbackService,
private readonly DownloadActivityService $downloadActivityService,
private readonly PlanhatService $planhatService,
) {
}
/**
* @throws AuthorizationException
* @throws JsonException
*/
public function show(Activity $activity, PlaybackPageTransformer $transformer, Request $request): array|string
{
$this->authorize('view', $activity);
/** @var User $user */
$user = $request->user();
$activityTypeCheck = in_array(
$activity->type,
[
Activity::TYPE_CONFERENCE,
Activity::TYPE_SOFTPHONE,
Activity::TYPE_SOFTPHONE_INBOUND,
],
true
);
abort_unless($activityTypeCheck, 404);
$notificationId = $request->input('nId');
if ($notificationId) {
/** @var DatabaseNotification|null $notification */
$notification = $user->unreadNotifications->where('id', $notificationId)->first();
if ($notification) {
$notification->markAsRead();
}
}
$view = $request->input('view', 'page');
$activity->loadMissing([
'questions.participant',
'participants.activity',
'topicTriggers',
'topicTriggers.participant',
'topicTriggers.playbackThemeTopicTrigger',
'topicTriggers.playbackThemeTopicTrigger.playbackThemeTopic',
]);
$data = Fractal::create()
->item(
$activity,
$transformer->setConsumer($user)
)
->serializeWith(new JsonSerializer())
->toArray();
$data['playbackData']['masterPlaylist'] = $this->getPreloadedPlaylist($activity);
if (! isset($data['playbackData']['tracks'])) {
$data['playbackData']['tracks'] = [];
}
/**
* Sending 'playbackVisited' event to Planhat without slowing the
* response to the user e.g. after the response is sent back.
*/
defer(
fn () => $this->planhatService->track(
user: $user,
event: 'playbackVisited',
payload: [
'activityId' => $activity->getId(),
'activityUuid' => $activity->getUuid(),
]
)
)->always();
return $this->render([
'playbackData' => [
'activity' => $data['playbackData'],
'favorited' => $data['favorited'],
'subscribed' => $data['subscribed'],
'view' => $view,
],
]);
}
private function getPreloadedPlaylist(Activity $activity): array
{
$masterPlaylist = [];
$urlPlaceholder = PlaybackService::M3U8_TRACK_PLACEHOLDER;
$this->authorize('stream', $activity);
$masterPlaylist['m3u8'] = $this->playbackService->generateMasterPlaylist($activity, null, $urlPlaceholder);
$masterPlaylist['placeholder'] = $urlPlaceholder;
$masterPlaylist['tracks'] = [];
/** @var Models\Track $track */
foreach ($this->playbackService->getMasterPlaylistTracks($activity) as $track) {
$mediaPlaylistPath = $this->mediaPlaylistPath($track);
$masterPlaylist['tracks'][] = [
'id' => $track->getUuid(),
'path' => $mediaPlaylistPath,
];
}
return $masterPlaylist;
}
/**
* @throws AuthorizationException
*/
public function playlist(Activity $activity): Response
{
$this->authorize('stream', $activity);
$masterPlaylist = $this->playbackService->generateMasterPlaylist($activity);
return response($masterPlaylist)
->header('Content-Type', 'application/x-mpegURL');
}
/**
* Generate a VTT "Video Text Tracks" file.
*
* @throws AuthorizationException
*/
public function vtt(Activity $activity): Response
{
$this->authorize('stream', $activity);
$vtt = $this->playbackService->generateVtt($activity);
return response($vtt)
->header('Content-Type', 'text/vtt;charset=utf-8');
}
/**
* @throws AuthorizationException
*/
public function media(Track $track): Response
{
$this->authorize('stream', $track->activity);
$this->queueMediaCookies($track);
$payload = $this->playbackService->generateMediaPlaylist($track);
return response($payload)
->header('Content-Type', 'application/x-mpegURL');
}
private function mediaPlaylistPath(Track $track): string
{
$this->queueMediaCookies($track);
// @TODO return cdn when CORS is fixed
// return client_cdn($track->content_path, $track->activity->user->team);
return route('media', ['track' => $track->id_string]);
}
private function queueMediaCookies(Track $track): void
{
$keepAliveCookieName = 'Media-KeepAlive_' . $track->id_string;
if (Cookie::has($keepAliveCookieName)) {
return;
}
// Restrict segment URLs to the IP requesting it.
$remoteIp = request()->ip();
$cookies = $this->playbackService->generateCookies($track, $remoteIp);
$keepAliveDuration = PlaybackService::MEDIA_COOKIE_MINIMUM_DURATION / 60;
// Cookie is only valid for this particular stream path.
$trackPath = '/' . preg_replace('/\/[^\/]+$/', '/', $track->content_path);
$host = config('jiminny.client_cdn_signed_cookie_domain');
// Queue up cookies to be able to be served secure track media.
foreach ($cookies as $name => $cookie) {
Cookie::queue($name, $cookie, $keepAliveDuration, $trackPath, $host, true, true);
}
// Cookie is only valid for this particular activity.
$paths = [
route('activity.playback', $track->activity->id_string, false),
route('media', ['track' => $track->id_string], false),
];
foreach ($paths as $path) {
Cookie::queue($keepAliveCookieName, 1, $keepAliveDuration, $path, $host, true, true);
}
}
/**
* Used by the Web app to download the activity.
*
* @throws AuthorizationException
*/
public function download(Activity $activity): RedirectResponse
{
$this->authorize('download', $activity);
try {
$url = $this->downloadActivityService->generateDownloadUrl($activity);
} catch (\Throwable $e) {
Log::info(
__METHOD__ . ' Download failed.',
['activity' => $activity->getUuid(), 'message' => $e->getMessage()]
);
abort(404, $e->getMessage());
}
return redirect($url);
}
/**
* Used by the Mobile app to download the activity.
*
* @throws AuthorizationException
*/
public function getDownloadUrl(Activity $activity): JsonResponse
{
$this->authorize('download', $activity);
try {
$url = $this->downloadActivityService->generateDownloadUrl($activity);
} catch (\Throwable $e) {
Log::info(
__METHOD__ . ' Getting signed url failed.',
['activity' => $activity->getUuid(), 'message' => $e->getMessage()]
);
abort(404, $e->getMessage());
}
return new JsonResponse(
['activity_url' => $url],
JsonResponse::HTTP_OK
);
}
}
Sync Changes
Hide This Notification
Code changed:
Hide
19
Previous Highlighted Error
Next Highlighted Error
[2026-05-07 14:21:15] local.INFO: [Hubspot] DEBUG Getting headers {
"headers":{
"Date":["Thu,07 May 2026 14:21:15 GMT"],
"Content-Type":["application/json;charset=utf-8"],
"Transfer-Encoding":["chunked"],
"Connection":["keep-alive"],
"CF-Ray":["9f80deb8db60dc3a-SOF"],
"CF-Cache-Status":["DYNAMIC"],
"Strict-Transport-Security":["max-age=31536000; includeSubDomains; preload"],
"Vary":["origin,
accept-encoding"],
"access-control-allow-credentials":["false"],
"server-timing":["hcid;desc=\"019e02d0-6fd8-7812-bdba-885b7ccb3ee3\",
cfr;desc=\"9f80deb8e7c6dc3a-IAD\""],
"x-content-type-options":["nosniff"],
"x-hubspot-correlation-id":["019e02d0-6fd8-7812-bdba-885b7ccb3ee3"],
"Set-Cookie":["__cf_bm=SIUrtdQgXVrik50pdqF6hZVYKhzTnQBidvMabeCtm0Y-1778163675-[IP_ADDRESS]-rI.ZggtDKxTge5zr8_2gbBfWMQQ.ufZEXDZyHz2mBUFdzdo2gTHEsOkXMSEShjK0hGYxNhUGM1ZoBpX7BcFZcHEjA7Cs_.SMUhUnd2nYjko; path=/; expires=Thu,
07-May-26 14:51:15 GMT; domain=.hubapi.com; HttpOnly; Secure; SameSite=None"],
"Report-To":["{
\"endpoints\":[{
\"url\":\"https:\\/\\/a.nel.cloudflare.com\\/report\\/v4?s=NYAlsVTP0fYm32qrSDjxYE4sd2RWRqiSp3wHsmdEgZlzoYdxI%2BIxVpHmsKn3O%2BKVA3mFIJ2m7YRECDGSM%2BW2IYTzo6FM4%2BdUIjURO8srzKSvJgZ%2BQ6R79arKQw3uHLlX\"}],
\"group\":\"cf-nel\",
\"max_age\":604800}"],
"NEL":["{
\"success_fraction\":0.01,
\"report_to\":\"cf-nel\",
\"max_age\":604800}"],
"Server":["cloudflare"]}} {
"correlation_id":"95236535-ec98-4541-b92a-adfa73b69eab",
"trace_id":"c7ab8365-903f-46d4-9403-0e5b551e3545"}
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
PhpStorm
|
faVsco.js – PlaybackController.php
|
NULL
|
16745
|
|
16746
|
Project: faVsco.js, menu
JY-20725-handle-HS-search Project: faVsco.js, menu
JY-20725-handle-HS-search-rate-limit, menu
Start Listening for PHP Debug Connections
AskJiminnyReportActivityServiceTest
Run 'AskJiminnyReportActivityServiceTest'
Debug 'AskJiminnyReportActivityServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
6
3
Previous Highlighted Error
Next Highlighted Error
<?php
namespace Jiminny\Http\Controllers;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Illuminate\Http\RedirectResponse;
use Illuminate\Auth\Access\AuthorizationException;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use Illuminate\Notifications\DatabaseNotification;
use Illuminate\Support\Facades\Log;
use Jiminny\Component\PlaybackPage\Download\Services\DownloadActivityService;
use Jiminny\Http\Serializers\JsonSerializer;
use Jiminny\Http\Transformers\PlaybackPageTransformer;
use Jiminny\Models\User;
use Jiminny\Models;
use Jiminny\Models\Activity;
use Jiminny\Models\Track;
use Jiminny\Services\PlanhatService;
use Jiminny\Services\PlaybackService;
use JsonException;
use Spatie\Fractal\Fractal;
use Illuminate\Support\Facades\Cookie;
final class PlaybackController extends FrontendController
{
use AuthorizesRequests;
public function __construct(
private readonly PlaybackService $playbackService,
private readonly DownloadActivityService $downloadActivityService,
private readonly PlanhatService $planhatService,
) {
}
/**
* @throws AuthorizationException
* @throws JsonException
*/
public function show(Activity $activity, PlaybackPageTransformer $transformer, Request $request): array|string
{
$this->authorize('view', $activity);
/** @var User $user */
$user = $request->user();
$activityTypeCheck = in_array(
$activity->type,
[
Activity::TYPE_CONFERENCE,
Activity::TYPE_SOFTPHONE,
Activity::TYPE_SOFTPHONE_INBOUND,
],
true
);
abort_unless($activityTypeCheck, 404);
$notificationId = $request->input('nId');
if ($notificationId) {
/** @var DatabaseNotification|null $notification */
$notification = $user->unreadNotifications->where('id', $notificationId)->first();
if ($notification) {
$notification->markAsRead();
}
}
$view = $request->input('view', 'page');
$activity->loadMissing([
'questions.participant',
'participants.activity',
'topicTriggers',
'topicTriggers.participant',
'topicTriggers.playbackThemeTopicTrigger',
'topicTriggers.playbackThemeTopicTrigger.playbackThemeTopic',
]);
$data = Fractal::create()
->item(
$activity,
$transformer->setConsumer($user)
)
->serializeWith(new JsonSerializer())
->toArray();
$data['playbackData']['masterPlaylist'] = $this->getPreloadedPlaylist($activity);
if (! isset($data['playbackData']['tracks'])) {
$data['playbackData']['tracks'] = [];
}
/**
* Sending 'playbackVisited' event to Planhat without slowing the
* response to the user e.g. after the response is sent back.
*/
defer(
fn () => $this->planhatService->track(
user: $user,
event: 'playbackVisited',
payload: [
'activityId' => $activity->getId(),
'activityUuid' => $activity->getUuid(),
]
)
)->always();
return $this->render([
'playbackData' => [
'activity' => $data['playbackData'],
'favorited' => $data['favorited'],
'subscribed' => $data['subscribed'],
'view' => $view,
],
]);
}
private function getPreloadedPlaylist(Activity $activity): array
{
$masterPlaylist = [];
$urlPlaceholder = PlaybackService::M3U8_TRACK_PLACEHOLDER;
$this->authorize('stream', $activity);
$masterPlaylist['m3u8'] = $this->playbackService->generateMasterPlaylist($activity, null, $urlPlaceholder);
$masterPlaylist['placeholder'] = $urlPlaceholder;
$masterPlaylist['tracks'] = [];
/** @var Models\Track $track */
foreach ($this->playbackService->getMasterPlaylistTracks($activity) as $track) {
$mediaPlaylistPath = $this->mediaPlaylistPath($track);
$masterPlaylist['tracks'][] = [
'id' => $track->getUuid(),
'path' => $mediaPlaylistPath,
];
}
return $masterPlaylist;
}
/**
* @throws AuthorizationException
*/
public function playlist(Activity $activity): Response
{
$this->authorize('stream', $activity);
$masterPlaylist = $this->playbackService->generateMasterPlaylist($activity);
return response($masterPlaylist)
->header('Content-Type', 'application/x-mpegURL');
}
/**
* Generate a VTT "Video Text Tracks" file.
*
* @throws AuthorizationException
*/
public function vtt(Activity $activity): Response
{
$this->authorize('stream', $activity);
$vtt = $this->playbackService->generateVtt($activity);
return response($vtt)
->header('Content-Type', 'text/vtt;charset=utf-8');
}
/**
* @throws AuthorizationException
*/
public function media(Track $track): Response
{
$this->authorize('stream', $track->activity);
$this->queueMediaCookies($track);
$payload = $this->playbackService->generateMediaPlaylist($track);
return response($payload)
->header('Content-Type', 'application/x-mpegURL');
}
private function mediaPlaylistPath(Track $track): string
{
$this->queueMediaCookies($track);
// @TODO return cdn when CORS is fixed
// return client_cdn($track->content_path, $track->activity->user->team);
return route('media', ['track' => $track->id_string]);
}
private function queueMediaCookies(Track $track): void
{
$keepAliveCookieName = 'Media-KeepAlive_' . $track->id_string;
if (Cookie::has($keepAliveCookieName)) {
return;
}
// Restrict segment URLs to the IP requesting it.
$remoteIp = request()->ip();
$cookies = $this->playbackService->generateCookies($track, $remoteIp);
$keepAliveDuration = PlaybackService::MEDIA_COOKIE_MINIMUM_DURATION / 60;
// Cookie is only valid for this particular stream path.
$trackPath = '/' . preg_replace('/\/[^\/]+$/', '/', $track->content_path);
$host = config('jiminny.client_cdn_signed_cookie_domain');
// Queue up cookies to be able to be served secure track media.
foreach ($cookies as $name => $cookie) {
Cookie::queue($name, $cookie, $keepAliveDuration, $trackPath, $host, true, true);
}
// Cookie is only valid for this particular activity.
$paths = [
route('activity.playback', $track->activity->id_string, false),
route('media', ['track' => $track->id_string], false),
];
foreach ($paths as $path) {
Cookie::queue($keepAliveCookieName, 1, $keepAliveDuration, $path, $host, true, true);
}
}
/**
* Used by the Web app to download the activity.
*
* @throws AuthorizationException
*/
public function download(Activity $activity): RedirectResponse
{
$this->authorize('download', $activity);
try {
$url = $this->downloadActivityService->generateDownloadUrl($activity);
} catch (\Throwable $e) {
Log::info(
__METHOD__ . ' Download failed.',
['activity' => $activity->getUuid(), 'message' => $e->getMessage()]
);
abort(404, $e->getMessage());
}
return redirect($url);
}
/**
* Used by the Mobile app to download the activity.
*
* @throws AuthorizationException
*/
public function getDownloadUrl(Activity $activity): JsonResponse
{
$this->authorize('download', $activity);
try {
$url = $this->downloadActivityService->generateDownloadUrl($activity);
} catch (\Throwable $e) {
Log::info(
__METHOD__ . ' Getting signed url failed.',
['activity' => $activity->getUuid(), 'message' => $e->getMessage()]
);
abort(404, $e->getMessage());
}
return new JsonResponse(
['activity_url' => $url],
JsonResponse::HTTP_OK
);
}
}
Sync Changes
Hide This Notification
Code changed:
Hide
19
Previous Highlighted Error
Next Highlighted Error
[2026-05-07 14:21:15] local.INFO: [Hubspot] DEBUG Getting headers {
"headers":{
"Date":["Thu,07 May 2026 14:21:15 GMT"],
"Content-Type":["application/json;charset=utf-8"],
"Transfer-Encoding":["chunked"],
"Connection":["keep-alive"],
"CF-Ray":["9f80deb8db60dc3a-SOF"],
"CF-Cache-Status":["DYNAMIC"],
"Strict-Transport-Security":["max-age=31536000; includeSubDomains; preload"],
"Vary":["origin,
accept-encoding"],
"access-control-allow-credentials":["false"],
"server-timing":["hcid;desc=\"019e02d0-6fd8-7812-bdba-885b7ccb3ee3\",
cfr;desc=\"9f80deb8e7c6dc3a-IAD\""],
"x-content-type-options":["nosniff"],
"x-hubspot-correlation-id":["019e02d0-6fd8-7812-bdba-885b7ccb3ee3"],
"Set-Cookie":["__cf_bm=SIUrtdQgXVrik50pdqF6hZVYKhzTnQBidvMabeCtm0Y-1778163675-[IP_ADDRESS]-rI.ZggtDKxTge5zr8_2gbBfWMQQ.ufZEXDZyHz2mBUFdzdo2gTHEsOkXMSEShjK0hGYxNhUGM1ZoBpX7BcFZcHEjA7Cs_.SMUhUnd2nYjko; path=/; expires=Thu,
07-May-26 14:51:15 GMT; domain=.hubapi.com; HttpOnly; Secure; SameSite=None"],
"Report-To":["{
\"endpoints\":[{
\"url\":\"https:\\/\\/a.nel.cloudflare.com\\/report\\/v4?s=NYAlsVTP0fYm32qrSDjxYE4sd2RWRqiSp3wHsmdEgZlzoYdxI%2BIxVpHmsKn3O%2BKVA3mFIJ2m7YRECDGSM%2BW2IYTzo6FM4%2BdUIjURO8srzKSvJgZ%2BQ6R79arKQw3uHLlX\"}],
\"group\":\"cf-nel\",
\"max_age\":604800}"],
"NEL":["{
\"success_fraction\":0.01,
\"report_to\":\"cf-nel\",
\"max_age\":604800}"],
"Server":["cloudflare"]}} {
"correlation_id":"95236535-ec98-4541-b92a-adfa73b69eab",
"trace_id":"c7ab8365-903f-46d4-9403-0e5b551e3545"}
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
PhpStorm
|
faVsco.js – PlaybackController.php
|
NULL
|
16746
|
|
16747
|
AI Notes: Off
loading…
Petko Kashinski is in the h AI Notes: Off
loading…
Petko Kashinski is in the huddle.: .
SlackFileEditViewGoHistoryWindowHelpSupport Daily • in 2 h 38 ml100% <• Mon 11 May 12:22:246д Huddle with Petko KashinskiAl Notes: Off vail4:53Leave...
|
Slack
|
Huddle: @Petko Kashinski - Jiminny Inc - Slack
|
NULL
|
16747
|
|
16748
|
AI Notes: Off
loading…
Petko Kashinski is in the h AI Notes: Off
loading…
Petko Kashinski is in the huddle.: .
PhostormVIewINavicarecodeFV faVsco.js°9 JY-20725-handle-HS-search-rate-IiyProiect© UserAutomatedReportsController.phpC) SubscrintionControsynckelatedAcuvilymanager.pnpC) TeamA Automationweinteceinixeereit@ TeamController.phpc) ToaminciahtcContrС) Cпескапакеtгукemotematch.phg( RateLimitException.phpo transcrlpuonconu© TranslationControllC) Client.phpphpidehelper.ph©) PaqinationState.phoC) MatchCrmData.php© CrmObiectsResolver.phcc usercontroller.pnp© VocabularyControll>@ AuthC) ProviderRateLimiter.php©) PaqinationConfia.phpfinal class PlavbackController extends FrontendcontrollenMA6X3AY-customerapl›J Internav D Kioskeams© ActivityController.pAutomatedReportsic) DashboardControllec) ImpersonationContc) OrcanizationscontrC PartnersController.C) ProfileController.oh© SearchController.pt 1ac>• SettingsM Telerhonvv M Wehhook>D Hubspot>D IntegrationAppSub: 10cl© ActivityProviderCor 104© ActivityTranscriptio 107© BaseController.php 10d© CalendarController. 109© ReportController.ph 11dSoftphoneWebhook 111(c. AbstractController.phg 11g® CommentContextinter 113© ConterencesOptinouts 114c) controller.phpExportController.php© FrontendController.ph| 112T FrontendControllerTra 118@ GeocodingController.p 119(C) HealthCheckControlleiP LiveCoachController.pl 120© MissingTeamControlle 120C) MobileController.oho© NotificationController.1 1z4© NotificationProviderCo 145Ye) PlavbackControlier ohg DlavlistController nhn1A4IO Spublic function show Activity Sactivity, PlaybackPageTransformer Stransformer, Request Srequest): arraylstr: ºSdata[ 'playbackData']['masterPlaylist'] = Sthis->qetPreloadedPlavlist(Sactivity):if (! isset(Sdata['playbackData']['tracks'])) {Scatal'olavbackData'"tracks'=* Sending 'playbackVisited' event to Planhat without slowing the* response to the user e.g. after the response is sent backdofen dfn () => $this->planhatService->track(usen. Susenevent: 'playbackVisited',payload: ['activityId' => Sactivity->getIdO'activityUuid' => Sactivity->getUuid.)->alwaysO:return Sthis->render(0"playbackData' =>'activity' => Sdatal'playbackbata''tavorited' => Sdatal'favorited'n'subscribed' => $datal 'subscribed'1Vlew => svlew.private function getPreloadedPlaylist(Activity Sactivity): arrayt...}Othrows AuthorizationEycentionGET Inlavlict[activitv) m2u8 fnlavlictlpublic function playlist(Activity $activity): Response{...}(C) PucherController nhng SlackController nhnlelner Code will hoin INF to underctand vour Laravel ann code II Generate II Don't Show Anvmore (todav Q•08)40suppont Dally • In zn 38m100% Lz• Mon 11 May 12:22:24AskJiminnyReportActivityServiceTest v+0 ..A SF (jiminny@localhost]4 HS_local (jiminny@localhost]# console [PKob.# console leu)# console [slAGiNg)2026-05-07 14:21:15] local.INF0: [Hubspot] DEBUG Getting headers {MMi9 AYheaders'1"Vace". "Inu,ur May 2020 14.21.19 6Ml"Jn"Concent-lvoe". "apolicacionison charser=utt-on"Transfer-Encoding": ["chunked"]."CF-Ray":"9t80deb8dbo0dcsa-S0F"J,"CF-Cache-Status": L"DYNAMIC"J,"Strict-Transport-Secur1ty":"max-aqe=31536000* 1ncludeSUbDomains: preload"),acceot-encodino""access-control-allow-credentials": "false"."server-timing": ["hcid;desc=\"019e02d0-6fd8-7812-bdba-885b7ccb3ee3)",cfr;desc=|"9f80deb8e7c6dc3a-1AD\""J,"x-content-tvoe-ootions":"nosniff"."x-hubspot-correlation-id":["019e02d0-6fd8-7812-bdba-885b7ccb3ee3"],"Set-Cookie":["__cf_bm=StUrtdQgXVrik50pdqF6hZVYKhzTnQBidvMabeCtm0Y-1778163675-[IP_ADDRESS]-May-26 14:51:15 GMT; domain=.hubapi.com; Http0nly; Secure; SameSite=None"],"Report-To":["{"endnoints".("url\":"https:\\/\\/a.nel.cloudflare.com\\/report\\/v4?s=NYAlsVTP0fYm32qrSDjxYE4sd2RV("group\":\"cf-nel\".("max_age\":604800}"],"NEL":["{"success_fraction\":0.01,reportto. "cr-nel,"max agel ":604800}"].'Server": ["cloudflare"]}} {"correlation_1d":"95256555-ec98-4541-b9za-adta/Sboyeab","trace_10":"C/AD8565-905t-4604-9405-0e5b551e5545CascadeHubspot Rate Limit ReE. Deaicatea low-concurrency worker poolRun only 5 workers for analytics low so concurrency naturally matches the 5 RPS limitEbashpho artisan queue:work --queue=analvtics low --tries=0 --max-iobs= --processes=5Effect: 5 workers x 1 successful op/sec = 5/sec. No rate-limit storms because we're under the limit by design. Each worker rarely sees a 429.Trade-oris•Slower throughput (still b/sec ceiling = 5.5 hours tor 100k• Other iobs on this queue comnete with the bottlleneckWorks, but requires Horizon config changesF. Pre-flight cache check at job entry (mentioned earlier)Eliminates the DB.transaction churn.from.cache-hit cvcles.Doesnit chande.the throughnut.ceilina.but.reduces.cost.during.a.storm.to.almost.nothinaEasy win. Pairs with all other optionsG. Filter unmatchable activities betore dispatchIf manv activities have no email/ohone/name to match. dispatchina them is pure waste.• phpActivity::needsCrmMatch()›whereHas("participants', fn (Sq) = $q->whereNotNull('email")->orWhereNotNull('phone"))-›each(fn ($a) => MatchActivityCrmData::dispatch($a->id)):If 30% of the 100k are unmatchable (no contact info), removing them gets you to 70k - still over 9k cap, but closer.Effort: low if a querv-side filter is feasibleRecommended combinationFor maximum RoI1. A hatch endnoints) — 100x throuahnut. Solves the nroblem2. B (dispatch throttling) - defense in depth. prevents future storms.3. C (lookup caching) - reduces redundant API calls.4. F (pre-flight cache check) - eliminates DB churn during inevitable stormsWith A + B alone, the 100k → 9k problem becomes 100k → 100k completed in ~3-10 minutes, depending on caching efficiency.A is the leverage point. Without batch endpoints, you're brute-forcing through a 5 RPS hose. With them, the hose is 500 matches/sec.SummaryRace window: 5-10 wasted real APl calls per cache iil cycle, Bounded, ~15k calls wastedlin 30 min (vs 441k without cache). Acceptables can be tiahtened with aprobe lock if neededHubSpot-named middleware on multi-CRM iob: no functional issue for HubSpot. Salesforce/Pinedrive rate-limits ao throuch the wrond nath (treated as real100k → 9k bottleneck: not a rate-limiter problem, an architectural one. The fix is batch endpoints + dispatch throttling, not more aggressive retry logic.Ask anvthing (84D)+ « CodeClaude Onus 4.7 MediumWN Windsurf Teams101-20UTF.8io 4 spaces...
|
Slack
|
Huddle: @Petko Kashinski - Jiminny Inc - Slack
|
NULL
|
16748
|
|
16749
|
AI Notes: Off
loading…
Petko Kashinski is in the h AI Notes: Off
loading…
Petko Kashinski is in the huddle.: .
SlackFileEditViewGoHistoryWindowHelp# Support Daily - in 2 h 38 m100% [8• Mon 11 May 12:22:266д Huddle with Petko KashinskiAl Notes: Off vail&ГА4:55Leave...
|
Slack
|
Huddle: @Petko Kashinski - Jiminny Inc - Slack
|
NULL
|
16749
|