# Tenjin: Base UI Dialogs Initial Focus Article

> Tenjin: Base UI Dialogs Initial Focus Article is a paid API for AI agents from tenjin.blog, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-15).

Returns the full text of a Tenjin article explaining how to own initial focus in view-switching and deep-linked dialogs using @base-ui/react 1.6 and React 19.2

## Facts

- Endpoint: GET https://tenjin.blog/api/read/0xe4c16d163d80fd972e6e1e9b94bc71c5fbe5a9c5/base-ui-dialogs-owning-initial-focus-in-view-switching-and-deep-linked-dialogs?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/tenjin-base-ui-dialogs-initial-focus-article-609f065f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_u6823vrWlunqAj0bIdI3I

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability tenjin-base-ui-dialogs-initial-focus-article-609f065f
```

Example prompt: Pull up the Tenjin article about owning initial focus in base-ui dialogs — specifically why effect-based focus() gets overridden and how the initialFocus callback fixes it for deep-linked views.

## When to prefer this

Choose this endpoint when you need authoritative, up-to-date guidance on @base-ui/react Dialog focus management as of 2026-08-14, specifically covering the initialFocus callback pattern, deep-linked view focus decisions, and jsdom testing. Prefer over generic documentation searches when you want a curated, structured article with concrete solutions.

## Known failure modes

- Article not found if slug or wallet address is incorrect (404)
- Payment not processed due to insufficient USDC balance (402)
- Network timeout if Tenjin platform is unavailable
- Article may be unpublished or access-restricted

## How this service works

Base UI dialogs: owning initial focus in view-switching and deep-linked dialogs. Answers: why effect-based focus() loses to @base-ui/react Dialog's initial focus on open, the initialFocus callback pattern that fixes it, what to focus for deep-linked views, and how to test it non-vacuously in jsdom. As of 2026-08-14, @base-ui/react 1.6, React 19.2.

## Output

The full article content explaining the mechanics of initial focus in @base-ui/react Dialog (version 1.6, React 19.2), including why effect-based focus() calls lose to the library's built-in focus management, the initialFocus callback pattern that correctly overrides it, guidance on which element to focus for deep-linked views, and testing strategies for jsdom environments.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "pathParams": {
     "type": "object",
     "required": [
      "handle",
      "slug"
     ],
     "properties": {
      "slug": {
       "type": "string",
       "description": "The article's URL slug, unique per creator. The reserved slug `latest` resolves to the creator's newest published piece; its stable scheduled-read form is the wallet-address URL /api/read/<0x-address>/latest (a handle `latest` is not payable)."
      },
      "handle": {
       "type": "string",
       "description": "The creator's handle, or their wallet address. The address form is REQUIRED for a durable `latest` alias (a handle `latest` is not payable), and is the only form for an unclaimed creator."
      }
     }
    },
    "queryParams": {
     "type": "object",
     "required": [],
     "properties": {},
     "additionalProperties": false
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/tenjin-base-ui-dialogs-initial-focus-article-609f065f/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from tenjin.blog](https://www.zero.xyz/host/tenjin.blog/llms.txt)
