Skip to content

Add event watch and media surfaces#153

Merged
BASIC-BIT merged 5 commits into
mainfrom
event-watch-surface-controls
Jun 25, 2026
Merged

Add event watch and media surfaces#153
BASIC-BIT merged 5 commits into
mainfrom
event-watch-surface-controls

Conversation

@BASIC-BIT

@BASIC-BIT BASIC-BIT commented Jun 23, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add event-level watchSurfaceEnabled opt-in so promoted watch surfaces default off while normal media links stay visible.
  • Add event banner and thumbnail image slots with poster fallbacks across public projection, search, world-event previews, and the editor.
  • Make public event cards/pages more image-forward with host, world, and lineup images while respecting discovery visibility, and document the shared media-slot model.

Closes #139.
Closes #133.

Validation

Local backend/web/docs checks passed. Desktop and mobile visual smoke plus updated public route snapshots passed for the event-related surfaces.

@vercel

vercel Bot commented Jun 23, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
vr-dex-web Ready Ready Preview, Comment Jun 24, 2026 6:59am

Request Review

@github-actions

github-actions Bot commented Jun 23, 2026

Copy link
Copy Markdown

Storybook Image Diff

Outcome: success
Run: https://github.com/BASIC-BIT/VRDex/actions/runs/28081097574
Artifact: storybook-image-diff

Changed Storybook baselines: none in this PR.

This check compares design-system component screenshots against committed baselines. Inline images show only added or modified Storybook baseline PNGs.

@github-actions

github-actions Bot commented Jun 23, 2026

Copy link
Copy Markdown

Storybook Component Screenshot Preview

Outcome: success
Run: https://github.com/BASIC-BIT/VRDex/actions/runs/28081097574
Artifact: storybook-component-preview

Screenshots: primitive component stories captured on desktop and mobile.

This lane is separate from full-route Playwright screenshots and focuses on design-system component regressions.

@github-actions

github-actions Bot commented Jun 23, 2026

Copy link
Copy Markdown

Playwright Hosted Data-Flow

Outcome: success
Target: https://staging.vrdex.net
Hosted extended profile flow: enabled
Hosted auth helpers: enabled
Hosted adapter helpers: enabled
Run: https://github.com/BASIC-BIT/VRDex/actions/runs/28081097574
Artifact: playwright-hosted-data-flow

This optional check runs the mutation-backed profile flow against a configured hosted dev/staging target with isolated E2E test data.

@github-actions

github-actions Bot commented Jun 23, 2026

Copy link
Copy Markdown

Playwright Data-Flow Preview

Outcome: success
Run: https://github.com/BASIC-BIT/VRDex/actions/runs/28081097574
Artifact: playwright-data-flow

Captured flow:

  • test-gated profile submission form
  • gated helper rejection without the Playwright token
  • Convex profile creation
  • submission success state
  • public profile page readback
  • discovery search readback

Artifacts include screenshots, traces, and recorded video for the flow run.

@github-actions

github-actions Bot commented Jun 23, 2026

Copy link
Copy Markdown

Playwright Image Diff

Outcome: success
Run: https://github.com/BASIC-BIT/VRDex/actions/runs/28081097574
Artifact: playwright-image-diff

Changed screenshot baselines: 8

desktop-chromium / community-profile

desktop-chromium community-profile

desktop-chromium / event-profile

desktop-chromium event-profile

desktop-chromium / event-watch-surface

desktop-chromium event-watch-surface

desktop-chromium / person-profile

desktop-chromium person-profile

mobile-chromium / community-profile

mobile-chromium community-profile

mobile-chromium / event-profile

mobile-chromium event-profile

mobile-chromium / event-watch-surface

mobile-chromium event-watch-surface

mobile-chromium / person-profile

mobile-chromium person-profile

This check compares public route screenshots against committed baselines. Inline images show only added or modified baseline PNGs.

@github-actions

github-actions Bot commented Jun 23, 2026

Copy link
Copy Markdown

Playwright Public Screenshot Preview

Outcome: success
Run: https://github.com/BASIC-BIT/VRDex/actions/runs/28081097574
Artifact: playwright-public-preview

Screenshots: all public route checks passed on desktop and mobile.

Full screenshot set is available in the artifact. Pixel diff baselines are handled by the separate Playwright Image Diff check.

@github-actions

github-actions Bot commented Jun 23, 2026

Copy link
Copy Markdown

@BASIC-BIT BASIC-BIT changed the title Add event watch-surface opt-in Add event watch and media surfaces Jun 23, 2026
@BASIC-BIT BASIC-BIT marked this pull request as ready for review June 24, 2026 06:38

@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: fd262e6061

ℹ️ 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/events/event-editor-form.tsx Outdated
@greptile-apps

greptile-apps Bot commented Jun 24, 2026

Copy link
Copy Markdown

Greptile Summary

This PR adds three new event fields — bannerImageUrl, thumbnailImageUrl, and watchSurfaceEnabled — wiring them through schema, mutations, public projections, search documents, and the editor form. It also surfaces entity images (community, world, participant, slot) on the public event page while respecting each profile's discovery-surface visibility settings.

  • Image slots: bannerImageUrl drives the event-page hero; thumbnailImageUrl drives event-card and search thumbnails; both fall back through posterImageUrl and each other so existing events remain presentable without migration.
  • Watch-surface gate: watchSurfaceEnabled defaults to false, keeping the promoted player hidden until an organizer explicitly opts in — media links continue to appear in the normal links section regardless.
  • Entity images: publicProfileCardImage picks avatarImageUrl then bannerImageUrl at the "discovery" visibility surface, so images on event cards cannot leak content a profile owner has restricted to their own profile page.

Confidence Score: 4/5

Safe to merge — new fields are all additive and optional, old events degrade gracefully through the fallback chains, and the watch-surface gate defaults off so no existing event accidentally gains an exposed player.

The implementation is clean and well-tested. Profile visibility gating on discovery surfaces is correctly applied. The one thing worth a follow-up is firstSafeHttpsUrl being copy-pasted verbatim into three separate Convex modules; no behavioral difference today, but any future tweak to the validation logic would need to land in all three places.

convex/_eventPublic.ts, convex/_searchDocuments.ts, and convex/_worldEvents.ts each carry an identical private helper that belongs in the shared _publicFields.ts utility module.

Important Files Changed

Filename Overview
convex/schema.ts Adds optional bannerImageUrl, thumbnailImageUrl, and watchSurfaceEnabled fields to the events table schema; all backward-compatible as optional.
convex/_eventInputs.ts Sanitizes the three new event fields; watchSurfaceEnabled correctly defaults to false via ?? false, and both URL fields pass through optionalHttpsUrl validation.
convex/_eventPublic.ts Adds banner/thumbnail fallback logic, community image projection, and per-profile discovery-visibility gating for participant/slot images; firstSafeHttpsUrl is defined here but duplicated in two other modules.
convex/_searchDocuments.ts Switches the search-document image from posterImageUrl to a thumbnailImageUrl → poster → banner fallback chain; duplicates firstSafeHttpsUrl from _eventPublic.ts.
convex/_worldEvents.ts Adds bannerImageUrl and thumbnailImageUrl with consistent fallback ordering to the world-event preview type; also duplicates firstSafeHttpsUrl.
convex/events.ts Threads the three new fields through createCommunityEvent and updateCommunityEvent mutations cleanly, including the v.optional validator declarations.
apps/web/src/app/_components/event-public-page.tsx Separates banner (hero) and thumbnail (card) uses, adds EntityImage component with initials fallback, and threads watchSurfaceEnabled to the watch-surface gate.
apps/web/src/app/_components/event-watch-surface.tsx Adds an enabled prop that short-circuits the component before any time-window check, correctly defaulting the watch surface to hidden until explicitly opted in.
apps/web/src/app/events/event-editor-form.tsx Adds banner and thumbnail URL fields plus a watchSurfaceEnabled checkbox; checkbox submission correctly handles unchecked state via === "on" comparison.
apps/web/src/app/api/e2e/fixture-assets/[assetId]/route.ts Adds banner and thumbnail fixture SVG assets with a showText flag that suppresses text for purely visual placeholder images; existing assets are unaffected.
apps/web/src/convex/playwright-fixtures.ts Populates bannerImageUrl, thumbnailImageUrl, watchSurfaceEnabled, and entity image fields in e2e fixtures to drive the new visual surfaces.
tests/backend/event-foundation.test.ts Adds thorough coverage for the new fields: fallback chains, watchSurfaceEnabled opt-in default, visibility-gated profile images, and the fixture projection round-trip.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    subgraph Image Slots ["Event Image Slot Resolution"]
        B["bannerImageUrl\n(hero)"] -->|"missing"| BP["posterImageUrl"]
        T["thumbnailImageUrl\n(card / search)"] -->|"missing"| TP["posterImageUrl"]
        TP -->|"missing"| TB["bannerImageUrl"]
    end

    subgraph ProfileImages ["Profile Card Image (discovery surface)"]
        PA["avatarImageUrl"] -->|"unlisted or private"| PB["bannerImageUrl"]
        PB -->|"unlisted or private"| PNone["(none)"]
    end

    subgraph WatchGate ["Watch Surface Gate"]
        WE{"watchSurfaceEnabled\n(default: false)"} -->|"true"| WW{"In schedule\nwindow?"}
        WE -->|"false"| WNull["Surface hidden\nLinks still visible"]
        WW -->|"yes + primary link"| WShow["Render watch surface"]
        WW -->|"no"| WNull
    end
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    subgraph Image Slots ["Event Image Slot Resolution"]
        B["bannerImageUrl\n(hero)"] -->|"missing"| BP["posterImageUrl"]
        T["thumbnailImageUrl\n(card / search)"] -->|"missing"| TP["posterImageUrl"]
        TP -->|"missing"| TB["bannerImageUrl"]
    end

    subgraph ProfileImages ["Profile Card Image (discovery surface)"]
        PA["avatarImageUrl"] -->|"unlisted or private"| PB["bannerImageUrl"]
        PB -->|"unlisted or private"| PNone["(none)"]
    end

    subgraph WatchGate ["Watch Surface Gate"]
        WE{"watchSurfaceEnabled\n(default: false)"} -->|"true"| WW{"In schedule\nwindow?"}
        WE -->|"false"| WNull["Surface hidden\nLinks still visible"]
        WW -->|"yes + primary link"| WShow["Render watch surface"]
        WW -->|"no"| WNull
    end
Loading
Prompt To Fix All With AI
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 1
convex/_searchDocuments.ts:369-381
**`firstSafeHttpsUrl` defined in three places**

`firstSafeHttpsUrl` is copy-pasted verbatim into `_eventPublic.ts`, `_searchDocuments.ts`, and `_worldEvents.ts`. Since `safeHttpsUrl` already lives in `_publicFields.ts`, this helper would be a natural peer export there, keeping all three callers in sync if the validation logic ever needs to change.

Reviews (1): Last reviewed commit: "Update public route screenshot baselines" | Re-trigger Greptile

Comment thread convex/_searchDocuments.ts Outdated
@BASIC-BIT BASIC-BIT merged commit 0321d9f into main Jun 25, 2026
22 checks passed
@BASIC-BIT BASIC-BIT deleted the event-watch-surface-controls branch June 25, 2026 13:14
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.

Add event watch-surface controls and defaults Define shared media slots and image-forward event cards

1 participant