Edit bldg chat command & prod-split#39
Closed
dibaunaumh wants to merge 129 commits into
Closed
Conversation
…address. Also reduced distance from speaker 10->2
… dev using downloaded image
…ootprint. this is tech-debt - proper solution is to remove chat to its own storage & pull just the latest
…ge (not the cleanest, but have to get this working). Also added an endpoint to get a bldg by the bldg_url
Multi tenant batteries
… how redis is used for transient data). Not sure it's the right approach though, because I want to keep the principle of , so not store data in a db hidden from the user, but rather store everything - including staging data - in bldgs, which the user can see
…staging-data Expend usage of graph db for staging data
Container bldgs now have a visual_language jsonb column that maps semantic entity types to 3d_object names and floor height metadata. This decouples what a bldg represents (entity_type) from how it looks when rendered. - New migration adding visual_language column to bldgs table - Default visual language with all 40 built-in entity type mappings - Refactored add_composite_bldg_metadata from 10+ hardcoded clauses to a single lookup against the visual language map - BldgView returns visual_language as JSON-encoded string - test.exs now reads DB_USER from env (consistent with dev.exs) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Added Buildings.is_authorized_owner?/2 that walks up the container chain to check if the given email owns the building or any of its ancestors. This means if you own a building, you can create, move, connect, and manage everything nested inside it. Replaced all 6 inline Enum.find ownership checks in BldgCommandExecutor with the new function. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The bldg_url hierarchy alternates between buildings and floors (e.g., g/udi-bauman/l0/goal_name). When walking up to check ancestor ownership, floor URLs like "g/udi-bauman/l0" aren't in the bldgs table, so the lookup returned nil and stopped the walk. Now continues walking up past floors until it reaches an actual building or the root. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace non-semantic entity_types (blue-lot, green-lot, problem) with semantic names (milestone, enabler, goal) while preserving the same 3D visual objects. Migration updates existing DB records and adds new keys to stored visual_language maps on containers. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Visual language
Replace 20-second HTTP polling with real-time Phoenix Channel push. Server: - Add FloorChannel (floor:* topics) with join, request_scan, and serialization helpers matching existing view JSON shapes - Register channel in UserSocket - Broadcast bldg_created/updated/deleted, resident_created/updated/deleted, road_created/updated/deleted after mutations in all three contexts - Broadcast to floor and all ancestor floors so recursive-scan clients receive nested changes - Add delete notifications to delete_bldg (previously had none) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…claw
- Add delete_bldg_cascade/1: deletes nested children (deepest first),
their roads, then the target bldg. Each deletion broadcasts bldg_deleted.
Residents inside deleted bldgs are left untouched.
- Add /delete bldg {name} chat command with is_authorized_owner? check
- REST DELETE /v1/bldgs/:address now uses cascade delete
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Stream changes to client & delete bldg support
Adds POST /v1/bldgs/:address/favorite_view_points plus schema and view support for a list of named poses (address, direction, size_delta, camera_vertical_angle) stored on each bldg. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Viewpoints
Adds /edit <bldg_name> <field> <value> so agents and users can update scalar fields on existing bldgs from chat, matching the style of /delete bldg, /move bldg, etc. Editable fields are whitelisted to state, summary, category, picture_url, web_url, data, tags — identity, location, hierarchy and ownership fields stay off-limits. Value tokens are joined with spaces; tags are split on commas into a list. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Chat `/create` trusted the caller's `say_flr` verbatim, so an agent sending coordinate tuples that didn't match the parent's real address stranded the child with a `flr` pointing to a nonexistent parent. Always derive `flr` from the container loaded via `bldg_url` (the name-based, stable identifier) instead. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Add bldg_server/fly.dev.toml and fly.prod.toml (secrets-free; use
fly secrets set for DB_PASSWORD, REDIS_PWD, SENDGRID_API_KEY etc.)
- Add bldg_server/deploy.sh accepting dev|prod
- Add .github/workflows/deploy.yml for auto-dev / manual-prod deploys
(requires FLY_API_TOKEN_DEV and FLY_API_TOKEN_PROD repo secrets)
- Add release tasks seed_ground/3, seed_batteries/0, seed_battery/1 for
bootstrapping fresh envs (root ground bldg, org container, battery
catalog)
Run seed_ground("https://alicein.app", "G") on a fresh prod env after
the first deploy to unblock figure_out_flr/1 and notify_bldg_created/4,
then seed_batteries to populate the ground-floor battery catalog.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Roads cached `from_address`/`to_address` and `from_x`/`from_y`/`to_x`/`to_y` at creation; relocating a bldg left those stale so roads hung at the old position. `Buildings.update_bldg/2` now diffs `address` and, on change, calls `Relations.cascade_bldg_relocation/3` to rewrite matching endpoints (and follow the flr if the road lived on the bldg's prior floor), which also re-broadcasts `road_updated` through existing channels. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.