Codex/index pages signal pass#8
Merged
Merged
Conversation
Collapse /auth from three pages (landing + browser-demo + backend) to one concise landing page. One FastNear API key works across the RPC and REST APIs and can be sent as an Authorization Bearer header or as ?apiKey=, with a dashboard.fastnear.com link to obtain a key. Scope: delete the two subpages and their Russian mirrors; rewrite the EN and RU landing pages; prune sidebars, config redirects, index cards, agents cross-links, Algolia rules/relevance/crawler boosts, and the AI-surface generator. Regenerate static/ru/** mirrors to match. Legacy /docs/rpc-api/auth-browser-demo and /docs/rpc-api/auth-production-backend now both redirect to /auth. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Rework the search popup so the content reads clearly at a glance and each endpoint family is visually distinct. - Bump hitsPerPage from 10 to 20 and cap each group to 6 visible results so RPC and API hits both show beyond the first item. - Endpoint badges now take rpc/api modifier classes driving teal and violet surface pills with WCAG-AA contrast in both themes. - Dark-mode modal drops the uniform blue for a neutral slate palette; focus-state titles use body color instead of the primary blue so they stay readable on the selected background. - Yellow query highlight uses amber tokens with no padding or radius so adjacent matches do not push words apart. - Add a horizontal rule between groups and kern + uppercase the group source labels so they read as section headers rather than hits. - Family pills (account, protocol, fastnear) get 12px radius, lighter border and background, and a slightly larger, lighter font so they pop without dominating. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Anchor the Copy Markdown button to the top-right of the content shell so it sits inline with the h1 instead of claiming its own row above the endpoint description. Covers both toolbar hosts: - .fastnear-doc-content__toolbar — the DocItem/Content page_actions wrapper used by MDX pages with page_actions: [markdown] frontmatter. - .fastnear-doc-content-shell .fastnear-operation-page__toolbar — the toolbar rendered inside FastnearDirectOperation for RPC/API endpoint pages. Scoped to the docs shell so hosted /rpcs/** and /apis/** pages (rendered without the shell) keep their in-flow flex layout. Also refine the button chrome: neutral slate border and background in both themes so the button reads as an idiomatic action pill instead of a washed-out card. The @media (max-width: 996px) rule reverts both toolbars to static flow so the button wraps below the title on narrow viewports. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Reorder the endpoint index pages so Base URLs sit right after the intro sentence, above Best fit / When not to use. Readers arriving at /rpc, /api, /tx, /transfers, /neardata, or /fastdata/kv now see the hostname they came for without scrolling past routing guidance. - /rpc: rename the Endpoints section to Base URLs for parity and tighten the auth-and-limits copy so it describes the one-key model instead of the retired browser-demo vs. backend framing. - /transfers: reorder, inline the mainnet-only note beneath the Base URL (moved from Troubleshooting), and add the Common starting points section that every other endpoint family has. Replace the testnet-switching troubleshooting entry with a resume_token tip. - /neardata: clarify the 401-before-redirect behavior as one sentence that names what the caller sees instead of what the app does. - /api, /tx, /fastdata/kv: pure reorder, body copy unchanged. - Russian mirrors: same structural changes; clunky-phrase rewrites land in a follow-up commit. Add docs/agents/index.mdx (and its RU mirror) as the front door for the agents section. Hub links to choosing-surfaces, auth-for-agents, and playbooks; each sibling page stays reachable on its current slug. Update the root chooser (EN + RU) so the agents bullet list points at the new hub first. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Rewrite the English-word-order calques flagged in the locale audit so the Russian pages read as composed-in-Russian prose instead of machine-translated filler. Applies the three-tier terminology rules in md-CLAUDE-chapters/i18n_translating_russian.md. - /transfers: drop the "вопрос сводится именно к движению NEAR" construction, switch the compliance-bullet to a cleaner "для отслеживания..." nominal form, and call them "события передачи активов" instead of "события перевода" (less redundant). - /rpc: "самая низкоуровневая поверхность" → "самый низкоуровневый доступ"; "сам добавляет" → "автоматически подставляет"; replace "продакшен-трафик"/"продакшен-бэкенды" with "боевой трафик"/ "боевые бэкенды" where a natural Russian word exists. - /api: tighten the optional-key sentence; swap "зеркальное повторение каждого RPC-метода" for "дублирование каждого RPC-метода" (non-calque). - /neardata: split the stacked "поверхность для почти реального времени и чтения по семействам блоков" phrase; rewrite the 401 line as one specific sentence that names what the caller sees; fix the redirect troubleshooting heading to be concrete. - /tx and /fastdata/kv: "токены Bearer" → "Bearer-токены" per the style guide's hyphenated-compound rule (Bearer stays English). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Hand-rewrite ~60 garbage entries in src/data/fastnearTranslations.ru.json
where an earlier auto-translate pass swapped a handful of Cyrillic
nouns into otherwise-English sentence skeletons ("Returns staking pool
аккаунта IDs..."). Applies the three-tier terminology rules in
md-CLAUDE-chapters/i18n_translating_russian.md: native Russian for
established concepts, transliteration for technical jargon that needs
to decline (токен, эндпоинт, валидатор), Latin script for protocol
names and code identifiers (API, JSON-RPC, Base64, Wasm).
Scope covered in this pass:
- Top-level family descriptions (indexed REST, JSON-RPC per category).
- Access-key, account, block, contract, and state operation
descriptions + their mainnet/testnet labels.
- Protocol-config parameter descriptions (epoch length, validator
thresholds, genesis, chunk-distribution settings).
This is deliberately a partial sweep — the broader pool audit surfaced
~30 more garbage entries (block headers, transaction-history summaries,
KV operation descriptions) that are better rewritten alongside the
operation pages they back. Those land in a follow-up branch.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Match the /rpc pattern across every endpoint index page so each mainnet and testnet URL gets its own titled bash codeblock, and each block exposes the Docusaurus code-block copy button. Readers (including agents) can now copy a base URL without clicking into a bullet or selecting text. Applied to /api, /tx, /transfers, /neardata, /fastdata/kv and their Russian mirrors. Block titles read "<Family> Mainnet" and "<Family> Testnet"; /transfers keeps its singular mainnet-only block with the existing ?network=testnet caveat beneath it. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The first version of /agents was three teaser paragraphs. Rewrite it as a real wayfinding doc for AI agents, crawlers, and automation runtimes landing on the page programmatically. New sections: - FASTNEAR_AI_DISCOVERY marker (JSX comment for MDX) pointing at the page's purpose so lightweight parsers can identify it. - "The site at a glance" — one-row-per-surface table with base URLs and one-line scope for each of RPC, FastNear API, Transactions, Transfers, NEAR Data, KV FastData, Snapshots. - "Route the agent's question to one surface" — shortlist mapping common question phrasings to the exact surface. - "Authenticate once, reuse everywhere" — both auth shapes shown as copy-ready curl blocks; operational posture link to /agents/auth. - "Pull clean docs into a prompt" — Copy Markdown button, llms.txt / llms-full.txt (EN + RU), /structured-data/site-graph.json, and per-page .md mirrors. - "Per-call hints an agent should know" — generated page-model registry location, ?network=testnet caveat, opaque pagination tokens, /status + /health per family. - "Playbooks and deeper guides" plus a final note directing human collaborators to the root chooser instead. Russian mirror follows the same shape with the three-tier terminology rules from the style guide applied throughout. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Pick up the upstream MDX rewrites from earlier commits on this branch: the Base URL codeblock swap on every endpoint index page, the /agents hub expansion, the de-calqued RU phrases on /transfers, /rpc, /api, /neardata, /tx, and the translation-pool cleanup for family descriptions and RPC operation metadata. All files regenerated via \`yarn generate:ai-surfaces\`. No hand edits — committing the output so static/ru/**, including the \`llms.txt\` indexes and \`structured-data/site-graph.json\`, reflects the current MDX source of truth. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Previously each bullet was plain text with the operation name in backticks, which is not actionable. Make every bullet a link so a reader (human or agent) can jump directly to the endpoint page. - /rpc: rewrite the category-scoped bullets into concrete method links grouped by intent — view_account / view_access_key*, block / block_effects, call_function / view_code / view_state, status / health / gas_price, send_tx / tx, validators. This matches the operation-level framing used on the other endpoint landing pages instead of naming only sidebar categories. - /api: link V1 full account view, V1 account FT/NFT, V1 public key, V1 FT top holders to their /api/v1/** slugs. - /tx: link Transactions by hash, Account history, Receipt lookup, Block range to their /tx/** slugs. - /neardata: link Optimistic block, Final block by height, Block headers, and the two redirect helpers to their /neardata/** slugs. - /fastdata/kv: link All by predecessor, History by predecessor, History by account, History by key, Multi lookup to the /fastdata/kv/** slugs. All Russian mirrors updated with the same links and translated labels. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The DocSearch modal applies a \`language:\${currentLocale}\` facet
filter. In RU locale the previous rules — which pinned EN-only
objectIDs like \`1-https://docs.fastnear.com/rpc/account/view-account\`
— were filtered out before reaching the user, so searches like
\`view_account\` in RU did not surface the obvious RPC page.
Duplicate each of the 16 machine-name rules with a \`-ru\` suffix
that promotes the matching \`/ru/\` URL at the same hierarchy level
and position 0. Patterns covered: view account / view-account /
view_account, send tx / send-tx / send_tx, account history, public
key, block headers, authentication, api key / x-api-key / x api
key, bearer token, access token, authorization header.
The EN rules are untouched. In any given locale only the rule whose
target URL survives the locale facet filter fires, so each locale
gets its canonical page pinned at the top.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Finish the sweep started in pass 1. Hand-rewrite every remaining mixed-language entry in src/data/fastnearTranslations.ru.json, covering ~140 additional strings across: - Block, light-client, network, node status, maintenance-window, metrics, and prometheus descriptions. - Transaction RPC summaries (send, broadcast async/commit, status, experimental variants). - Validators RPC operations (current, by-epoch, ordered). - Every FastNear API v1 operation description (staking, FT, NFT, account-full, FT top holders). - KV FastData operation summaries, parameter descriptions, and pagination-cursor warnings. - NEAR Data redirect helpers, chunk / shard / block documents, and health probe copy. - Transactions API history, block-lookup, block-range, receipt, and by-hash descriptions and labels. - Protocol-config and client-config parameter descriptions that still read as English with Cyrillic nouns dropped in. - Embedded page-specific fields (info.description, info.title, parameter labels, and the "Optional API-key for embedded portal clients" string referenced on every live page). Terminology choices follow md-CLAUDE-chapters/i18n_translating_russian.md: - native Russian for established concepts (запрос, ответ, ключ, значение, состояние, доказательство, аккаунт, блок, контракт, квитанция, транзакция, шард, валидатор, подпись, перегрузка); - transliteration with Russian declension for technical jargon that needs to inflect (эндпоинт, токен, чанк, нода, стейкинг); - Latin script preserved for protocol names, feature flags, code identifiers, and config keys (API, REST, JSON-RPC, Base58, Base64, Wasm, Mainnet, Testnet, State Sync, Block Sync, ViewClient, OrphanStateWitnessPool, predecessor, page_token, resume_token, apiKey, `last_update_block_height`). - Hyphenated compounds for English abbreviations binding Russian nouns (API-ключ, HTTP-запрос, Bearer-токен, REST-эндпоинт, FT-токен, NFT-контракт). The pool is now free of English-syntax-with-Cyrillic-nouns entries, so Russian becomes an exemplar for future locale work on this site. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… algolia) Pick up the second pool cleanup pass, the landing-page link-ification of Common starting points, and the new Algolia RU-locale promote rules into the static/** mirrors. Propagation from: - docs: lead endpoint index pages with Base URLs, add /agents hub - i18n(ru): de-calque flagged clunky phrases on index pages - i18n(ru): clean mixed-language entries in the translation pool (pass 1) - docs: switch Base URLs to copy-friendly titled codeblocks - docs(agents): rewrite /agents hub as an agent-oriented site map - docs: link Common starting points bullets to their endpoint pages - algolia(ru): add RU-locale variants for every machine-name promote rule - i18n(ru): complete the translation-pool cleanup (pass 2) All files regenerated via \`yarn build\` (which runs \`yarn generate:ai-surfaces\`). No hand edits in this commit — static/ru/** and static/ru/structured-data/site-graph.json reflect the current MDX plus translation-pool source of truth. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The DocSearch index already carried an `operation_id` attribute on every RPC/REST operation record (emitted via the FastnearDirectOperation meta tags), and `separatorsToIndex: "_"` kept `view_account` as a single token instead of splitting it into `view`+`account`. Ranking and synonym coverage were the gaps: exact machine-name hits were ranking below hierarchy.lvl1 matches, and synonym groups were hand-crafted per operation, so every new RPC/API page needed touch-ups in two places. Two systematic changes land here: 1. Reorder `searchableAttributes` in both `algolia/index-settings.json` and the crawler's `initialIndexSettings`. `operation_id` and `canonical_target` now sit at positions 1 and 2, above hierarchy levels. Exact machine-name and canonical-path matches (the pages users mean when they type `view_account` or `/rpcs/account/view_account`) outrank fuzzy hits on page titles. 2. Add `scripts/generate-algolia-synonyms.js`, wired as `yarn generate:algolia-synonyms`. It reads every `operationId` in `src/data/generatedFastnearPageModels.json` and emits a synonym group for each one, treating snake_case, hyphen-case, and space-separated forms as equivalent. Generated entries use the `fastnear-op-*` objectID prefix; the script preserves any hand-crafted conceptual synonym (auth, bearer-token, api-key, etc.) and rewrites only the autogenerated slice on each run. First run covers 76 operations across /rpc, /api, /tx, /transfers, /neardata, and /fastdata/kv, preserving 11 hand-crafted conceptual groups. Adding a new operation to the page-model registry now flows into synonyms via `yarn generate:algolia-synonyms` — no per-operation rule authoring needed. Hand-crafted per-operation promote rules in `rules.json` stay in place as backup for this round; they can retire once the reranked index ships and relevance tests confirm the autogen pathway is enough. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
mikedotexe
added a commit
that referenced
this pull request
Jul 21, 2026
Vendored from mike-docs branch sync-kv-fastdata-error-response. Picks up the kv-fastdata ApiError -> ErrorResponse rename and catches builder-docs up on the EXPERIMENTAL_receipt_to_tx page model (added in mike-docs #8). The receipt_to_tx MDX page + sidebar entry remain a separate follow-up. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NZZ9z9mCWCqXdkpupo5MnM
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.