feat(agent-world): add TinyPlace world and GraphQL reads#3867
Conversation
📝 WalkthroughWalkthroughAdds a complete PixiJS isometric agent world engine ( ChangesIsometric World Engine and React Integration
GraphQL API Surface Expansion
Wallet Test Infrastructure Cleanup
Sequence Diagram(s)sequenceDiagram
participant WorldSection
participant GameWorld
participant BaseRoom
participant Agent
participant TextureFactory
WorldSection->>GameWorld: init(containerElement)
GameWorld->>TextureFactory: new TextureFactory(renderer)
WorldSection->>GameWorld: setRoom("outside")
GameWorld->>BaseRoom: new OutsideWorldRoom(factory)
BaseRoom->>TextureFactory: floorTile(), cuboid(), wallBlock(), buildingDetail()
BaseRoom-->>GameWorld: view, depthObstacles(), findPath()
WorldSection->>GameWorld: spawnAgents(count)
GameWorld->>Agent: new Agent(options)
Agent->>TextureFactory: agentBody(), agentFace(), accessory(), agentShadow()
GameWorld->>Agent: teleportTo(spawnNode)
loop Ticker
GameWorld->>Agent: tick(deltaSeconds)
Agent->>Agent: advanceMovement / applyPose / syncPosition
GameWorld->>GameWorld: depth-sort agents vs depthObstacles
end
WorldSection->>GameWorld: updateAgentState(state)
GameWorld->>BaseRoom: findPath(current, target)
BaseRoom-->>GameWorld: Array<WalkNode>
GameWorld->>Agent: walkPath(path, arrivalAction, facing, seatDropY)
sequenceDiagram
participant FrontendSection
participant invokeApiClient
participant RustHandler
participant TinyplaceGraphQL
FrontendSection->>invokeApiClient: graphql.agents(params)
invokeApiClient->>RustHandler: openhuman.tinyplace_graphql_agents({params})
RustHandler->>TinyplaceGraphQL: GraphQL query
TinyplaceGraphQL-->>RustHandler: agent list JSON
RustHandler-->>invokeApiClient: GqlAgentCardListResult
invokeApiClient-->>FrontendSection: typed agent list
FrontendSection->>invokeApiClient: graphql.identityListings({limit:50})
invokeApiClient->>RustHandler: openhuman.tinyplace_graphql_identity_listings
RustHandler->>TinyplaceGraphQL: identity listings query
TinyplaceGraphQL-->>RustHandler: listings JSON
RustHandler-->>invokeApiClient: raw listings
invokeApiClient->>invokeApiClient: normalizeGraphqlIdentityListing(each)
invokeApiClient-->>FrontendSection: GqlIdentityListingListResult
Estimated code review effort🎯 5 (Critical) | ⏱️ ~120 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9ebd8ff3a3
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 313c04644e
ℹ️ 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".
There was a problem hiding this comment.
Actionable comments posted: 6
🧹 Nitpick comments (5)
app/src/agentworld/iso/types.ts (1)
113-113: ExtractspawnTileinto a named interface.Line 113 uses an inline object shape; this violates the repo TypeScript rule requiring interfaces for object-shape declarations.
♻️ Proposed fix
+export interface SpawnTile { + x: number; + y: number; +} + export interface RoomDefinition { key: string; name: string; description: string; @@ - spawnTile: { x: number; y: number }; + spawnTile: SpawnTile; /** Extra vertical clearance above the floor for tall props (buildings). */ topMargin?: number; }🤖 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 `@app/src/agentworld/iso/types.ts` at line 113, The spawnTile property on line 113 uses an inline object type definition ({ x: number; y: number }) which violates the repo's TypeScript rule requiring named interfaces for object shapes. Create a new named interface for the coordinate/position type that defines the x and y number properties, then replace the inline object type in the spawnTile declaration with a reference to this new interface.Sources: Coding guidelines, Learnings
app/src/agentworld/iso/BaseRoom.ts (1)
76-77: ⚡ Quick winUse named interfaces instead of inline object-shape types.
These ranges introduce inline object-shape annotations (e.g., size/bounds/queue node). Please extract named interfaces to align with the TypeScript style contract and keep types reusable.
As per coding guidelines,
**/*.{ts,tsx}requiresinterfacefor defining object shapes.Also applies to: 264-265, 305-306, 378-380
🤖 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 `@app/src/agentworld/iso/BaseRoom.ts` around lines 76 - 77, The BaseRoom class contains inline object-shape type annotations (such as the size property with { width: number; height: number }) that should be extracted into named interfaces for reusability and alignment with TypeScript style guidelines. Create named interfaces for each distinct object shape (like for size, bounds, and queue node types), and then replace all inline type annotations with references to these newly created interfaces throughout the BaseRoom class, including at the properties around lines 264-265, 305-306, and 378-380.Source: Coding guidelines
app/src/agentworld/iso/furniture.ts (2)
64-74: ⚡ Quick winReplace inline object-shape type annotations with named
interfaces.Lines in these ranges define object shapes inline (
options: { ... },Array<{ x: number; y: number }>). Please promote these to named interfaces for consistency with the repo’s TypeScript rules.♻️ Suggested direction
+interface BuildingBlueprintOptions { + footprintWidth: number; + footprintHeight: number; + height: number; + bodyTint: number; + windowRows: number; + windowColumns: number; + windowColor: number; + roofColor: number; + doorColor: number; +} + +interface TableBlueprintOptions { + footprintWidth: number; + footprintHeight: number; + height: number; + bodyTint: number; + topTint: number; + extraParts?: Array<FurniturePart>; +} + +interface TileCoord { + x: number; + y: number; +} - -function buildingBlueprint(options: { ... }): FurnitureBlueprint { +function buildingBlueprint(options: BuildingBlueprintOptions): FurnitureBlueprint { ... } - -function tableBlueprint(options: { ... }): FurnitureBlueprint { +function tableBlueprint(options: TableBlueprintOptions): FurnitureBlueprint { ... } - -public footprintTiles(): Array<{ x: number; y: number }> { +public footprintTiles(): Array<TileCoord> { ... }As per coding guidelines,
**/*.{ts,tsx}should useinterfacefor defining object shapes.Also applies to: 105-112, 869-893
🤖 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 `@app/src/agentworld/iso/furniture.ts` around lines 64 - 74, The buildingBlueprint function and other functions in the specified ranges (105-112 and 869-893) are using inline object type annotations instead of named interfaces. Create separate named interfaces for each of these object shapes (the options parameter for buildingBlueprint and any other inline object types in the mentioned ranges), then replace the inline type definitions with references to these new interfaces. This ensures consistency with the repository's TypeScript coding guidelines.Source: Coding guidelines
1-900: 🏗️ Heavy liftSplit
furniture.ts; it exceeds the frontend file-size limit.This file is ~900 lines, which is well above the frontend size cap and is now mixing blueprint catalog + rendering logic in one module. Please split it (for example:
blueprints.ts,blueprintBuilders.ts,FurnitureSprite.ts) to keep module boundaries maintainable.As per coding guidelines, frontend files under
app/src/**/*.{ts,tsx}should stay at or below ~500 lines and be broken into smaller focused modules.🤖 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 `@app/src/agentworld/iso/furniture.ts` around lines 1 - 900, The furniture.ts file is approximately 900 lines, exceeding the 500-line frontend file-size limit and mixing blueprint catalog definitions with rendering logic. Split the file into focused modules: move the FURNITURE_BLUEPRINTS record and constant definitions (WOOD_DARK, WOOD_MID, FELT_GREEN) into a blueprints.ts file; move the blueprint builder helper functions (buildingBlueprint, tableBlueprint, sit) into a blueprintBuilders.ts file; keep the FurnitureSprite class, FurnitureStation interface, and related types (FurniturePart, FurnitureBlueprint) in the main furniture.ts or a separate FurnitureSprite.ts file. Update all import statements in these new modules to reference each other correctly and ensure they are properly exported for use by other modules that depend on them.Source: Coding guidelines
app/src/agentworld/pages/MarketplaceSection.test.tsx (1)
145-145: ⚡ Quick winAssert the jobs-query payload, not just invocation.
This currently misses regressions where
{ limit: 50 }is dropped/changed. Assert the call args to lock the frontend↔client contract.Proposed test hardening
- expect(apiClient.graphql.jobs).toHaveBeenCalled(); + expect(apiClient.graphql.jobs).toHaveBeenCalledWith({ limit: 50 });🤖 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 `@app/src/agentworld/pages/MarketplaceSection.test.tsx` at line 145, The test currently only asserts that apiClient.graphql.jobs was called but does not verify the arguments passed to it. Replace the toHaveBeenCalled() assertion on apiClient.graphql.jobs with toHaveBeenCalledWith() and pass the expected query payload (specifically { limit: 50 }) as the argument to ensure the frontend↔client contract is properly locked and regressions where the limit parameter is dropped or modified are caught.
🤖 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 `@app/src/agentworld/iso/BaseRoom.ts`:
- Around line 377-423: The BFS pathfinding algorithm is performing avoidable
quadratic work through two inefficiencies: queue.shift() is O(n) per operation,
and the path array is being cloned for each neighbor expansion with
[...current.path, next]. Replace the array-based queue with an index-based
approach using a pointer variable to track the current position instead of
calling shift(). Additionally, create a predecessor map that tracks which
node/position led to each visited tile, then construct the final path only once
when reaching the terminal destination by walking backwards through the
predecessor map instead of cloning the path array at each step.
In `@app/src/agentworld/iso/GameWorld.ts`:
- Around line 545-560: The arrival check at line 558 comparing startX ===
state.x and startY === state.y uses rounded coordinates, which causes the agent
to stop prematurely during interpolation before reaching the tile center. Remove
the rounding operations on start.x and start.y when creating the comparison
values, or alternatively modify the comparison logic to use a threshold-based
approach that checks if the agent is sufficiently close to the actual target
coordinates rather than exact matches. Apply the same fix to the similar arrival
checks mentioned in lines 562-565.
- Around line 177-1004: The GameWorld class exceeds the project guideline of
~500 lines for frontend files. Extract traffic management, pointer input
handling, and resize management into separate dedicated modules. Create
TrafficController to handle clearTraffic, spawnTraffic, addCar,
spawnReplacementCar, positionCar, carBlocked, updateTraffic and related fields
(cars, lanes, trafficLength). Create PointerController to handle onPointerDown,
onPointerMove, onPointerUp, handleTap and related pointer state fields
(pointerActive, pointerMoved, lastPointerX, lastPointerY). Create
ResizeController to handle observeResize, applySize and related fields
(resizeObserver, fillMode, panRangeX, panRangeY). Have GameWorld instantiate and
delegate to these controllers, passing necessary dependencies like the room,
agents, camera, and world containers to each controller.
In `@app/src/agentworld/iso/textures.ts`:
- Around line 57-63: The texture generation is using antialias: true which bakes
smoothing into the pixel rasterization, and setting texture.source.scaleMode =
'nearest' afterward cannot undo this smoothing. To achieve the crisp/chunky
pixel rendering intended by the code, change the antialias property from true to
false in the renderer.generateTexture() call to disable antialiasing at
generation time rather than attempting to compensate with scale mode adjustments
afterward.
In `@app/src/agentworld/pages/IdentitiesSection.tsx`:
- Around line 145-150: The identityListings API call in the floor-price lookup
is missing a status filter constraint, allowing inactive listings to be returned
and causing incorrect floor price calculations. Modify the parameters passed to
apiClient.graphql.identityListings to add a status constraint that filters for
only active listings. This will ensure the floor price lookup only considers
tradable listings when determining the minimum price.
In `@src/openhuman/tinyplace/schemas.rs`:
- Around line 2441-2442: The schema documentation for AgentQueryParams near the
string starting with "Optional AgentQueryParams..." lists pagination parameters
(`offset`) that don't match the frontend's actual pagination contract, which
uses `cursor`. Update this schema documentation string to replace `offset` with
`cursor` to accurately reflect the expected parameters that schema-discovery
clients should use when generating pagination calls.
---
Nitpick comments:
In `@app/src/agentworld/iso/BaseRoom.ts`:
- Around line 76-77: The BaseRoom class contains inline object-shape type
annotations (such as the size property with { width: number; height: number })
that should be extracted into named interfaces for reusability and alignment
with TypeScript style guidelines. Create named interfaces for each distinct
object shape (like for size, bounds, and queue node types), and then replace all
inline type annotations with references to these newly created interfaces
throughout the BaseRoom class, including at the properties around lines 264-265,
305-306, and 378-380.
In `@app/src/agentworld/iso/furniture.ts`:
- Around line 64-74: The buildingBlueprint function and other functions in the
specified ranges (105-112 and 869-893) are using inline object type annotations
instead of named interfaces. Create separate named interfaces for each of these
object shapes (the options parameter for buildingBlueprint and any other inline
object types in the mentioned ranges), then replace the inline type definitions
with references to these new interfaces. This ensures consistency with the
repository's TypeScript coding guidelines.
- Around line 1-900: The furniture.ts file is approximately 900 lines, exceeding
the 500-line frontend file-size limit and mixing blueprint catalog definitions
with rendering logic. Split the file into focused modules: move the
FURNITURE_BLUEPRINTS record and constant definitions (WOOD_DARK, WOOD_MID,
FELT_GREEN) into a blueprints.ts file; move the blueprint builder helper
functions (buildingBlueprint, tableBlueprint, sit) into a blueprintBuilders.ts
file; keep the FurnitureSprite class, FurnitureStation interface, and related
types (FurniturePart, FurnitureBlueprint) in the main furniture.ts or a separate
FurnitureSprite.ts file. Update all import statements in these new modules to
reference each other correctly and ensure they are properly exported for use by
other modules that depend on them.
In `@app/src/agentworld/iso/types.ts`:
- Line 113: The spawnTile property on line 113 uses an inline object type
definition ({ x: number; y: number }) which violates the repo's TypeScript rule
requiring named interfaces for object shapes. Create a new named interface for
the coordinate/position type that defines the x and y number properties, then
replace the inline object type in the spawnTile declaration with a reference to
this new interface.
In `@app/src/agentworld/pages/MarketplaceSection.test.tsx`:
- Line 145: The test currently only asserts that apiClient.graphql.jobs was
called but does not verify the arguments passed to it. Replace the
toHaveBeenCalled() assertion on apiClient.graphql.jobs with
toHaveBeenCalledWith() and pass the expected query payload (specifically {
limit: 50 }) as the argument to ensure the frontend↔client contract is properly
locked and regressions where the limit parameter is dropped or modified are
caught.
🪄 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: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: e632f46e-5113-44c1-a9a5-3f5540e0dc4b
⛔ Files ignored due to path filters (2)
Cargo.lockis excluded by!**/*.lockapp/src-tauri/Cargo.lockis excluded by!**/*.lock
📒 Files selected for processing (44)
Cargo.tomlapp/src/agentworld/iso/Agent.tsapp/src/agentworld/iso/BaseRoom.tsapp/src/agentworld/iso/ChatBubble.tsapp/src/agentworld/iso/GameWorld.tsapp/src/agentworld/iso/color.tsapp/src/agentworld/iso/furniture.tsapp/src/agentworld/iso/geometry.tsapp/src/agentworld/iso/index.tsapp/src/agentworld/iso/rooms.tsapp/src/agentworld/iso/textures.tsapp/src/agentworld/iso/types.tsapp/src/agentworld/pages/AgentWorld.test.tsxapp/src/agentworld/pages/AgentWorld.tsxapp/src/agentworld/pages/DirectorySection.test.tsxapp/src/agentworld/pages/DirectorySection.tsxapp/src/agentworld/pages/ExploreSection/ExploreSection.test.tsxapp/src/agentworld/pages/ExploreSection/index.tsxapp/src/agentworld/pages/IdentitiesSection.test.tsxapp/src/agentworld/pages/IdentitiesSection.tsxapp/src/agentworld/pages/MarketplaceSection.test.tsxapp/src/agentworld/pages/MarketplaceSection.tsxapp/src/agentworld/pages/WorldSection.tsxapp/src/lib/agentworld/invokeApiClient.test.tsapp/src/lib/agentworld/invokeApiClient.tsapp/src/lib/i18n/ar.tsapp/src/lib/i18n/bn.tsapp/src/lib/i18n/de.tsapp/src/lib/i18n/en.tsapp/src/lib/i18n/es.tsapp/src/lib/i18n/fr.tsapp/src/lib/i18n/hi.tsapp/src/lib/i18n/id.tsapp/src/lib/i18n/it.tsapp/src/lib/i18n/ko.tsapp/src/lib/i18n/pl.tsapp/src/lib/i18n/pt.tsapp/src/lib/i18n/ru.tsapp/src/lib/i18n/zh-CN.tsapp/test/vitest.config.tssrc/openhuman/tinyplace/manifest.rssrc/openhuman/tinyplace/schemas.rssrc/openhuman/wallet/execution_tests.rssrc/openhuman/wallet/ops.rs
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 35253662c6
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 89558ed24d
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9a4e463c2b
ℹ️ 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".
There was a problem hiding this comment.
♻️ Duplicate comments (1)
app/src/agentworld/pages/IdentitiesSection.tsx (1)
146-151:⚠️ Potential issue | 🟠 Major | ⚡ Quick winConstrain floor lookup to active listings at query time.
Line 146 limits results before status filtering (Lines 149-151), so inactive entries can crowd out the actual active floor and produce a wrong price.
Suggested fix
- void apiClient.graphql - .identityListings({ length, limit: 20, sortBy: 'price_asc' }) + void apiClient.graphql + .identityListings({ length, limit: 1, sortBy: 'price_asc', status: 'active' }) .then(data => { if (cancelled) return; - const listing = data.identities?.find( - identity => identity.status == null || identity.status === 'active' - ); + const listing = data.identities?.[0]; setState({ status: 'ok', data: { length, price: listing?.price } }); })🤖 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 `@app/src/agentworld/pages/IdentitiesSection.tsx` around lines 146 - 151, The identityListings method query applies a limit of 20 results before filtering by status, which means inactive listings can be included in the limited result set and prevent finding the actual active floor price. Move the status filtering logic (checking for identity.status == null or identity.status === 'active') from the client-side find operation into the query parameters passed to identityListings, so the server returns only active listings sorted by price and the first result will be the true floor price.
🤖 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.
Duplicate comments:
In `@app/src/agentworld/pages/IdentitiesSection.tsx`:
- Around line 146-151: The identityListings method query applies a limit of 20
results before filtering by status, which means inactive listings can be
included in the limited result set and prevent finding the actual active floor
price. Move the status filtering logic (checking for identity.status == null or
identity.status === 'active') from the client-side find operation into the query
parameters passed to identityListings, so the server returns only active
listings sorted by price and the first result will be the true floor price.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: c14ae330-649f-476f-8bd9-421651c1f428
📒 Files selected for processing (27)
app/src/agentworld/iso/Agent.tsapp/src/agentworld/iso/BaseRoom.tsapp/src/agentworld/iso/GameWorld.tsapp/src/agentworld/iso/textures.tsapp/src/agentworld/iso/types.tsapp/src/agentworld/pages/DirectorySection.test.tsxapp/src/agentworld/pages/DirectorySection.tsxapp/src/agentworld/pages/IdentitiesSection.test.tsxapp/src/agentworld/pages/IdentitiesSection.tsxapp/src/agentworld/pages/MarketplaceSection.test.tsxapp/src/lib/agentworld/invokeApiClient.test.tsapp/src/lib/agentworld/invokeApiClient.tsapp/src/lib/i18n/ar.tsapp/src/lib/i18n/bn.tsapp/src/lib/i18n/de.tsapp/src/lib/i18n/en.tsapp/src/lib/i18n/es.tsapp/src/lib/i18n/fr.tsapp/src/lib/i18n/hi.tsapp/src/lib/i18n/id.tsapp/src/lib/i18n/it.tsapp/src/lib/i18n/ko.tsapp/src/lib/i18n/pl.tsapp/src/lib/i18n/pt.tsapp/src/lib/i18n/ru.tsapp/src/lib/i18n/zh-CN.tssrc/openhuman/tinyplace/schemas.rs
✅ Files skipped from review due to trivial changes (4)
- app/src/lib/i18n/hi.ts
- app/src/lib/i18n/es.ts
- app/src/lib/i18n/bn.ts
- app/src/lib/i18n/id.ts
🚧 Files skipped from review as they are similar to previous changes (12)
- app/src/agentworld/iso/types.ts
- app/src/agentworld/pages/DirectorySection.test.tsx
- app/src/agentworld/pages/IdentitiesSection.test.tsx
- app/src/agentworld/iso/Agent.ts
- app/src/agentworld/pages/DirectorySection.tsx
- app/src/lib/agentworld/invokeApiClient.test.ts
- app/src/lib/agentworld/invokeApiClient.ts
- app/src/agentworld/pages/MarketplaceSection.test.tsx
- app/src/agentworld/iso/textures.ts
- app/src/agentworld/iso/GameWorld.ts
- src/openhuman/tinyplace/schemas.rs
- app/src/agentworld/iso/BaseRoom.ts
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: df7d295467
ℹ️ 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".
There was a problem hiding this comment.
♻️ Duplicate comments (1)
app/src/agentworld/pages/IdentitiesSection.tsx (1)
172-179:⚠️ Potential issue | 🟠 Major | ⚡ Quick winConstrain floor-price query to active listings at source (Line 173).
Filtering after
limit: 20can miss the real active floor when cheaper inactive rows fill the page. Query only active listings (or paginate until first active) before taking the minimum.Suggested fix
void apiClient.graphql - .identityListings({ length, limit: 20, sortBy: 'price_asc' }) + .identityListings({ length, limit: 20, sortBy: 'price_asc', status: 'active' }) .then(data => { if (cancelled) return; - const listing = data.identities?.find( - identity => identity.status == null || identity.status === 'active' - ); + const listing = data.identities?.[0]; setState({ status: 'ok', data: { length, price: listing?.price } }); })🤖 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 `@app/src/agentworld/pages/IdentitiesSection.tsx` around lines 172 - 179, The identityListings API call applies a limit of 20 results before filtering for active listings in the JavaScript code, which can cause the actual cheapest active listing to be missed if inactive listings fill the page. Modify the identityListings API call to constrain the query at the source by adding a filter or status parameter that ensures only active listings (where status is null or 'active') are returned from the API before the limit is applied, so the first result returned is guaranteed to be the true floor price of active listings.
🤖 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.
Duplicate comments:
In `@app/src/agentworld/pages/IdentitiesSection.tsx`:
- Around line 172-179: The identityListings API call applies a limit of 20
results before filtering for active listings in the JavaScript code, which can
cause the actual cheapest active listing to be missed if inactive listings fill
the page. Modify the identityListings API call to constrain the query at the
source by adding a filter or status parameter that ensures only active listings
(where status is null or 'active') are returned from the API before the limit is
applied, so the first result returned is guaranteed to be the true floor price
of active listings.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 75f8a1fa-aac1-45f0-b0d0-f1fc13a4af55
📒 Files selected for processing (4)
app/src/agentworld/pages/ExploreSection/ExploreSection.test.tsxapp/src/agentworld/pages/ExploreSection/index.tsxapp/src/agentworld/pages/IdentitiesSection.test.tsxapp/src/agentworld/pages/IdentitiesSection.tsx
🚧 Files skipped from review as they are similar to previous changes (3)
- app/src/agentworld/pages/ExploreSection/index.tsx
- app/src/agentworld/pages/ExploreSection/ExploreSection.test.tsx
- app/src/agentworld/pages/IdentitiesSection.test.tsx
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fcfcd5f6e7
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0ef340a724
ℹ️ 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".
|
|
||
| for ( | ||
| let page = 0; | ||
| page < MARKETPLACE_MAX_PAGES && active.length < MARKETPLACE_TARGET_ACTIVE; |
There was a problem hiding this comment.
Keep paging marketplace listings until active rows are found
Fresh evidence: this version now pages, but the loop still stops after MARKETPLACE_MAX_PAGES (five pages/250 unfiltered rows) even when the server keeps returning full pages. If sold/expired listings occupy those first pages and active listings start at a later offset, the Trading tab shows an empty or truncated sale list; either use a real active-status filter in the core/GraphQL query or continue paging until the server is exhausted or enough active listings are collected.
Useful? React with 👍 / 👎.
| } | ||
|
|
||
| async function fetchActiveFloorPrice(length: number): Promise<IdentityFloor> { | ||
| for (let page = 0; page < FLOOR_MAX_PAGES; page++) { |
There was a problem hiding this comment.
Keep paging floor listings past the fixed cap
Fresh evidence: this version still hard-stops after FLOOR_MAX_PAGES (10 pages/200 price-sorted listings) before returning { price: undefined }. When a length bucket has more than 200 sold/expired listings cheaper than the first active listing, the floor card reports “No floor” even though a buyable listing exists; continue paging until an active row is found or add a real server-side active-status filter.
Useful? React with 👍 / 👎.
Summary
Problem
Agent World's TinyPlace sidebar needed the new city rendering page from tiny.place, and several pages still used REST list calls or per-card follow/stat requests that could fan out into many backend requests and trigger 429s. The tinyplace Rust SDK API shape also changed in 1.0.1, so OpenHuman's bridge needed to compile and operate against that newer contract.
Solution
app/src/agentworld/isoand mounted it from a newWorldSectionroute.agentWorld.worldtranslations across locale files and made/agent-worlddefault to the world page.viewerIsFollowingedges when available.Submission Checklist
diff-cover) meet the gate enforced by.github/workflows/pr-ci.yml. Local full coverage not run; CI will enforce this gate.## Related: N/A, no new/renamed feature ID.Closes #NNNin the## Relatedsection: N/A, no linked issue provided.Impact
Related
AI Authored PR Metadata (required for Codex/Linear PRs)
Linear Issue
Commit & Branch
Validation Run
pnpm --filter openhuman-app format:checkviapnpm format:checkpnpm typecheckpnpm debug unit src/agentworld/pages/DirectorySection.test.tsx src/agentworld/pages/ExploreSection/ExploreSection.test.tsx src/agentworld/pages/MarketplaceSection.test.tsx;pnpm debug unit src/agentworld/pages/IdentitiesSection.test.tsxcargo fmt --manifest-path Cargo.toml;cargo check --manifest-path Cargo.tomlpnpm rust:check/cargo check --manifest-path app/src-tauri/Cargo.tomlpnpm lint,pnpm i18n:check,pnpm buildduring implementationValidation Blocked
command:N/Aerror:N/Aimpact:N/ABehavior Changes
Parity Contract
Duplicate / Superseded PR Handling
senamakel:feat/tinyplace-world-graphql.Summary by CodeRabbit
Release Notes
New Features
Documentation
Tests / Chores
tinyplacedependency.