Skip to content

[AGENT] Add event performer links and automatic live lineup playback - #342

Merged
BASIC-BIT merged 22 commits into
mainfrom
codex/event-lineup-live
Sep 23, 2026
Merged

BASIC-BIT merged 22 commits into
mainfrom
codex/event-lineup-live

Conversation

@BASIC-BIT

Copy link
Copy Markdown
Owner

[AGENT] Community events now collect each performer's public links, including PC and Quest stream URLs, in one roster. Organizers can choose an event stream or a performer sequence and select among a performer's public live sources.

After Play, the event page follows the lineup by default. It prepares only the next slot near the scheduled transition, then advances after sustained source silence or playback failure. Healthy overtime continues, manual selection offers Return to live, and event or source edits invalidate playback.

Validation includes a captured browser-editor submission through real backend update/publication/discovery, rendering of that same returned event, and HTTP/hosted/stdio MCP serialization. Desktop/mobile editor and roster checks passed16/16. Controlled Chromium/Firefox media tests cover handoffs, overtime, cancellation and a two-connection limit. A reproduced mpegts cancellation rejection is handled by a shared loader with explicit resource ownership.

Browser tests use guarded query transport and loopback or intercepted media. Native hidden-window/OS resume, Safari/iOS and live-provider compatibility remain unverified. Detailed local evidence is in docs/engineering/event-lineup-verification.md. Merge and deployment are separate.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 16, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-23T05:36:21.126917Z 94a88e6 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@greptile-apps

greptile-apps Bot commented Sep 16, 2026

Copy link
Copy Markdown

Greptile Summary

This PR adds visibility-filtered performer links and stream choices to event projections and API/MCP contracts, adds organizer authoring for event-stream versus performer-sequence modes, and implements browser-local lineup playback with source preparation, observed silence/failure handoffs, retries, and reactive invalidation.

  • Extends event and slot persistence, public schemas, OpenAPI, and MCP serialization.
  • Adds roster link/copy presentation and event editor stream selection.
  • Adds a bounded current/next MPEG-TS playback runtime and shared fetch transport.
  • Adds extensive unit, backend, browser, race, transport, and visual coverage.

Confidence Score: 3/5

The PR is not yet safe to merge because reactive source edits can resume playback without the required viewer action, and a later simultaneous-start pair can stall otherwise valid earlier lineup transitions.

Two lifecycle and scheduling defects remain: source invalidation does not cancel a pending Play continuation, and next-slot selection applies schedule ambiguity globally instead of at the relevant transition.

Files Needing Attention: apps/web/src/lib/event-lineup-runtime.ts, apps/web/src/lib/event-lineup-session.ts

Important Files Changed

Filename Overview
apps/web/src/lib/event-lineup-runtime.ts Implements lineup session ownership, retries, source reconciliation, and automatic handoff; a pending Play can survive source invalidation.
apps/web/src/lib/event-lineup-session.ts Reconciles slot identity and identifies the next slot; its global ordering check can stall valid earlier transitions.
apps/web/src/lib/event-playback.ts Encapsulates schedule joining, preparation eligibility, and evidence-qualified handoff decisions.
apps/web/src/lib/vrcdn-fetch-loader.ts Adds an abort-aware custom MPEG-TS fetch loader with explicit reader and cancellation ownership.
convex/_eventPublic.ts Projects discovery-visible performer links, canonical stream choices, stable playback keys, and effective watch mode.
convex/events.ts Persists watch mode and selected stream IDs while validating new choices against public performer streams.
apps/web/src/app/events/event-editor-form.tsx Adds watch-mode and per-slot stream controls with unavailable-choice preservation and performer-change clearing.
apps/web/src/app/_components/event-public-page.tsx Adds reactive public-event updates and roster link presentation to schedule and participant sections.
packages/api-contracts/src/schemas.ts Replaces unknown event roster structures with typed participant, slot, stream, world, and watch-mode schemas.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Published event projection] --> B{Watch mode}
  B -->|Event stream| C[Existing event stream player]
  B -->|Performer sequence| D[Viewer presses Play]
  D --> E[Select scheduled slot]
  E --> F[Current performer source]
  F --> G[Prepare immediate next source near boundary]
  G --> H{Current source evidence}
  H -->|Healthy or brief interruption| F
  H -->|Sustained silence or failure| I{Next source ready?}
  I -->|No| F
  I -->|Yes| J[Release current and promote next]
  J --> F
  K[Event or source projection update] --> L[Reconcile or invalidate playback]
  L --> F
Loading
Prompt To Fix All With AI
### Issue 1
apps/web/src/lib/event-lineup-runtime.ts:58-62
**Revoked source restarts playback**

If a source changes while `play()` is waiting for `AudioContext.resume()`, this update pauses the session and releases the old source but leaves the pending play request valid. When the resume finishes, that stale request clears the paused state and can connect the replacement automatically, even though a revoked source is supposed to require another viewer action. Invalidate the pending play request when reconciliation fails.

### Issue 2
apps/web/src/lib/event-lineup-session.ts:16
**Later ambiguity stalls playback**

This check rejects traversal when any pair anywhere in the schedule has equal or descending start times. Equal starts are valid and retained in the public projection, so an ambiguous pair late in an event prevents an established earlier slot from advancing to its otherwise unambiguous next performer. Limit this check to the transition currently being considered so playback only stops when it reaches the ambiguous part of the lineup.

```suggestion
  if (slots[index + 1]?.startAt <= current.startAt) return undefined;
```

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Reviews (1): Last reviewed commit: "fix(events): preserve overlap handoffs a..." | Re-trigger Greptile

Comment thread apps/web/src/lib/event-lineup-runtime.ts
Comment thread apps/web/src/lib/event-lineup-session.ts Outdated
@github-actions

github-actions Bot commented Sep 16, 2026

Copy link
Copy Markdown

[AGENT]

Claude Review

Claude review for commit 77da1a1752eb350498a98cb0bdb20c71fd409499 is unavailable because the pull request was merged.

This is not a current review or approval.

@github-actions

github-actions Bot commented Sep 16, 2026

Copy link
Copy Markdown

PR verification report

All configured preview and verification checks passed.

Check Result Evidence
Mutation data flow PASSED Open artifact
Hosted data flow PASSED Open artifact
Public route screenshots PASSED Open artifact
Public route image diff PASSED Open artifact
Storybook screenshots PASSED Open artifact
Storybook image diff PASSED Open artifact
Changed visual baselines (8)
desktop-chromium / event-lineup-editor
desktop-chromium / event-lineup-editor
desktop-chromium / event-lineup-roster
desktop-chromium / event-lineup-roster
desktop-chromium / event-profile
desktop-chromium / event-profile
desktop-chromium / event-watch-surface
desktop-chromium / event-watch-surface
mobile-chromium / event-lineup-editor
mobile-chromium / event-lineup-editor
mobile-chromium / event-lineup-roster
mobile-chromium / event-lineup-roster
mobile-chromium / event-profile
mobile-chromium / event-profile
mobile-chromium / event-watch-surface
mobile-chromium / event-watch-surface

Updated from Baseline Checks run 35824727357, attempt 1 for 77da1a1. This comment is updated in place.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: da35850272

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/web/src/app/_components/event-public-page.tsx
Comment thread apps/web/src/app/_components/event-public-page.tsx
Comment thread apps/web/src/app/_components/event-live-watch.tsx
Comment thread apps/web/src/lib/event-lineup-runtime.ts
Comment thread convex/events.ts
Comment thread apps/web/src/lib/event-lineup-runtime.ts

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 34c6fe222d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/web/src/lib/event-lineup-session.ts

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b04aaf8756

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/web/src/lib/event-lineup-runtime.ts Outdated
Comment thread apps/web/src/lib/event-lineup-runtime.ts
Comment thread apps/web/src/lib/event-lineup-runtime.ts
@BASIC-BIT
BASIC-BIT merged commit 34e1760 into main Sep 23, 2026
21 checks passed
@BASIC-BIT
BASIC-BIT deleted the codex/event-lineup-live branch September 23, 2026 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant