S255 Progress Report

Documentation for Sessions

S255 Progress Report — Platform Generation & Data Cleanup

For: Stakeholders, product owners, non-technical team members Date: March 23, 2026 Session: 255


What This Session Was About

GoGrab Space allows users to create digital platforms (called "universes") powered by AI. The AI generates the code for these platforms — things like player management, booking systems, inventory trackers, etc. This session focused on making that generation reliable and cleaning up when platforms are deleted.


Timeline of Work

Phase 1: Diagnosing Why Generated Platforms Were Broken

What we found: When the AI generated a new platform module (like "Player Management"), all the output files had the word undefined in their names — undefined-list.component.ts, undefined.model.ts. This made every generated platform completely unusable.

Why it mattered: This was the #1 blocker for platform generation. No module generated since this bug was introduced would have correct file names.

Root cause: The system that builds the initial file structure used one set of variable names (entityName), but the system that fills in those variables expected completely different names (entity, Entity). It's like labeling a mailbox "John" but addressing the letter to "Jonathan" — the letter never arrives.

What we did: Fixed both sides to speak the same language, and added safety nets so even if one side uses a slightly different name, the other side can still figure out what was meant.


Phase 2: Fixing the Live Preview

When a platform is generated, users can see a live preview in their browser — a working version of the app they're building. Several things were broken:

  1. Delete buttons crashed — Clicking "Delete" on a list item caused an error because the preview expected data in one format (a list of IDs) but received it in another format (a single ID). Fixed.

  2. Saving edits lost all data — When editing a record, the save operation sent data in the wrong format. The database expected the data wrapped in an envelope ({ data: {...} }), but the preview sent it unwrapped. All fields were silently dropped. Fixed.

  3. Preview showed a blank white page — The Angular framework that powers the preview couldn't load a critical component (the "compiler") because the CDN delivery service stripped it out. We added three backup methods to ensure it loads regardless. Fixed.

  4. Missing UI components — The AI was told to use toggle switches and data tables in its generated code, but the preview didn't know how to render them. We added those missing components. Fixed.

  5. Forms could submit invalid data — There was no check before saving. Now invalid forms are blocked before they reach the server. Fixed.


Phase 3: Cleaning Up Deleted Platforms

What we found: When a user deleted a universe (platform), the system removed the main record but left behind a trail of orphaned data:

Over time, this leaked data would accumulate — filling up GitLab quotas, leaving stale records in the database, and potentially causing conflicts when creating new platforms.

What we did: Added automatic cleanup that runs when a universe is deleted. Each cleanup step is independent — if one fails (e.g., GitLab is temporarily down), the others still complete. The system logs what it cleaned up for transparency.

What we intentionally left for later: The AI service (a separate backend system) also stores records about each generation. Cleaning those up requires communication between two independent systems. Rather than creating a brittle connection, we recommend implementing this as either an event-based notification or a scheduled background cleanup — a decision for a future session.


Summary of Changes

Area What Changed Business Impact
Code Generation File naming fixed Platforms can now be generated correctly
Live Preview Delete, Save, Forms fixed Users can test their platforms before deploying
Live Preview Missing components added Toggle fields and tables now render
Live Preview Compiler loading fixed Preview no longer shows blank white page
Data Cleanup 5 orphaned data types now cleaned up No more leaked data when universes are deleted
Data Cleanup Git repositories removed on delete GitLab quotas won't fill up with abandoned repos

What's Next

Must Do (Next Session)

  1. End-to-end generation test — The Vitto AI backend was unavailable during this session (database server unreachable). Once it's back, generate a complete platform and verify everything works from creation to preview.

  2. Cross-service cleanup — When a universe is deleted, the AI backend still retains its records. Need to implement a notification system so the AI backend can clean up its own data.

Should Do (Near Term)

  1. Automated contract checking — Build a tool that automatically verifies the AI generation rules and the preview components stay in sync. Currently this is a manual audit.

  2. Filter functionality — The preview shows filter UI but it doesn't actually filter. Needs implementation.

Nice to Have

  1. Advanced CSS support — The preview can handle basic styling (nesting, parent selectors) but not advanced features like variables and mixins. Would need a full CSS compiler if generated code uses these features.

Risk Assessment

Risk Likelihood Impact Mitigation
Hetzner MongoDB stays unreachable Medium High — blocks Vitto backend and full generation testing Monitor, escalate if persists
AI generates code with wrong import paths Low (fixed) Medium — preview shows compilation errors VFS-aware path fixer handles most cases
New prompt changes introduce stub mismatches Medium High — breaks preview for any module using new components Convention added: always update stubs when changing prompts
Universe deletion cascade fails partially Low Low — each step is independent, failures are logged Monitor logs for recurring failures