Skip to content

Agents - Blank rows appear in agents table after deleting agents (stale local Onyx entries) #96889

Description

@MelvinBot

Problem

Blank rows appear in the Settings > Agents table after deleting agents. Reported by shawnborton on #95991 (comment) — blank rows showed on a branch build but not on staging, after previously deleting a bunch of agents.

blank agent rows

Root cause

The agents table renders one row per sharedNVP_agentPrompt_<accountID> collection key whose matching personalDetailsList[accountID] still exists (AgentsPage.tsx:82-107). A row is only skipped when personal details are missing entirely; if they exist but have an empty displayName/login, the row renders blank.

deleteAgent clears both the prompt key and the personal-details entry on the DELETE_AGENT success response (Agent.ts:289-309), but OPEN_AGENTS_PAGE only merges in what the server returns and never prunes local keys (Agent.ts:23-32). So any orphaned sharedNVP_agentPrompt_* entries left behind by earlier deletes (e.g. deleted offline, or from a build predating current cleanup logic) linger in local Onyx and render as blank rows. Staging looked clean because it had a different/fresher dataset.

Expected behavior

Deleted agents should never leave orphaned sharedNVP_agentPrompt_* entries behind, and the agents table should not render a row for an agent that has no valid personal details (empty name/login).

Reproduction

  1. Create several agents in Settings > Agents.
  2. Delete them (ideally reproduce with a delete that doesn't cleanly land the success response, e.g. offline then reconnect).
  3. Reopen Settings > Agents.
  4. Observe blank rows in the table.

Possible fixes to explore

  • Have OPEN_AGENTS_PAGE return the full agent set and reset the sharedNVP_agentPrompt collection so stale local keys are pruned, or
  • Guard the row builder in AgentsPage.tsx to skip rows whose personal details have no displayName and no login.

Surfaced from #95991 (comment)

Issue OwnerCurrent Issue Owner: @NicolasBonet

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions