LearnNewsExamplesServices
Frontmatter
id18939
titlequery_component drops dotted paths; ai.Client gives up on a late bridge
stateClosed
labels
bugaiagent-os
assigneesneo-opus-ada
createdAtSep 18, 2026, 10:30 PM
updatedAtSep 19, 2026, 3:28 PM
githubUrlhttps://github.com/neomjs/neo/issues/18939
authorneo-opus-ada
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtSep 19, 2026, 3:28 PM

query_component drops dotted paths; ai.Client gives up on a late bridge

neo-opus-ada
neo-opus-ada commented on Sep 18, 2026, 10:30 PM

Context

Found 2026-09-18 while driving the operator's Portal through the Neural Link to explore conversational UI edits (a plain-language request becomes a Neural Link write). Both defects sit in the App Worker half of the Neural Link.

Sweeps: live latest-20 open (2026-09-18T20:22Z, re-checked 20:29Z) and state:all searches for returnProperties and ai.Client reconnect: no open equivalent. Closed #8924 added dotted paths to get_instance_properties; query_component never got them.

The Problem

1. query_component silently drops dotted returnProperties. ComponentService#queryComponent reads each entry as c[prop], so 'store.id' looks up a literal key, gets undefined, and the key vanishes from the JSON. Its siblings InstanceService#findInstances and #getInstanceProperties resolve the same strings with Neo.ns(prop, false, instance).

Live: query_component({ntype: 'treelist'}, ['id', 'store.id', 'store.count', 'windowId']) returned only id and windowId. A caller cannot tell an unsupported path from a missing property.

2. An app booted before the bridge never attaches. Split to #18956 on 2026-09-19. Its ACs 3 and 4 turned out to be jointly unsatisfiable as filed: every failed WebSocket dial writes a browser-level DevTools error, which JS cannot suppress, so no background poll is silent. #18956 carries the measurement and a design fork. The paragraph below is kept for provenance.

Neo.ai.Client's socket (Neo.data.connection.WebSocket, maxReconnectAttempts = 5) gives up, and onSocketReconnectFailed logs "reconnecting stopped". Nothing dials again.

Observed: the Portal (useAiClient: true) booted while no bridge ran. After the bridge started, healthcheck showed sessions: [] until the tab was reloaded. The docblock's intent stands: a visitor without a bridge must not get a retry loop. But an agent that starts the bridge later has no way in, and the tab may stay visible the whole time.

The Architectural Reality

  • src/ai/client/ComponentService.mjs queryComponent; src/ai/client/InstanceService.mjs findInstances, getInstanceProperties (the Neo.ns readers).
  • src/ai/Client.mjs onSocketReconnectFailed; src/data/connection/WebSocket.mjs maxReconnectAttempts, backoffStrategy.
  • src/main/DomEvents.mjs#onVisibilitychange already posts {action: 'visibilityChange'} to the App Worker. Its receiver there is not traced.

The Fix

  1. queryComponent resolves returnProperties with Neo.ns(prop, false, c), like its siblings. An unresolvable path returns null, so the key stays visible.
  2. After the capped attempts, the client can still attach later without a reload and without noise. → #18956.
    • A page-visibility or focus re-dial is free while idle, but it misses a tab that stays visible, which is exactly the observed case.
    • A capped slow poll that stays silent after exhaustion covers that case.
    • Choose by the ACs, not by preference.

Contract Ledger

Target Surface Source of Authority Proposed Behavior Fallback / Edge Case Docs Evidence
query_component returnProperties #8924 (dotted paths on the sibling reader) dotted paths resolve like get_instance_properties an unresolvable path → null JSDoc unit arm: store.id returns the store's id
Neo.ai.Client late-bridge attach — transferred to #18956 on 2026-09-19; not delivered here — — —

Acceptance Criteria

  • query_component with ['store.id'] returns the store's id. Unit arm, red on dev (the key is absent).
  • An unresolvable path is present in the result as null.
  • An App Worker booted while no bridge listens attaches after a bridge starts, without a reload, while its tab stays visible. → #18956
  • A page with no bridge emits no console output after the capped attempts. → #18956

Out of Scope

  • Brain-side Neural Link schemas: neomjs/neo-agent-brain#371.
  • Reflecting config enum sets (static iconPositions, … validated by beforeSetEnumValue) through inspect_class. That is a separate idea from the same exploration.

Decision Record impact: none.

Owner: @neo-opus-ada (claimed 2026-09-19, after the split).

Retrieval Hint: "query_component returnProperties dotted path Neo.ns", "ai.Client reconnecting stopped late bridge" Origin Session ID: fc012fb9-612e-431f-b2d1-115e3b895a32