Skip to content

feat(career): bundle dive bar venue pack#927

Merged
byrongamatos merged 1 commit into
mainfrom
fix/bundle-career-bar-pack
Jul 12, 2026
Merged

feat(career): bundle dive bar venue pack#927
byrongamatos merged 1 commit into
mainfrom
fix/bundle-career-bar-pack

Conversation

@byrongamatos

@byrongamatos byrongamatos commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Summary

  • bundle the Dive Bar venue pack under plugins/career/venue-packs/bar so a normal checkout/build includes the videos
  • serve bundled packs as installed venue packs, with downloaded packs still overriding bundled assets
  • hide Remove pack for bundled venue assets and pin coverage for the intro video + ambience

Testing

  • pytest tests/plugins/career/test_routes.py
  • node --test tests/js/career_plugin.test.js
  • npm run lint

Summary by CodeRabbit

  • New Features

    • Added support for bundled venue packs alongside downloaded packs.
    • Bundled packs are available automatically and take precedence when no downloaded version exists.
    • Added the bundled Bar venue pack, including intro media, loops, and stinger assets.
    • Venue status now indicates whether a pack is bundled.
  • Bug Fixes

    • Improved venue asset serving and path validation.
    • Bundled venue packs can no longer be removed through the interface.

@coderabbitai

coderabbitai Bot commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Career venue packs now support plugin-bundled assets alongside downloaded packs. Downloaded packs take precedence, bundled packs are validated and reported through the state API, asset serving supports both locations, and the UI prevents removing bundled packs.

Changes

Career bundled venue packs

Layer / File(s) Summary
Pack resolution and serving
plugins/career/routes.py, tests/plugins/career/test_routes.py
Routes track and validate bundled packs, prefer downloaded packs, expose bundled state, serve selected assets, and enforce path containment.
Bundled pack assets and UI
plugins/career/venue-packs/bar/manifest.json, plugins/career/screen.js, tests/js/career_plugin.test.js
Adds the bundled bar manifest and asset checks, and hides “Remove pack” for bundled venues.
Downloaded pack regression coverage
tests/plugins/career/test_routes.py
Retains downloaded-pack serving, traversal protection, installation/deletion, and unpublished-download coverage using the club venue.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant VenueCard
  participant CareerRoutes
  participant PackDirectory
  VenueCard->>CareerRoutes: Request career state
  CareerRoutes->>PackDirectory: Select downloaded or bundled pack
  PackDirectory-->>CareerRoutes: Return manifest and asset path
  VenueCard->>CareerRoutes: Request venue asset
  CareerRoutes->>PackDirectory: Resolve and constrain asset path
  PackDirectory-->>VenueCard: Serve bundled or downloaded asset
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: bundling the Dive Bar venue pack in the career plugin.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/bundle-career-bar-pack

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
tests/plugins/career/test_routes.py (1)

90-105: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick win

Cover downloaded-over-bundled precedence.

These tests cover bundled-only and downloaded-only packs, but not the key case where both exist. Install a local bar override, assert it is served, delete it, then assert the bundled manifest/media are served again.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/plugins/career/test_routes.py` around lines 90 - 105, Extend
test_bundled_bar_pack_is_installed_and_served to create and install a local bar
override, then assert the override manifest and media are served in preference
to the bundled pack. Delete the local override and repeat the manifest/media
assertions to verify serving falls back to the bundled assets.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@plugins/career/screen.js`:
- Around line 92-97: Update the removal-control logic in the action markup
around the remove variable to use an explicit flag indicating that the selected
pack source is a downloaded override, rather than relying solely on v.bundled.
Keep the delete button visible for downloaded overrides so users can restore the
bundled pack, and hide it only when the installation is bundled-only; propagate
the source flag from routes.py’s pack-selection response.

---

Nitpick comments:
In `@tests/plugins/career/test_routes.py`:
- Around line 90-105: Extend test_bundled_bar_pack_is_installed_and_served to
create and install a local bar override, then assert the override manifest and
media are served in preference to the bundled pack. Delete the local override
and repeat the manifest/media assertions to verify serving falls back to the
bundled assets.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 06cc50e1-0874-4e5b-a4b4-60de2ed0b534

📥 Commits

Reviewing files that changed from the base of the PR and between ea0ca94 and 68e8359.

⛔ Files ignored due to path filters (8)
  • plugins/career/venue-packs/bar/bar-ambience.mp3 is excluded by !**/*.mp3
  • plugins/career/venue-packs/bar/bored.mp4 is excluded by !**/*.mp4
  • plugins/career/venue-packs/bar/cheer.mp4 is excluded by !**/*.mp4
  • plugins/career/venue-packs/bar/clap.mp4 is excluded by !**/*.mp4
  • plugins/career/venue-packs/bar/ecstatic.mp4 is excluded by !**/*.mp4
  • plugins/career/venue-packs/bar/engaged.mp4 is excluded by !**/*.mp4
  • plugins/career/venue-packs/bar/intro.mp4 is excluded by !**/*.mp4
  • plugins/career/venue-packs/bar/neutral.mp4 is excluded by !**/*.mp4
📒 Files selected for processing (5)
  • plugins/career/routes.py
  • plugins/career/screen.js
  • plugins/career/venue-packs/bar/manifest.json
  • tests/js/career_plugin.test.js
  • tests/plugins/career/test_routes.py

Comment thread plugins/career/screen.js
Comment on lines +92 to +97
const remove = v.bundled
? ''
: `<button data-career-delete="${esc(v.id)}" class="career-btn career-btn-ghost">Remove pack</button>`;
action = `<div class="flex items-center gap-2">
${main}
<button data-career-delete="${esc(v.id)}" class="career-btn career-btn-ghost">Remove pack</button>
${remove}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift

Keep removal available for downloaded overrides.

routes.py sets bundled whenever the bundled manifest exists, even when _pack_dir() is currently selecting a downloaded override. This hides the delete button after overriding a bundled venue, leaving no UI path to restore the bundled pack. Expose a downloaded/selected-source flag and hide removal only for bundled-only installations.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/career/screen.js` around lines 92 - 97, Update the removal-control
logic in the action markup around the remove variable to use an explicit flag
indicating that the selected pack source is a downloaded override, rather than
relying solely on v.bundled. Keep the delete button visible for downloaded
overrides so users can restore the bundled pack, and hide it only when the
installation is bundled-only; propagate the source flag from routes.py’s
pack-selection response.

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