Skip to content

WIP: Populate linked venue on the gig feed (gig↔venue linkage)#245

Draft
JoshuaVSherman wants to merge 2 commits into
devfrom
claude/244-gig-venue-feed-populate
Draft

WIP: Populate linked venue on the gig feed (gig↔venue linkage)#245
JoshuaVSherman wants to merge 2 commits into
devfrom
claude/244-gig-venue-feed-populate

Conversation

@JoshuaVSherman

Copy link
Copy Markdown
Contributor

Summary

WIP — rescued from orphaned working-tree changes; not finished. Parks the gig↔venue feed-populate work so it's tracked and durable (issue #244).

  • Add a venueId (ObjectId, ref: 'Venue') field to the gig schema, plus a minimal Venue model so the ref resolves.
  • Make gig find / findSort .populate() the linked venue's name/city/usState/website, so the SocketCluster gig feed carries live venue details.
  • Bump version to 3.0.9.

Known-incomplete (remaining on #244, for the Sonnet lane):

  • Lint is RED: 2 max-len errors in gig-facade.ts (the WIP's single-line try/catch bodies exceed 150 chars). Full npm test fails at eslint until fixed.
  • Venue schema is missing a street address field that JaM#1242 (Gigs Location column) needs — add it and include it in the populate.
  • No tests added for the new find/findSort overrides.
  • Verify JaM#1220's render-time venue link actually consumes this feed shape in prod.

Closes #244

How to test locally

This is WIP — the suite is not fully green yet (lint red). Vitest unit tests pass; eslint does not.

Run the unit tests:

npm run test:unit

Expect: all unit tests pass (they do — see Test evidence).

Run the full gate (currently RED, by design until the lint fix on #244):

npm test

Expect: eslint reports 2 max-len errors in src/model/gig/gig-facade.ts.

Exercise the change (once finished): with a gig whose venueId points at a venues document, the gig model's find / findSort now return that gig with venueId populated as a subdocument carrying name, city, usState, website — instead of a bare ObjectId. Confirm by loading a linked gig through the gig controller and asserting the populated venue fields are present on the response.

Test evidence

 RUN  v4.1.9 /home/joshua/WebJamApps/WebJamSocketCluster

(node:27726) [MONGOOSE] Warning: mongoose: the `new` option for `findOneAndUpdate()` and `findOneAndReplace()` is deprecated. Use `returnDocument: 'after'` instead.
(Use `node --trace-warnings ...` to show where the warning was created)

 Test Files  9 passed (9)
      Tests  81 passed (81)
   Start at  04:22:49
   Duration  34.72s (transform 974ms, setup 0ms, import 2.90s, tests 38.12s, environment 1ms)

🤖 Work by Claude Code — Opus 4.8

JoshuaVSherman and others added 2 commits July 22, 2026 04:12
Preserves working-tree changes that were left uncommitted on `dev`
since 2026-07-17 (no branch/issue/PR). Adds a `venueId` ObjectId ref to
the gig schema plus a minimal Venue model, and makes gig find/findSort
populate the linked venue's name/city/usState/website so the SocketCluster
gig feed can carry venue details.

Relates to the gig↔venue linkage effort (JaM#1220 render-time venue link,
JaM#1242 Gigs Location column). INCOMPLETE for the current design: the
venue schema here lacks a street `address` field that JaM#1242 needs.
Not reviewed, not tested, no issue yet — parked pending decision.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@JoshuaVSherman JoshuaVSherman changed the title Populate linked venue on the gig feed (gig↔venue linkage) WIP: Populate linked venue on the gig feed (gig↔venue linkage) Jul 22, 2026
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.

Populate linked venue on the gig feed (gig↔venue linkage)

1 participant