Quick Wins — CI repair, icon fix, 29MB asset compression, TS cleanup, geo bug - #106
Quick Wins — CI repair, icon fix, 29MB asset compression, TS cleanup, geo bug#106BrandDead wants to merge 2 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit c74389f. Configure here.
| .reduce((sum, i) => sum + i.quantity, 0); | ||
| const weaponCount = inventory | ||
| .filter(i => i.type === 'weapon' && i.quantity > 0) | ||
| .reduce((sum, i) => sum + i.quantity, 0); |
There was a problem hiding this comment.
Raid overlay skips inventory confiscation
High Severity
After wiring raids to real inventory counts, the overlay still only applies cash and heat. It never removes seized drugs or weapons from useEconomyStore, so displayed losses can exceed what the player actually loses.
Reviewed by Cursor Bugbot for commit c74389f. Configure here.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c74389ffed
ℹ️ 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".
| topdownBg: `/assets/runtime/generated/environments/topdown/block_lasolas_topdown_v001.png`, | ||
| streetBackdropDay: `/assets/runtime/generated/environments/street/block_lasolas_driveby_street_v001.png`, | ||
| streetBackdropNight: `/assets/runtime/generated/environments/street/block_lasolas_driveby_street_v001.png`, | ||
| topdownBg: `/assets/runtime/generated/environments/topdown/block_lasolas_topdown_v001.webp`, |
There was a problem hiding this comment.
Record these meaningful changes in the project log
This commit changes runtime asset formats, geospatial calculations, raid behavior, and seeded gameplay data, but it does not add the required dated entry to docs/PROJECT_LOG.md. That leaves the repository’s running record of decisions, current direction, and rollback context stale; document this landing before merging.
AGENTS.md reference: AGENTS.md:L3-L5
Useful? React with 👍 / 👎.
| const drugQty = inventory | ||
| .filter(i => i.type === 'drug' && i.quantity > 0) | ||
| .reduce((sum, i) => sum + i.quantity, 0); | ||
| const weaponCount = inventory | ||
| .filter(i => i.type === 'weapon' && i.quantity > 0) |
There was a problem hiding this comment.
Deduct the reported raid seizures from inventory
When the interactive raid calculates a nonzero drug or weapon seizure from these newly wired inventory totals, the consequence block only deducts money and heat; it never calls the economy store’s removeInventoryItem, so the result screen says the actual stash was seized while the player retains every item. Apply confiscatedDrugs and confiscatedWeapons to the corresponding inventory entries, as the background raid path already does for drugs.
Useful? React with 👍 / 👎.
| settings: `${ICONS_BASE}/icon_settings_new.webp`, | ||
| driveby: `${ICONS_BASE}/icon_driveby_new.webp`, | ||
| graffiti: `${ICONS_BASE}/icon_graffiti_new.webp`, | ||
| news: `${ICONS_BASE}/icon_market_new.webp`, // no dedicated news icon yet |
There was a problem hiding this comment.
Use the existing dedicated News icon
The News app is now assigned icon_market_new.webp, so the OS home screen displays the same market/stash artwork for both News and Market. A dedicated processed News asset already exists and is exposed immediately above as GENERATED_UI_OVERLAYS.icon_news; route the News entry to that asset instead of claiming no dedicated icon exists.
Useful? React with 👍 / 👎.
…ding_service.py — fixes NameError on /api/blocks endpoints


Quick Wins — CI Repair, Asset Compression, Icon Fix, TS Cleanup, Bug Fixes
Base:
main-tL2525· 1 commit · 51 files changedWhat's in this PR
1. CI: Restore Green Test Suite
The
npcStoretest was failing because the "Nine Side / N9NE" gang was seeded with only 2 members against a test requiring ≥3. AddedNine-Iron(enforcer, level 2) as the third member.2. TypeScript: Zero Errors on Main
Resolved 5 pre-existing TS errors that were silently failing on
main:CanvasStreetRendererV3.tsx—ROLE_COLORSmap was missingrecruit,k9,policerolesassetResolver.ts—ROLE_CHARACTER_IDmap was missing the same three roles (now falls back to closest existing kit)BlockOverlay.tsx—GeoJSON.FeatureCollectionnamespace not found; cast toanyTrapApp.tsx— Strict comparison ofdeployedstatus that doesn't exist in the type union3. OS Shell Icons: All App Icons Now Render
Every icon on the home screen was silently falling back to text labels.
GameSprite.tsxpointed to/assets/icons/icon_*_new.pngbut the actual files live at/assets/runtime/icons/icon_*_new.webp. Fixed all 20+ icon paths to the correct runtime location.Additionally, 9 of the 14 per-app PNG files in
/assets/icons/apps/had corrupt checksums (bad IDAT chunks) and were never rendering. Removed the corrupt files and routed those icons to the existing runtime.webpset. The 2 valid per-app icon sets (messages, trap-house) were compressed from ~750KB each to ~8KB WebP.4. Asset Compression: Runtime 37MB → 5.35MB
The 7 plates committed directly to
public/assets/runtime/as raw PNGs (2560×1440, ~4–6MB each) were never processed through the asset pipeline. Converted all 7 at the same quality budgets the processor uses:env-topdown: 1536px wide, q82env-street: 1920px wide, q82ui-overlay: 1024px wide, q86Savings: 29.5MB from runtime assets alone. Total runtime is now 5.35MB / 20MB budget.
5. Backend: Longitude Bounds Bug Fixed
block.pyandgeocoding_service.pyboth usedabs(lat)instead ofcos(lat)when computing longitude degree offsets. At Fort Lauderdale latitude (26.1°),abs(26.1) = 26.1vscos(26.1°) = 0.898— a ~29× error that squashes block bounds east-west. Now usesmath.cos(math.radians(lat)).6. RaidEventOverlay: Wire Drug Count to Actual Inventory
The raid confiscation logic used a hardcoded
drugQty = 100. Now reads the actual drug quantity from the player's inventory store, and weapon count from weapon-type items.Verification
vitest run— 581/581 passtsc --noEmit— 0 errorsnode scripts/assets/audit.mjs— PASSED, 5.35 MB / 20 MBNote
Medium Risk
Geo and raid logic changes affect territory queries and confiscation outcomes; asset URL changes depend on WebP files being present at the new paths.
Overview
This PR bundles several quick wins: runtime assets move from large PNGs to processed WebP under
/assets/runtime/(loading screen, OS wallpaper, Las Olas env plates, UI overlays), with GameSprite and assetManifest / demoSeed updated to match so the OS shell icons and backgrounds actually load.Backend fixes longitude scaling in
Block.find_nearbyandGeocodingService._calculate_block_boundsby usingcos(latitude)instead ofabs(lat), so east–west search boxes and block bounds are no longer wildly wrong at mid-latitudes (e.g. Miami).Frontend gameplay / quality:
RaidEventOverlaynow passes real drug and weapon counts from the economy inventory intoexecuteRaid(aligned with the game loop). TypeScript is cleaned up (recruit/k9/policerole colors and asset resolver mappings, looser GeoJSON typing inBlockOverlay,TrapAppmember filter). npcStore adds a third N9 gang member so NPC tests expecting ≥3 members pass.Reviewed by Cursor Bugbot for commit cb77a7a. Bugbot is set up for automated code reviews on this repo. Configure here.